Remove sources
|
@ -3,14 +3,19 @@
|
|||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||
set -e
|
||||
|
||||
# definie useful vars
|
||||
app=bozon
|
||||
app_path=/var/www/$app
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
|
||||
|
||||
#retrieve arguments
|
||||
save_path=$1
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
|
||||
# Backup sources & data
|
||||
sudo cp -R $app_path $save_path
|
||||
sudo cp -R $final_path $save_path/$app
|
||||
|
||||
# Copy Nginx and YunoHost parameters to make the script "standalone"
|
||||
sudo cp -a /etc/yunohost/apps/$app/. save_path/yunohost
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf save_path/nginx.conf
|
||||
sudo cp -a /etc/yunohost/apps/$app/. $save_path/yunohost
|
||||
sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf $save_path/nginx.conf
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#! /bin/bash
|
||||
|
||||
app=bozon
|
||||
|
||||
#retrieve arguments
|
||||
domain=$1
|
||||
path=$2
|
||||
|
@ -9,6 +7,11 @@ admin=$3
|
|||
is_public=$4
|
||||
default_lang=$5
|
||||
|
||||
# definie useful vars
|
||||
app=bozon
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
|
||||
# Remove trailing slash
|
||||
[ "$path" != "/" ] && path=${path%/}
|
||||
|
||||
|
@ -31,12 +34,14 @@ sudo yunohost app setting $app is_public -v "$is_public"
|
|||
sudo yunohost app setting $app domain -v "$domain"
|
||||
sudo yunohost app setting $app path -v "$path"
|
||||
|
||||
# Create path for copying
|
||||
final_path=/var/www/$app
|
||||
sudo mkdir -p $final_path
|
||||
# Download bozon
|
||||
cd $parent_path
|
||||
sudo wget https://github.com/broncowdd/BoZoN/archive/master.zip
|
||||
sudo unzip master.zip
|
||||
sudo rm master.zip
|
||||
sudo mv BoZoN-master $app
|
||||
|
||||
# Copy files to final folder and set permissions
|
||||
sudo cp -R ../sources/* $final_path/
|
||||
sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
|
|
|
@ -1,10 +1,24 @@
|
|||
#! /bin/bash
|
||||
|
||||
# definie useful vars
|
||||
app=bozon
|
||||
app_path=/var/www/$app
|
||||
save_path=$1
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
|
||||
sudo mv $save_path $app_path
|
||||
sudo chown -R www-data: $app_path/private
|
||||
sudo chown -R www-data: $app_path/uploads
|
||||
sudo chown -R www-data: $app_path/thumbs
|
||||
#retrieve arguments
|
||||
save_path=$1
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
|
||||
# move the backup
|
||||
sudo mv $save_path/$app $final_path
|
||||
|
||||
# restore permissions
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
sudo chown -R www-data: $final_path/private
|
||||
sudo chown -R www-data: $final_path/uploads
|
||||
sudo chown -R www-data: $final_path/thumbs
|
||||
|
||||
sudo cp -a $save_path/yunohost /etc/yunohost/apps/$app/.
|
||||
sudo cp -a $save_path/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
|
|
@ -1,42 +1,27 @@
|
|||
#! /bin/bash
|
||||
|
||||
app=bozon
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
|
||||
#retrieve arguments
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
path=$(sudo yunohost app setting $app path)
|
||||
admin=$(sudo yunohost app setting $app admin)
|
||||
is_public=$(sudo yunohost app setting $app is_public)
|
||||
|
||||
# Download bozon
|
||||
cd $parent_path
|
||||
sudo wget https://github.com/broncowdd/BoZoN/archive/master.zip
|
||||
sudo unzip master.zip
|
||||
sudo rm master.zip
|
||||
sudo mv BoZoN-master $app
|
||||
|
||||
# Remove trailing "/" for next commands
|
||||
path=${path%/}
|
||||
|
||||
# Copy source files
|
||||
final_path=/var/www/$app
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -a ../sources/* $final_path
|
||||
# Copy files to final folder and set permissions
|
||||
sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
|
||||
sudo rm $final_path/install.php
|
||||
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
sudo chown -R www-data: $final_path/private
|
||||
sudo chown -R www-data: $final_path/uploads
|
||||
sudo chown -R www-data: $final_path/thumbs
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
|
||||
|
||||
#configure nginx settings
|
||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
||||
# If app is public, add url to SSOWat conf as skipped_uris
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
sudo yunohost app setting $app unprotected_uris -v "/"
|
||||
fi
|
||||
|
||||
# Restart services
|
||||
sudo service nginx reload
|
||||
|
|
|
@ -1,201 +0,0 @@
|
|||
|
||||
Copyright (C) 2016 bronco@warriordudimanche.net
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
|
||||
|
||||
|
||||
|
||||
#GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
|
||||
##Version 3, 19 November 2007
|
||||
|
||||
###Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
##Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are 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.
|
||||
|
||||
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.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
|
||||
|
||||
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 Affero 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. Remote Network Interaction; Use with the GNU General Public License.
|
||||
Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
|
||||
|
||||
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 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 work with which it is combined will remain governed by version 3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU Affero 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 Affero 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 Affero 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 Affero 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
|
|
@ -1,131 +0,0 @@
|
|||
|
||||
# Version history
|
||||
## New in 2.4
|
||||
- optimisation : reduce slow down when folder tree contains a huge amount of files (tested with more than 30,000 files ^^ thx to Cyrille)
|
||||
- optimisation : reduce regen base use to reduce useless files scans (even for zip to folder option)
|
||||
- Added : volume option for playlist
|
||||
- Enhancement : unzipping file on server creates a new folder
|
||||
- Added : zip and download selection of files and folders
|
||||
- Added : in public access to a folder can now fold/unfold the folders.
|
||||
- Added : a regen base button for the admins who use FTP access instead of the bozon's upload (adds the new IDs, removes the old one and rebuilds the tree)
|
||||
- Added : a temp cleaning procedure
|
||||
- Added : a $default_temp_folder variable in config.php
|
||||
- Added : a load more button in admin list files (for those who save thousands of files in the same directory ^^ wink to Cyrille (again))
|
||||
- Added : a config variable to choose between two click on file options.
|
||||
- Enhancement : change some js functions to use my own vanillajs lib
|
||||
- Enhancement : share button will no longer appear when there's only one user
|
||||
- Enhancement : Some little changes in the design
|
||||
- Bugfix : the locked folder now works again correctly
|
||||
- Added : language choice is now saved in the user profile
|
||||
- Added : three status for users (admin/user/guest). The first user created is now superadmin.
|
||||
- Enhancement : the drag and drop fallback now accepts multiselection
|
||||
- Added : a markdown editor to quickly create a new document and share it or edit a text file (still a beta feature but it works)
|
||||
- Enhancement : users page is now available only if there's more than one user
|
||||
- Enhancement : users page design
|
||||
- Enhancement : change png icons to webfont (thx fontello ^^) 56k -> 9k \o/
|
||||
- Enhancement : change users management page (tabs instead of dialog boxes)
|
||||
- Added : Superadmin can now change the user's password
|
||||
- Added : brand new profiles rights managing; now, you can create new profiles and allow acces to specific parts of the app to those profiles.
|
||||
- Added : . and .. in file list
|
||||
- Added : download a zip from a shared folder on visitor's access
|
||||
- Added : config variable to allow or not rss/json/download from user shared access
|
||||
- Added : warnings if required libs are not installed; however, bozon can work without those libs (some functions will be disabled) and if you want to disable those warnings, go to config.php and set $disable_non_installed_libs_warning to true
|
||||
- Bugfix : encoding accents problems
|
||||
- Bugfix : refresh needed when adding or deleting a user
|
||||
- Added : config variable to use lightbox or new tab to open images/txt etc
|
||||
- Enhancement : lightbox
|
||||
- Bugfix : shared links works again
|
||||
- Enhancement/Bugfix : when you renew a shared folder id, the id will change in the shared file or will be removed from it (see $remove_item_from_users_share_when_renew_id in config.php)
|
||||
|
||||
|
||||
## New in 2.3b
|
||||
- Added : folder size limit for users (if there's no limit, the free space icon will not display)
|
||||
- Added : display free space in user's folder (this information will not display if admin or if allowed free space is set to 0)
|
||||
- Added : display folder size
|
||||
- Added : lazy load for gallery http://dinbror.dk/blazy/
|
||||
- Added : a minimalist lightbox
|
||||
- Bugfixes : links lost when moving a file/folder, video name in gallery mode...
|
||||
- Enhancement : brand new html/css structure by Eauland.
|
||||
- Enhancement : new table based file list
|
||||
- Added : some information on homepage
|
||||
- Added : qrcode on share page
|
||||
- Added : playlist audio. If a folder only contains mp3/ogg, it'll be shared as a playlist
|
||||
- Added : a shortcut to share link in links mode
|
||||
- Added : an icon to go directly to a gallery or a playlist in file mode
|
||||
- Changed : the dropzone is now hidden by default: click on upload button or drag a file on it to reveal the dropzone
|
||||
- Added : an option to easily change the colors: just change the values in template/default/css/styles.php !
|
||||
- Changed : color
|
||||
- Removed : old time forgotten javascript in stats.php
|
||||
- Added : scrolltotop from Cyril MAGUIRE
|
||||
- Added : download from url allows to specify a local filename
|
||||
- Added : a required state for important fields in dialog boxes
|
||||
- Bugfix : remove exif error on thumb generation
|
||||
- Added : sorting filelist by name or size
|
||||
- Enhancement : A burn mode id stays in burn mode when accessed by the connected owner (id will be burned only if not connected or not owner)
|
||||
- Bugfix : security bug
|
||||
- Added : multiselection to delete files/folders
|
||||
|
||||
## New in 2.2beta
|
||||
- Added : double check for the password on profile creation
|
||||
- Added : password change for user connected
|
||||
- Added : markdown display for md files
|
||||
- Added : qrcode to easily get a share on smartphone
|
||||
- Added : secured rss feed for log file
|
||||
- Added : share folders between users \o/
|
||||
- Added : changes on files/folders only allowed to the owner
|
||||
- Bugfixes: htaccess problems, catching distant file path problem, some css problems
|
||||
|
||||
## New in 2.1
|
||||
### /!\ Read carefully to avoid data loss !
|
||||
- added a top bar menu
|
||||
- added a minimalist auto gallery function: when a folder contains only images, it will be displayed as a gallery for the user.
|
||||
- bug fix on rss feed and share links
|
||||
- Added multiuser capacity ! Now, the admin (the first user) can create new users. Each user has his own separated upload folder.
|
||||
- Added a import script: beacause of multiuser change, the ID file, the upload folder, the users data has a new format...
|
||||
If you're upgrading from 2.0 or less, keep only private and upload folders, install bozon.
|
||||
When you first start, it will ask you if you want to import previous data.
|
||||
|
||||
## New in 2.0 beta
|
||||
- major changes in bozon's structure: all is called from index page
|
||||
- real home page
|
||||
- major design improvements: lighter, no more menu etc.
|
||||
- bugfixes
|
||||
- all pages'files are now in the template folder (easier to modify)
|
||||
- html files replace the variable template (easier for designers ;-)
|
||||
- language files are now seperated in a locale folder
|
||||
- language can now also be changed in user mode (not only admin)
|
||||
- default language: set at browser default if not specified in config
|
||||
|
||||
## New in 1.7.5b
|
||||
- added a function to erase no longuer used ids
|
||||
- bugfix with file with accent on first char: a basename function bug ! oO
|
||||
|
||||
## New in 1.7.5
|
||||
- change in the templates: templates are now html files, easier to modify
|
||||
- added the mode in the file list's title.
|
||||
|
||||
|
||||
## New in 1.7.4
|
||||
bug fixes (thx to chatainsim on Github)
|
||||
- #56: problem deleting a folder
|
||||
- #53: error deleting files you just uploaded
|
||||
- #55: password protection problem when a password is used for several files (caution, this fix is not compatible with old password protection)
|
||||
- disapearing files and folders until page is refreshed.
|
||||
- my blog's URL removed (too «hasbeen»: wink to eauland ;-)
|
||||
|
||||
|
||||
## New in 1.7.3
|
||||
- some bugs fixed (rename bug, home icon bug)
|
||||
- little changes on resolutions below 600 (switch from icon to list view)
|
||||
- added handheld rule for media queries
|
||||
|
||||
|
||||
## New in 1.7.2
|
||||
- new list layout (change layout in config or in menu)
|
||||
- change theme with get variable theme=xxx
|
||||
-
|
||||
|
||||
## New in 1.7
|
||||
* serious security enhancement by Oros ( https://www.ecirtam.net / https://github.com/Oros42 ) (Thanks a lot for this huge job !)
|
||||
* add: a link to clear stats
|
||||
* BEWARE! Because of the new data & files structure, all previous generated IDs will no longer be valid.
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN basic config page:
|
||||
* change if you need
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
if(!ini_get('date.timezone') ){date_default_timezone_set("Europe/Paris");} # list of timezones here http://php.net/manual/en/timezones.php Europe/Paris Europe/Madrid Europe/London etc.
|
||||
$default_language='en';
|
||||
$debug_mode=false;
|
||||
if (function_exists('navigatorLanguage')){$default_language=navigatorLanguage();}
|
||||
|
||||
#############################################################
|
||||
# Path config (change it BEFORE first start)
|
||||
#############################################################
|
||||
$default_path='uploads/'; # upload folder
|
||||
$default_private='private/'; # private folder
|
||||
$default_id_file=$default_private.'/id.php'; # IDs file name
|
||||
$default_temp_folder=$default_private.'/temp/'; # temp folder path
|
||||
$default_users_rights_file=$default_private.'/users_rights_file.php'; # IDs file name
|
||||
$default_profiles_rights_file=$default_private.'/profiles_rights.php'; # profiles rights file name
|
||||
$default_folder_share_file=$default_private.'/folder_share.php'; # IDs file name
|
||||
$default_stat_file=$default_private.'/stats_log.php'; # stats file name
|
||||
|
||||
#############################################################
|
||||
# Aspect config
|
||||
#############################################################
|
||||
$default_theme='default'; # you can make your own bozon design and set this variable with the folder skin's name inside the design folder
|
||||
$default_aspect='list'; # «icon»/«list»
|
||||
$default_mode='view';
|
||||
$gallery_thumbs_width=256;
|
||||
$show_back_button=true; # show previous folder button
|
||||
|
||||
#############################################################
|
||||
# Behaviour config
|
||||
#############################################################
|
||||
$default_max_lines_per_page_on_stats_page=100;
|
||||
$default_limit_stat_file_entries=10000;
|
||||
$default_max_files_per_page=100;
|
||||
$disable_non_installed_libs_warning=false;
|
||||
$allow_folder_size_stat=true; # show folder size (put false if you have a big slowdown with huge amount of files)
|
||||
$allow_shared_folder_RSS_feed=true; # Visitor can access to the rss feed of a shared folder
|
||||
$allow_shared_folder_JSON_feed=true; # Visitor can access to the json feed of a shared folder
|
||||
$allow_shared_folder_download=true; # Visitor can download a shared folder as a zip
|
||||
$click_on_link_to_download=true; # true= download a file by clicking on it, false= open file in new tab (img/pdf etc)
|
||||
$check_ID_base_on_page_load=false; # true= the base will be checked for deleted files / added files and problems with IDs on each page load: put false if you see a slow down when you have a huge amout of files and folders.
|
||||
$allow_unknown_filetypes=true; # true= allow exotic filetypes (when filetype mime is not recognised)
|
||||
$use_lightbox=true; # false= view in a new tab
|
||||
$remove_item_from_users_share_when_renew_id=false; # false= id will be updated in share file, true= id will be removed from share file
|
||||
|
||||
#############################################################
|
||||
# Profiles config
|
||||
#############################################################
|
||||
$default_profile_folder_max_size=50; # false = infinite or specify in MB
|
||||
|
||||
?>
|
|
@ -1,9 +0,0 @@
|
|||
## Contributors
|
||||
|
||||
- [aledeg](https://github.com/aledeg)
|
||||
- [ankerfest](https://github.com/ankerfest)
|
||||
- [eauland](https://github.com/eauland)
|
||||
- [Oros42](https://github.com/Oros42)
|
||||
|
||||
## Special thanks
|
||||
- [Cyrille Borne](https://github.com/cborne) (http://www.cyrille-borne.com): without your comments, issues reporting and enhancement ideas this app would never have been so complete ;-)
|
|
@ -1,4 +0,0 @@
|
|||
Order Allow,Deny
|
||||
<FilesMatch "\.(js)$">
|
||||
Allow from all
|
||||
</FilesMatch>
|
|
@ -1,76 +0,0 @@
|
|||
<?php
|
||||
# Array2feed
|
||||
# @author: bronco@warriordudimanche.net
|
||||
# @version 0.1 (alpha: I'm testing but it works ^^)
|
||||
# @license free and opensource
|
||||
# @inspired by http://milletmaxime.net/syndexport/
|
||||
# @use: $items=feed2array('http://sebsauvage.net/links/index.php?do=rss');
|
||||
# @doc:
|
||||
# the array must have an index 'infos' and another called 'items'
|
||||
#info key
|
||||
# for rss type feed, infos must have at least the 'title', 'description', 'guid' keys
|
||||
# for atom type feed, infos must have at least the 'title', 'id', 'subtitle', 'link' keys
|
||||
# items key => array
|
||||
# for rss type feed, each item must have the 'title', 'description', 'pubDate' and 'link' keys
|
||||
# for atom type feed, info must have the 'title', 'id', 'updated, 'link' & 'content' keys
|
||||
function makeRSSdate($date=NULL){// format DD-MM-YY HH:MM => rfc2822 (rss compatible)
|
||||
if ($date){
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
$time = strtotime($date);
|
||||
return date("r", $time);
|
||||
}
|
||||
}
|
||||
function no_nl($string){$tab = array( CHR(13) => " ", CHR(10) => " " ); return strtr($string,$tab); }
|
||||
function array2feed($array=null){
|
||||
|
||||
|
||||
if (!$array){return false;}
|
||||
if (empty($array['infos']['type'])){$array['infos']['type']='rss';}else{$array['infos']['type']=strtolower($array['infos']['type']);}
|
||||
if (empty($array['infos']['description'])){$array['infos']['description']='';}
|
||||
$r="\n";$t="\t";
|
||||
$tpl=array('rss'=>array(),'atom'=>array());
|
||||
$tpl['rss']['header']='<?xml version="1.0" encoding="utf-8"?>'.$r.'<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">'
|
||||
.$r.$t.'<channel>'.$r;
|
||||
$tpl['atom']['header']='<feed xmlns="http://www.w3.org/2005/Atom">'.$r;
|
||||
$tpl['rss']['footer']=$t.'</channel></rss>'.$r;
|
||||
$tpl['atom']['footer']='</feed>'.$r;
|
||||
$tpl['rss']['content-type']='Content-Type: application/rss+xml; charset=utf-8';
|
||||
$tpl['atom']['content-type']='Content-Type: application/atom+xml; charset=utf-8';
|
||||
|
||||
header($tpl[$array['infos']['type']]['content-type']);
|
||||
$feed=$tpl[$array['infos']['type']]['header'];
|
||||
//create the feed's info content
|
||||
foreach($array['infos'] as $key=>$value){
|
||||
if ($array['infos']['type']=='atom'){ // ATOM
|
||||
if ($key=='link'){$feed.=$t.$t.'<link href="'.$value.'" rel="self" type="application/atom+xml"/>'.$r;}
|
||||
elseif ($key=='author'){$feed.=$t.$t.'<author><name>'.$value.'</name></author>'.$r;}
|
||||
elseif ($key=='licence'){$feed.=$t.$t.'<'.$key.' href="'.$value.'" rel="license"/>'.$r;} // in atom feed, licence is the link to the licence type
|
||||
elseif ($key!='version'&&$key!='type'){$feed.=$t.$t.'<'.$key.'>'.$value.'</'.$key.'>'.$r;}
|
||||
}else{ // RSS
|
||||
if ($key!='version'&&$key!='type'){$feed.=$t.$t.'<'.$key.'>'.$value.'</'.$key.'>'.$r;}
|
||||
}
|
||||
}
|
||||
|
||||
//then the items content
|
||||
foreach ($array['items'] as $item){
|
||||
if ($array['infos']['type']=='atom'){ $feed.=$t.$t.$t.'<entry>'.$r;}else{$feed.=$t.$t.$t.'<item>'.$r;}
|
||||
foreach($item as $key=>$value){
|
||||
if ($array['infos']['type']=='atom'){ // ATOM
|
||||
if ($key=='link'){$feed.=$t.$t.$t.$t.'<link href="'.$value.'" rel="alternate" type="text/html"/>'.$r;}
|
||||
elseif ($key=='content'){$feed.=$t.$t.$t.$t.'<content type="text">'.htmlspecialchars($value).'</content>'.$r;}
|
||||
elseif (!empty($value)){$feed.=$t.$t.$t.$t.'<'.$key.'>'.no_nl($value).'</'.$key.'>'.$r;}
|
||||
}else{ // RSS
|
||||
if ($key=='pubDate'||$key=='title'||$key=='link'){$feed.=$t.$t.$t.$t.'<'.$key.'>'.htmlspecialchars($value).'</'.$key.'>'.$r;}
|
||||
elseif ($key=='date'){}
|
||||
elseif($key=='guid'){ $feed.=$t.$t.$t.$t.'<guid isPermaLink="false"><![CDATA['.$value.']]></guid>'.$r;}
|
||||
elseif(!empty($value)){$feed.=$t.$t.$t.$t.'<'.$key.'><![CDATA['.no_nl($value).']]></'.$key.'>'.$r;}
|
||||
}
|
||||
}
|
||||
if ($array['infos']['type']=='atom'){ $feed.=$t.$t.$t.'</entry>'.$r;}else{$feed.=$t.$t.$t.'</item>'.$r;}
|
||||
}
|
||||
|
||||
|
||||
$feed.=$tpl[$array['infos']['type']]['footer'];
|
||||
echo $feed;
|
||||
}
|
||||
?>
|
|
@ -1,367 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN GET/POST page:
|
||||
* handles the GET & POST data
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
|
||||
# avoid user control: only admin
|
||||
if (!function_exists('newToken')||!is_user_connected()){exit;}
|
||||
|
||||
######################################################################
|
||||
# $_GET DATA
|
||||
######################################################################
|
||||
|
||||
# edit file (for editor page)
|
||||
if (!empty($_GET['file'])&!empty($_GET['p'])&&$_GET['p']=='editor'&&is_allowed('markdown editor')){
|
||||
$file=id2file($_GET['file']);
|
||||
if (!empty($file)&&is_file($file)){
|
||||
$editor_content=file_get_contents($file);}else{$editor_content='';$file='';
|
||||
if (!is_writable($file)){$msg='<div class="error">'.$file.' '.e('is not writable',false).'</div>';}
|
||||
}
|
||||
}
|
||||
|
||||
# regen tree
|
||||
if (isset($_GET['regen'])){
|
||||
$ids=updateIDs($ids,$_GET['regen']);
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# unzip: convert zip file to folder
|
||||
if (!empty($_GET['unzip']) && trim($_GET['unzip'])!==false && $_SESSION['zip']){
|
||||
$id=$_GET['unzip'];
|
||||
$zipfile=id2file($id);
|
||||
$folder=str_ireplace('.zip','',_basename($zipfile));
|
||||
$id=new_folder($folder);
|
||||
$destination=id2file($id);
|
||||
unzip($zipfile,$destination);
|
||||
$sdi=array_flip($ids);
|
||||
$unzipped_content=recursive_glob($destination);
|
||||
foreach ($unzipped_content as $item){
|
||||
if (empty($sdi[$item])){$ids[uniqid(true)]=$item;}
|
||||
}
|
||||
store($ids);
|
||||
//$ids=updateIDs($ids,$id);
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# renew file id
|
||||
if (!empty($_GET['renew']) && trim($_GET['renew'])!==false&&is_owner($_GET['renew'])){
|
||||
$old_id=$_GET['renew'];
|
||||
$path=id2file($old_id);
|
||||
unset($ids[$old_id]);
|
||||
$new_id=addID($path,$ids);
|
||||
# change in share folder
|
||||
|
||||
if (is_dir($path)){
|
||||
$shares=load_folder_share();
|
||||
$save=false;
|
||||
foreach ($shares as $user=>$data){
|
||||
if (!empty($data[$old_id])){
|
||||
if (!$remove_item_from_users_share_when_renew_id){
|
||||
$shares[$user][$new_id]=$data[$old_id];
|
||||
}
|
||||
unset($shares[$user][$old_id]);$save=true;
|
||||
}
|
||||
}
|
||||
if ($save){save_folder_share($shares);}
|
||||
}
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# create burn after acces state
|
||||
if (!empty($_GET['burn']) && trim($_GET['burn'])!==false&&is_owner($_GET['burn'])){
|
||||
$id_to_burn=$_GET['burn'];
|
||||
$path=id2file($id_to_burn);
|
||||
unset($ids[$id_to_burn]);
|
||||
if ($id_to_burn[0]!='*'){
|
||||
$ids['*'.$id_to_burn]=$path;
|
||||
}else{
|
||||
$ids[str_replace('*','',$id_to_burn)]=$path;
|
||||
}
|
||||
store($ids);
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# subfolder path
|
||||
if (!empty($_GET['path']) && trim($_GET['path'])!==false){
|
||||
$path=$_GET['path'];
|
||||
if($path=='/'){
|
||||
$path='';
|
||||
}
|
||||
if(check_path($path)){
|
||||
$_SESSION['current_path']=$path;
|
||||
}
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# search/filter
|
||||
if (!empty($_GET['filter'])){
|
||||
$_SESSION['filter']=$_GET['filter'];
|
||||
}else{
|
||||
$_SESSION['filter']='';
|
||||
}
|
||||
|
||||
# file mode
|
||||
if (!empty($_GET['mode'])){
|
||||
$_SESSION['mode']=$_GET['mode'];
|
||||
}elseif (empty($_SESSION['mode'])){
|
||||
$_SESSION['mode']='view';
|
||||
}
|
||||
|
||||
# create a new subfolder
|
||||
if (!empty($_GET['newfolder'])){
|
||||
$folder=$_GET['newfolder'];
|
||||
if(check_path($folder)){
|
||||
$tree=add_branch($folder,new_folder($folder)); # $path,$id
|
||||
header('location:index.php?p=admin&msg='.$folder.' '.e('created',false).'&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# get file from url
|
||||
if (!empty($_GET['url'])&&$_GET['url']!='' && $_SESSION['curl']){
|
||||
if ($content=file_curl_contents($_GET['url'])){
|
||||
if (empty($_GET['filename'])){
|
||||
$basename=_basename($_GET['url']);
|
||||
}else{
|
||||
$basename=no_special_char($_GET['filename']);
|
||||
}
|
||||
|
||||
$folder_path=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path'].'/';
|
||||
$filename=$folder_path.$basename;
|
||||
if(is_file($filename)){
|
||||
$filename=$folder_path.rename_item($filename,$folder_path);
|
||||
}
|
||||
file_put_contents($filename,$content);
|
||||
|
||||
$tree=add_branch($filename,addID($filename));
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}else{$message.='<div class="error">'.e('Problem accessing remote file.',false).'</div>';}
|
||||
}
|
||||
|
||||
# delete SINGLE file/folder
|
||||
if (!empty($_GET['del'])&&$_GET['del']!=''&&is_owner($_GET['del'])){
|
||||
$tree=delete_file_or_folder($_GET['del'],$ids,$tree);
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# rename file/folder
|
||||
if (!empty($_GET['id'])&&!empty($_GET['newname'])&&is_owner($_GET['id'])){
|
||||
$oldfile=id2file($_GET['id']);
|
||||
$path=dirname($oldfile).'/';
|
||||
$newfile=$path.no_special_char($_GET['newname']);
|
||||
if ($newfile!=$oldfile && check_path($newfile)){
|
||||
# if newname exists, change newname
|
||||
if(is_file($newfile) || is_dir($newfile)){aff($newfile.' '.$oldfile);
|
||||
$newfile=$path.rename_item(_basename($newfile),$path);
|
||||
}
|
||||
if (is_dir($oldfile)){
|
||||
# for folders, must change the path in all sub items
|
||||
$old=$oldfile;
|
||||
$old.='/';
|
||||
foreach($ids as $id=>$path){
|
||||
if (strpos($path,$old)!==false){$ids[$id]=str_replace($old, $newfile.'/', $path);}
|
||||
}
|
||||
|
||||
};
|
||||
$ids[$_GET['id']]=$newfile;
|
||||
store($ids);
|
||||
rename($oldfile,$newfile);
|
||||
if (is_file(get_thumbs_name($oldfile))){rename(get_thumbs_name($oldfile),get_thumbs_name($newfile));}
|
||||
$tree=rename_branch($newfile,$oldfile,$_GET['id'],$_SESSION['login'],$tree);
|
||||
}
|
||||
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# zip and download a folder
|
||||
if (!empty($_GET['zipfolder']) && $_SESSION['zip']){
|
||||
$folder=id2file($_GET['zipfolder']);
|
||||
if (!is_dir($_SESSION['temp_folder'])){mkdir($_SESSION['temp_folder']);}
|
||||
$zipfile=$_SESSION['temp_folder'].return_owner($_GET['zipfolder']).'-'._basename($folder).'.zip';
|
||||
zip($folder,$zipfile);
|
||||
header('location: '.$zipfile);
|
||||
exit;
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# $_POST DATA
|
||||
######################################################################
|
||||
# Move file folder
|
||||
if (!empty($_POST['file'])&&!empty($_POST['destination'])){
|
||||
# init
|
||||
$destination=$to=$_POST['destination'];
|
||||
$file=$_POST['file'];$me=_basename($file);
|
||||
if($destination=='/'){ $destination=''; }
|
||||
if($file=='/'){ $file=''; }
|
||||
$file_with_path=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$file;
|
||||
$destination=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$destination;
|
||||
|
||||
if (check_path($file) && check_path($destination)){
|
||||
if (is_file($file_with_path)){$file=$file_with_path;}
|
||||
$file=$file_with_path;
|
||||
$file=stripslashes($file);
|
||||
$destination_temp = addslash_if_needed($destination)._basename($file);
|
||||
# if file/folder exists in destination folder, change name
|
||||
if(is_file($destination_temp) || is_dir($destination_temp)){
|
||||
$destination_temp=addslash_if_needed($destination).rename_item(_basename($file),$destination);
|
||||
}
|
||||
$destination=$destination_temp;
|
||||
|
||||
if (!is_dir(dirname('thumbs/'.$destination))){
|
||||
mkdir(dirname('thumbs/'.$destination),0744, true);
|
||||
}
|
||||
@rename(get_thumbs_name($file_with_path),get_thumbs_name($destination));
|
||||
|
||||
if (is_file($file_with_path)){
|
||||
# change path in id
|
||||
$id=file2id($file_with_path);
|
||||
$ids=unstore();
|
||||
$ids[$id]=$destination;
|
||||
store($ids);
|
||||
rename($file_with_path,$destination);
|
||||
$tree=rename_branch($destination,$file_with_path,$id,$_SESSION['login'],$tree);
|
||||
}elseif(is_dir($file_with_path)){
|
||||
# change path in id and all files/folders in the moved folder
|
||||
$id=file2id($file_with_path);
|
||||
$ids=unstore();
|
||||
$ids[$id]=$destination;
|
||||
$destination=$destination.'/';
|
||||
$file=$file.'/';
|
||||
foreach($ids as $id=>$path){
|
||||
if (strpos($path, $file)!==false){$ids[$id]=str_replace($file,$destination, $path);}
|
||||
}
|
||||
store($ids);
|
||||
rename($file_with_path,$destination);
|
||||
$tree=rename_branch($destination,$file_with_path,$id,$_SESSION['login'],$tree);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
header('location:index.php?p=admin&msg='.$me.' '.e('moved to',false).' '.$to.'&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# Delete multiselection
|
||||
if (!empty($_POST['item']) && !empty($_POST['multiselect_command']) && $_POST['multiselect_command']=='delete'){
|
||||
foreach ($_POST['item'] as $key => $item) {
|
||||
if (is_owner($item)){
|
||||
$tree=delete_file_or_folder($item,$ids);
|
||||
}
|
||||
}
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# zip multiselection
|
||||
if (!empty($_POST['item']) && !empty($_POST['multiselect_command']) && $_POST['multiselect_command']=='zip' && $_SESSION['zip']){
|
||||
$zipfile=$_SESSION['temp_folder'].'Bozon_pack'.date('d-m-Y h-i-s').'.zip';
|
||||
$file_list=array();
|
||||
foreach ($_POST['item'] as $key => $item) {
|
||||
$file_list[]=id2file($item);
|
||||
}
|
||||
if (!is_dir($_SESSION['temp_folder'])){mkdir($_SESSION['temp_folder']);}
|
||||
zip($file_list,$zipfile);
|
||||
header('location: '.$zipfile);
|
||||
exit;
|
||||
}
|
||||
|
||||
# Lock folder with password
|
||||
if (!empty($_POST['password'])&&!empty($_POST['id'])&&is_owner($_POST['id'])){
|
||||
$id=$_POST['id'];
|
||||
$file=id2file($id);
|
||||
$password=blur_password($_POST['password']);
|
||||
# turn normal share id into password hashed id
|
||||
$ids=unstore();
|
||||
unset($ids[$id]);
|
||||
$ids[$password.$id]=$file;
|
||||
store($ids);
|
||||
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# Handle folder share with users
|
||||
if (!empty($_GET['users'])&&!empty($_GET['share'])&&is_owner($_GET['share'])){
|
||||
$folder_id=$_GET['share'];
|
||||
$users=$auto_restrict['users'];
|
||||
unset($users[$_SESSION['login']]);
|
||||
$shared_with=load_folder_share();
|
||||
$sent=array_flip($_GET['users']);
|
||||
foreach ($users as $login=>$data){
|
||||
if (isset($sent[$login])){
|
||||
# User checked: add share
|
||||
$shared_with[$login][$folder_id]=array('folder'=>id2file($folder_id),'from'=>$_SESSION['login']);
|
||||
}else{
|
||||
# User not checked: remove share if exists
|
||||
if (isset($shared_with[$login][$folder_id])){unset($shared_with[$login][$folder_id]);}
|
||||
}
|
||||
}
|
||||
save_folder_share($shared_with);
|
||||
header('location:index.php?p=admin&token='.TOKEN);
|
||||
exit;
|
||||
}
|
||||
|
||||
# Handle users rights
|
||||
if (isset($_POST['user_right'])&&is_allowed('change status rights')){
|
||||
foreach($_POST['user_right'] as $key=>$user_nb){
|
||||
$users_rights[$_POST['user_name'][$key]]=$user_nb;
|
||||
}
|
||||
save_users_rights($users_rights);
|
||||
header('location:index.php?p=users&token='.TOKEN.'&msg='.e('Changes saved',false));
|
||||
exit;
|
||||
}
|
||||
|
||||
# Handle superadmin request for users pass change
|
||||
if (isset($_POST['user_pass'])&&is_allowed('change passes')){
|
||||
foreach($_POST['user_pass'] as $key=>$pass){
|
||||
if (!empty($_POST['user_pass'][$key])&&!empty($_POST['user_name'][$key])){
|
||||
$auto_restrict['users'][$_POST['user_name'][$key]]['pass'] = hash('sha512', $auto_restrict['users'][$_POST['user_name'][$key]]['salt'].$pass);
|
||||
}
|
||||
}
|
||||
save_users();
|
||||
header('location:index.php?p=edit_profiles&token='.TOKEN.'&msg='.e('Changes saved',false));
|
||||
exit;
|
||||
}
|
||||
|
||||
# Handle profile's rights change
|
||||
if (isset($_POST['profile_name'])&&is_allowed('change user status')){
|
||||
$rights=array();
|
||||
foreach($_POST['profile_name'] as $num=>$profile){
|
||||
if (!empty($_POST[$num])){
|
||||
foreach($_POST[$num] as $allowed){$rights[$profile][$allowed]=1;}
|
||||
}else{$rights[$profile]=array();}
|
||||
}
|
||||
save($_SESSION['profiles_rights_file'],$rights);
|
||||
header('location:index.php?p=edit_profiles&token='.TOKEN.'&msg='.e('Changes saved',false));
|
||||
exit;
|
||||
}
|
||||
|
||||
# Editor
|
||||
if (isset($_POST['editor_content'])&&!empty($_POST['editor_filename'])&&is_allowed('markdown editor')){
|
||||
$extension=pathinfo($_POST['editor_filename'],PATHINFO_EXTENSION);
|
||||
if (empty($extension)){$_POST['editor_filename'].='.md';}
|
||||
$file=no_special_char($_POST['editor_filename']);
|
||||
$path=addslash_if_needed($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path']);
|
||||
if (is_file($path.$file)&&!isset($_POST['overwrite'])){$file=rename_item($file,$path);}
|
||||
file_put_contents($path.$file, $_POST['editor_content']);
|
||||
if (!isset($_POST['overwrite'])){
|
||||
$id=addID($path.$file);
|
||||
$tree=add_branch($path.$file,$id,$_SESSION['login'],$tree);
|
||||
}
|
||||
header('location:index.php?p=admin&token='.TOKEN.'&msg='.$_POST['editor_filename'].' '.e('Changes saved',false));
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_FILES&&is_allowed('upload')){include('core/auto_dropzone.php');exit();}
|
||||
?>
|
|
@ -1,469 +0,0 @@
|
|||
<?php
|
||||
if (session_id()==''){session_start();}
|
||||
if (!is_file('core.php')){$path_core='core/';}else{$path_core='';}
|
||||
/* Auto_dropzone.php v1.5 # Version Bozon !!!!!!!!!
|
||||
author: Bronco
|
||||
email: bronco@warriordudimanche.net
|
||||
web: http://warriordudimanche.net
|
||||
licence: free & free ^^ (feel free to use & modify for free)
|
||||
|
||||
based on http://www.script-tutorials.com/html5-drag-and-drop-multiple-file-uploader/
|
||||
|
||||
New in 1.4:
|
||||
----------------------------------------------
|
||||
- multiselection for fallback
|
||||
|
||||
New in 1.3:
|
||||
----------------------------------------------
|
||||
- fixed config changes conflict
|
||||
New in 1.2:
|
||||
- handle form upload errors
|
||||
- handle minimal filesize (script config/php.ini value)
|
||||
- handle automatic refresh when no errors
|
||||
|
||||
configuration / init
|
||||
----------------------------------------------
|
||||
you can configure outside this script, before the include('auto_dropzone.php');
|
||||
with this kind of init:
|
||||
|
||||
$auto_dropzone=array(
|
||||
'destination_filepath'=>'path/to/',
|
||||
'dropzone_text'=>'D&D here !',
|
||||
'dropzone_id'=>'drop_images',
|
||||
'dropzone_class'=>'drop_images',
|
||||
'forbidden_filetypes'=>'exe,php',
|
||||
'use_style'=>true, // false if you're using an css file
|
||||
);
|
||||
|
||||
'destination_filepath' key:'destination_filepath'=>"$_SESSION['upload_root_path']/" (with ending slash)
|
||||
if not specified, the destination folder will be destination/ (created on the first start)
|
||||
you also can set specific paths for each mime type like that
|
||||
'destination_filepath'=>array('gif'=>'path/to/gif/','png'=>'path/to/png/' ... )
|
||||
|
||||
'forbidden_filetypes' key: restrict allowed filetypes (separated with ,)
|
||||
----------------------------------------------
|
||||
|
||||
* this is the default config
|
||||
*/
|
||||
|
||||
// Configuration
|
||||
$phpini=ini_get_all();
|
||||
$default_config=array(
|
||||
'forbidden_filetypes'=>'php',
|
||||
'allow_unknown_filetypes'=>$allow_unknown_filetypes,
|
||||
'use_style'=>false, // false if you're using a external css file
|
||||
'auto_refresh_after_upload'=>true, // auto refresh page after uploading files (except on errors)
|
||||
'max_length'=>2048, // Mo (see php.ini if changes doesn't work [post_max_size / upload_max_filesize])
|
||||
'dropzone_text'=>e('Drop your files here or click to select a local file',false),
|
||||
'dropzone_id'=>'dropArea',
|
||||
'dropzone_class'=>'dropArea',
|
||||
'destination_filepath'=>$_SESSION['current_path'].'/', // this can be an array like 'jpg'=>'upload/jpeg/' or a string 'destination/'
|
||||
'my_filepath'=>'index.php'//$_SERVER['SCRIPT_NAME'],
|
||||
);
|
||||
|
||||
foreach($default_config as $key=>$val){
|
||||
// create or complete config var
|
||||
if(!isset($auto_dropzone[$key])){ $auto_dropzone[$key]=$auto_dropzone[$key]=$val;}
|
||||
|
||||
// has config changed ?
|
||||
if (!isset($_SESSION[$key]) || $auto_dropzone[$key]!=$_SESSION[$key]){ $_SESSION[$key]=$auto_dropzone[$key];}
|
||||
}
|
||||
|
||||
if (!is_array($auto_dropzone['destination_filepath'])&&!is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'])){
|
||||
mkdir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'],0744);file_put_contents($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'].'index.html','');
|
||||
}
|
||||
|
||||
// Handle the unit (M/G) in max post/upload size
|
||||
$ini_max_upload=$phpini['upload_max_filesize']['global_value'];
|
||||
if (strpos($ini_max_upload,'G')!=false){$ini_max_upload=intval($ini_max_upload*1024);}
|
||||
else{$ini_max_upload=intval($ini_max_upload);}
|
||||
$ini_max_post=$phpini['post_max_size']['global_value'];
|
||||
if (strpos($ini_max_post,'G')!=false){$ini_max_post=intval($ini_max_post*1024);}
|
||||
else{$ini_max_post=intval($ini_max_post);}
|
||||
|
||||
$max=min($auto_dropzone['max_length'],$ini_max_upload,$ini_max_post);
|
||||
$_SESSION['max_size']=$max;
|
||||
$file_length_error=e('Error, max filelength:',false).' '.$max.' Mo';
|
||||
$file_format_error=e(': Error, forbidden file format !',false);
|
||||
|
||||
$auto_dropzone_error=false;
|
||||
|
||||
// uploading files
|
||||
if (!empty($_FILES)){
|
||||
|
||||
// HANDLE UPLOAD
|
||||
function bytesToSize1024($bytes, $precision = 2) {
|
||||
if (!empty($bytes)){
|
||||
$unit = array('B','KB','MB');
|
||||
return @round($bytes / pow(1024, ($i = floor(log($bytes, 1024)))), $precision).' '.$unit[$i];
|
||||
}else{return false;}
|
||||
}
|
||||
function error2msg($e){
|
||||
if ($e>0&&$e<7){
|
||||
$errors=array(
|
||||
1=>e('The file to big for the server\'s config',false),
|
||||
2=>e('The file to big for this page',false),
|
||||
3=>e('There was a problem during upload (file was truncated)',false),
|
||||
4=>e('No file upload',false),
|
||||
5=>e('No temp folder',false),
|
||||
6=>e('Write error on server',false),
|
||||
);
|
||||
return $errors[$e];
|
||||
}else if ($e>7){return true;}
|
||||
else{return false;}
|
||||
}
|
||||
function secure($file){
|
||||
return preg_replace('#(.+)\.php#i','$1.SPHP',$file);
|
||||
}
|
||||
|
||||
if (isset($_FILES['myfile']) && strtolower($_FILES['myfile']['name'])!="index.html") {
|
||||
$sFileName = secure($_FILES['myfile']['name']);
|
||||
$sFileType = $_FILES['myfile']['type'];
|
||||
$sFileSize = intval(bytesToSize1024($_FILES['myfile']['size'], 1));
|
||||
$sFileError = error2msg($_FILES['myfile']['error']);
|
||||
$sFileExt = pathinfo($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,PATHINFO_EXTENSION);
|
||||
|
||||
#########################################################################
|
||||
# ADDED FOR BOZON
|
||||
#########################################################################
|
||||
if (!function_exists('folder_fit')){include($path_core.'core.php');}
|
||||
if (!folder_fit(null,$_FILES['myfile']['size'],$_SESSION['login'])){
|
||||
# uploaded file doesn't fit in user's folder
|
||||
if (!isset($_SESSION['ERRORS'])){$_SESSION['ERRORS']='';}
|
||||
$error='<li class="DD_file DD_error">
|
||||
<span class="DD_filename">'.$sFileName.'</span>
|
||||
[<em class="DD_filetype">'.$sFileType.'</em>,
|
||||
<em class="DD_filesize">'.$sFileSize.'</em>] '.e('The file doesn\'t fit',false).'
|
||||
</li>';
|
||||
$_SESSION['ERRORS'].=$error;
|
||||
exit($error);
|
||||
}
|
||||
#########################################################################
|
||||
|
||||
$ok='<li class="DD_file DD_success '.$sFileExt.'">
|
||||
<span class="DD_filename">'.$sFileName.'</span>
|
||||
[<em class="DD_filetype">'.$sFileType.'</em>,
|
||||
<em class="DD_filesize">'.$sFileSize.'</em>] [OK]
|
||||
</li>';
|
||||
$notok='<li class="DD_file DD_error">
|
||||
<span class="DD_filename">'.$sFileName.'</span>
|
||||
[<em class="DD_filetype">'.$sFileType.'</em>,
|
||||
<em class="DD_filesize">'.$sFileSize.'</em>] '.e('Upload error',false).'
|
||||
</li>';
|
||||
if (
|
||||
is_array($auto_dropzone['destination_filepath'])
|
||||
&&!empty($auto_dropzone['destination_filepath'][$sFileExt])
|
||||
&&is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'][$sFileExt])
|
||||
){
|
||||
$sFileName = $auto_dropzone['destination_filepath'][$sFileExt].$sFileName;
|
||||
echo $ok;
|
||||
rename($_FILES['myfile']['tmp_name'], $_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName );
|
||||
chmod($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,0644);
|
||||
}elseif(
|
||||
is_array($auto_dropzone['destination_filepath'])
|
||||
&&!empty($auto_dropzone['destination_filepath'][$sFileExt])
|
||||
&&!is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'][$sFileExt])
|
||||
||
|
||||
is_string($auto_dropzone['destination_filepath'])
|
||||
&&!is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'])
|
||||
){
|
||||
//local upload dir error
|
||||
echo '<li class="DD_file DD_error"><span class="DD_filename">Upload path problem with '.$sFileName.' </span></li> ';
|
||||
|
||||
}elseif($sFileError){
|
||||
// file upload error
|
||||
echo '<li class="DD_file DD_error"><span class="DD_filename">'.$sFileName.': '.$sFileError.' </span></li> ';
|
||||
|
||||
} elseif(is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'])){
|
||||
$file=$sFileName;
|
||||
$sFileName = $auto_dropzone['destination_filepath'].$sFileName;
|
||||
if (is_file($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName)){
|
||||
$newfilename=rename_item($file,$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath']);
|
||||
echo '<li class="DD_file DD_warning"><span class="DD_filename">'.$file.' => '.$newfilename.' </span></li>';
|
||||
$sFileName=$auto_dropzone['destination_filepath'].$newfilename;
|
||||
}
|
||||
echo $ok;
|
||||
rename($_FILES['myfile']['tmp_name'], $_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName );
|
||||
chmod($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,0644);
|
||||
$id=addID($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName);
|
||||
$tree=add_branch($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,$id,$_SESSION['login'],$tree);
|
||||
}
|
||||
} else {
|
||||
echo $notok;
|
||||
}
|
||||
exit();
|
||||
}else{
|
||||
// GENERATE DROPZONE
|
||||
if ($auto_dropzone['use_style']){
|
||||
echo '
|
||||
<style>
|
||||
.DD_dropzone{
|
||||
font-family:courier;cursor:pointer;
|
||||
text-shadow:0 2px 1px white;
|
||||
box-sizing: border-box;
|
||||
text-align:center;
|
||||
box-shadow:inset 0 2px 3px;
|
||||
margin:5px;padding:20px;
|
||||
width:100%;min-height:100px;
|
||||
border-radius:3px;border:3px dashed darkblue;
|
||||
background-color:#99F;
|
||||
}
|
||||
.DD_uploading{ background-color:orange;}
|
||||
.DD_hover{background-color:yellow;box-shadow:inset 0 4px 8px;}
|
||||
.DD_text{font-size:30px;margin:15px 0;font-weight:bold;text-shadow:0 2px 2px white;}
|
||||
.DD_file,.DD_error{padding:10px;box-sizing: border-box;border-radius:3px;box-shadow:0 1px 2px #0A0;display:block;margin-bottom:5px;}
|
||||
.DD_success{background-color:#0F0;}
|
||||
.DD_error{font-weight:bold;background-color:#F00;color:white;box-shadow:0 1px 2px #F00;text-shadow: 0 1px 1px maroon}
|
||||
.DD_info{font-size:12px;text-align:left;}
|
||||
.DD_info li.DD_file{list-style:none;}
|
||||
#DD_progressbar{
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
box-sizing: border-box;
|
||||
border-radius:3px;
|
||||
padding:3px 0;
|
||||
text-align:center;
|
||||
background-color:#3f3;
|
||||
box-shadow:0 0 3px #0F0;
|
||||
height:20px;width:0%
|
||||
}
|
||||
.DD_hidden{display:none;
|
||||
</style>
|
||||
';
|
||||
}
|
||||
?>
|
||||
<div style="clear:both"></div>
|
||||
<div id="upload" class="hidden">
|
||||
<div class="<?php echo $auto_dropzone['dropzone_class']; ?> DD_dropzone" id="<?php echo $auto_dropzone['dropzone_id'];?>">
|
||||
<header class="DD_text"><?php echo $auto_dropzone['dropzone_text'];?><br/><em>(max:<?php echo $max;?> Mo)</em></header>
|
||||
|
||||
<div class="DD_info">
|
||||
<div id="result"></div>
|
||||
<div id="DD_progressbar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="index.php" method="post" enctype="multipart/form-data" id="DD_fallback_form">
|
||||
<input type="file" name="myfile[]" id="fileToUpload" class="DD_hidden" multiple="true"/>
|
||||
<input type="hidden" value="fallback" name="fallback"/>
|
||||
<input type="submit" id="DD_submit" class="DD_hidden"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.body.addEventListener("dragover",function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
},false);
|
||||
document.body.addEventListener("drop",function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
},false);
|
||||
|
||||
// variables
|
||||
var dropArea = document.getElementById('<?php echo $auto_dropzone['dropzone_id'];?>');
|
||||
var bar = document.getElementById('DD_progressbar');
|
||||
var result = document.getElementById('result');
|
||||
var list = [];
|
||||
var totalSize = 0;
|
||||
var totalProgress = 0;
|
||||
var uploading = false;
|
||||
|
||||
function reload_list(){
|
||||
//reload list
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET','index.php?refresh&token=<?php newToken(true);?>', true);
|
||||
target=document.getElementById('list_files');
|
||||
request.onload = function() {
|
||||
if (request.status >= 200 && request.status < 400) {
|
||||
// Success!
|
||||
target.innerHTML= request.responseText;
|
||||
} else {
|
||||
target.innerHTML= 'erreur de rechargement de la liste'
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
request.onerror = function() {
|
||||
// There was a connection error of some sort
|
||||
};
|
||||
|
||||
request.send();
|
||||
}
|
||||
|
||||
function filetype(filemime){
|
||||
var parts = filemime.split("/");
|
||||
return (parts[(parts.length-1)]);
|
||||
}
|
||||
function is_allowed(filemime){
|
||||
var r='<?php echo $auto_dropzone['forbidden_filetypes']; ?>';
|
||||
var allow=<?php echo $auto_dropzone['allow_unknown_filetypes']; ?>;
|
||||
m=filetype(filemime);
|
||||
if (m==''&&!allow){return false;}
|
||||
if (m==''&&allow){return true;}
|
||||
if(r.indexOf(m)==-1){return true;}
|
||||
else{return false;}
|
||||
}
|
||||
function add_class(el,cl){
|
||||
if (el.classList){ el.classList.add(cl);}
|
||||
else {el.className += ' ' + cl; }
|
||||
}
|
||||
function remove_class(el,cl){
|
||||
if (el.classList)
|
||||
el.classList.remove(cl)
|
||||
else
|
||||
el.className = el.className.replace(new RegExp('(^| )' + cl.split(' ').join('|') + '( |$)', 'gi'), ' ')
|
||||
}
|
||||
|
||||
// main initialization
|
||||
|
||||
|
||||
// init handlers
|
||||
function initHandlers() {
|
||||
dropArea.addEventListener('drop', handleDrop, false);
|
||||
dropArea.addEventListener('dragover', handleDragOver, false);
|
||||
dropArea.addEventListener('dragleave', handleDragLeave, true );
|
||||
}
|
||||
|
||||
// draw progress
|
||||
function drawProgress(progress) {
|
||||
if(progress!='NaN'){
|
||||
percent=Math.floor(progress*100)+'%';
|
||||
bar.style.width=percent;
|
||||
bar.innerHTML=percent;
|
||||
}else{bar.style.width='0';}
|
||||
}
|
||||
|
||||
// drag over
|
||||
function handleDragOver(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
add_class(dropArea,'DD_hover');
|
||||
}
|
||||
|
||||
// drag leave
|
||||
function handleDragLeave(event) {
|
||||
remove_class(dropArea,'DD_hover');
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
}
|
||||
|
||||
// drag drop
|
||||
function handleDrop(event) {
|
||||
remove_class(dropArea,'DD_hover');
|
||||
if(event.preventDefault) { event.preventDefault(); }
|
||||
if(event.stopPropagation) { event.stopPropagation(); }
|
||||
if (uploading==true){return false;}
|
||||
processFiles(event.dataTransfer.files);
|
||||
return false;
|
||||
}
|
||||
|
||||
// process bunch of files
|
||||
function processFiles(filelist) {
|
||||
if (!filelist || !filelist.length || list.length) return;
|
||||
totalSize = 0;
|
||||
totalProgress = 0;
|
||||
result.textContent = '';
|
||||
for (var i = 0; i < filelist.length; i++) {
|
||||
list.push(filelist[i]);
|
||||
totalSize += filelist[i].size;
|
||||
}
|
||||
uploadNext();
|
||||
}
|
||||
|
||||
// on complete - start next file
|
||||
function handleComplete(size) {
|
||||
uploading=false;
|
||||
totalProgress += size;
|
||||
drawProgress(totalProgress / totalSize);
|
||||
uploadNext();
|
||||
}
|
||||
|
||||
// update progress
|
||||
function handleProgress(event) {
|
||||
var progress = totalProgress + event.loaded;
|
||||
drawProgress(progress / totalSize);
|
||||
}
|
||||
|
||||
// upload file
|
||||
function uploadFile(file, status) {
|
||||
// prepare XMLHttpRequest
|
||||
uploading=true;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', "<?php echo $auto_dropzone['my_filepath'];?>");
|
||||
xhr.onload = function() {
|
||||
result.innerHTML += this.responseText;
|
||||
handleComplete(file.size);
|
||||
};
|
||||
xhr.onerror = function() {
|
||||
result.textContent = this.responseText;
|
||||
handleComplete(file.size);
|
||||
};
|
||||
xhr.upload.onprogress = function(event) {
|
||||
handleProgress(event);
|
||||
}
|
||||
xhr.upload.onloadstart = function(event) {
|
||||
}
|
||||
|
||||
// prepare FormData
|
||||
var formData = new FormData();
|
||||
formData.append('myfile', file);
|
||||
formData.append('token', "<?php newToken(true);?>");
|
||||
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
// upload next file
|
||||
function uploadNext() {
|
||||
//reload_list();
|
||||
if (list.length) {
|
||||
add_class(dropArea,'DD_uploading');
|
||||
var nextFile = list.shift();
|
||||
|
||||
if (nextFile.size >= <?php echo $max*1048576; ?>) {
|
||||
result.innerHTML += '<li class="DD_error">'+nextFile.name+'<?php echo $file_length_error;?></li>';
|
||||
handleComplete(nextFile.size);
|
||||
} else if(is_allowed(nextFile.type)==false){
|
||||
result.innerHTML += '<li class="DD_error">'+nextFile.name+'<?php echo $file_format_error;?></li>';
|
||||
handleComplete(nextFile.size);
|
||||
} else {
|
||||
uploadFile(nextFile, status);
|
||||
}
|
||||
} else {
|
||||
result.innerHTML='';
|
||||
remove_class(dropArea,'DD_uploading');
|
||||
|
||||
bar.style.width='0';
|
||||
//reload_list();// ICI ON REFRESH
|
||||
location.reload();
|
||||
uploading=false;
|
||||
}
|
||||
}
|
||||
|
||||
initHandlers();
|
||||
|
||||
|
||||
|
||||
// click on dropzone: fallback file
|
||||
document.getElementById('<?php echo $auto_dropzone['dropzone_id'];?>').addEventListener('click', function(){
|
||||
document.getElementById('fileToUpload').click();
|
||||
});
|
||||
document.getElementById('fileToUpload').addEventListener('change', function(){
|
||||
|
||||
processFiles(this.files);
|
||||
|
||||
/*if (this.files[0].size >= <?php echo $max*1048576; ?>) {
|
||||
result.innerHTML += '<li class="DD_error">'+this.files[0].name+'<?php echo $file_length_error;?></li>';
|
||||
}else if(is_allowed(this.files[0].type)==false){
|
||||
result.innerHTML += '<li class="DD_error">'+this.files[0].name+'<?php echo $file_format_error;?></li>';
|
||||
} else {
|
||||
uploadFile(this.files,'');
|
||||
} */
|
||||
});
|
||||
</script>
|
||||
<?php }
|
||||
|
||||
|
||||
?>
|
|
@ -1,723 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN admin only protection:
|
||||
* part of auto_restrict lib
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
*
|
||||
* auto_restrict
|
||||
* @author bronco@warriordudimanche.com / www.warriordudimanche.net
|
||||
* @copyright open source and free to adapt (keep me aware !)
|
||||
* @version 4.2 - multi user
|
||||
*
|
||||
* This script locks a page's access
|
||||
* Just include it in the page you want to lock
|
||||
* It does all for you:
|
||||
* - login/pass creation
|
||||
* - auto redirect to login form
|
||||
* - session's expiration
|
||||
* - login & logout (to logout, add ?logout $_GET var)
|
||||
* - referrer errors (same domain)
|
||||
* - auto ban IP and (auto unban)
|
||||
* - tokens to secure post and get forms (just add <?php newToken(); ?> to the form or <?php sameToken();?> to repeat a previously generated token, in case of various forms in a same page)
|
||||
* - easyly secure sensitive actions adding admin password in your form (just add <?php adminPassword(); ?>, auto_restrict will exit if password is not correct)
|
||||
* - secure post and get data
|
||||
* - add function to ask password for sensitive/superadmin actions...
|
||||
*
|
||||
*
|
||||
*
|
||||
* Verrouille l'accès à une page
|
||||
* Il suffit d'inclure ce fichier pour bloquer l'accès...
|
||||
* gestion de l'expiration de session,
|
||||
* gestion de la connexion et de la déconnexion.
|
||||
* gestion des différences entre le domaine referer et le domaine sur lequel le script est hébergé (si différent -> pas ok)
|
||||
* gestion du bannissement des adresses ip en cas de bruteforcing ou de referer anormal
|
||||
* gestion des tokens de sécurisation à ajouter aux forms en une commande <?php newToken();?>; le script se charge seul de vérifier le token
|
||||
* génération aléatoire de la clé de cryptage
|
||||
* sécurisation par mot de passe sur les actions sensibles (il suffit d'ajouter <?php adminPassword(); ?> à un formulaire pour qu'auto_restrict bloque en cas de mauvais mot de passe)
|
||||
*
|
||||
* Améliorations eventuelles:
|
||||
* ajouter un fichier log de connexion
|
||||
*
|
||||
*
|
||||
* ajout 4.2 :
|
||||
* ajout du statut (superadmin/admin/user) et de la langue (pour bozon)
|
||||
* ajout 4.1 :
|
||||
* ajout du double check de passe et du changement de mdp
|
||||
* ajout 4.0 :
|
||||
* ajout du support multi utilisateur
|
||||
*/
|
||||
@session_start();
|
||||
# ------------------------------------------------------------------
|
||||
# default config: initialisation
|
||||
# ------------------------------------------------------------------
|
||||
# you can modify this config before the include('auto_restrict.php');
|
||||
if (!isset($auto_restrict['error_msg'])){ $auto_restrict['error_msg']='Erreur - impossible de se connecter.';}# utilisé si on ne veut pas rediriger
|
||||
if (!isset($auto_restrict['cookie_name'])){ $auto_restrict['cookie_name']='BoZoN';}# nom du cookie
|
||||
if (!isset($auto_restrict['session_expiration_delay'])){ $auto_restrict['session_expiration_delay']=90;}#minutes
|
||||
if (!isset($auto_restrict['cookie_expiration_delay'])){ $auto_restrict['cookie_expiration_delay']=365;}#days
|
||||
if (!isset($auto_restrict['IP_banned_expiration_delay'])){ $auto_restrict['IP_banned_expiration_delay']=90;}#seconds
|
||||
if (!isset($auto_restrict['max_security_issues_before_ban'])){ $auto_restrict['max_security_issues_before_ban']=5;}
|
||||
if (!isset($auto_restrict['just_die_on_errors'])){ $auto_restrict['just_die_on_errors']=true;}# end script immediately instead of include loginform in case of user not logged;
|
||||
if (!isset($auto_restrict['just_die_if_not_logged'])){ $auto_restrict['just_die_if_not_logged']=false;}# end script immediately instead of include loginform in case of banished ip or referer problem;
|
||||
if (!isset($auto_restrict['tokens_expiration_delay'])){ $auto_restrict['tokens_expiration_delay']=7200;}#seconds
|
||||
if (!isset($auto_restrict['kill_tokens_after_use'])){ $auto_restrict['kill_tokens_after_use']=false;}#false to allow the token to survive after it was used (for a form with multiple submits, like a preview button)
|
||||
if (!isset($auto_restrict['use_GET_tokens_too'])){ $auto_restrict['use_GET_tokens_too']=true;}
|
||||
if (!isset($auto_restrict['use_ban_IP_on_token_errors'])){ $auto_restrict['use_ban_IP_on_token_errors']=false;}
|
||||
if (!isset($auto_restrict['redirect_error'])){ $auto_restrict['redirect_error']='index.php';}# si précisé, pas de message d'erreur
|
||||
if (!isset($auto_restrict['redirect_success'])){ $auto_restrict['redirect_success']='index.php?p=admin&token='.returnToken();}
|
||||
if (!isset($auto_restrict['domain'])){ $auto_restrict['domain']=$_SERVER['SERVER_NAME'];}
|
||||
if (!isset($auto_restrict['POST_striptags'])){ $auto_restrict['POST_striptags']=false;}# if true, all $_POST data will be strip_taged
|
||||
if (!isset($auto_restrict['GET_striptags'])){ $auto_restrict['GET_striptags']=false;}# if true, all $_GET data will be strip_taged
|
||||
if (!isset($auto_restrict['root'])){ $auto_restrict['root']='.';}
|
||||
if (!isset($auto_restrict['path_from_root'])){ $auto_restrict['path_from_root']='';}
|
||||
if (!isset($auto_restrict['add_remove_user_admin_only'])){ $auto_restrict['add_remove_user_admin_only']=true;}# only admin can add or remove a user (admin is the first user)
|
||||
if (!empty($_SERVER['HTTP_REFERER'])){ $auto_restrict['referer']=returndomain($_SERVER['HTTP_REFERER']);}else{$auto_restrict['referer']='';}
|
||||
$auto_restrict['path_to_my_folder']=$auto_restrict['root'].$auto_restrict['path_from_root'].'/';
|
||||
$auto_restrict['path_to_files']=$auto_restrict['path_to_my_folder'].$default_private;
|
||||
# ------------------------------------------------------------------
|
||||
# secure $_POST & $_GET data
|
||||
# ------------------------------------------------------------------
|
||||
if ($auto_restrict['POST_striptags']){$_POST=array_map('strip_tags',$_POST);}
|
||||
if ($auto_restrict['GET_striptags']){$_GET=array_map('strip_tags',$_GET);}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# create cookie token folder
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
if (!is_dir($auto_restrict['path_to_files'])){mkdir($auto_restrict['path_to_files'],0700);chmod($auto_restrict['path_to_files'],0700);}
|
||||
if (!is_dir($auto_restrict['path_to_files'])){echo '<div class="error">auto_restrict error: cannot create the '.$auto_restrict['path_to_files'].' folder </div>';}
|
||||
elseif (!is_writable($auto_restrict['path_to_files'])){echo '<div class="error">auto_restrict error: token folder is not writeable</div>';}
|
||||
elseif (!is_file($auto_restrict['path_to_files'].'/.htaccess')){file_put_contents($auto_restrict['path_to_files'].'/.htaccess', 'deny from all');}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# checks auto_restrict's data file : include or create
|
||||
# ------------------------------------------------------------------
|
||||
if(file_exists($auto_restrict['path_to_files'].'/auto_restrict_data.php')){
|
||||
include($auto_restrict['path_to_files'].'/auto_restrict_data.php');
|
||||
}else{
|
||||
$auto_restrict['system_salt']=generate_salt(512);
|
||||
$ret="\n";
|
||||
file_put_contents($auto_restrict['path_to_files'].'/auto_restrict_data.php', '<?php '.$ret.'$auto_restrict["system_salt"]='.var_export($auto_restrict['system_salt'],true).';'.$ret.'$auto_restrict["tokens_filename"] = "tokens_'.var_export(hash('sha512', $auto_restrict['system_salt'].uniqid('', true)),true).'.php";'.$ret.'$auto_restrict["banned_ip_filename"] = "banned_ip_'.var_export(hash('sha512', $auto_restrict['system_salt'].uniqid('', true)),true).'.php"; '.$ret.'?>');
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# checks auto_restrict's users file : include or redirect to login page if no $_POST
|
||||
# ------------------------------------------------------------------
|
||||
if(file_exists($auto_restrict['path_to_files'].'/auto_restrict_users.php')){
|
||||
# if file exists, include it
|
||||
include($auto_restrict['path_to_files'].'/auto_restrict_users.php');
|
||||
complete_if_needed();
|
||||
|
||||
|
||||
}else if(!isset($_POST['pass'])){
|
||||
# problem with files during a session
|
||||
if (isset($_SESSION['login'])){
|
||||
session_destroy();
|
||||
}
|
||||
# or redirect to login form
|
||||
safe_redirect('index.php?p=login');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Sets a global token to use it later
|
||||
# ------------------------------------------------------------------
|
||||
define('TOKEN',returnToken());
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# New user request: add it, save and return to login page
|
||||
# ------------------------------------------------------------------
|
||||
if(!empty($_POST['pass'])&&!empty($_POST['confirm'])&&isset($_POST['creation'])&&!empty($_POST['login'])&&empty($_POST['admin_password'])){
|
||||
if (!isset($auto_restrict['users'])){$auto_restrict['users']=array();}
|
||||
$index=count($auto_restrict['users']);
|
||||
$login=strip_tags($_POST['login']);
|
||||
if (login_exists($login)){safe_redirect('index.php?p=login&newuser&error=1&token='.returnToken());}
|
||||
if ($_POST['pass']!=$_POST['confirm']){safe_redirect('index.php?p=login&newuser&error=3&token='.returnToken());}
|
||||
$auto_restrict['users'][$index]['login'] = $login;
|
||||
$auto_restrict['users'][$index]['encryption_key'] = md5(uniqid('', true));
|
||||
$auto_restrict['users'][$index]['salt'] = generate_salt(512);
|
||||
$auto_restrict['users'][$index]['lang'] = $_SESSION['language'];
|
||||
$auto_restrict['users'][$index]['status'] = '';
|
||||
$auto_restrict['users'][$index]['pass'] = hash('sha512', $auto_restrict['users'][$index]['salt'].$_POST['pass']);
|
||||
|
||||
if (!save_users()){exit('<div class="error">auto_restrict: problem saving users</div>');}
|
||||
safe_redirect('index.php?p=admin&msg='.e('Account created:',false).$login.'&token='.returnToken());
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Change password request
|
||||
# ------------------------------------------------------------------
|
||||
if(!empty($_POST['pass'])&&!empty($_POST['confirm'])&&!empty($_POST['admin_password'])){
|
||||
|
||||
if ($auto_restrict['users'][$_SESSION['login']]['pass']!==hash('sha512', $auto_restrict['users'][$_SESSION['login']]['salt'].$_POST['admin_password'])){
|
||||
safe_redirect('index.php?p=login&change_password&error=4&token='.returnToken());
|
||||
exit;
|
||||
}
|
||||
if ($_POST['pass']!=$_POST['confirm']){
|
||||
safe_redirect('index.php?p=login&newuser&error=3&token='.returnToken());
|
||||
exit;
|
||||
}
|
||||
$auto_restrict['users'][$_SESSION['login']]['pass']=hash('sha512', $auto_restrict['users'][$_SESSION['login']]['salt'].$_POST['pass']);
|
||||
if (save_users()){safe_redirect('index.php?p=admin&msg='.e('New password saved for ',false).$_SESSION['login'].'&token='.returnToken());}
|
||||
else{safe_redirect('index.php?p=admin&msg='.e('Error saving new password for ',false).$_SESSION['login'].'&token='.returnToken());}
|
||||
}
|
||||
# ------------------------------------------------------------------
|
||||
# load banned ip
|
||||
# ------------------------------------------------------------------
|
||||
if (is_file($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"])){include($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"]);}
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# user tries to login
|
||||
# ------------------------------------------------------------------
|
||||
if (isset($_POST['login'])&&isset($_POST['pass'])&&empty($_POST['confirm'])&&empty($_POST['creation'])){
|
||||
$ok=log_user($_POST['login'],$_POST['pass']);
|
||||
if (!$ok){safe_redirect('index.php?p=login&error=2');}
|
||||
elseif (isset($_POST['cookie'])){
|
||||
set_cookie();
|
||||
}
|
||||
# ------------------------------------------------------------------
|
||||
# redirect if needed
|
||||
# ------------------------------------------------------------------
|
||||
if (!empty($auto_restrict['redirect_success'])){
|
||||
if (strpos($auto_restrict['redirect_success'], '&token=')!==false){
|
||||
safe_redirect($auto_restrict['redirect_success'].'&token='.returnToken());
|
||||
}else{
|
||||
safe_redirect($auto_restrict['redirect_success']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# user wants to logout (?logout $_GET var)
|
||||
# ------------------------------------------------------------------
|
||||
if (isset($_GET['deconnexion'])||isset($_GET['logout'])){@session_destroy();delete_cookie();exit_redirect();}
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# No admin connected -> login
|
||||
# ------------------------------------------------------------------
|
||||
if (empty($_SESSION['id_user'])||empty($_SESSION['login'])||empty($_SESSION['expire'])){
|
||||
if (!empty($_GET['p'])&&$_GET['p']!='login'){safe_redirect('index.php?p=login');}
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# if here, there's no login/logout process.
|
||||
# Check referrer, ip
|
||||
# session duration...
|
||||
# on problem, out !
|
||||
# ------------------------------------------------------------------
|
||||
if (!is_ok()){
|
||||
@session_destroy();
|
||||
if (!$auto_restrict['just_die_if_not_logged']){
|
||||
safe_redirect('index.php?p=login');
|
||||
} else {
|
||||
echo $auto_restrict['error_msg'];
|
||||
}
|
||||
exit();
|
||||
}
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# if here, there was no security problem.
|
||||
# Now, if there is an admin password post data,
|
||||
# it means that the submitted form is a secured one:
|
||||
# check if password is correct (if not => ban ip and stop here)
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
if (isset($_POST['admin_password'])){
|
||||
$pass=hash('sha512', $auto_restrict["salt"].$_POST['admin_password']);
|
||||
if ($auto_restrict['pass']!=$pass){
|
||||
add_banned_ip();
|
||||
death('The admin password is wrong... too bad !');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# users list form requests
|
||||
# ------------------------------------------------------------------
|
||||
# Erase a user account
|
||||
if (isset($_POST['user_key'])&&is_user_admin()){
|
||||
foreach($_POST['user_key'] as $user_nb){
|
||||
if (isset($auto_restrict['users'][$user_nb])){
|
||||
unset($auto_restrict['users'][$user_nb]);
|
||||
# ADDED FOR BOZON
|
||||
rrmdir($_SESSION['upload_root_path'].$user_nb);
|
||||
}
|
||||
}
|
||||
if (!empty($auto_restrict['users'])){
|
||||
save_users();
|
||||
# ADDED FOR BOZON
|
||||
safe_redirect('index.php?p=users&token='.TOKEN.'&msg='.e('Changes saved',false));
|
||||
exit;
|
||||
}
|
||||
else{
|
||||
unlink($auto_restrict['path_to_files'].'/auto_restrict_users.php');
|
||||
exit_redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# change user status
|
||||
# ------------------------------------------------------------------
|
||||
if (isset($_POST['users_status'])&&is_user_admin()){
|
||||
unset($_POST['users_status']);
|
||||
unset($_POST['token']);
|
||||
foreach($_POST as $user=>$status){
|
||||
if (!empty($user)){$auto_restrict['users'][$user]['status']=$status;}
|
||||
}
|
||||
save_users();
|
||||
# ADDED FOR BOZON
|
||||
safe_redirect('index.php?p=users&token='.TOKEN.'&msg='.e('Changes saved',false));
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# save user language if change BOZON CHANGE
|
||||
# ------------------------------------------------------------------
|
||||
if (empty($auto_restrict['users'][$_SESSION['login']]['lang'])||$_SESSION['language']!=$auto_restrict['users'][$_SESSION['login']]['lang']){
|
||||
$auto_restrict['users'][$_SESSION['login']]['lang']=$_SESSION['language'];
|
||||
save_users();
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# crypt functions
|
||||
# form http:#www.info-3000.com/phpmysql/cryptagedecryptage.php
|
||||
# ------------------------------------------------------------------
|
||||
function GenerationCle($Texte,$CleDEncryptage)
|
||||
{
|
||||
$CleDEncryptage = md5($CleDEncryptage);
|
||||
$Compteur=0;
|
||||
$VariableTemp = "";
|
||||
for ($Ctr=0;$Ctr<strlen($Texte);$Ctr++)
|
||||
{
|
||||
if ($Compteur==strlen($CleDEncryptage))
|
||||
$Compteur=0;
|
||||
$VariableTemp.= substr($Texte,$Ctr,1) ^ substr($CleDEncryptage,$Compteur,1);
|
||||
$Compteur++;
|
||||
}
|
||||
return $VariableTemp;
|
||||
}
|
||||
function chiffre($Texte,$Cle)
|
||||
{
|
||||
srand((double)microtime()*1000000);
|
||||
$CleDEncryptage = md5(rand(0,32000) );
|
||||
$Compteur=0;
|
||||
$VariableTemp = "";
|
||||
for ($Ctr=0;$Ctr<strlen($Texte);$Ctr++)
|
||||
{
|
||||
if ($Compteur==strlen($CleDEncryptage))
|
||||
$Compteur=0;
|
||||
$VariableTemp.= substr($CleDEncryptage,$Compteur,1).(substr($Texte,$Ctr,1) ^ substr($CleDEncryptage,$Compteur,1) );
|
||||
$Compteur++;
|
||||
}
|
||||
return base64_encode(GenerationCle($VariableTemp,$Cle) );
|
||||
}
|
||||
function Dechiffre($Texte,$Cle)
|
||||
{
|
||||
$Texte = GenerationCle(base64_decode($Texte),$Cle);
|
||||
$VariableTemp = "";
|
||||
for ($Ctr=0;$Ctr<strlen($Texte);$Ctr++)
|
||||
{
|
||||
$md5 = substr($Texte,$Ctr,1);
|
||||
$Ctr++;
|
||||
$VariableTemp.= (substr($Texte,$Ctr,1) ^ $md5);
|
||||
}
|
||||
return $VariableTemp;
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
function save_users(){
|
||||
global $auto_restrict;
|
||||
$ret="\n";$data='<?php'.$ret;
|
||||
if (!isset($auto_restrict['users'])){return false;}
|
||||
foreach ($auto_restrict['users'] as $key=>$user){
|
||||
$data.= $ret.'# user : '.$user['login'].$ret
|
||||
.'$auto_restrict["users"]["'.$user['login'].'"]["login"]='.var_export($user['login'],true).';'.$ret
|
||||
.'$auto_restrict["users"]["'.$user['login'].'"]["encryption_key"]='.var_export($user['encryption_key'],true).';'.$ret
|
||||
.'$auto_restrict["users"]["'.$user['login'].'"]["salt"] = '.var_export($user['salt'],true).';'.$ret
|
||||
.'$auto_restrict["users"]["'.$user['login'].'"]["pass"] = '.var_export($user['pass'],true).';'.$ret
|
||||
.'$auto_restrict["users"]["'.$user['login'].'"]["status"]='.var_export($user['status'],true).';'.$ret
|
||||
.'$auto_restrict["users"]["'.$user['login'].'"]["lang"]='.var_export($user['lang'],true).';'.$ret;
|
||||
}
|
||||
|
||||
$data.=$ret.'?>';
|
||||
$r=file_put_contents($auto_restrict['path_to_files'].'/auto_restrict_users.php', $data);
|
||||
sleep(0.5);
|
||||
return $r;
|
||||
}
|
||||
|
||||
function complete_if_needed(){
|
||||
global $auto_restrict,$default_language;$save=false;
|
||||
if (!$auto_restrict){return false;}
|
||||
$indexes_to_check=array( # 'var' => 'default value',
|
||||
'lang'=>$default_language,
|
||||
);
|
||||
$first=first($auto_restrict['users']);
|
||||
foreach ($auto_restrict['users'] as $user=>$data){
|
||||
foreach ($indexes_to_check as $index=>$default_value){
|
||||
if (empty($data[$index])){
|
||||
$auto_restrict['users'][$user][$index]=$default_value;$save=true;
|
||||
}
|
||||
if (empty($data['status'])){
|
||||
$auto_restrict['users'][$user]['status']=create_status($user,$first);$save=true;
|
||||
}elseif($data['status']!='superadmin'&&$data['login']==$first['login']){
|
||||
$auto_restrict['users'][$user]['status']='superadmin';$save=true;# force first status to superadmin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($save){save_users();return true;}
|
||||
return false;
|
||||
}
|
||||
function create_status($user=null,$first=''){
|
||||
global $auto_restrict;
|
||||
if (!$user){return false;}
|
||||
if (count($auto_restrict['users'])==1){ return 'superadmin';}
|
||||
elseif ($user==$first['login']){ return 'superadmin';}
|
||||
else{return 'user';}
|
||||
}
|
||||
|
||||
function login_exists($login=null){
|
||||
global $auto_restrict;
|
||||
if (empty($login)){return false;}
|
||||
foreach ($auto_restrict['users'] as $key=>$user){
|
||||
if ($user['login']==$login){return true;}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function id_user(){
|
||||
$id=$_SERVER['REMOTE_ADDR'];
|
||||
$id.='-'.$_SERVER['HTTP_USER_AGENT'];
|
||||
$id.='-'.session_id();
|
||||
return $id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function is_ok(){
|
||||
# check tokens, session vars, ip, referrer, cookie etc
|
||||
# in case of problem, destroy session and redirect
|
||||
global $auto_restrict;
|
||||
$expired=false;
|
||||
if (!isset($_SESSION['id_user'])){return false;}
|
||||
# fatal problem
|
||||
if (!checkReferer()){return death('<div class="error">You are definitely NOT from here !</div>');}
|
||||
if (!checkIP()){return death('<div class="error">Hey... you were banished, fuck off !</div>');}
|
||||
if (!checkToken()){return death('<div class="error">Invalid token</div>');}
|
||||
|
||||
#
|
||||
if (checkCookie()){return true;}
|
||||
|
||||
if ($_SESSION['expire']<time()){$expired=true;}
|
||||
|
||||
$sid=Dechiffre($_SESSION['id_user'],$auto_restrict['users'][$_SESSION['login']]['encryption_key']);
|
||||
$id=id_user();
|
||||
if ($sid!=$id || $expired==true){# problème d'identité
|
||||
return false;
|
||||
}else{ # all fine
|
||||
#session can survive a bit more ^^
|
||||
$_SESSION['expire']=time()+(60*$auto_restrict['session_expiration_delay']);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function death($msg="Don't try to be so clever !"){global $auto_restrict;if ($auto_restrict['just_die_on_errors']){die('<p class="error">'.$msg.'</p>');}else{return false;}}
|
||||
function is_user_admin(){
|
||||
global $auto_restrict;
|
||||
if ($auto_restrict['add_remove_user_admin_only']==false){return true;}
|
||||
if (!empty($_SESSION['status'])){
|
||||
if ($_SESSION['status']=='admin'||$_SESSION['status']=='superadmin'){return true;}
|
||||
}else{
|
||||
$first=first($auto_restrict['users']);
|
||||
if (!empty($_SESSION['login'])&&$_SESSION['login']==$first['login']){return true;}
|
||||
if (!empty($_SESSION['login'])&&isset($auto_restrict['users'][$_SESSION['login']]['status'])&&$auto_restrict['users'][$_SESSION['login']]['status']=='admin'){return true;}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function log_user($login_donne,$pass_donne){
|
||||
# create session vars
|
||||
$save=false;
|
||||
global $auto_restrict,$default_language;
|
||||
if (empty($default_language)){$default_language='en';}
|
||||
session_destroy();session_start();
|
||||
foreach ($auto_restrict['users'] as $key=>$user){
|
||||
if ($user['login']===$login_donne && $user['pass']===hash('sha512', $user["salt"].$pass_donne)){
|
||||
$_SESSION['id_user']=chiffre(id_user(),$user['encryption_key']);
|
||||
$_SESSION['login']=$user['login'];
|
||||
$_SESSION['expire']=time()+(60*$auto_restrict['session_expiration_delay']);
|
||||
$admin=first($auto_restrict['users']);
|
||||
$_SESSION['status']=$user['status'];
|
||||
$_SESSION['language']=$user['lang'];
|
||||
if ($save){save_users();}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if ($login_donne!='dis'&&$pass_donne!='connect'){
|
||||
add_banned_ip();
|
||||
}else{exit_redirect();}
|
||||
return false;
|
||||
}
|
||||
|
||||
function exit_redirect(){
|
||||
global $auto_restrict;
|
||||
@session_unset();
|
||||
@session_destroy();
|
||||
delete_cookie();
|
||||
if ($auto_restrict['redirect_error']&&$auto_restrict['redirect_error']!=''){
|
||||
safe_redirect($auto_restrict['redirect_error']);
|
||||
}else{exit($auto_restrict['error_msg']);}
|
||||
}
|
||||
function generate_salt($length=256){
|
||||
$salt='';
|
||||
for($i=1;$i<=$length;$i++){
|
||||
$salt.=chr(mt_rand(35,126));
|
||||
}
|
||||
return $salt;
|
||||
}
|
||||
|
||||
function set_cookie(){
|
||||
# create cookie and token file
|
||||
global $auto_restrict;
|
||||
$token_cookie=hash('sha512',$auto_restrict['system_salt'].md5(preg_replace('#[^a-zA-Z]#','',uniqid(true))));
|
||||
$time=time()+$auto_restrict['cookie_expiration_delay']*1440;
|
||||
setcookie($auto_restrict['cookie_name'],$token_cookie,$time);
|
||||
file_put_contents($auto_restrict['path_to_files'].'/'.$token_cookie,$time,0666);
|
||||
chmod($auto_restrict['path_to_files'].'/'.$token_cookie,0666);
|
||||
}
|
||||
function delete_cookie(){
|
||||
# delete cookie and token cookie file
|
||||
global $auto_restrict;
|
||||
@$token_cookie_file=$_COOKIE[$auto_restrict['cookie_name']];
|
||||
setcookie($auto_restrict['cookie_name'],'',time()+1);
|
||||
@unlink($auto_restrict['path_to_files'].'/'.$token_cookie_file);
|
||||
}
|
||||
function checkCookie(){
|
||||
# test cookie token file security access
|
||||
global $auto_restrict;
|
||||
|
||||
if (!isset($_COOKIE[$auto_restrict['cookie_name']])){return false;} # no cookie ?
|
||||
$cookie_token_file=$auto_restrict['path_to_files'].'/'.$_COOKIE[$auto_restrict['cookie_name']];
|
||||
if (!is_file($cookie_token_file)){return false;} # no cookie token file ?
|
||||
if (file_get_contents($cookie_token_file)<time()){return false;} # cookie/token too old ?
|
||||
|
||||
return true;
|
||||
}
|
||||
# ------------------------------------------------------------------
|
||||
# REFERER
|
||||
# ------------------------------------------------------------------
|
||||
function returndomain($url){$domaine=parse_url($url);return $domaine['host'];}
|
||||
|
||||
function checkReferer(){
|
||||
global $auto_restrict;
|
||||
if ($auto_restrict['domain']!=$auto_restrict['referer']&&!empty($auto_restrict['referer'])){
|
||||
# log IP to ban it
|
||||
if (isset($_SERVER['REMOTE_ADDR'])){add_banned_ip();}
|
||||
return false;
|
||||
}else{return true;}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# TOKENS
|
||||
# ------------------------------------------------------------------
|
||||
# return true if token situation is ok
|
||||
function checkToken(){
|
||||
global $auto_restrict;
|
||||
if(empty($_POST)&&empty($_GET)||empty($_POST)&&!$auto_restrict['use_GET_tokens_too']){return true;}# no post or get data, no need of a token
|
||||
|
||||
if (# from login form, no need of a token
|
||||
count($_POST)==2&&isset($_POST['login'])&&isset($_POST['pass'])
|
||||
||
|
||||
count($_POST)==3&&isset($_POST['login'])&&isset($_POST['pass'])&&isset($_POST['cookie'])
|
||||
){return true;}
|
||||
|
||||
|
||||
|
||||
# secure $_POST with token
|
||||
if (!empty($_POST)){
|
||||
if (!isset($_POST['token'])){# no token given ? get out !
|
||||
if ($auto_restrict['use_ban_IP_on_token_errors']){add_banned_ip();}
|
||||
return false;
|
||||
}
|
||||
$token=$_POST['token'];
|
||||
if (!isset($_SESSION[$token])){# Problem with session token ? get out !
|
||||
if ($auto_restrict['use_ban_IP_on_token_errors']){add_banned_ip();}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
# secure $_GET with token
|
||||
if (!empty($_GET)&&$auto_restrict['use_GET_tokens_too']){
|
||||
if (!isset($_GET['token'])){# no token given ? get out !
|
||||
if ($auto_restrict['use_ban_IP_on_token_errors']){add_banned_ip();}
|
||||
return false;
|
||||
}
|
||||
$token=$_GET['token'];
|
||||
if (!isset($_SESSION[$token])){ # Problem with session token ? get out !
|
||||
if ($auto_restrict['use_ban_IP_on_token_errors']){add_banned_ip();}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# SESSION token too old ? out ! (but no ip_ban)
|
||||
if ($_SESSION[$token]<@date('U')){ return false;}
|
||||
# when all is fine, return true after erasing the token (one use only)
|
||||
if ($auto_restrict['kill_tokens_after_use']){unset($_SESSION[$token]);}
|
||||
return true;
|
||||
}
|
||||
|
||||
# create a token, echo a hidden input, sets the session token
|
||||
# if $token_only==true, echo only the token.
|
||||
function newToken($token_only=false){
|
||||
global $auto_restrict;
|
||||
$token=hash('sha512',uniqid('',true));
|
||||
$_SESSION[$token]=@date('U')+$auto_restrict['tokens_expiration_delay'];
|
||||
if (!$token_only){echo '<input type="hidden" value="'.$token.'" name="token"/>';}
|
||||
else {echo $token;}
|
||||
}
|
||||
# create a token, and return it
|
||||
function returnToken(){
|
||||
global $auto_restrict;
|
||||
$token=hash('sha512',uniqid('',true));
|
||||
$_SESSION[$token]=@date('U')+$auto_restrict['tokens_expiration_delay'];
|
||||
return $token;
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# ADMIN ONLY PROTECTION
|
||||
# ------------------------------------------------------------------
|
||||
# echo a password input form to secure sensitive sections
|
||||
# you can specify a label text and/or a placeholder text
|
||||
function adminPassword($label='',$placeholder=''){
|
||||
if (!empty($label)){$label='<label for="admin_password" class="admin_password_label">'.$label.'</label>';}
|
||||
if (!empty($placeholder)){$placeholder=' placeholder="'.$placeholder.'" ';}
|
||||
echo $label.'<input id="admin_password" type="password" class="admin_password" name="admin_password" '.$placeholder.'/>';
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# IP
|
||||
# ------------------------------------------------------------------
|
||||
# increment the IP counter in the banned IP file
|
||||
function add_banned_ip($ip=null){
|
||||
if(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}
|
||||
global $auto_restrict;
|
||||
|
||||
if (isset($auto_restrict["banned_ip"][$ip])){
|
||||
$auto_restrict["banned_ip"][$ip]['nb']++;
|
||||
}else{
|
||||
$auto_restrict["banned_ip"][$ip]['nb']=1;
|
||||
}
|
||||
|
||||
$auto_restrict["banned_ip"][$ip]['date']=@date('U')+$auto_restrict['IP_banned_expiration_delay'];
|
||||
file_put_contents($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"],'<?php /*Banned IP*/ $auto_restrict["banned_ip"]='.var_export($auto_restrict["banned_ip"],true).' ?>');
|
||||
}
|
||||
|
||||
function remove_banned_ip($ip=null){
|
||||
if(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}
|
||||
global $auto_restrict;
|
||||
if (isset($auto_restrict["banned_ip"][$ip])){
|
||||
unset($auto_restrict["banned_ip"][$ip]);
|
||||
}
|
||||
file_put_contents($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"],'<?php /*Banned IP*/ $auto_restrict["banned_ip"]='.var_export($auto_restrict["banned_ip"],true).' ?>');
|
||||
}
|
||||
|
||||
# check if user IP is banned or not
|
||||
function checkIP($ip=null){
|
||||
if(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}
|
||||
global $auto_restrict;
|
||||
|
||||
if (isset($auto_restrict["banned_ip"][$ip])){
|
||||
if ($auto_restrict["banned_ip"][$ip]['nb']<$auto_restrict['max_security_issues_before_ban']){return true;} # below max login fails
|
||||
else if ($auto_restrict["banned_ip"][$ip]['date']>=@date('U')){return false;} # active banishment
|
||||
else if ($auto_restrict["banned_ip"][$ip]['date']<@date('U')){remove_banned_ip($ip);return true;} # old banishment
|
||||
return false;
|
||||
}else{return true;}# ip is ok
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Misc
|
||||
# ------------------------------------------------------------------
|
||||
# creates a form with the users list to erase
|
||||
function generate_users_formlist($text='Check users to delete account and files'){
|
||||
global $auto_restrict;
|
||||
echo '<h1>'.$text.'</h1><form action="" method="POST" class="auto_restrict_users_list"><table>';
|
||||
foreach ($auto_restrict['users'] as $key=>$user){
|
||||
if ($user['status']=='superadmin'){continue;}
|
||||
$class=' class="'.$user['status'].'" title="'.e($user['status'],false).'"';
|
||||
//if ($user['status']=='admin'){$class=' class="admin" title="admin"';}else{$class='';}
|
||||
echo '<tr>';
|
||||
echo '<td><label '.$class.'><input type="checkbox" name="user_key[]" value="'.$key.'"/> '.$user['login'].'</label>';
|
||||
newToken();
|
||||
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '</table><input type="submit" value="Ok" class="btn red"/></form>';
|
||||
}
|
||||
# creates a form with the users list to change status
|
||||
function generate_users_status_formlist($text='Select new status for the users',$user_text='user',$admin_text='admin'){
|
||||
global $auto_restrict,$PROFILES;
|
||||
echo '<h1>'.$text.'</h1><form action="" method="POST" class="auto_restrict_users_status"><input type="hidden" name="users_status" value="1"/><table>';
|
||||
foreach ($auto_restrict['users'] as $key=>$user){
|
||||
$class=' class="'.$user['status'].'" title="'.e($user['status'],false).'"';
|
||||
if (empty($user['status'])||$user['status']!='superadmin'){
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td><label '.$class.'>'.$user['login'].'</label></td>';
|
||||
echo '<td><select name="'.$user['login'].'" class="npt">';
|
||||
foreach($PROFILES as $profile){
|
||||
$selected='';$class='';
|
||||
if ($user['status']==$profile){$class='selected="true"';}
|
||||
echo '<option value="'.$profile.'" '.$class.'>'.e($profile,false).'</option>';
|
||||
}
|
||||
echo '</select></td>';
|
||||
newToken();
|
||||
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
echo '</table><input type="submit" value="Ok" class="btn red"/></form>';
|
||||
}
|
||||
|
||||
function safe_redirect($url=none){
|
||||
if (!$url){return false;}
|
||||
if (!headers_sent()){header('location: '.$url);}
|
||||
else{echo '<script>document.location.href="'.$url.'";</script>';}
|
||||
exit;
|
||||
}
|
||||
|
||||
# creates the secured link to the users list form
|
||||
function generate_users_list_link($text='See users list'){
|
||||
global $auto_restrict;
|
||||
echo '<a class="auto_restrict_userslist_link" href="'.$_SERVER["SCRIPT_NAME"].'?p=users&token='.returnToken().'" alt="link to users list" title="'.$text.'"><span class="icon-users" ></span></a>';
|
||||
}
|
||||
# creates the secured link to new user form
|
||||
function generate_new_users_link($text='Add a user'){
|
||||
echo '<a class="auto_restrict_new_user_link" href="index.php?p=login&newuser&token='.returnToken().'" alt="link to a new user" title="'.$text.'"><span class="icon-user-add" ></span></a>';
|
||||
}
|
||||
# creates the secured link to new password form
|
||||
function generate_new_password_link($text='Change password'){
|
||||
echo '<a class="auto_restrict_new_password_link" href="index.php?p=login&change_password&token='.returnToken().'" alt="link to a new password" title="'.$text.'"><span class="icon-newpass" ></span></a>';
|
||||
}
|
||||
function first($array){
|
||||
if (empty($array)){return false;}
|
||||
$akeys=array_keys($array);
|
||||
$key=array_shift($akeys);
|
||||
return $array[$key];
|
||||
}
|
||||
?>
|
|
@ -1,97 +0,0 @@
|
|||
<?php
|
||||
const EXIF_ORIENTATION_TOP=1;
|
||||
const EXIF_ORIENTATION_BOTTOM=3;
|
||||
const EXIF_ORIENTATION_RIGHT=6;
|
||||
const EXIF_ORIENTATION_LEFT=8;
|
||||
|
||||
function get_rotation_angle($exif_orientation){
|
||||
if (EXIF_ORIENTATION_BOTTOM == $exif_orientation){return 180;}
|
||||
if (EXIF_ORIENTATION_RIGHT == $exif_orientation){return 270;}
|
||||
if (EXIF_ORIENTATION_LEFT == $exif_orientation){return 90;}
|
||||
return 0;
|
||||
}
|
||||
function auto_thumb($img,$width=null,$height=null,$add_to_thumb_filename='_THUMB_',$crop_image=true){
|
||||
### VERSION MODIFIEE POUR BOZON ###
|
||||
// initialisation
|
||||
$DONT_RESIZE_THUMBS=true;
|
||||
global $auto_thumb;
|
||||
if (!$width){$width=$auto_thumb['default_width'];}
|
||||
if (!$height){$height=$auto_thumb['default_height'];}
|
||||
$recadrageX=0;$recadrageY=0;
|
||||
$motif='#\.(jpe?g|png|gif)#i';
|
||||
$rempl=$add_to_thumb_filename.$width.'x'.$height.'.$1';
|
||||
$thumb_name='thumbs/'.preg_replace($motif,$rempl,$img);
|
||||
if (!file_exists($img)){return 'auto_thumb ERROR: '.$img.' doesn\'t exists';}
|
||||
if (file_exists($thumb_name)){return $thumb_name;} // miniature déjà créée
|
||||
if ($add_to_thumb_filename!='' && preg_match($add_to_thumb_filename,$img) && $DONT_RESIZE_THUMBS){return false;} // on cherche à traiter un fichier miniature (rangez un peu !)
|
||||
if(!is_dir(dirname($thumb_name))){ mkdir(dirname($thumb_name), 0755, true); }
|
||||
|
||||
// redimensionnement en fonction du ratio
|
||||
$taille = getimagesize($img);
|
||||
$src_width=$taille[0];
|
||||
$src_height=$taille[1];
|
||||
if (!$crop_image){
|
||||
// sans recadrage: on conserve les proportions
|
||||
if ($src_width<$src_height){
|
||||
// portrait
|
||||
$ratio=$src_height/$src_width;
|
||||
$width=$height/$ratio;
|
||||
}else if ($src_width>$src_height){
|
||||
// paysage
|
||||
$ratio=$src_width/$src_height;
|
||||
$height=$width/$ratio;
|
||||
}
|
||||
}else{
|
||||
// avec recadrage: on produit une image aux dimensions définies mais coupée
|
||||
if ($src_width<$src_height){
|
||||
// portrait
|
||||
$recadrageY=round(($src_height-$src_width)/2);
|
||||
$src_height=$src_width;
|
||||
}else if ($src_width>$src_height){
|
||||
// paysage
|
||||
$recadrageX=round(($src_width-$src_height)/2);
|
||||
$src_width=$src_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// en fonction de l'extension
|
||||
$fichier = pathinfo($img);
|
||||
$extension=str_ireplace('jpg','jpeg',$fichier['extension']);
|
||||
|
||||
|
||||
$fonction='imagecreatefrom'.$extension;
|
||||
if (!$src = $fonction($img)){return false;}
|
||||
|
||||
// création image
|
||||
$thumb = imagecreatetruecolor($width,$height);
|
||||
|
||||
// gestion de la transparence
|
||||
// (voir fonction de Seebz: http://code.seebz.net/p/imagethumb/)
|
||||
if( $extension=='png' ){imagealphablending($thumb,false);imagesavealpha($thumb,true);}
|
||||
if( $extension=='gif' && @imagecolortransparent($img)>=0 ){
|
||||
$transparent_index = @imagecolortransparent($img);
|
||||
$transparent_color = @imagecolorsforindex($img, $transparent_index);
|
||||
$transparent_index = imagecolorallocate($thumb, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
|
||||
imagefill($thumb, 0, 0, $transparent_index);
|
||||
imagecolortransparent($thumb, $transparent_index);
|
||||
}
|
||||
|
||||
imagecopyresampled($thumb,$src,0,0,$recadrageX,$recadrageY,$width,$height,$src_width,$src_height);
|
||||
|
||||
// gestion de la rotation
|
||||
@$exif = exif_read_data($img);
|
||||
if ($exif && array_key_exists('Orientation', $exif)) {
|
||||
$orientation = $exif['Orientation'];
|
||||
$angle = get_rotation_angle($orientation);
|
||||
$thumb = imagerotate($thumb, $angle, 0);
|
||||
}
|
||||
imagepng($thumb, $thumb_name);
|
||||
imagedestroy($thumb);
|
||||
|
||||
return $thumb_name;
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -1,132 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN commands GET vars part:
|
||||
* Here we handle the GET data for commands WITHOUT <header> <Body> <footer>
|
||||
* like thumbnails request, users list, login/logout request, public share file/folder request...
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
|
||||
|
||||
# thumbnail request
|
||||
if(isset($_GET['thumbs'])&&!empty($_GET['f'])&&$_SESSION['GD']){
|
||||
$f=get_thumbs_name(id2file($_GET['f']));
|
||||
$type=_mime_content_type($f);
|
||||
header('Content-type: '.$type.'; charset=utf-8');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Length: '.filesize($f));
|
||||
readfile($f);
|
||||
exit;
|
||||
}
|
||||
if(isset($_GET['gthumbs'])&&!empty($_GET['f'])&&$_SESSION['GD']){
|
||||
$f=get_thumbs_name_gallery(id2file($_GET['f']));
|
||||
$type=_mime_content_type($f);
|
||||
header('Content-type: '.$type.'; charset=utf-8');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Length: '.filesize($f));
|
||||
readfile($f);
|
||||
exit;
|
||||
}
|
||||
|
||||
# public share request
|
||||
if (!empty($_GET['f'])){
|
||||
require('core/share.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
# Try to login or logout ? => auto_restrict
|
||||
if (!empty($_POST['pass'])&&!empty($_POST['login'])||isset($_GET['logout'])||isset($_GET['deconnexion'])){
|
||||
require_once('core/auto_restrict.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
# ask for rss stats
|
||||
if (isset($_GET['statrss'])&&!empty($_GET['key'])&&hash_user($_GET['key'])){
|
||||
$rss=array('infos'=>'','items'=>'');
|
||||
$rss['infos']=array(
|
||||
'title'=>'BoZoN - stats',
|
||||
'description'=>e('Rss feed of stats',false),
|
||||
//'guid'=>$_SESSION['home'].'?f='.$id,
|
||||
'link'=>htmlentities($_SESSION['home']),
|
||||
);
|
||||
|
||||
include('core/Array2feed.php');
|
||||
$stats=load($_SESSION['stats_file']);
|
||||
for ($index=0;$index<$_SESSION['stats_max_lines'];$index++){
|
||||
if (!empty($stats[$index])){
|
||||
$rss['items'][]=
|
||||
array(
|
||||
'title'=>$stats[$index]['file'],
|
||||
'description'=>'[ip:'.$stats[$index]['ip'].'] '.'[referrer:'.$stats[$index]['referrer'].'] '.'[host:'.$stats[$index]['host'].'] ',
|
||||
'pubDate'=>makeRSSdate($stats[$index]['date']),
|
||||
'link'=>$_SESSION['home'].'?f='.$stats[$index]['id'],
|
||||
'guid'=>$_SESSION['home'].'?f='.$stats[$index]['id'],
|
||||
);
|
||||
}
|
||||
}
|
||||
array2feed($rss);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# ask for json format stats
|
||||
if (isset($_GET['statjson'])&&!empty($_GET['key'])&&hash_user($_GET['key'])){
|
||||
$stats=load($_SESSION['stats_file']);
|
||||
exit(json_encode($stats));
|
||||
}
|
||||
|
||||
# zip and download a folder from visitor's share page
|
||||
if (!empty($_GET['zipfolder'])&&$_SESSION['zip']){
|
||||
$folder=id2file($_GET['zipfolder']);
|
||||
if (!is_dir($_SESSION['temp_folder'])){mkdir($_SESSION['temp_folder']);}
|
||||
$zipfile=$_SESSION['temp_folder'].return_owner($_GET['zipfolder']).'-'._basename($folder).'.zip';
|
||||
zip($folder,$zipfile);
|
||||
header('location: '.$zipfile);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (is_user_connected()){
|
||||
# users list request
|
||||
if (isset($_GET['users_list'])&&is_allowed('user page')){
|
||||
$_GET['p']='users';unset($_GET['users_list']); # To avoid useless changes in auto_restrict
|
||||
}
|
||||
# if user is connected, use auto_restrict
|
||||
require_once('core/auto_restrict.php');
|
||||
$token=returnToken();
|
||||
|
||||
# complete list files ajax request button «load more»
|
||||
if(isset($_GET['async'])){
|
||||
include('core/listfiles.php');
|
||||
exit;
|
||||
}
|
||||
if (empty($_GET['p'])&&!empty($_GET)||count($_GET)>2||!empty($_POST)){include('core/GET_POST_admin_data.php');}
|
||||
if (!empty($_FILES)){
|
||||
include('core/auto_dropzone.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
# users share list request
|
||||
if (isset($_GET['users_share_list'])){
|
||||
$shared_id=$_GET['users_share_list'];
|
||||
require_once('core/auto_restrict.php');
|
||||
$shared_with=load_folder_share();
|
||||
$users=$auto_restrict['users'];
|
||||
unset($users[$_SESSION['login']]);
|
||||
foreach($users as $login=>$data){
|
||||
# creates a checkbox list of users (if the folder is already shared by logged user, checked)
|
||||
if (isset($shared_with[$login][$shared_id]) && $shared_with[$login][$shared_id]['from']==$_SESSION['login']){
|
||||
$check=' checked ';$class=' class="shared" ';
|
||||
}else{$check='';$class='';}
|
||||
echo '<li><input type="checkbox" '.$class.' id="check_'.$login.'" value="'.$login.'" name="users[]"'.$check.'><label for="check_'.$login.'">'.$login.'</label></li>';
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{$token='';}
|
||||
if (!empty($_GET['p'])){$page=$_GET['p'];}else{$page='';}
|
||||
if (!empty($_GET['msg'])){$message=$_GET['msg'];}
|
||||
if (!empty($_GET['lang'])){$_SESSION['language']=$_GET['lang'];header('location:index.php?p='.$page.'&token='.$token);}
|
||||
if (!empty($_GET['aspect'])){$_SESSION['aspect']=$_GET['aspect'];header('location:index.php?p='.$page.'&token='.$token);}
|
||||
|
||||
?>
|
|
@ -1,328 +0,0 @@
|
|||
/* VanillaJS v0.1 by bronco@warriordudimanche.net */
|
||||
// fonctions systeme ----------------------------------------------------
|
||||
function when_ready(funct){document.addEventListener("DOMContentLoaded",funct,false);}
|
||||
function _(obj,single){
|
||||
if (typeof obj=='string'){
|
||||
if (single){return first(obj);}
|
||||
else{return all(obj);}
|
||||
}else{
|
||||
if (single && obj[0]){return obj[0];}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
function _tcl(el,cl){
|
||||
if (el.classList) {
|
||||
el.classList.toggle(cl)
|
||||
} else {
|
||||
var classes = el.className.split(' ')
|
||||
var existingIndex = classes.indexOf(cl)
|
||||
if (existingIndex >= 0)
|
||||
classes.splice(existingIndex, 1)
|
||||
else
|
||||
classes.push(cl);
|
||||
el.className = classes.join(' ')
|
||||
}
|
||||
}
|
||||
function _acl(el,cl){
|
||||
if (el.classList){ el.classList.add(cl);}
|
||||
else {el.className += ' ' + cl; }
|
||||
}
|
||||
function _rcl(el,cl){
|
||||
if (el.classList)
|
||||
el.classList.remove(cl)
|
||||
else
|
||||
el.className = el.className.replace(new RegExp('(^| )' + cl.split(' ').join('|') + '( |$)', 'gi'), ' ')
|
||||
}
|
||||
function _adev(obj,ev,funct){if (obj.addEventListener){obj.addEventListener(ev, funct);}}
|
||||
function _tglval(valToTgl,val1,val2){if (valToTgl==val1){return val2;}else{return val1;}}
|
||||
|
||||
|
||||
// parcours du DOM ----------------------------------------------------
|
||||
function all(tag){return document.querySelectorAll(tag);}
|
||||
function first(tag){return document.querySelector(tag);}
|
||||
function allIn(obj,selector){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
return obj.querySelectorAll(selector);
|
||||
}
|
||||
function firstIn(obj,selector){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
if (selector) {return obj.querySelector(selector);}else{return obj.children[0];}
|
||||
}
|
||||
function lastIn(obj,selector){
|
||||
if (typeof obj=='string'){obj=first(obj);}
|
||||
if (!obj){return false}
|
||||
if (selector) {
|
||||
childs=obj.querySelectorAll(selector);
|
||||
if (!childs){return false;}
|
||||
if (!childs.length){return childs;}
|
||||
return childs[childs.length-1];
|
||||
}else{return obj.lastElementChild;}
|
||||
}
|
||||
function parent(obj,degree){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
if (!degree||degree==1){return obj.parentNode;}
|
||||
else{
|
||||
for (i=1;i<=degree;i++){
|
||||
obj=obj.parentNode;
|
||||
console.log(obj.getAttribute('class'))
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
function next(obj){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
return obj.nextElementSibling;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// contenu ----------------------------------------------------
|
||||
function remove(obj,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.parentNode.removeChild(obj);return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.parentNode.removeChild(el);});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function prepend(obj,content,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.innerHTML=content+obj.innerHTML;return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.innerHTML=content+el.innerHTML;});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function append(obj,content,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.innerHTML+=content;return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.innerHTML+=content;});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function before(obj, content,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.insertAdjacentHTML('beforebegin', content);return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.insertAdjacentHTML('beforebegin', content);});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function after(obj, content,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.insertAdjacentHTML('afterend', content);return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.insertAdjacentHTML('afterend', content);});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function clear(obj,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.innerHTML='';return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.innerHTML='';});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Ajax ----------------------------------------------------
|
||||
function ajax(url,data,method,target,callback){
|
||||
if (!target){target ='';}
|
||||
if (!method){method='GET';}
|
||||
if (!data){data='';}
|
||||
// Envoi de la requête
|
||||
request = new XMLHttpRequest;
|
||||
request.open(method, url, true);
|
||||
if (method=='POST'){request.setRequestHeader("Content-type","application/x-www-form-urlencoded");}
|
||||
request.send(data);
|
||||
|
||||
// Gestion de la réponse du serveur
|
||||
request.onreadystatechange=function(){
|
||||
if (request.readyState==4 && request.status==200){
|
||||
rep=request.responseText;
|
||||
if (target){
|
||||
if (typeof target=='string'){target=all(target);}
|
||||
if (!target.length){target.innerHTML=rep;return true;}
|
||||
if (target.length){ [].forEach.call(target, function(el) {el.innerHTML=rep;}); }
|
||||
}else{return rep;}
|
||||
|
||||
}
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function onProgress(e) {
|
||||
var percentComplete = (e.position / e.totalSize)*100;
|
||||
return percentComplete;
|
||||
}
|
||||
|
||||
function appendAjax(url,data,method,target,onload){
|
||||
if (!target){target ='';}
|
||||
if (!method){method='GET';}
|
||||
if (!data){data='';}
|
||||
// Envoi de la requête
|
||||
request = new XMLHttpRequest;
|
||||
request.onprogress=onProgress;
|
||||
request.onload=onload;
|
||||
request.onerror=function(){return 'Error loading !';}
|
||||
request.open(method, url, true);
|
||||
if (method=='POST'){request.setRequestHeader("Content-type","application/x-www-form-urlencoded");}
|
||||
request.send(data);
|
||||
|
||||
// Gestion de la réponse du serveur
|
||||
request.onreadystatechange=function(){
|
||||
if (request.readyState==4 && request.status==200){
|
||||
rep=request.responseText;
|
||||
if (target){
|
||||
if (typeof target=='string'){target=all(target);}
|
||||
append(target,rep);
|
||||
|
||||
return true;
|
||||
}else{
|
||||
|
||||
return rep;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function get(url){
|
||||
request = new XMLHttpRequest();request.open('GET', url, true);request.send();
|
||||
request.onreadystatechange=function(){
|
||||
if (request.readyState==4 && request.status==200){return request.responseText;}
|
||||
}
|
||||
}
|
||||
function post(url){
|
||||
request = new XMLHttpRequest();request.open('POST', url, true);request.send();
|
||||
request.onreadystatechange=function(){
|
||||
if (this.readyState==4){return request.responseText;}
|
||||
}
|
||||
}
|
||||
|
||||
// Classes ----------------------------------------------------
|
||||
function addClass(obj,classname,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){_acl(obj,classname);return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {_acl(el,classname);});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function removeClass(obj,classname,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){_rcl(obj,classname);return true;}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {_rcl(el,classname);});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function toggleClass(obj,classname,callback){
|
||||
obj=_(obj);if (!obj||obj.length==0){return false}
|
||||
if (!obj.length){_tcl(obj,classname);}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {_tcl(el,classname)});
|
||||
}
|
||||
if (callback){callback();}
|
||||
}
|
||||
function hasClass(obj,classname,callback){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
return obj.className && new RegExp("(\\s|^)" + classname + "(\\s|$)").test(obj.className);
|
||||
}
|
||||
|
||||
// visibilité ----------------------------------------------------
|
||||
function show(obj){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.style.display ='';}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.style.display ='';});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function hide(obj,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.style.display ='none';}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.style.display ='none';});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function toggle(obj,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){obj.style.display=_tglval(obj.style.display, 'none' ,'');}
|
||||
if (obj.length){
|
||||
[].forEach.call(obj, function(el) {el.style.display=_tglval(el.style.display, 'none' ,'');});
|
||||
}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function fadeTo(obj,opacity,callback){return style(obj,'opacity:'+opacity+';');}
|
||||
|
||||
|
||||
// attributs ----------------------------------------------------
|
||||
function attr(obj,attr,value){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (!obj.length){
|
||||
if (value){obj.setAttribute(attr,value);}
|
||||
else{
|
||||
return obj.getAttribute(attr);
|
||||
}
|
||||
}
|
||||
if (obj.length){
|
||||
if (value){
|
||||
[].forEach.call(obj, function(el) {el.setAttribute(attr,value);});
|
||||
}else{return obj[0].getAttribute(attr);}
|
||||
}
|
||||
}
|
||||
function removeAttr(obj,attr,value){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
[].forEach.call(obj, function(el) {el.removeAttribute(attr,value);});
|
||||
}
|
||||
function style(obj,css,callback){return attr(obj,'style',css); }
|
||||
function id(obj){return attr(obj,'id');}
|
||||
function href(obj){return attr(obj,'href');}
|
||||
|
||||
|
||||
|
||||
// Evènement ----------------------------------------------------
|
||||
function on(ev,obj,funct,callback){
|
||||
obj=_(obj);
|
||||
if (!obj){obj=window.document;}
|
||||
if (!obj[0]){_adev(obj,ev,funct);}
|
||||
else{[].forEach.call(obj, function(el) {_adev(el,ev,funct);});}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function onDomChange(funct,callback){on("DOMSubtreeModified",'',funct);if (callback) {callback();} }
|
||||
|
||||
// divers ----------------------------------------------------
|
||||
function isInViewport(obj) {
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
var rect = obj.getBoundingClientRect();
|
||||
var html = document.documentElement;
|
||||
return (
|
||||
rect.top >= 0 &&
|
||||
rect.left >= 0 &&
|
||||
rect.bottom <= (window.innerHeight || html.clientHeight) &&
|
||||
rect.right <= (window.innerWidth || html.clientWidth)
|
||||
);
|
||||
}
|
||||
function each(obj,funct,callback){
|
||||
obj=_(obj);if (!obj){return false}
|
||||
if (obj.length){Array.prototype.forEach.call(obj,funct);}
|
||||
if (callback) {callback();}
|
||||
}
|
||||
function numVal(obj){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
if (val=attr(obj,"value")){return parseInt(val);}else{return parseInt(obj.innerHTML);}
|
||||
}
|
||||
function value(obj){
|
||||
obj=_(obj,1);if (!obj){return false}
|
||||
if (val=attr(obj,"value")){return val;}else{return obj.innerHTML;}
|
||||
}
|
||||
|
||||
function refresh(){location.reload();}
|
||||
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
(function(h,o,g){var p=function(){for(var b=/audio(.min)?.js.*/,a=document.getElementsByTagName("script"),c=0,d=a.length;c<d;c++){var e=a[c].getAttribute("src");if(b.test(e))return e.replace(b,"")}}();g[h]={instanceCount:0,instances:{},flashSource:' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="$1" width="1" height="1" name="$1" style="position: absolute; left: -1px;"> <param name="movie" value="$2?playerInstance='+h+'.instances[\'$1\']&datetime=$3"> <param name="allowscriptaccess" value="always"> <embed name="$1" src="$2?playerInstance='+
|
||||
h+'.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess="always"> </object>',settings:{autoplay:false,loop:false,preload:true,imageLocation:p+"player-graphics.gif",swfLocation:p+"audiojs.swf",useFlash:function(){var b=document.createElement("audio");return!(b.canPlayType&&b.canPlayType("audio/mpeg;").replace(/no/,""))}(),hasFlash:function(){if(navigator.plugins&&navigator.plugins.length&&navigator.plugins["Shockwave Flash"])return true;else if(navigator.mimeTypes&&navigator.mimeTypes.length){var b=
|
||||
navigator.mimeTypes["application/x-shockwave-flash"];return b&&b.enabledPlugin}else try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(a){}return false}(),createPlayer:{markup:' <div class="play-pause"> <p class="play"></p> <p class="pause"></p> <p class="loading"></p> <p class="error"></p> </div> <div class="scrubber"> <div class="progress"></div> <div class="loaded"></div> </div> <div class="time"> <em class="played">00:00</em>/<strong class="duration">00:00</strong> </div> <div class="error-message"></div>',
|
||||
playPauseClass:"play-pause",scrubberClass:"scrubber",progressClass:"progress",loaderClass:"loaded",timeClass:"time",durationClass:"duration",playedClass:"played",errorMessageClass:"error-message",playingClass:"playing",loadingClass:"loading",errorClass:"error"},css:' .audiojs audio { position: absolute; left: -1px; } .audiojs { width: 460px; height: 36px; background: #404040; overflow: hidden; font-family: monospace; font-size: 12px; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #444), color-stop(0.5, #555), color-stop(0.51, #444), color-stop(1, #444)); background-image: -moz-linear-gradient(center top, #444 0%, #555 50%, #444 51%, #444 100%); -webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -moz-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -o-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); } .audiojs .play-pause { width: 25px; height: 40px; padding: 4px 6px; margin: 0px; float: left; overflow: hidden; border-right: 1px solid #000; } .audiojs p { display: none; width: 25px; height: 40px; margin: 0px; cursor: pointer; } .audiojs .play { display: block; } .audiojs .scrubber { position: relative; float: left; width: 280px; background: #5a5a5a; height: 14px; margin: 10px; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; } .audiojs .progress { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #ccc; z-index: 1; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ccc), color-stop(0.5, #ddd), color-stop(0.51, #ccc), color-stop(1, #ccc)); background-image: -moz-linear-gradient(center top, #ccc 0%, #ddd 50%, #ccc 51%, #ccc 100%); } .audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #333), color-stop(0.51, #222), color-stop(1, #222)); background-image: -moz-linear-gradient(center top, #222 0%, #333 50%, #222 51%, #222 100%); } .audiojs .time { float: left; height: 36px; line-height: 36px; margin: 0px 0px 0px 6px; padding: 0px 6px 0px 12px; border-left: 1px solid #000; color: #ddd; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5); } .audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; } .audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; } .audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff; text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; } .audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; } .audiojs .play { background: url("$1") -2px -1px no-repeat; } .audiojs .loading { background: url("$1") -2px -31px no-repeat; } .audiojs .error { background: url("$1") -2px -61px no-repeat; } .audiojs .pause { background: url("$1") -2px -91px no-repeat; } .playing .play, .playing .loading, .playing .error { display: none; } .playing .pause { display: block; } .loading .play, .loading .pause, .loading .error { display: none; } .loading .loading { display: block; } .error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; } .error .error { display: block; } .error .play-pause p { cursor: auto; } .error .error-message { display: block; }',
|
||||
trackEnded:function(){},flashError:function(){var b=this.settings.createPlayer,a=j(b.errorMessageClass,this.wrapper),c='Missing <a href="http://get.adobe.com/flashplayer/">flash player</a> plugin.';if(this.mp3)c+=' <a href="'+this.mp3+'">Download audio file</a>.';g[h].helpers.removeClass(this.wrapper,b.loadingClass);g[h].helpers.addClass(this.wrapper,b.errorClass);a.innerHTML=c},loadError:function(){var b=this.settings.createPlayer,a=j(b.errorMessageClass,this.wrapper);g[h].helpers.removeClass(this.wrapper,
|
||||
b.loadingClass);g[h].helpers.addClass(this.wrapper,b.errorClass);a.innerHTML='Error loading: "'+this.mp3+'"'},init:function(){g[h].helpers.addClass(this.wrapper,this.settings.createPlayer.loadingClass)},loadStarted:function(){var b=this.settings.createPlayer,a=j(b.durationClass,this.wrapper),c=Math.floor(this.duration/60),d=Math.floor(this.duration%60);g[h].helpers.removeClass(this.wrapper,b.loadingClass);a.innerHTML=(c<10?"0":"")+c+":"+(d<10?"0":"")+d},loadProgress:function(b){var a=this.settings.createPlayer,
|
||||
c=j(a.scrubberClass,this.wrapper);j(a.loaderClass,this.wrapper).style.width=c.offsetWidth*b+"px"},playPause:function(){this.playing?this.settings.play():this.settings.pause()},play:function(){g[h].helpers.addClass(this.wrapper,this.settings.createPlayer.playingClass)},pause:function(){g[h].helpers.removeClass(this.wrapper,this.settings.createPlayer.playingClass)},updatePlayhead:function(b){var a=this.settings.createPlayer,c=j(a.scrubberClass,this.wrapper);j(a.progressClass,this.wrapper).style.width=
|
||||
c.offsetWidth*b+"px";a=j(a.playedClass,this.wrapper);c=this.duration*b;b=Math.floor(c/60);c=Math.floor(c%60);a.innerHTML=(b<10?"0":"")+b+":"+(c<10?"0":"")+c}},create:function(b,a){a=a||{};return b.length?this.createAll(a,b):this.newInstance(b,a)},createAll:function(b,a){var c=a||document.getElementsByTagName("audio"),d=[];b=b||{};for(var e=0,i=c.length;e<i;e++)d.push(this.newInstance(c[e],b));return d},newInstance:function(b,a){var c=this.helpers.clone(this.settings),d="audiojs"+this.instanceCount,
|
||||
e="audiojs_wrapper"+this.instanceCount;this.instanceCount++;if(b.getAttribute("autoplay")!=null)c.autoplay=true;if(b.getAttribute("loop")!=null)c.loop=true;if(b.getAttribute("preload")=="none")c.preload=false;a&&this.helpers.merge(c,a);if(c.createPlayer.markup)b=this.createPlayer(b,c.createPlayer,e);else b.parentNode.setAttribute("id",e);e=new g[o](b,c);c.css&&this.helpers.injectCss(e,c.css);if(c.useFlash&&c.hasFlash){this.injectFlash(e,d);this.attachFlashEvents(e.wrapper,e)}else c.useFlash&&!c.hasFlash&&
|
||||
this.settings.flashError.apply(e);if(!c.useFlash||c.useFlash&&c.hasFlash)this.attachEvents(e.wrapper,e);return this.instances[d]=e},createPlayer:function(b,a,c){var d=document.createElement("div"),e=b.cloneNode(true);d.setAttribute("class","audiojs");d.setAttribute("className","audiojs");d.setAttribute("id",c);if(e.outerHTML&&!document.createElement("audio").canPlayType){e=this.helpers.cloneHtml5Node(b);d.innerHTML=a.markup;d.appendChild(e);b.outerHTML=d.outerHTML;d=document.getElementById(c)}else{d.appendChild(e);
|
||||
d.innerHTML+=a.markup;b.parentNode.replaceChild(d,b)}return d.getElementsByTagName("audio")[0]},attachEvents:function(b,a){if(a.settings.createPlayer){var c=a.settings.createPlayer,d=j(c.playPauseClass,b),e=j(c.scrubberClass,b);g[h].events.addListener(d,"click",function(){a.playPause.apply(a)});g[h].events.addListener(e,"click",function(i){i=i.clientX;var f=this,k=0;if(f.offsetParent){do k+=f.offsetLeft;while(f=f.offsetParent)}a.skipTo((i-k)/e.offsetWidth)});if(!a.settings.useFlash){g[h].events.trackLoadProgress(a);
|
||||
g[h].events.addListener(a.element,"timeupdate",function(){a.updatePlayhead.apply(a)});g[h].events.addListener(a.element,"ended",function(){a.trackEnded.apply(a)});g[h].events.addListener(a.source,"error",function(){clearInterval(a.readyTimer);clearInterval(a.loadTimer);a.settings.loadError.apply(a)})}}},attachFlashEvents:function(b,a){a.swfReady=false;a.load=function(c){a.mp3=c;a.swfReady&&a.element.load(c)};a.loadProgress=function(c,d){a.loadedPercent=c;a.duration=d;a.settings.loadStarted.apply(a);
|
||||
a.settings.loadProgress.apply(a,[c])};a.skipTo=function(c){if(!(c>a.loadedPercent)){a.updatePlayhead.call(a,[c]);a.element.skipTo(c)}};a.updatePlayhead=function(c){a.settings.updatePlayhead.apply(a,[c])};a.play=function(){if(!a.settings.preload){a.settings.preload=true;a.element.init(a.mp3)}a.playing=true;a.element.pplay();a.settings.play.apply(a)};a.pause=function(){a.playing=false;a.element.ppause();a.settings.pause.apply(a)};a.setVolume=function(c){a.element.setVolume(c)};a.loadStarted=function(){a.swfReady=
|
||||
true;a.settings.preload&&a.element.init(a.mp3);a.settings.autoplay&&a.play.apply(a)}},injectFlash:function(b,a){var c=this.flashSource.replace(/\$1/g,a);c=c.replace(/\$2/g,b.settings.swfLocation);c=c.replace(/\$3/g,+new Date+Math.random());var d=b.wrapper.innerHTML,e=document.createElement("div");e.innerHTML=c+d;b.wrapper.innerHTML=e.innerHTML;b.element=this.helpers.getSwf(a)},helpers:{merge:function(b,a){for(attr in a)if(b.hasOwnProperty(attr)||a.hasOwnProperty(attr))b[attr]=a[attr]},clone:function(b){if(b==
|
||||
null||typeof b!=="object")return b;var a=new b.constructor,c;for(c in b)a[c]=arguments.callee(b[c]);return a},addClass:function(b,a){RegExp("(\\s|^)"+a+"(\\s|$)").test(b.className)||(b.className+=" "+a)},removeClass:function(b,a){b.className=b.className.replace(RegExp("(\\s|^)"+a+"(\\s|$)")," ")},injectCss:function(b,a){for(var c="",d=document.getElementsByTagName("style"),e=a.replace(/\$1/g,b.settings.imageLocation),i=0,f=d.length;i<f;i++){var k=d[i].getAttribute("title");if(k&&~k.indexOf("audiojs")){f=
|
||||
d[i];if(f.innerHTML===e)return;c=f.innerHTML;break}}d=document.getElementsByTagName("head")[0];i=d.firstChild;f=document.createElement("style");if(d){f.setAttribute("type","text/css");f.setAttribute("title","audiojs");if(f.styleSheet)f.styleSheet.cssText=c+e;else f.appendChild(document.createTextNode(c+e));i?d.insertBefore(f,i):d.appendChild(styleElement)}},cloneHtml5Node:function(b){var a=document.createDocumentFragment(),c=a.createElement?a:document;c.createElement("audio");c=c.createElement("div");
|
||||
a.appendChild(c);c.innerHTML=b.outerHTML;return c.firstChild},getSwf:function(b){b=document[b]||window[b];return b.length>1?b[b.length-1]:b}},events:{memoryLeaking:false,listeners:[],addListener:function(b,a,c){if(b.addEventListener)b.addEventListener(a,c,false);else if(b.attachEvent){this.listeners.push(b);if(!this.memoryLeaking){window.attachEvent("onunload",function(){if(this.listeners)for(var d=0,e=this.listeners.length;d<e;d++)g[h].events.purge(this.listeners[d])});this.memoryLeaking=true}b.attachEvent("on"+
|
||||
a,function(){c.call(b,window.event)})}},trackLoadProgress:function(b){if(b.settings.preload){var a,c;b=b;var d=/(ipod|iphone|ipad)/i.test(navigator.userAgent);a=setInterval(function(){if(b.element.readyState>-1)d||b.init.apply(b);if(b.element.readyState>1){b.settings.autoplay&&b.play.apply(b);clearInterval(a);c=setInterval(function(){b.loadProgress.apply(b);b.loadedPercent>=1&&clearInterval(c)})}},10);b.readyTimer=a;b.loadTimer=c}},purge:function(b){var a=b.attributes,c;if(a)for(c=0;c<a.length;c+=
|
||||
1)if(typeof b[a[c].name]==="function")b[a[c].name]=null;if(a=b.childNodes)for(c=0;c<a.length;c+=1)purge(b.childNodes[c])},ready:function(){return function(b){var a=window,c=false,d=true,e=a.document,i=e.documentElement,f=e.addEventListener?"addEventListener":"attachEvent",k=e.addEventListener?"removeEventListener":"detachEvent",n=e.addEventListener?"":"on",m=function(l){if(!(l.type=="readystatechange"&&e.readyState!="complete")){(l.type=="load"?a:e)[k](n+l.type,m,false);if(!c&&(c=true))b.call(a,l.type||
|
||||
l)}},q=function(){try{i.doScroll("left")}catch(l){setTimeout(q,50);return}m("poll")};if(e.readyState=="complete")b.call(a,"lazy");else{if(e.createEventObject&&i.doScroll){try{d=!a.frameElement}catch(r){}d&&q()}e[f](n+"DOMContentLoaded",m,false);e[f](n+"readystatechange",m,false);a[f](n+"load",m,false)}}}()}};g[o]=function(b,a){this.element=b;this.wrapper=b.parentNode;this.source=b.getElementsByTagName("source")[0]||b;this.mp3=function(c){var d=c.getElementsByTagName("source")[0];return c.getAttribute("src")||
|
||||
(d?d.getAttribute("src"):null)}(b);this.settings=a;this.loadStartedCalled=false;this.loadedPercent=0;this.duration=1;this.playing=false};g[o].prototype={updatePlayhead:function(){this.settings.updatePlayhead.apply(this,[this.element.currentTime/this.duration])},skipTo:function(b){if(!(b>this.loadedPercent)){this.element.currentTime=this.duration*b;this.updatePlayhead()}},load:function(b){this.loadStartedCalled=false;this.source.setAttribute("src",b);this.element.load();this.mp3=b;g[h].events.trackLoadProgress(this)},
|
||||
loadError:function(){this.settings.loadError.apply(this)},init:function(){this.settings.init.apply(this)},loadStarted:function(){if(!this.element.duration)return false;this.duration=this.element.duration;this.updatePlayhead();this.settings.loadStarted.apply(this)},loadProgress:function(){if(this.element.buffered!=null&&this.element.buffered.length){if(!this.loadStartedCalled)this.loadStartedCalled=this.loadStarted();this.loadedPercent=this.element.buffered.end(this.element.buffered.length-1)/this.duration;
|
||||
this.settings.loadProgress.apply(this,[this.loadedPercent])}},playPause:function(){this.playing?this.pause():this.play()},play:function(){/(ipod|iphone|ipad)/i.test(navigator.userAgent)&&this.element.readyState==0&&this.init.apply(this);if(!this.settings.preload){this.settings.preload=true;this.element.setAttribute("preload","auto");g[h].events.trackLoadProgress(this)}this.playing=true;this.element.play();this.settings.play.apply(this)},pause:function(){this.playing=false;this.element.pause();this.settings.pause.apply(this)},
|
||||
setVolume:function(b){this.element.volume=b},trackEnded:function(){this.skipTo.apply(this,[0]);this.settings.loop||this.pause.apply(this);this.settings.trackEnded.apply(this)}};var j=function(b,a){var c=[];a=a||document;if(a.getElementsByClassName)c=a.getElementsByClassName(b);else{var d,e,i=a.getElementsByTagName("*"),f=RegExp("(^|\\s)"+b+"(\\s|$)");d=0;for(e=i.length;d<e;d++)f.test(i[d].className)&&c.push(i[d])}return c.length>1?c:c[0]}})("audiojs","audiojsInstance",this);
|
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
hey, [be]Lazy.js - v1.5.2 - 2015.12.01
|
||||
A lazy loading and multi-serving image script
|
||||
(c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
|
||||
*/
|
||||
(function(k,f){"function"===typeof define&&define.amd?define(f):"object"===typeof exports?module.exports=f():k.Blazy=f()})(this,function(){function k(b){var c=b._util;c.elements=v(b.options.selector);c.count=c.elements.length;c.destroyed&&(c.destroyed=!1,b.options.container&&h(b.options.container,function(a){l(a,"scroll",c.validateT)}),l(window,"resize",c.saveViewportOffsetT),l(window,"resize",c.validateT),l(window,"scroll",c.validateT));f(b)}function f(b){for(var c=b._util,a=0;a<c.count;a++){var d=c.elements[a],g=d.getBoundingClientRect();if(g.right>=e.left&&g.bottom>=e.top&&g.left<=e.right&&g.top<=e.bottom||n(d,b.options.successClass))b.load(d),c.elements.splice(a,1),c.count--,a--}0===c.count&&b.destroy()}function q(b,c,a){if(!n(b,a.successClass)&&(c||a.loadInvisible||0<b.offsetWidth&&0<b.offsetHeight))if(c=b.getAttribute(p)||b.getAttribute(a.src)){c=c.split(a.separator);var d=c[r&&1<c.length?1:0],g="img"===b.nodeName.toLowerCase();h(a.breakpoints,function(a){b.removeAttribute(a.src)});b.removeAttribute(a.src);g||void 0===b.src?(c=new Image,c.onerror=function(){a.error&&a.error(b,"invalid");b.className=b.className+" "+a.errorClass},c.onload=function(){g?b.src=d:b.style.backgroundImage='url("'+d+'")';b.className=b.className+" "+a.successClass;a.success&&a.success(b)},c.src=d):(b.src=d,b.className=b.className+" "+a.successClass)}else a.error&&a.error(b,"missing"),n(b,a.errorClass)||(b.className=b.className+" "+a.errorClass)}function n(b,c){return-1!==(" "+b.className+" ").indexOf(" "+c+" ")}function v(b){var c=[];b=document.querySelectorAll(b);for(var a=b.length;a--;c.unshift(b[a]));return c}function t(b){e.bottom=(window.innerHeight||document.documentElement.clientHeight)+b;e.right=(window.innerWidth||document.documentElement.clientWidth)+b}function l(b,c,a){b.attachEvent?b.attachEvent&&b.attachEvent("on"+c,a):b.addEventListener(c,a,!1)}function m(b,c,a){b.detachEvent?b.detachEvent&&b.detachEvent("on"+c,a):b.removeEventListener(c,a,!1)}function h(b,c){if(b&&c)for(var a=b.length,d=0;d<a&&!1!==c(b[d],d);d++);}function u(b,c,a){var d=0;return function(){var g=+new Date;g-d<c||(d=g,b.apply(a,arguments))}}var p,e,r;return function(b){if(!document.querySelectorAll){var c=document.createStyleSheet();document.querySelectorAll=function(a,b,d,e,f){f=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(d=a.length;d--;){c.addRule(a[d],"k:v");for(e=f.length;e--;)f[e].currentStyle.k&&b.push(f[e]);c.removeRule(0)}return b}}var a=this,d=a._util={};d.elements=[];d.destroyed=!0;a.options=b||{};a.options.error=a.options.error||!1;a.options.offset=a.options.offset||100;a.options.success=a.options.success||!1;a.options.selector=a.options.selector||".b-lazy";a.options.separator=a.options.separator||"|";a.options.container=a.options.container?document.querySelectorAll(a.options.container):!1;a.options.errorClass=a.options.errorClass||"b-error";a.options.breakpoints=a.options.breakpoints||!1;a.options.loadInvisible=a.options.loadInvisible||!1;a.options.successClass=a.options.successClass||"b-loaded";a.options.validateDelay=a.options.validateDelay||25;a.options.saveViewportOffsetDelay=a.options.saveViewportOffsetDelay||50;a.options.src=p=a.options.src||"data-src";r=1<window.devicePixelRatio;e={};e.top=0-a.options.offset;e.left=0-a.options.offset;a.revalidate=function(){k(this)};a.load=function(a,b){var c=this.options;void 0===a.length?q(a,b,c):h(a,function(a){q(a,b,c)})};a.destroy=function(){var a=this._util;this.options.container&&h(this.options.container,function(b){m(b,"scroll",a.validateT)});m(window,"scroll",a.validateT);m(window,"resize",a.validateT);m(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};d.validateT=u(function(){f(a)},a.options.validateDelay,a);d.saveViewportOffsetT=u(function(){t(a.options.offset)},a.options.saveViewportOffsetDelay,a);t(a.options.offset);h(a.options.breakpoints,function(a){if(a.width>=window.screen.width)return p=a.src,!1});k(a)}});
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
Minimalist Lightbox by Bronco (bronco@warriordudimanche.net)
|
||||
*/
|
||||
var lb_hide=function(){
|
||||
var lb_nav=document.getElementById("lb_nav");
|
||||
var lb_overlay=document.getElementById("lb_overlay");
|
||||
|
||||
lb_overlay.style.height=0;
|
||||
lb_overlay.style.opacity=0;
|
||||
lb_nav.style.height=0;
|
||||
lb_nav.style.opacity=0;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
var lb_show=function(obj){
|
||||
var lb_overlay=document.getElementById("lb_overlay");
|
||||
var lb_content=document.getElementById("lb_content");
|
||||
var lb_img=document.getElementById("lb_img");
|
||||
var lb_info=document.getElementById("lb_content-info");
|
||||
var lb_nav=document.getElementById("lb_nav");
|
||||
var lb_prev=document.getElementById("lb_prev");
|
||||
var lb_next=document.getElementById("lb_next");
|
||||
var type=obj.getAttribute("data-type");
|
||||
var path=obj.getAttribute("href");
|
||||
var alt=obj.getAttribute("alt");
|
||||
var group=obj.getAttribute("data-group");
|
||||
if (group==null&&path!="prev"&&path!="next"){
|
||||
lb_prev.style.display="none";
|
||||
lb_next.style.display="none";
|
||||
}else{
|
||||
group_set=document.querySelectorAll("a[data-group="+group+"]");
|
||||
if (group_set.length>0){
|
||||
for (var index=0; index<group_set.length; ++index){
|
||||
if (group_set[index].getAttribute("href")==path){
|
||||
if (index>0){
|
||||
prev=group_set[index-1];
|
||||
lb_prev.style.display="block";
|
||||
lb_next.setAttribute("style","margin-left:0");
|
||||
}else{
|
||||
prev=null;
|
||||
lb_prev.setAttribute("style","display:none;");
|
||||
lb_next.setAttribute("style","margin-left:32px");
|
||||
}
|
||||
if (index<group_set.length-1){
|
||||
next=group_set[index+1];
|
||||
lb_next.style.display="block";
|
||||
}else{
|
||||
next=null;
|
||||
lb_next.style.display="none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
lb_prev.style.display="none";
|
||||
lb_next.style.display="none";
|
||||
}
|
||||
|
||||
}
|
||||
if (path=="prev"&&prev!=null){lb_show(prev);return false;}
|
||||
if (path=="next"&&next!=null){lb_show(next);return false;}
|
||||
|
||||
lb_img.setAttribute("src",path);
|
||||
lb_info.innerHTML=alt;
|
||||
lb_overlay.style.height="100%";
|
||||
lb_overlay.style.opacity=100;
|
||||
lb_nav.style.height="48px";
|
||||
lb_nav.style.opacity=100;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
}
|
|
@ -1,143 +0,0 @@
|
|||
;(function(root, name, output){
|
||||
if(typeof define == "function" && define.amd) return define([], output)
|
||||
if(typeof module == "object" && module.exports) module.exports = output()
|
||||
else root[name] = output()
|
||||
})(this.window, "m3uStreamPlayer", function(){
|
||||
|
||||
'use strict';
|
||||
|
||||
// Defaults
|
||||
var exports = {
|
||||
selector: '[data-playlist]',
|
||||
debug: false
|
||||
};
|
||||
|
||||
|
||||
// Load playlist, and get sources.
|
||||
var _getPlaylistSources = function(elem) {
|
||||
// XHR Request to playlist file
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = process;
|
||||
xhr.open("GET", elem.getAttribute('data-playlist'), true);
|
||||
xhr.send();
|
||||
function process() {
|
||||
if (xhr.readyState == 4) {
|
||||
// m3uToUrl From https://github.com/aitorciki/jquery-playlist/blob/master/jquery.playlist.js
|
||||
elem.sources = xhr.responseText.match(/^(?!#)(?!\s).*$/mg).filter(function(element){return (element);});
|
||||
if (exports.debug) console.log("Sources: "+elem.sources);
|
||||
// Load first source
|
||||
elem.src = elem.sources[0];
|
||||
// Play first source
|
||||
if (elem.getAttribute('autoplay')) elem.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get current source index
|
||||
var _getSourceIdx = function(elem) {
|
||||
for(var i = 0; i < elem.sources.length; i++){
|
||||
if (elem.currentSrc == elem.sources[i]) return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Jump to next source.
|
||||
var _nextSource = function(elem) {
|
||||
var sourceIdx = _getSourceIdx(elem);
|
||||
var nextSourceIdx = (sourceIdx == elem.sources.length -1 ) ? 0 : sourceIdx + 1;
|
||||
|
||||
elem.src = elem.sources[nextSourceIdx];
|
||||
if (exports.debug) console.log("Source updated: "+elem.src);
|
||||
elem.play();
|
||||
}
|
||||
|
||||
// Randomize source.
|
||||
var _randomizeSource = function(elem) {
|
||||
elem.src = elem.sources[Math.floor(Math.random()*elem.sources.length)];
|
||||
// this.currentTime = 0;
|
||||
if (exports.debug) console.log("Source randomized: "+elem.src);
|
||||
elem.play();
|
||||
}
|
||||
|
||||
// Display human readable message in console.
|
||||
var _errorMessage = function(event) {
|
||||
switch (event.target.error.code) {
|
||||
case event.target.error.MEDIA_ERR_ABORTED:
|
||||
return "The fetching process for the media resource was aborted by the user agent at the user's request.";
|
||||
case event.target.error.MEDIA_ERR_NETWORK:
|
||||
return "A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable.";
|
||||
case event.target.error.MEDIA_ERR_DECODE:
|
||||
return "An error of some description occurred while decoding the media resource, after the resource was established to be usable.";
|
||||
case event.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
|
||||
return "The media resource indicated by the src attribute was not suitable.";
|
||||
default:
|
||||
return "An unknown error occurred.";
|
||||
}
|
||||
}
|
||||
|
||||
// Process element, attach listeners
|
||||
var _process = function(elem) {
|
||||
elem.sources = [];
|
||||
_getPlaylistSources(elem);
|
||||
|
||||
// On error, update source, and play again.
|
||||
elem.addEventListener('error', function(e) {
|
||||
if (exports.debug) console.log("Error: " + _errorMessage(e));
|
||||
_nextSource(this);
|
||||
});
|
||||
|
||||
// On end, update source, and play again.
|
||||
elem.addEventListener('ended', function() {
|
||||
if (exports.debug) console.log("Ended");
|
||||
_nextSource(this);
|
||||
});
|
||||
|
||||
// Show current source, debug only.
|
||||
elem.addEventListener('play', function(e) {
|
||||
if (exports.debug) console.log("Play: "+this.currentSrc);
|
||||
});
|
||||
|
||||
// Pause event, debug only.
|
||||
elem.addEventListener('pause', function() {
|
||||
if (exports.debug) console.log("Pause");
|
||||
});
|
||||
}
|
||||
|
||||
// Expose nextSource function
|
||||
exports.nextSource = function(elem) {
|
||||
_nextSource(elem);
|
||||
}
|
||||
|
||||
// Expose randomizeSource function
|
||||
exports.randomizeSource = function(elem) {
|
||||
_randomizeSource(elem);
|
||||
}
|
||||
|
||||
exports.init = function (obj) {
|
||||
// Allow string to be passed as argument.
|
||||
if (typeof obj === "string") obj = {selector: obj}
|
||||
|
||||
// Mix options with defaults.
|
||||
for (var key in obj) {
|
||||
exports[key] = obj[key];
|
||||
}
|
||||
|
||||
// Prevent IE8 from bugging when a calling console.log
|
||||
if (exports.debug) {
|
||||
if (!window.console) window.console = {};
|
||||
if (!window.console.log) window.console.log = function () { };
|
||||
}
|
||||
|
||||
// Get nodes, and process them.
|
||||
var nodes = document.querySelectorAll(exports.selector);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var node = nodes[i];
|
||||
if (node.nodeName === "VIDEO" || node.nodeName === "AUDIO") {
|
||||
_process(node);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
});
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
function play(song_link) {
|
||||
removeClass(document.querySelectorAll(".sound"),"playing");
|
||||
addClass(song_link,"playing");
|
||||
|
||||
player=document.querySelector("audio");
|
||||
player.setAttribute("src",song_link.getAttribute("data-src"));
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Setup the player to autoplay the next track (personal change in vanilla js)
|
||||
audiojs.events.ready(function() {
|
||||
var a = audiojs.createAll(
|
||||
{
|
||||
trackEnded: function() {
|
||||
var current = document.querySelector(".playing");
|
||||
next=next(current);
|
||||
removeClass(current,"playing");
|
||||
addClass(next,"playing");
|
||||
audio.load(next.getAttribute("data-src"));
|
||||
audio.play();
|
||||
},
|
||||
css:false}
|
||||
);
|
||||
audio=a[0];
|
||||
on ("click","span[data-volume]",function(){
|
||||
audio.setVolume(this.getAttribute("data-volume"));
|
||||
removeClass("span[data-volume]","active");
|
||||
toggleClass(this,"active");
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
// Load in the first track
|
||||
var audio = a[0];
|
||||
first_link=first(".sound");
|
||||
first = first_link.getAttribute("data-src");
|
||||
addClass(first_link,"playing");
|
||||
audio.load(first);
|
||||
});
|
|
@ -1,760 +0,0 @@
|
|||
/* qr.js -- QR code generator in Javascript (revision 2011-01-19)
|
||||
* Written by Kang Seonghoon <public+qrjs@mearie.org>.
|
||||
*
|
||||
* This source code is in the public domain; if your jurisdiction does not
|
||||
* recognize the public domain the terms of Creative Commons CC0 license
|
||||
* apply. In the other words, you can always do what you want.
|
||||
*/
|
||||
|
||||
var QRCode = (function(){
|
||||
|
||||
/* Quick overview: QR code composed of 2D array of modules (a rectangular
|
||||
* area that conveys one bit of information); some modules are fixed to help
|
||||
* the recognition of the code, and remaining data modules are further divided
|
||||
* into 8-bit code words which are augumented by Reed-Solomon error correcting
|
||||
* codes (ECC). There could be multiple ECCs, in the case the code is so large
|
||||
* that it is helpful to split the raw data into several chunks.
|
||||
*
|
||||
* The number of modules is determined by the code's "version", ranging from 1
|
||||
* (21x21) to 40 (177x177). How many ECC bits are used is determined by the
|
||||
* ECC level (L/M/Q/H). The number and size (and thus the order of generator
|
||||
* polynomial) of ECCs depend to the version and ECC level.
|
||||
*/
|
||||
|
||||
// per-version information (cf. JIS X 0510:2004 pp. 30--36, 71)
|
||||
//
|
||||
// [0]: the degree of generator polynomial by ECC levels
|
||||
// [1]: # of code blocks by ECC levels
|
||||
// [2]: left-top positions of alignment patterns
|
||||
//
|
||||
// the number in this table (in particular, [0]) does not exactly match with
|
||||
// the numbers in the specficiation. see augumenteccs below for the reason.
|
||||
var VERSIONS = [
|
||||
null,
|
||||
[[10, 7,17,13], [ 1, 1, 1, 1], []],
|
||||
[[16,10,28,22], [ 1, 1, 1, 1], [4,16]],
|
||||
[[26,15,22,18], [ 1, 1, 2, 2], [4,20]],
|
||||
[[18,20,16,26], [ 2, 1, 4, 2], [4,24]],
|
||||
[[24,26,22,18], [ 2, 1, 4, 4], [4,28]],
|
||||
[[16,18,28,24], [ 4, 2, 4, 4], [4,32]],
|
||||
[[18,20,26,18], [ 4, 2, 5, 6], [4,20,36]],
|
||||
[[22,24,26,22], [ 4, 2, 6, 6], [4,22,40]],
|
||||
[[22,30,24,20], [ 5, 2, 8, 8], [4,24,44]],
|
||||
[[26,18,28,24], [ 5, 4, 8, 8], [4,26,48]],
|
||||
[[30,20,24,28], [ 5, 4,11, 8], [4,28,52]],
|
||||
[[22,24,28,26], [ 8, 4,11,10], [4,30,56]],
|
||||
[[22,26,22,24], [ 9, 4,16,12], [4,32,60]],
|
||||
[[24,30,24,20], [ 9, 4,16,16], [4,24,44,64]],
|
||||
[[24,22,24,30], [10, 6,18,12], [4,24,46,68]],
|
||||
[[28,24,30,24], [10, 6,16,17], [4,24,48,72]],
|
||||
[[28,28,28,28], [11, 6,19,16], [4,28,52,76]],
|
||||
[[26,30,28,28], [13, 6,21,18], [4,28,54,80]],
|
||||
[[26,28,26,26], [14, 7,25,21], [4,28,56,84]],
|
||||
[[26,28,28,30], [16, 8,25,20], [4,32,60,88]],
|
||||
[[26,28,30,28], [17, 8,25,23], [4,26,48,70,92]],
|
||||
[[28,28,24,30], [17, 9,34,23], [4,24,48,72,96]],
|
||||
[[28,30,30,30], [18, 9,30,25], [4,28,52,76,100]],
|
||||
[[28,30,30,30], [20,10,32,27], [4,26,52,78,104]],
|
||||
[[28,26,30,30], [21,12,35,29], [4,30,56,82,108]],
|
||||
[[28,28,30,28], [23,12,37,34], [4,28,56,84,112]],
|
||||
[[28,30,30,30], [25,12,40,34], [4,32,60,88,116]],
|
||||
[[28,30,30,30], [26,13,42,35], [4,24,48,72,96,120]],
|
||||
[[28,30,30,30], [28,14,45,38], [4,28,52,76,100,124]],
|
||||
[[28,30,30,30], [29,15,48,40], [4,24,50,76,102,128]],
|
||||
[[28,30,30,30], [31,16,51,43], [4,28,54,80,106,132]],
|
||||
[[28,30,30,30], [33,17,54,45], [4,32,58,84,110,136]],
|
||||
[[28,30,30,30], [35,18,57,48], [4,28,56,84,112,140]],
|
||||
[[28,30,30,30], [37,19,60,51], [4,32,60,88,116,144]],
|
||||
[[28,30,30,30], [38,19,63,53], [4,28,52,76,100,124,148]],
|
||||
[[28,30,30,30], [40,20,66,56], [4,22,48,74,100,126,152]],
|
||||
[[28,30,30,30], [43,21,70,59], [4,26,52,78,104,130,156]],
|
||||
[[28,30,30,30], [45,22,74,62], [4,30,56,82,108,134,160]],
|
||||
[[28,30,30,30], [47,24,77,65], [4,24,52,80,108,136,164]],
|
||||
[[28,30,30,30], [49,25,81,68], [4,28,56,84,112,140,168]]];
|
||||
|
||||
// mode constants (cf. Table 2 in JIS X 0510:2004 p. 16)
|
||||
var MODE_TERMINATOR = 0;
|
||||
var MODE_NUMERIC = 1, MODE_ALPHANUMERIC = 2, MODE_OCTET = 4, MODE_KANJI = 8;
|
||||
|
||||
// validation regexps
|
||||
var NUMERIC_REGEXP = /^\d*$/;
|
||||
var ALPHANUMERIC_REGEXP = /^[A-Za-z0-9 $%*+\-./:]*$/;
|
||||
var ALPHANUMERIC_OUT_REGEXP = /^[A-Z0-9 $%*+\-./:]*$/;
|
||||
|
||||
// ECC levels (cf. Table 22 in JIS X 0510:2004 p. 45)
|
||||
var ECCLEVEL_L = 1, ECCLEVEL_M = 0, ECCLEVEL_Q = 3, ECCLEVEL_H = 2;
|
||||
|
||||
// GF(2^8)-to-integer mapping with a reducing polynomial x^8+x^4+x^3+x^2+1
|
||||
// invariant: GF256_MAP[GF256_INVMAP[i]] == i for all i in [1,256)
|
||||
var GF256_MAP = [], GF256_INVMAP = [-1];
|
||||
for (var i = 0, v = 1; i < 255; ++i) {
|
||||
GF256_MAP.push(v);
|
||||
GF256_INVMAP[v] = i;
|
||||
v = (v * 2) ^ (v >= 128 ? 0x11d : 0);
|
||||
}
|
||||
|
||||
// generator polynomials up to degree 30
|
||||
// (should match with polynomials in JIS X 0510:2004 Appendix A)
|
||||
//
|
||||
// generator polynomial of degree K is product of (x-\alpha^0), (x-\alpha^1),
|
||||
// ..., (x-\alpha^(K-1)). by convention, we omit the K-th coefficient (always 1)
|
||||
// from the result; also other coefficients are written in terms of the exponent
|
||||
// to \alpha to avoid the redundant calculation. (see also calculateecc below.)
|
||||
var GF256_GENPOLY = [[]];
|
||||
for (var i = 0; i < 30; ++i) {
|
||||
var prevpoly = GF256_GENPOLY[i], poly = [];
|
||||
for (var j = 0; j <= i; ++j) {
|
||||
var a = (j < i ? GF256_MAP[prevpoly[j]] : 0);
|
||||
var b = GF256_MAP[(i + (prevpoly[j-1] || 0)) % 255];
|
||||
poly.push(GF256_INVMAP[a ^ b]);
|
||||
}
|
||||
GF256_GENPOLY.push(poly);
|
||||
}
|
||||
|
||||
// alphanumeric character mapping (cf. Table 5 in JIS X 0510:2004 p. 19)
|
||||
var ALPHANUMERIC_MAP = {};
|
||||
for (var i = 0; i < 45; ++i) {
|
||||
ALPHANUMERIC_MAP['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'.charAt(i)] = i;
|
||||
}
|
||||
|
||||
// mask functions in terms of row # and column #
|
||||
// (cf. Table 20 in JIS X 0510:2004 p. 42)
|
||||
var MASKFUNCS = [
|
||||
function(i,j) { return (i+j) % 2 == 0; },
|
||||
function(i,j) { return i % 2 == 0; },
|
||||
function(i,j) { return j % 3 == 0; },
|
||||
function(i,j) { return (i+j) % 3 == 0; },
|
||||
function(i,j) { return (((i/2)|0) + ((j/3)|0)) % 2 == 0; },
|
||||
function(i,j) { return (i*j) % 2 + (i*j) % 3 == 0; },
|
||||
function(i,j) { return ((i*j) % 2 + (i*j) % 3) % 2 == 0; },
|
||||
function(i,j) { return ((i+j) % 2 + (i*j) % 3) % 2 == 0; }];
|
||||
|
||||
// returns true when the version information has to be embeded.
|
||||
var needsverinfo = function(ver) { return ver > 6; };
|
||||
|
||||
// returns the size of entire QR code for given version.
|
||||
var getsizebyver = function(ver) { return 4 * ver + 17; };
|
||||
|
||||
// returns the number of bits available for code words in this version.
|
||||
var nfullbits = function(ver) {
|
||||
/*
|
||||
* |<--------------- n --------------->|
|
||||
* | |<----- n-17 ---->| |
|
||||
* +-------+ ///+-------+ ----
|
||||
* | | ///| | ^
|
||||
* | 9x9 | @@@@@ ///| 9x8 | |
|
||||
* | | # # # @5x5@ # # # | | |
|
||||
* +-------+ @@@@@ +-------+ |
|
||||
* # ---|
|
||||
* ^ |
|
||||
* # |
|
||||
* @@@@@ @@@@@ @@@@@ | n
|
||||
* @5x5@ @5x5@ @5x5@ n-17
|
||||
* @@@@@ @@@@@ @@@@@ | |
|
||||
* # | |
|
||||
* ////// v |
|
||||
* //////# ---|
|
||||
* +-------+ @@@@@ @@@@@ |
|
||||
* | | @5x5@ @5x5@ |
|
||||
* | 8x9 | @@@@@ @@@@@ |
|
||||
* | | v
|
||||
* +-------+ ----
|
||||
*
|
||||
* when the entire code has n^2 modules and there are m^2-3 alignment
|
||||
* patterns, we have:
|
||||
* - 225 (= 9x9 + 9x8 + 8x9) modules for finder patterns and
|
||||
* format information;
|
||||
* - 2n-34 (= 2(n-17)) modules for timing patterns;
|
||||
* - 36 (= 3x6 + 6x3) modules for version information, if any;
|
||||
* - 25m^2-75 (= (m^2-3)(5x5)) modules for alignment patterns
|
||||
* if any, but 10m-20 (= 2(m-2)x5) of them overlaps with
|
||||
* timing patterns.
|
||||
*/
|
||||
var v = VERSIONS[ver];
|
||||
var nbits = 16*ver*ver + 128*ver + 64; // finder, timing and format info.
|
||||
if (needsverinfo(ver)) nbits -= 36; // version information
|
||||
if (v[2].length) { // alignment patterns
|
||||
nbits -= 25 * v[2].length * v[2].length - 10 * v[2].length - 55;
|
||||
}
|
||||
return nbits;
|
||||
};
|
||||
|
||||
// returns the number of bits available for data portions (i.e. excludes ECC
|
||||
// bits but includes mode and length bits) in this version and ECC level.
|
||||
var ndatabits = function(ver, ecclevel) {
|
||||
var nbits = nfullbits(ver) & ~7; // no sub-octet code words
|
||||
var v = VERSIONS[ver];
|
||||
nbits -= 8 * v[0][ecclevel] * v[1][ecclevel]; // ecc bits
|
||||
return nbits;
|
||||
}
|
||||
|
||||
// returns the number of bits required for the length of data.
|
||||
// (cf. Table 3 in JIS X 0510:2004 p. 16)
|
||||
var ndatalenbits = function(ver, mode) {
|
||||
switch (mode) {
|
||||
case MODE_NUMERIC: return (ver < 10 ? 10 : ver < 27 ? 12 : 14);
|
||||
case MODE_ALPHANUMERIC: return (ver < 10 ? 9 : ver < 27 ? 11 : 13);
|
||||
case MODE_OCTET: return (ver < 10 ? 8 : 16);
|
||||
case MODE_KANJI: return (ver < 10 ? 8 : ver < 27 ? 10 : 12);
|
||||
}
|
||||
};
|
||||
|
||||
// returns the maximum length of data possible in given configuration.
|
||||
var getmaxdatalen = function(ver, mode, ecclevel) {
|
||||
var nbits = ndatabits(ver, ecclevel) - 4 - ndatalenbits(ver, mode); // 4 for mode bits
|
||||
switch (mode) {
|
||||
case MODE_NUMERIC:
|
||||
return ((nbits/10) | 0) * 3 + (nbits%10 < 4 ? 0 : nbits%10 < 7 ? 1 : 2);
|
||||
case MODE_ALPHANUMERIC:
|
||||
return ((nbits/11) | 0) * 2 + (nbits%11 < 6 ? 0 : 1);
|
||||
case MODE_OCTET:
|
||||
return (nbits/8) | 0;
|
||||
case MODE_KANJI:
|
||||
return (nbits/13) | 0;
|
||||
}
|
||||
};
|
||||
|
||||
// checks if the given data can be encoded in given mode, and returns
|
||||
// the converted data for the further processing if possible. otherwise
|
||||
// returns null.
|
||||
//
|
||||
// this function does not check the length of data; it is a duty of
|
||||
// encode function below (as it depends on the version and ECC level too).
|
||||
var validatedata = function(mode, data) {
|
||||
switch (mode) {
|
||||
case MODE_NUMERIC:
|
||||
if (!data.match(NUMERIC_REGEXP)) return null;
|
||||
return data;
|
||||
|
||||
case MODE_ALPHANUMERIC:
|
||||
if (!data.match(ALPHANUMERIC_REGEXP)) return null;
|
||||
return data.toUpperCase();
|
||||
|
||||
case MODE_OCTET:
|
||||
if (typeof data === 'string') { // encode as utf-8 string
|
||||
var newdata = [];
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
var ch = data.charCodeAt(i);
|
||||
if (ch < 0x80) {
|
||||
newdata.push(ch);
|
||||
} else if (ch < 0x800) {
|
||||
newdata.push(0xc0 | (ch >> 6),
|
||||
0x80 | (ch & 0x3f));
|
||||
} else if (ch < 0x10000) {
|
||||
newdata.push(0xe0 | (ch >> 12),
|
||||
0x80 | ((ch >> 6) & 0x3f),
|
||||
0x80 | (ch & 0x3f));
|
||||
} else {
|
||||
newdata.push(0xf0 | (ch >> 18),
|
||||
0x80 | ((ch >> 12) & 0x3f),
|
||||
0x80 | ((ch >> 6) & 0x3f),
|
||||
0x80 | (ch & 0x3f));
|
||||
}
|
||||
}
|
||||
return newdata;
|
||||
} else {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// returns the code words (sans ECC bits) for given data and configurations.
|
||||
// requires data to be preprocessed by validatedata. no length check is
|
||||
// performed, and everything has to be checked before calling this function.
|
||||
var encode = function(ver, mode, data, maxbuflen) {
|
||||
var buf = [];
|
||||
var bits = 0, remaining = 8;
|
||||
var datalen = data.length;
|
||||
|
||||
// this function is intentionally no-op when n=0.
|
||||
var pack = function(x, n) {
|
||||
if (n >= remaining) {
|
||||
buf.push(bits | (x >> (n -= remaining)));
|
||||
while (n >= 8) buf.push((x >> (n -= 8)) & 255);
|
||||
bits = 0;
|
||||
remaining = 8;
|
||||
}
|
||||
if (n > 0) bits |= (x & ((1 << n) - 1)) << (remaining -= n);
|
||||
};
|
||||
|
||||
var nlenbits = ndatalenbits(ver, mode);
|
||||
pack(mode, 4);
|
||||
pack(datalen, nlenbits);
|
||||
|
||||
switch (mode) {
|
||||
case MODE_NUMERIC:
|
||||
for (var i = 2; i < datalen; i += 3) {
|
||||
pack(parseInt(data.substring(i-2,i+1), 10), 10);
|
||||
}
|
||||
pack(parseInt(data.substring(i-2), 10), [0,4,7][datalen%3]);
|
||||
break;
|
||||
|
||||
case MODE_ALPHANUMERIC:
|
||||
for (var i = 1; i < datalen; i += 2) {
|
||||
pack(ALPHANUMERIC_MAP[data.charAt(i-1)] * 45 +
|
||||
ALPHANUMERIC_MAP[data.charAt(i)], 11);
|
||||
}
|
||||
if (datalen % 2 == 1) {
|
||||
pack(ALPHANUMERIC_MAP[data.charAt(i-1)], 6);
|
||||
}
|
||||
break;
|
||||
|
||||
case MODE_OCTET:
|
||||
for (var i = 0; i < datalen; ++i) {
|
||||
pack(data[i], 8);
|
||||
}
|
||||
break;
|
||||
};
|
||||
|
||||
// final bits. it is possible that adding terminator causes the buffer
|
||||
// to overflow, but then the buffer truncated to the maximum size will
|
||||
// be valid as the truncated terminator mode bits and padding is
|
||||
// identical in appearance (cf. JIS X 0510:2004 sec 8.4.8).
|
||||
pack(MODE_TERMINATOR, 4);
|
||||
if (remaining < 8) buf.push(bits);
|
||||
|
||||
// the padding to fill up the remaining space. we should not add any
|
||||
// words when the overflow already occurred.
|
||||
while (buf.length + 1 < maxbuflen) buf.push(0xec, 0x11);
|
||||
if (buf.length < maxbuflen) buf.push(0xec);
|
||||
return buf;
|
||||
};
|
||||
|
||||
// calculates ECC code words for given code words and generator polynomial.
|
||||
//
|
||||
// this is quite similar to CRC calculation as both Reed-Solomon and CRC use
|
||||
// the certain kind of cyclic codes, which is effectively the division of
|
||||
// zero-augumented polynomial by the generator polynomial. the only difference
|
||||
// is that Reed-Solomon uses GF(2^8), instead of CRC's GF(2), and Reed-Solomon
|
||||
// uses the different generator polynomial than CRC's.
|
||||
var calculateecc = function(poly, genpoly) {
|
||||
var modulus = poly.slice(0);
|
||||
var polylen = poly.length, genpolylen = genpoly.length;
|
||||
for (var i = 0; i < genpolylen; ++i) modulus.push(0);
|
||||
for (var i = 0; i < polylen; ) {
|
||||
var quotient = GF256_INVMAP[modulus[i++]];
|
||||
if (quotient >= 0) {
|
||||
for (var j = 0; j < genpolylen; ++j) {
|
||||
modulus[i+j] ^= GF256_MAP[(quotient + genpoly[j]) % 255];
|
||||
}
|
||||
}
|
||||
}
|
||||
return modulus.slice(polylen);
|
||||
};
|
||||
|
||||
// auguments ECC code words to given code words. the resulting words are
|
||||
// ready to be encoded in the matrix.
|
||||
//
|
||||
// the much of actual augumenting procedure follows JIS X 0510:2004 sec 8.7.
|
||||
// the code is simplified using the fact that the size of each code & ECC
|
||||
// blocks is almost same; for example, when we have 4 blocks and 46 data words
|
||||
// the number of code words in those blocks are 11, 11, 12, 12 respectively.
|
||||
var augumenteccs = function(poly, nblocks, genpoly) {
|
||||
var subsizes = [];
|
||||
var subsize = (poly.length / nblocks) | 0, subsize0 = 0;
|
||||
var pivot = nblocks - poly.length % nblocks;
|
||||
for (var i = 0; i < pivot; ++i) {
|
||||
subsizes.push(subsize0);
|
||||
subsize0 += subsize;
|
||||
}
|
||||
for (var i = pivot; i < nblocks; ++i) {
|
||||
subsizes.push(subsize0);
|
||||
subsize0 += subsize+1;
|
||||
}
|
||||
subsizes.push(subsize0);
|
||||
|
||||
var eccs = [];
|
||||
for (var i = 0; i < nblocks; ++i) {
|
||||
eccs.push(calculateecc(poly.slice(subsizes[i], subsizes[i+1]), genpoly));
|
||||
}
|
||||
|
||||
var result = [];
|
||||
var nitemsperblock = (poly.length / nblocks) | 0;
|
||||
for (var i = 0; i < nitemsperblock; ++i) {
|
||||
for (var j = 0; j < nblocks; ++j) {
|
||||
result.push(poly[subsizes[j] + i]);
|
||||
}
|
||||
}
|
||||
for (var j = pivot; j < nblocks; ++j) {
|
||||
result.push(poly[subsizes[j+1] - 1]);
|
||||
}
|
||||
for (var i = 0; i < genpoly.length; ++i) {
|
||||
for (var j = 0; j < nblocks; ++j) {
|
||||
result.push(eccs[j][i]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// auguments BCH(p+q,q) code to the polynomial over GF(2), given the proper
|
||||
// genpoly. the both input and output are in binary numbers, and unlike
|
||||
// calculateecc genpoly should include the 1 bit for the highest degree.
|
||||
//
|
||||
// actual polynomials used for this procedure are as follows:
|
||||
// - p=10, q=5, genpoly=x^10+x^8+x^5+x^4+x^2+x+1 (JIS X 0510:2004 Appendix C)
|
||||
// - p=18, q=6, genpoly=x^12+x^11+x^10+x^9+x^8+x^5+x^2+1 (ibid. Appendix D)
|
||||
var augumentbch = function(poly, p, genpoly, q) {
|
||||
var modulus = poly << q;
|
||||
for (var i = p - 1; i >= 0; --i) {
|
||||
if ((modulus >> (q+i)) & 1) modulus ^= genpoly << i;
|
||||
}
|
||||
return (poly << q) | modulus;
|
||||
};
|
||||
|
||||
// creates the base matrix for given version. it returns two matrices, one of
|
||||
// them is the actual one and the another represents the "reserved" portion
|
||||
// (e.g. finder and timing patterns) of the matrix.
|
||||
//
|
||||
// some entries in the matrix may be undefined, rather than 0 or 1. this is
|
||||
// intentional (no initialization needed!), and putdata below will fill
|
||||
// the remaining ones.
|
||||
var makebasematrix = function(ver) {
|
||||
var v = VERSIONS[ver], n = getsizebyver(ver);
|
||||
var matrix = [], reserved = [];
|
||||
for (var i = 0; i < n; ++i) {
|
||||
matrix.push([]);
|
||||
reserved.push([]);
|
||||
}
|
||||
|
||||
var blit = function(y, x, h, w, bits) {
|
||||
for (var i = 0; i < h; ++i) {
|
||||
for (var j = 0; j < w; ++j) {
|
||||
matrix[y+i][x+j] = (bits[i] >> j) & 1;
|
||||
reserved[y+i][x+j] = 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// finder patterns and a part of timing patterns
|
||||
// will also mark the format information area (not yet written) as reserved.
|
||||
blit(0, 0, 9, 9, [0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x17f, 0x00, 0x40]);
|
||||
blit(n-8, 0, 8, 9, [0x100, 0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x7f]);
|
||||
blit(0, n-8, 9, 8, [0xfe, 0x82, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00]);
|
||||
|
||||
// the rest of timing patterns
|
||||
for (var i = 9; i < n-8; ++i) {
|
||||
matrix[6][i] = matrix[i][6] = ~i & 1;
|
||||
reserved[6][i] = reserved[i][6] = 1;
|
||||
}
|
||||
|
||||
// alignment patterns
|
||||
var aligns = v[2], m = aligns.length;
|
||||
for (var i = 0; i < m; ++i) {
|
||||
var minj = (i==0 || i==m-1 ? 1 : 0), maxj = (i==0 ? m-1 : m);
|
||||
for (var j = minj; j < maxj; ++j) {
|
||||
blit(aligns[i], aligns[j], 5, 5, [0x1f, 0x11, 0x15, 0x11, 0x1f]);
|
||||
}
|
||||
}
|
||||
|
||||
// version information
|
||||
if (needsverinfo(ver)) {
|
||||
var code = augumentbch(ver, 6, 0x1f25, 12);
|
||||
var k = 0;
|
||||
for (var i = 0; i < 6; ++i) {
|
||||
for (var j = 0; j < 3; ++j) {
|
||||
matrix[i][(n-11)+j] = matrix[(n-11)+j][i] = (code >> k++) & 1;
|
||||
reserved[i][(n-11)+j] = reserved[(n-11)+j][i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {matrix: matrix, reserved: reserved};
|
||||
};
|
||||
|
||||
// fills the data portion (i.e. unmarked in reserved) of the matrix with given
|
||||
// code words. the size of code words should be no more than available bits,
|
||||
// and remaining bits are padded to 0 (cf. JIS X 0510:2004 sec 8.7.3).
|
||||
var putdata = function(matrix, reserved, buf) {
|
||||
var n = matrix.length;
|
||||
var k = 0, dir = -1;
|
||||
for (var i = n-1; i >= 0; i -= 2) {
|
||||
if (i == 6) --i; // skip the entire timing pattern column
|
||||
var jj = (dir < 0 ? n-1 : 0);
|
||||
for (var j = 0; j < n; ++j) {
|
||||
for (var ii = i; ii > i-2; --ii) {
|
||||
if (!reserved[jj][ii]) {
|
||||
// may overflow, but (undefined >> x)
|
||||
// is 0 so it will auto-pad to zero.
|
||||
matrix[jj][ii] = (buf[k >> 3] >> (~k&7)) & 1;
|
||||
++k;
|
||||
}
|
||||
}
|
||||
jj += dir;
|
||||
}
|
||||
dir = -dir;
|
||||
}
|
||||
return matrix;
|
||||
};
|
||||
|
||||
// XOR-masks the data portion of the matrix. repeating the call with the same
|
||||
// arguments will revert the prior call (convenient in the matrix evaluation).
|
||||
var maskdata = function(matrix, reserved, mask) {
|
||||
var maskf = MASKFUNCS[mask];
|
||||
var n = matrix.length;
|
||||
for (var i = 0; i < n; ++i) {
|
||||
for (var j = 0; j < n; ++j) {
|
||||
if (!reserved[i][j]) matrix[i][j] ^= maskf(i,j);
|
||||
}
|
||||
}
|
||||
return matrix;
|
||||
}
|
||||
|
||||
// puts the format information.
|
||||
var putformatinfo = function(matrix, reserved, ecclevel, mask) {
|
||||
var n = matrix.length;
|
||||
var code = augumentbch((ecclevel << 3) | mask, 5, 0x537, 10) ^ 0x5412;
|
||||
for (var i = 0; i < 15; ++i) {
|
||||
var r = [0,1,2,3,4,5,7,8,n-7,n-6,n-5,n-4,n-3,n-2,n-1][i];
|
||||
var c = [n-1,n-2,n-3,n-4,n-5,n-6,n-7,n-8,7,5,4,3,2,1,0][i];
|
||||
matrix[r][8] = matrix[8][c] = (code >> i) & 1;
|
||||
// we don't have to mark those bits reserved; always done
|
||||
// in makebasematrix above.
|
||||
}
|
||||
return matrix;
|
||||
};
|
||||
|
||||
// evaluates the resulting matrix and returns the score (lower is better).
|
||||
// (cf. JIS X 0510:2004 sec 8.8.2)
|
||||
//
|
||||
// the evaluation procedure tries to avoid the problematic patterns naturally
|
||||
// occuring from the original matrix. for example, it penaltizes the patterns
|
||||
// which just look like the finder pattern which will confuse the decoder.
|
||||
// we choose the mask which results in the lowest score among 8 possible ones.
|
||||
//
|
||||
// note: zxing seems to use the same procedure and in many cases its choice
|
||||
// agrees to ours, but sometimes it does not. practically it doesn't matter.
|
||||
var evaluatematrix = function(matrix) {
|
||||
// N1+(k-5) points for each consecutive row of k same-colored modules,
|
||||
// where k >= 5. no overlapping row counts.
|
||||
var PENALTY_CONSECUTIVE = 3;
|
||||
// N2 points for each 2x2 block of same-colored modules.
|
||||
// overlapping block does count.
|
||||
var PENALTY_TWOBYTWO = 3;
|
||||
// N3 points for each pattern with >4W:1B:1W:3B:1W:1B or
|
||||
// 1B:1W:3B:1W:1B:>4W, or their multiples (e.g. highly unlikely,
|
||||
// but 13W:3B:3W:9B:3W:3B counts).
|
||||
var PENALTY_FINDERLIKE = 40;
|
||||
// N4*k points for every (5*k)% deviation from 50% black density.
|
||||
// i.e. k=1 for 55~60% and 40~45%, k=2 for 60~65% and 35~40%, etc.
|
||||
var PENALTY_DENSITY = 10;
|
||||
|
||||
var evaluategroup = function(groups) { // assumes [W,B,W,B,W,...,B,W]
|
||||
var score = 0;
|
||||
for (var i = 0; i < groups.length; ++i) {
|
||||
if (groups[i] >= 5) score += PENALTY_CONSECUTIVE + (groups[i]-5);
|
||||
}
|
||||
for (var i = 5; i < groups.length; i += 2) {
|
||||
var p = groups[i];
|
||||
if (groups[i-1] == p && groups[i-2] == 3*p && groups[i-3] == p &&
|
||||
groups[i-4] == p && (groups[i-5] >= 4*p || groups[i+1] >= 4*p)) {
|
||||
// this part differs from zxing...
|
||||
score += PENALTY_FINDERLIKE;
|
||||
}
|
||||
}
|
||||
return score;
|
||||
};
|
||||
|
||||
var n = matrix.length;
|
||||
var score = 0, nblacks = 0;
|
||||
for (var i = 0; i < n; ++i) {
|
||||
var row = matrix[i];
|
||||
var groups;
|
||||
|
||||
// evaluate the current row
|
||||
groups = [0]; // the first empty group of white
|
||||
for (var j = 0; j < n; ) {
|
||||
var k;
|
||||
for (k = 0; j < n && row[j]; ++k) ++j;
|
||||
groups.push(k);
|
||||
for (k = 0; j < n && !row[j]; ++k) ++j;
|
||||
groups.push(k);
|
||||
}
|
||||
score += evaluategroup(groups);
|
||||
|
||||
// evaluate the current column
|
||||
groups = [0];
|
||||
for (var j = 0; j < n; ) {
|
||||
var k;
|
||||
for (k = 0; j < n && matrix[j][i]; ++k) ++j;
|
||||
groups.push(k);
|
||||
for (k = 0; j < n && !matrix[j][i]; ++k) ++j;
|
||||
groups.push(k);
|
||||
}
|
||||
score += evaluategroup(groups);
|
||||
|
||||
// check the 2x2 box and calculate the density
|
||||
var nextrow = matrix[i+1] || [];
|
||||
nblacks += row[0];
|
||||
for (var j = 1; j < n; ++j) {
|
||||
var p = row[j];
|
||||
nblacks += p;
|
||||
// at least comparison with next row should be strict...
|
||||
if (row[j-1] == p && nextrow[j] === p && nextrow[j-1] === p) {
|
||||
score += PENALTY_TWOBYTWO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
score += PENALTY_DENSITY * ((Math.abs(nblacks / n / n - 0.5) / 0.05) | 0);
|
||||
return score;
|
||||
};
|
||||
|
||||
// returns the fully encoded QR code matrix which contains given data.
|
||||
// it also chooses the best mask automatically when mask is -1.
|
||||
var generate = function(data, ver, mode, ecclevel, mask) {
|
||||
var v = VERSIONS[ver];
|
||||
var buf = encode(ver, mode, data, ndatabits(ver, ecclevel) >> 3);
|
||||
buf = augumenteccs(buf, v[1][ecclevel], GF256_GENPOLY[v[0][ecclevel]]);
|
||||
|
||||
var result = makebasematrix(ver);
|
||||
var matrix = result.matrix, reserved = result.reserved;
|
||||
putdata(matrix, reserved, buf);
|
||||
|
||||
if (mask < 0) {
|
||||
// find the best mask
|
||||
maskdata(matrix, reserved, 0);
|
||||
putformatinfo(matrix, reserved, ecclevel, 0);
|
||||
var bestmask = 0, bestscore = evaluatematrix(matrix);
|
||||
maskdata(matrix, reserved, 0);
|
||||
for (mask = 1; mask < 8; ++mask) {
|
||||
maskdata(matrix, reserved, mask);
|
||||
putformatinfo(matrix, reserved, ecclevel, mask);
|
||||
var score = evaluatematrix(matrix);
|
||||
if (bestscore > score) {
|
||||
bestscore = score;
|
||||
bestmask = mask;
|
||||
}
|
||||
maskdata(matrix, reserved, mask);
|
||||
}
|
||||
mask = bestmask;
|
||||
}
|
||||
|
||||
maskdata(matrix, reserved, mask);
|
||||
putformatinfo(matrix, reserved, ecclevel, mask);
|
||||
return matrix;
|
||||
};
|
||||
|
||||
// the public interface is trivial; the options available are as follows:
|
||||
//
|
||||
// - version: an integer in [1,40]. when omitted (or -1) the smallest possible
|
||||
// version is chosen.
|
||||
// - mode: one of 'numeric', 'alphanumeric', 'octet'. when omitted the smallest
|
||||
// possible mode is chosen.
|
||||
// - ecclevel: one of 'L', 'M', 'Q', 'H'. defaults to 'L'.
|
||||
// - mask: an integer in [0,7]. when omitted (or -1) the best mask is chosen.
|
||||
//
|
||||
// for generate{HTML,PNG}:
|
||||
//
|
||||
// - modulesize: a number. this is a size of each modules in pixels, and
|
||||
// defaults to 5px.
|
||||
// - margin: a number. this is a size of margin in *modules*, and defaults to
|
||||
// 4 (white modules). the specficiation mandates the margin no less than 4
|
||||
// modules, so it is better not to alter this value unless you know what
|
||||
// you're doing.
|
||||
var QRCode = {
|
||||
'generate': function(data, options) {
|
||||
var MODES = {'numeric': MODE_NUMERIC, 'alphanumeric': MODE_ALPHANUMERIC,
|
||||
'octet': MODE_OCTET};
|
||||
var ECCLEVELS = {'L': ECCLEVEL_L, 'M': ECCLEVEL_M, 'Q': ECCLEVEL_Q,
|
||||
'H': ECCLEVEL_H};
|
||||
|
||||
options = options || {};
|
||||
var ver = options.version || -1;
|
||||
var ecclevel = ECCLEVELS[(options.ecclevel || 'L').toUpperCase()];
|
||||
var mode = options.mode ? MODES[options.mode.toLowerCase()] : -1;
|
||||
var mask = 'mask' in options ? options.mask : -1;
|
||||
|
||||
if (mode < 0) {
|
||||
if (typeof data === 'string') {
|
||||
if (data.match(NUMERIC_REGEXP)) {
|
||||
mode = MODE_NUMERIC;
|
||||
} else if (data.match(ALPHANUMERIC_OUT_REGEXP)) {
|
||||
// while encode supports case-insensitive
|
||||
// encoding, we restrict the data to be
|
||||
// uppercased when auto-selecting the mode.
|
||||
mode = MODE_ALPHANUMERIC;
|
||||
} else {
|
||||
mode = MODE_OCTET;
|
||||
}
|
||||
} else {
|
||||
mode = MODE_OCTET;
|
||||
}
|
||||
} else if (!(mode == MODE_NUMERIC || mode == MODE_ALPHANUMERIC ||
|
||||
mode == MODE_OCTET)) {
|
||||
throw 'invalid or unsupported mode';
|
||||
}
|
||||
|
||||
data = validatedata(mode, data);
|
||||
if (data === null) throw 'invalid data format';
|
||||
|
||||
if (ecclevel < 0 || ecclevel > 3) throw 'invalid ECC level';
|
||||
|
||||
if (ver < 0) {
|
||||
for (ver = 1; ver <= 40; ++ver) {
|
||||
if (data.length <= getmaxdatalen(ver, mode, ecclevel)) break;
|
||||
}
|
||||
if (ver > 40) throw 'too large data';
|
||||
} else if (ver < 1 || ver > 40) {
|
||||
throw 'invalid version';
|
||||
}
|
||||
|
||||
if (mask != -1 && (mask < 0 || mask > 8)) throw 'invalid mask';
|
||||
|
||||
return generate(data, ver, mode, ecclevel, mask);
|
||||
},
|
||||
|
||||
'generateHTML': function(data, options) {
|
||||
options = options || {};
|
||||
var matrix = QRCode['generate'](data, options);
|
||||
var modsize = Math.max(options.modulesize || 5, 0.5);
|
||||
var margin = Math.max(options.margin || 4, 0.0);
|
||||
|
||||
var e = document.createElement('div');
|
||||
var n = matrix.length;
|
||||
var html = ['<table border="0" cellspacing="0" cellpadding="0" style="border:' +
|
||||
modsize*margin + 'px solid #fff;background:#fff">'];
|
||||
for (var i = 0; i < n; ++i) {
|
||||
html.push('<tr>');
|
||||
for (var j = 0; j < n; ++j) {
|
||||
html.push('<td style="width:' + modsize + 'px;height:' + modsize + 'px' +
|
||||
(matrix[i][j] ? ';background:#000' : '') + '"></td>');
|
||||
}
|
||||
html.push('</tr>');
|
||||
}
|
||||
e.className = 'qrcode';
|
||||
e.innerHTML = html.join('') + '</table>';
|
||||
return e;
|
||||
},
|
||||
|
||||
'generatePNG': function(data, options) {
|
||||
options = options || {};
|
||||
var matrix = QRCode['generate'](data, options);
|
||||
var modsize = Math.max(options.modulesize || 5, 0.5);
|
||||
var margin = Math.max(options.margin || 4, 0.0);
|
||||
var n = matrix.length;
|
||||
var size = modsize * (n + 2 * margin);
|
||||
|
||||
var canvas = document.createElement('canvas'), context;
|
||||
canvas.width = canvas.height = size;
|
||||
context = canvas.getContext('2d');
|
||||
if (!context) throw 'canvas support is needed for PNG output';
|
||||
|
||||
context.fillStyle = '#fff';
|
||||
context.fillRect(0, 0, size, size);
|
||||
context.fillStyle = '#000';
|
||||
for (var i = 0; i < n; ++i) {
|
||||
for (var j = 0; j < n; ++j) {
|
||||
if (matrix[i][j]) {
|
||||
context.fillRect(modsize * (margin + j),
|
||||
modsize * (margin + i),
|
||||
modsize, modsize);
|
||||
}
|
||||
}
|
||||
}
|
||||
//context.fillText('evaluation: ' + evaluatematrix(matrix), 10, 10);
|
||||
return canvas.toDataURL();
|
||||
}
|
||||
};
|
||||
|
||||
return QRCode;
|
||||
})();
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
# ------------------ BEGIN LICENSE BLOCK ------------------
|
||||
#
|
||||
# Copyright (c) 2009 - 2014 Cyril MAGUIRE
|
||||
# Licensed under the CeCILL v2.1 license.
|
||||
# See http://www.cecill.info/licences.fr.html
|
||||
#
|
||||
# ------------------- END LICENSE BLOCK -------------------
|
||||
*/
|
||||
;(function(window,undefined) {
|
||||
|
||||
'use_strict';
|
||||
|
||||
var timeOut;
|
||||
var isIE = isIE();
|
||||
var bodyTag = first('body');
|
||||
var idOfBody = id(bodyTag);
|
||||
if (idOfBody == null) {
|
||||
idOfBody = 'top';
|
||||
bodyTag.setAttribute('id', 'top');
|
||||
}
|
||||
|
||||
function isIE() {
|
||||
var nav = navigator.userAgent.toLowerCase();
|
||||
return (nav.indexOf('msie') != -1) ? parseInt(nav.split('msie')[1]) : false;
|
||||
}
|
||||
|
||||
function backToTop() {
|
||||
if (document.body.scrollTop!=0 || document.documentElement.scrollTop!=0){
|
||||
window.scrollBy(0,-50);
|
||||
timeOut=setTimeout('backToTop()',10);
|
||||
}
|
||||
else {
|
||||
clearTimeout(timeOut);
|
||||
}
|
||||
}
|
||||
|
||||
function getScrollPosition() {
|
||||
return Array((document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft,(document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop);
|
||||
}
|
||||
|
||||
function Remove(idOfParent,idToRemove) {
|
||||
if (isIE) {
|
||||
document.getElementById(idToRemove).removeNode(true);
|
||||
} else {
|
||||
var Node1 = document.getElementById(idOfParent);
|
||||
var len = Node1.childNodes.length;
|
||||
|
||||
for(var i = 0; i < len; i++){
|
||||
if (Node1.childNodes[i] != undefined && Node1.childNodes[i].id != undefined && Node1.childNodes[i].id == idToRemove){
|
||||
Node1.removeChild(Node1.childNodes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addElement(idOfParent,idToAdd,htmlToInsert) {
|
||||
var DomParent = document.getElementById(idOfParent);//id of body
|
||||
var newdiv = document.createElement('div');
|
||||
|
||||
newdiv.setAttribute('id',idToAdd);
|
||||
newdiv.innerHTML = htmlToInsert;
|
||||
|
||||
DomParent.appendChild(newdiv);
|
||||
}
|
||||
|
||||
function displayBackButton() {
|
||||
var pos = [];
|
||||
var fleche = '▲';
|
||||
|
||||
if (isIE) {
|
||||
fleche = '▲';
|
||||
}
|
||||
pos = getScrollPosition();
|
||||
var topLink = document.getElementById('toplink');
|
||||
if (pos[1] > 150) {
|
||||
if (topLink == null) {
|
||||
addElement(idOfBody,'toplink','<a href="#" onclick="backToTop();return false;">'+fleche+'</a>');
|
||||
}
|
||||
} else {
|
||||
if (topLink != null) {
|
||||
Remove(idOfBody,'toplink');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//add to global namespace
|
||||
window.onscroll = displayBackButton;
|
||||
window.displayBackButton = displayBackButton;
|
||||
window.backToTop = backToTop;
|
||||
|
||||
|
||||
})(window);
|
||||
|
|
@ -1,495 +0,0 @@
|
|||
/*
|
||||
SortTable
|
||||
version 2
|
||||
7th April 2007
|
||||
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
|
||||
|
||||
Instructions:
|
||||
Download this file
|
||||
Add <script src="sorttable.js"></script> to your HTML
|
||||
Add class="sortable" to any table you'd like to make sortable
|
||||
Click on the headers to sort
|
||||
|
||||
Thanks to many, many people for contributions and suggestions.
|
||||
Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
|
||||
This basically means: do what you want with it.
|
||||
*/
|
||||
|
||||
|
||||
var stIsIE = /*@cc_on!@*/false;
|
||||
|
||||
sorttable = {
|
||||
init: function() {
|
||||
// quit if this function has already been called
|
||||
if (arguments.callee.done) return;
|
||||
// flag this function so we don't do the same thing twice
|
||||
arguments.callee.done = true;
|
||||
// kill the timer
|
||||
if (_timer) clearInterval(_timer);
|
||||
|
||||
if (!document.createElement || !document.getElementsByTagName) return;
|
||||
|
||||
sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
|
||||
|
||||
forEach(document.getElementsByTagName('table'), function(table) {
|
||||
if (table.className.search(/\bsortable\b/) != -1) {
|
||||
sorttable.makeSortable(table);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
makeSortable: function(table) {
|
||||
if (table.getElementsByTagName('thead').length == 0) {
|
||||
// table doesn't have a tHead. Since it should have, create one and
|
||||
// put the first table row in it.
|
||||
the = document.createElement('thead');
|
||||
the.appendChild(table.rows[0]);
|
||||
table.insertBefore(the,table.firstChild);
|
||||
}
|
||||
// Safari doesn't support table.tHead, sigh
|
||||
if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
|
||||
|
||||
if (table.tHead.rows.length != 1) return; // can't cope with two header rows
|
||||
|
||||
// Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
|
||||
// "total" rows, for example). This is B&R, since what you're supposed
|
||||
// to do is put them in a tfoot. So, if there are sortbottom rows,
|
||||
// for backwards compatibility, move them to tfoot (creating it if needed).
|
||||
sortbottomrows = [];
|
||||
for (var i=0; i<table.rows.length; i++) {
|
||||
if (table.rows[i].className.search(/\bsortbottom\b/) != -1) {
|
||||
sortbottomrows[sortbottomrows.length] = table.rows[i];
|
||||
}
|
||||
}
|
||||
if (sortbottomrows) {
|
||||
if (table.tFoot == null) {
|
||||
// table doesn't have a tfoot. Create one.
|
||||
tfo = document.createElement('tfoot');
|
||||
table.appendChild(tfo);
|
||||
}
|
||||
for (var i=0; i<sortbottomrows.length; i++) {
|
||||
tfo.appendChild(sortbottomrows[i]);
|
||||
}
|
||||
delete sortbottomrows;
|
||||
}
|
||||
|
||||
// work through each column and calculate its type
|
||||
headrow = table.tHead.rows[0].cells;
|
||||
for (var i=0; i<headrow.length; i++) {
|
||||
// manually override the type with a sorttable_type attribute
|
||||
if (!headrow[i].className.match(/\bsorttable_nosort\b/)) { // skip this col
|
||||
mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/);
|
||||
if (mtch) { override = mtch[1]; }
|
||||
if (mtch && typeof sorttable["sort_"+override] == 'function') {
|
||||
headrow[i].sorttable_sortfunction = sorttable["sort_"+override];
|
||||
} else {
|
||||
headrow[i].sorttable_sortfunction = sorttable.guessType(table,i);
|
||||
}
|
||||
// make it clickable to sort
|
||||
headrow[i].sorttable_columnindex = i;
|
||||
headrow[i].sorttable_tbody = table.tBodies[0];
|
||||
dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) {
|
||||
|
||||
if (this.className.search(/\bsorttable_sorted\b/) != -1) {
|
||||
// if we're already sorted by this column, just
|
||||
// reverse the table, which is quicker
|
||||
sorttable.reverse(this.sorttable_tbody);
|
||||
this.className = this.className.replace('sorttable_sorted',
|
||||
'sorttable_sorted_reverse');
|
||||
this.removeChild(document.getElementById('sorttable_sortfwdind'));
|
||||
sortrevind = document.createElement('span');
|
||||
sortrevind.id = "sorttable_sortrevind";
|
||||
sortrevind.innerHTML = stIsIE ? ' <font face="webdings">5</font>' : ' ▴';
|
||||
this.appendChild(sortrevind);
|
||||
return;
|
||||
}
|
||||
if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
|
||||
// if we're already sorted by this column in reverse, just
|
||||
// re-reverse the table, which is quicker
|
||||
sorttable.reverse(this.sorttable_tbody);
|
||||
this.className = this.className.replace('sorttable_sorted_reverse',
|
||||
'sorttable_sorted');
|
||||
this.removeChild(document.getElementById('sorttable_sortrevind'));
|
||||
sortfwdind = document.createElement('span');
|
||||
sortfwdind.id = "sorttable_sortfwdind";
|
||||
sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾';
|
||||
this.appendChild(sortfwdind);
|
||||
return;
|
||||
}
|
||||
|
||||
// remove sorttable_sorted classes
|
||||
theadrow = this.parentNode;
|
||||
forEach(theadrow.childNodes, function(cell) {
|
||||
if (cell.nodeType == 1) { // an element
|
||||
cell.className = cell.className.replace('sorttable_sorted_reverse','');
|
||||
cell.className = cell.className.replace('sorttable_sorted','');
|
||||
}
|
||||
});
|
||||
sortfwdind = document.getElementById('sorttable_sortfwdind');
|
||||
if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); }
|
||||
sortrevind = document.getElementById('sorttable_sortrevind');
|
||||
if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); }
|
||||
|
||||
this.className += ' sorttable_sorted';
|
||||
sortfwdind = document.createElement('span');
|
||||
sortfwdind.id = "sorttable_sortfwdind";
|
||||
sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾';
|
||||
this.appendChild(sortfwdind);
|
||||
|
||||
// build an array to sort. This is a Schwartzian transform thing,
|
||||
// i.e., we "decorate" each row with the actual sort key,
|
||||
// sort based on the sort keys, and then put the rows back in order
|
||||
// which is a lot faster because you only do getInnerText once per row
|
||||
row_array = [];
|
||||
col = this.sorttable_columnindex;
|
||||
rows = this.sorttable_tbody.rows;
|
||||
for (var j=0; j<rows.length; j++) {
|
||||
row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]];
|
||||
}
|
||||
/* If you want a stable sort, uncomment the following line */
|
||||
//sorttable.shaker_sort(row_array, this.sorttable_sortfunction);
|
||||
/* and comment out this one */
|
||||
row_array.sort(this.sorttable_sortfunction);
|
||||
|
||||
tb = this.sorttable_tbody;
|
||||
for (var j=0; j<row_array.length; j++) {
|
||||
tb.appendChild(row_array[j][1]);
|
||||
}
|
||||
|
||||
delete row_array;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
guessType: function(table, column) {
|
||||
// guess the type of a column based on its first non-blank row
|
||||
sortfn = sorttable.sort_alpha;
|
||||
for (var i=0; i<table.tBodies[0].rows.length; i++) {
|
||||
text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]);
|
||||
if (text != '') {
|
||||
if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) {
|
||||
return sorttable.sort_numeric;
|
||||
}
|
||||
// check for a date: dd/mm/yyyy or dd/mm/yy
|
||||
// can have / or . or - as separator
|
||||
// can be mm/dd as well
|
||||
possdate = text.match(sorttable.DATE_RE)
|
||||
if (possdate) {
|
||||
// looks like a date
|
||||
first = parseInt(possdate[1]);
|
||||
second = parseInt(possdate[2]);
|
||||
if (first > 12) {
|
||||
// definitely dd/mm
|
||||
return sorttable.sort_ddmm;
|
||||
} else if (second > 12) {
|
||||
return sorttable.sort_mmdd;
|
||||
} else {
|
||||
// looks like a date, but we can't tell which, so assume
|
||||
// that it's dd/mm (English imperialism!) and keep looking
|
||||
sortfn = sorttable.sort_ddmm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sortfn;
|
||||
},
|
||||
|
||||
getInnerText: function(node) {
|
||||
// gets the text we want to use for sorting for a cell.
|
||||
// strips leading and trailing whitespace.
|
||||
// this is *not* a generic getInnerText function; it's special to sorttable.
|
||||
// for example, you can override the cell text with a customkey attribute.
|
||||
// it also gets .value for <input> fields.
|
||||
|
||||
if (!node) return "";
|
||||
|
||||
hasInputs = (typeof node.getElementsByTagName == 'function') &&
|
||||
node.getElementsByTagName('input').length;
|
||||
|
||||
if (node.getAttribute("sorttable_customkey") != null) {
|
||||
return node.getAttribute("sorttable_customkey");
|
||||
}
|
||||
else if (typeof node.textContent != 'undefined' && !hasInputs) {
|
||||
return node.textContent.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
else if (typeof node.innerText != 'undefined' && !hasInputs) {
|
||||
return node.innerText.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
else if (typeof node.text != 'undefined' && !hasInputs) {
|
||||
return node.text.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
else {
|
||||
switch (node.nodeType) {
|
||||
case 3:
|
||||
if (node.nodeName.toLowerCase() == 'input') {
|
||||
return node.value.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
case 4:
|
||||
return node.nodeValue.replace(/^\s+|\s+$/g, '');
|
||||
break;
|
||||
case 1:
|
||||
case 11:
|
||||
var innerText = '';
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
innerText += sorttable.getInnerText(node.childNodes[i]);
|
||||
}
|
||||
return innerText.replace(/^\s+|\s+$/g, '');
|
||||
break;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
reverse: function(tbody) {
|
||||
// reverse the rows in a tbody
|
||||
newrows = [];
|
||||
for (var i=0; i<tbody.rows.length; i++) {
|
||||
newrows[newrows.length] = tbody.rows[i];
|
||||
}
|
||||
for (var i=newrows.length-1; i>=0; i--) {
|
||||
tbody.appendChild(newrows[i]);
|
||||
}
|
||||
delete newrows;
|
||||
},
|
||||
|
||||
/* sort functions
|
||||
each sort function takes two parameters, a and b
|
||||
you are comparing a[0] and b[0] */
|
||||
sort_numeric: function(a,b) {
|
||||
aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));
|
||||
if (isNaN(aa)) aa = 0;
|
||||
bb = parseFloat(b[0].replace(/[^0-9.-]/g,''));
|
||||
if (isNaN(bb)) bb = 0;
|
||||
return aa-bb;
|
||||
},
|
||||
sort_alpha: function(a,b) {
|
||||
if (a[0]==b[0]) return 0;
|
||||
if (a[0]<b[0]) return -1;
|
||||
return 1;
|
||||
},
|
||||
sort_ddmm: function(a,b) {
|
||||
mtch = a[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; m = mtch[2]; d = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt1 = y+m+d;
|
||||
mtch = b[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; m = mtch[2]; d = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt2 = y+m+d;
|
||||
if (dt1==dt2) return 0;
|
||||
if (dt1<dt2) return -1;
|
||||
return 1;
|
||||
},
|
||||
sort_mmdd: function(a,b) {
|
||||
mtch = a[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; d = mtch[2]; m = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt1 = y+m+d;
|
||||
mtch = b[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; d = mtch[2]; m = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt2 = y+m+d;
|
||||
if (dt1==dt2) return 0;
|
||||
if (dt1<dt2) return -1;
|
||||
return 1;
|
||||
},
|
||||
|
||||
shaker_sort: function(list, comp_func) {
|
||||
// A stable sort function to allow multi-level sorting of data
|
||||
// see: http://en.wikipedia.org/wiki/Cocktail_sort
|
||||
// thanks to Joseph Nahmias
|
||||
var b = 0;
|
||||
var t = list.length - 1;
|
||||
var swap = true;
|
||||
|
||||
while(swap) {
|
||||
swap = false;
|
||||
for(var i = b; i < t; ++i) {
|
||||
if ( comp_func(list[i], list[i+1]) > 0 ) {
|
||||
var q = list[i]; list[i] = list[i+1]; list[i+1] = q;
|
||||
swap = true;
|
||||
}
|
||||
} // for
|
||||
t--;
|
||||
|
||||
if (!swap) break;
|
||||
|
||||
for(var i = t; i > b; --i) {
|
||||
if ( comp_func(list[i], list[i-1]) < 0 ) {
|
||||
var q = list[i]; list[i] = list[i-1]; list[i-1] = q;
|
||||
swap = true;
|
||||
}
|
||||
} // for
|
||||
b++;
|
||||
|
||||
} // while(swap)
|
||||
}
|
||||
}
|
||||
|
||||
/* ******************************************************************
|
||||
Supporting functions: bundled here to avoid depending on a library
|
||||
****************************************************************** */
|
||||
|
||||
// Dean Edwards/Matthias Miller/John Resig
|
||||
|
||||
/* for Mozilla/Opera9 */
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", sorttable.init, false);
|
||||
}
|
||||
|
||||
/* for Internet Explorer */
|
||||
/*@cc_on @*/
|
||||
/*@if (@_win32)
|
||||
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
|
||||
var script = document.getElementById("__ie_onload");
|
||||
script.onreadystatechange = function() {
|
||||
if (this.readyState == "complete") {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
};
|
||||
/*@end @*/
|
||||
|
||||
/* for Safari */
|
||||
if (/WebKit/i.test(navigator.userAgent)) { // sniff
|
||||
var _timer = setInterval(function() {
|
||||
if (/loaded|complete/.test(document.readyState)) {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
|
||||
/* for other browsers */
|
||||
window.onload = sorttable.init;
|
||||
|
||||
// written by Dean Edwards, 2005
|
||||
// with input from Tino Zijdel, Matthias Miller, Diego Perini
|
||||
|
||||
// http://dean.edwards.name/weblog/2005/10/add-event/
|
||||
|
||||
function dean_addEvent(element, type, handler) {
|
||||
if (element.addEventListener) {
|
||||
element.addEventListener(type, handler, false);
|
||||
} else {
|
||||
// assign each event handler a unique ID
|
||||
if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;
|
||||
// create a hash table of event types for the element
|
||||
if (!element.events) element.events = {};
|
||||
// create a hash table of event handlers for each element/event pair
|
||||
var handlers = element.events[type];
|
||||
if (!handlers) {
|
||||
handlers = element.events[type] = {};
|
||||
// store the existing event handler (if there is one)
|
||||
if (element["on" + type]) {
|
||||
handlers[0] = element["on" + type];
|
||||
}
|
||||
}
|
||||
// store the event handler in the hash table
|
||||
handlers[handler.$$guid] = handler;
|
||||
// assign a global event handler to do all the work
|
||||
element["on" + type] = handleEvent;
|
||||
}
|
||||
};
|
||||
// a counter used to create unique IDs
|
||||
dean_addEvent.guid = 1;
|
||||
|
||||
function removeEvent(element, type, handler) {
|
||||
if (element.removeEventListener) {
|
||||
element.removeEventListener(type, handler, false);
|
||||
} else {
|
||||
// delete the event handler from the hash table
|
||||
if (element.events && element.events[type]) {
|
||||
delete element.events[type][handler.$$guid];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function handleEvent(event) {
|
||||
var returnValue = true;
|
||||
// grab the event object (IE uses a global event object)
|
||||
event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
|
||||
// get a reference to the hash table of event handlers
|
||||
var handlers = this.events[event.type];
|
||||
// execute each event handler
|
||||
for (var i in handlers) {
|
||||
this.$$handleEvent = handlers[i];
|
||||
if (this.$$handleEvent(event) === false) {
|
||||
returnValue = false;
|
||||
}
|
||||
}
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
function fixEvent(event) {
|
||||
// add W3C standard event methods
|
||||
event.preventDefault = fixEvent.preventDefault;
|
||||
event.stopPropagation = fixEvent.stopPropagation;
|
||||
return event;
|
||||
};
|
||||
fixEvent.preventDefault = function() {
|
||||
this.returnValue = false;
|
||||
};
|
||||
fixEvent.stopPropagation = function() {
|
||||
this.cancelBubble = true;
|
||||
}
|
||||
|
||||
// Dean's forEach: http://dean.edwards.name/base/forEach.js
|
||||
/*
|
||||
forEach, version 1.0
|
||||
Copyright 2006, Dean Edwards
|
||||
License: http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
// array-like enumeration
|
||||
if (!Array.forEach) { // mozilla already supports this
|
||||
Array.forEach = function(array, block, context) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
block.call(context, array[i], i, array);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// generic enumeration
|
||||
Function.prototype.forEach = function(object, block, context) {
|
||||
for (var key in object) {
|
||||
if (typeof this.prototype[key] == "undefined") {
|
||||
block.call(context, object[key], key, object);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// character enumeration
|
||||
String.forEach = function(string, block, context) {
|
||||
Array.forEach(string.split(""), function(chr, index) {
|
||||
block.call(context, chr, index, string);
|
||||
});
|
||||
};
|
||||
|
||||
// globally resolve forEach enumeration
|
||||
var forEach = function(object, block, context) {
|
||||
if (object) {
|
||||
var resolve = Object; // default
|
||||
if (object instanceof Function) {
|
||||
// functions have a "length" property
|
||||
resolve = Function;
|
||||
} else if (object.forEach instanceof Function) {
|
||||
// the object implements a custom forEach method so use that
|
||||
object.forEach(block, context);
|
||||
return;
|
||||
} else if (typeof object == "string") {
|
||||
// the object is a string
|
||||
resolve = String;
|
||||
} else if (typeof object.length == "number") {
|
||||
// the object is array-like
|
||||
resolve = Array;
|
||||
}
|
||||
resolve.forEach(object, block, context);
|
||||
}
|
||||
};
|
||||
|
|
@ -1,228 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN list files script:
|
||||
* just list the files in the upload current path (with the filter if needed)
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
|
||||
|
||||
start_session();
|
||||
|
||||
if (!empty($_SESSION['ERRORS'])){echo '<div class="error">'.strip_tags($_SESSION['ERRORS']).'</div>';unset($_SESSION['ERRORS']);}
|
||||
|
||||
# Libs & dependencies
|
||||
require_once('core/core.php');
|
||||
require_once('core/auto_restrict.php'); # Connected user only !
|
||||
include("core/auto_thumb.php");
|
||||
|
||||
# Initialisation
|
||||
if (empty($layout)){$layout=$_SESSION['aspect'];}
|
||||
if (!isset($shared_folders)){$shared_folders='';}
|
||||
if (!isset($back_link)){$back_link='';}
|
||||
$upload_path_size=strlen($_SESSION['upload_root_path'].$_SESSION['upload_user_path']);
|
||||
if (empty($_SESSION['mode'])){$mode='view';}else{$mode=$_SESSION['mode'];}
|
||||
if (empty($_SESSION['current_path'])){
|
||||
$path_list=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'];
|
||||
}else{
|
||||
$path_list=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].addslash_if_needed($_SESSION['current_path']);
|
||||
}
|
||||
|
||||
# Building current tree and prepare pagination
|
||||
if (empty($_SESSION['filter'])){$liste=tree($path_list,null,false,false,$tree);}
|
||||
else{$liste=tree($path_list,null,false,false,$tree);}
|
||||
$total_files=count($liste);$from=0;
|
||||
$max_pages=ceil($total_files/$_SESSION['max_files_per_page']);
|
||||
if (!empty($_GET['from'])){$from=$_GET['from'];}
|
||||
$liste=array_slice($liste, $from*$_SESSION['max_files_per_page'],$_SESSION['max_files_per_page']);
|
||||
$remain=$total_files-(($from+1)*$_SESSION['max_files_per_page']);
|
||||
|
||||
|
||||
if ($allow_folder_size_stat){$size_folder=folder_size($path_list);}
|
||||
|
||||
if (count($liste)>0){
|
||||
$files=array_flip($ids);
|
||||
$folderlist='';
|
||||
$filelist='';
|
||||
|
||||
foreach ($liste as $fichier){
|
||||
$nom=_basename($fichier);
|
||||
if ($nom!='index.html'&&!empty($files[$fichier])){
|
||||
$id=$files[$fichier];
|
||||
$class='';$title='';
|
||||
if (substr($id, 0,1)=='*'){
|
||||
# add class burn id after access
|
||||
$class='burn';
|
||||
$title=e('The user can access this only one time', false);
|
||||
}elseif (strlen($id)>strlen(uniqid(true))){
|
||||
# add class password protected
|
||||
$class='locked';
|
||||
$title=e('The user can access this only with the password', false);
|
||||
}
|
||||
|
||||
$extension=strtolower(pathinfo($fichier,PATHINFO_EXTENSION));
|
||||
|
||||
# adding view icon if needed
|
||||
if ($extension=='jpg'||$extension=='jpeg'||$extension=='gif'||$extension=='png'||$extension=='svg'){
|
||||
if ($use_lightbox){
|
||||
$icone_visu='<a class="visu" data-type="lightbox" data-group="lb" href="index.php?f='.$id.'" title="'.e('View this share',false).'" alt="'.$nom.'"><span class="icon-eye" ></span></a>';
|
||||
}else{
|
||||
$icone_visu='<a class="visu" target="_BLANK" href="index.php?f='.$id.'" title="'.e('View this share',false).'"><span class="icon-eye" ></span></a>';
|
||||
}
|
||||
if (!$click_on_link_to_download){$target='target="_BLANK"';}else{$target=null;}
|
||||
}elseif($extension=='m3u'){
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
|
||||
$icone_visu='<a class="visu" title="'.e('View this file',false).'" onclick="" href="#m3u"><span class="icon-eye" ></span></a>';
|
||||
}elseif($extension=='txt'||$extension=='nfo'||$extension=='md'){
|
||||
$icone_visu='<a class="visu" target="_BLANK" href="index.php?f='.$id.'&view" title="'.e('View this file',false).'"><span class="icon-eye" ></span></a>';
|
||||
}else{$icone_visu='';}
|
||||
|
||||
#adding edit icon if needed
|
||||
if (is_file($fichier)&&_mime_content_type($fichier)=='text/plain'&&$extension!='js'&&$extension!='php'&&$extension!='sphp'){
|
||||
$icone_edit='<a class="edit" href="index.php?p=editor&overwrite=true&file='.$id.'&token='.TOKEN.'" title="'.e('Edit this file',false).'"><span class="icon-edit" ></span></a>';
|
||||
}else{$icone_edit='';}
|
||||
|
||||
# create item for file or folder
|
||||
$fichier_short=substr($fichier,$upload_path_size);
|
||||
if (is_dir($fichier)){
|
||||
# Item is a folder
|
||||
$current_tree=tree($fichier,null,false,false,$tree);
|
||||
if (only_type($current_tree,'.jpg .jpeg .gif .png') || only_type($current_tree,'.mp3 .ogg')||only_type($fichier,'.jpg .jpeg .gif .png') || only_type($fichier,'.mp3 .ogg')){
|
||||
$icone_visu='<a class="visu" href="index.php?f='.$id.'" title="'.e('View this share',false).'"><span class="icon-eye"></span></a>';
|
||||
}
|
||||
if ($allow_folder_size_stat){$taille=folder_size($fichier);}else{$taille='';}
|
||||
# no share folder button if there's only one user
|
||||
if ($mode=='links'&&count($auto_restrict['users'])>1){
|
||||
$icone_share='<a class="usershare" title="'.e('Share this folder with another user',false).'" href="#usershare" data-id="'.$id.'" data-name="'.$fichier_short.'"><span class="icon-users"></span></a>';
|
||||
}else{$icone_share='';}
|
||||
$array=array(
|
||||
'#CLASS' => $class,
|
||||
'#ID' => $id,
|
||||
'#FICHIER' => $fichier_short,
|
||||
'#TOKEN' => TOKEN,
|
||||
'#SIZE' => $taille,
|
||||
'#NAME' => $nom,
|
||||
'#USERSHAREBUTTON' => $icone_share,
|
||||
'#TITLE' => $title,
|
||||
'#ICONE_VISU' => $icone_visu,
|
||||
'#SLASHEDNAME' => addslashes($nom),
|
||||
'#SLASHEDFICHIER' => addslashes($fichier_short),
|
||||
);
|
||||
$folderlist.= template($mode.'_folder_'.$layout,$array);
|
||||
$current_tree='';
|
||||
}elseif (is_file($fichier) && $_SESSION['GD'] && ($extension=='gif'||$extension=='jpg'||$extension=='jpeg'||$extension=='png')){
|
||||
# Item is a picture
|
||||
auto_thumb($fichier,64,64);
|
||||
if (empty($target)){$target='download="'.$nom.'"';}
|
||||
$array=array(
|
||||
'#CLASS' => $class,
|
||||
'#ID' => $id,
|
||||
'#FICHIER' => $fichier_short,
|
||||
'#TOKEN' => TOKEN,
|
||||
'#SIZE' => sizeconvert(filesize($fichier)),
|
||||
'#NAME' => $nom,
|
||||
'#TARGET' => $target,
|
||||
'#TITLE' => $title,
|
||||
'#EXTENSION' => $extension,
|
||||
'#ICONE_VISU' => $icone_visu,
|
||||
'#SLASHEDNAME' => addslashes($nom),
|
||||
'#SLASHEDFICHIER' => addslashes($fichier_short),
|
||||
);
|
||||
$filelist.= template($mode.'_image_'.$layout,$array);
|
||||
}elseif (is_file($fichier) && $extension=='zip' && $_SESSION['zip']){
|
||||
|
||||
# Item is a zip file=> add change to folder
|
||||
$icone_visu='<a class="tofolder" href="index.php?p=admin&unzip='.$id.'&token='.TOKEN.'" title="'.e('Convert this zip file to folder',false).'"><span class="icon-folder-1"></span></a>';
|
||||
$array=array(
|
||||
'#CLASS' => $class,
|
||||
'#ID' => $id,
|
||||
'#FICHIER' => $fichier_short,
|
||||
'#TOKEN' => TOKEN,
|
||||
'#SIZE' => sizeconvert(filesize($fichier)),
|
||||
'#NAME' => $nom,
|
||||
'#TARGET' => 'download="'.$nom.'"',
|
||||
'#TITLE' => $title,
|
||||
'#EXTENSION' => $extension,
|
||||
'#ICONE_VISU' => $icone_visu,
|
||||
'#ICONE_EDIT' => $icone_edit,
|
||||
'#SLASHEDNAME' => addslashes($nom),
|
||||
'#SLASHEDFICHIER' => addslashes($fichier_short),
|
||||
);
|
||||
$filelist.= template($mode.'_file_'.$layout,$array);
|
||||
}elseif (is_file($fichier)){
|
||||
chrono('fichier:'.$nom);
|
||||
# all other types
|
||||
if (empty($target)){$target='download="'.$nom.'"';}
|
||||
$array=array(
|
||||
'#CLASS' => $class,
|
||||
'#ID' => $id,
|
||||
'#FICHIER' => $fichier_short,
|
||||
'#TOKEN' => TOKEN,
|
||||
'#SIZE' => sizeconvert(filesize($fichier)),
|
||||
'#NAME' => $nom,
|
||||
'#TITLE' => $title,
|
||||
'#TARGET' => $target,
|
||||
'#EXTENSION' => $extension,
|
||||
'#ICONE_VISU' => $icone_visu,
|
||||
'#ICONE_EDIT' => $icone_edit,
|
||||
'#SLASHEDNAME' => addslashes($nom),
|
||||
'#SLASHEDFICHIER' => addslashes($fichier_short),
|
||||
);
|
||||
$filelist.= template($mode.'_file_'.$layout,$array);
|
||||
chrono('fichier:'.$nom);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if ($mode=='view'){
|
||||
$column='<td class="table_check"></td>';
|
||||
$column_header='<th class="table_check sorttable_nosort"><input type="checkbox" id="check_all" title="'.e('Check all',false).'"/></th>';
|
||||
$form_header='<form id="multiselect" action="#" method="POST">
|
||||
<input type="hidden" name="token" value="'.TOKEN.'"/>
|
||||
<input type="hidden" name="multiselect_command" id="multiselect_command" value=""/>';
|
||||
$form_footer='</form>';
|
||||
}else{
|
||||
$column=$form_header=$form_footer=$column_header='';
|
||||
}
|
||||
if ($layout=='list'&&!isset($_GET['async'])){
|
||||
# List layout
|
||||
echo $form_header;
|
||||
echo '
|
||||
<table class="sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
'.$column_header.'
|
||||
<th class="table_image sorttable_nosort"> </th>
|
||||
<th class="table_filename">'.e('Filename',false).'</th>
|
||||
<th class="table_filesize">'.e('Filesize',false).'</th>
|
||||
<th class="table_buttons sorttable_nosort"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="async_load">';
|
||||
|
||||
echo $shared_folders.$back_link.$folderlist.$filelist;
|
||||
|
||||
if (!empty($size_folder)){echo '</tbody><tfoot><tr>'.$column.'<td class="table_image"></td><td class="table_filename" style="text-align:right">Total:</td><td id="folder_size">'.$size_folder.'</td><td></td></tr></tfoot>';}
|
||||
echo '</table>';
|
||||
echo $form_footer;
|
||||
|
||||
}elseif ($layout=='icon'&&!isset($_GET['async'])){
|
||||
# Icon layout
|
||||
echo '<div id="async_load">';
|
||||
echo $shared_folders.$folderlist.$filelist;
|
||||
echo '</div>';
|
||||
if (!empty($size_folder)){echo '<div id="folder_size">'.e('Foldersize',false).': '.$size_folder.'</div>';}
|
||||
}else{
|
||||
# Ajax load more => content only
|
||||
echo $shared_folders.$back_link.$folderlist.$filelist;
|
||||
}
|
||||
|
||||
# «Load more» button
|
||||
if ($remain>0&&!isset($_GET['async'])){
|
||||
if ($remain>$_SESSION['max_files_per_page']){$remain=$_SESSION['max_files_per_page'];}
|
||||
$from++;
|
||||
echo '<a id="more_button" class="btn" href="index.php?p=admin&from='.$from.'&token='.TOKEN.'" onclick="loadMore(this);return false;" data-from="'.$from.'" data-url="index.php?async&token='.TOKEN.'" data-max="'.$max_pages.'">'.e('Load',false).' '.$remain.' '.e('more',false).'</a>';
|
||||
}
|
||||
}else{echo '<table>'.$shared_folders.'</table><div id="nofile">'.e('No file or folder',false).'</div>';}
|
||||
chrono('etape2 listfiles.php ');
|
||||
?>
|
|
@ -1,509 +0,0 @@
|
|||
<?php
|
||||
#
|
||||
#
|
||||
# Parsedown
|
||||
# http://parsedown.org
|
||||
#
|
||||
# (c) Emanuil Rusev
|
||||
# http://erusev.com
|
||||
#
|
||||
|
||||
#This version is not the original: it's a class to function conversion by Bronco (http:www.warriordudimanche.net)
|
||||
#Thanks a lot to Emanuil Rusev for this script ! It saved me lots of time ! ;-)
|
||||
function url2link($url){
|
||||
return preg_replace('!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si','<a href="$1" rel="nofollow">$1</a>',$url);
|
||||
;
|
||||
}
|
||||
global $escape_sequence_map;
|
||||
function parse($text)
|
||||
{
|
||||
# removes UTF-8 BOM and marker characters
|
||||
$text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text);
|
||||
|
||||
# removes \r characters
|
||||
$text = str_replace("\r\n", "\n", $text);
|
||||
$text = str_replace("\r", "\n", $text);
|
||||
|
||||
# replaces tabs with spaces
|
||||
$text = str_replace("\t", ' ', $text);
|
||||
|
||||
# encodes escape sequences
|
||||
if (strpos($text, '\\') !== FALSE)
|
||||
{
|
||||
$escape_sequences = array('\\\\', '\`', '\*', '\_', '\{', '\}', '\[', '\]', '\(', '\)', '\>', '\#', '\+', '\-', '\.', '\!');
|
||||
foreach ($escape_sequences as $index => $escape_sequence)
|
||||
{
|
||||
if (strpos($text, $escape_sequence) !== FALSE)
|
||||
{
|
||||
$code = "\x1A".'\\'.$index.';';
|
||||
$text = str_replace($escape_sequence, $code, $text);
|
||||
$escape_sequence_map[$code] = $escape_sequence;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ~
|
||||
|
||||
$text = preg_replace('/\n\s*\n/', "\n\n", $text);
|
||||
$text = trim($text, "\n");
|
||||
$lines = explode("\n", $text);
|
||||
$text = parse_block_elements($lines);
|
||||
|
||||
# decodes escape sequences
|
||||
if (!empty($escape_sequence_map)){
|
||||
foreach ($escape_sequence_map as $code => $escape_sequence)
|
||||
{
|
||||
$text = str_replace($code, $escape_sequence[1], $text);
|
||||
}
|
||||
}
|
||||
|
||||
$text = rtrim($text, "\n");
|
||||
return $text;
|
||||
}
|
||||
|
||||
function parse_block_elements(array $lines, $context = '')
|
||||
{
|
||||
$elements = array();
|
||||
$element = array('type' => '',);
|
||||
|
||||
foreach ($lines as $line)
|
||||
{
|
||||
# markup (open)
|
||||
if ($element['type'] === 'markup' and ! isset($element['closed']))
|
||||
{
|
||||
if (preg_match('{<'.$element['subtype'].'>$}', $line)) # opening tag
|
||||
{
|
||||
$element['depth']++;
|
||||
}
|
||||
|
||||
if (preg_match('{</'.$element['subtype'].'>$}', $line)) # closing tag
|
||||
{
|
||||
$element['depth'] > 0
|
||||
? $element['depth']--
|
||||
: $element['closed'] = true;
|
||||
}
|
||||
$element['text'] .= "\n".$line;
|
||||
continue;
|
||||
}
|
||||
|
||||
# *
|
||||
|
||||
if ($line === '')
|
||||
{
|
||||
$element['interrupted'] = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
# blockquote (existing)
|
||||
if ($element['type'] === 'blockquote' and ! isset($element['interrupted']))
|
||||
{
|
||||
$line = preg_replace('/^[ ]*>[ ]?/', '', $line);
|
||||
$element['lines'] []= $line;
|
||||
continue;
|
||||
}
|
||||
|
||||
# list (existing)
|
||||
if ($element['type'] === 'li')
|
||||
{
|
||||
if (preg_match('/^([ ]{0,3})(\d+[.]|[*+-])[ ](.*)/', $line, $matches))
|
||||
{
|
||||
if ($element['indentation'] !== $matches[1])
|
||||
{
|
||||
$element['lines'] []= $line;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($element['last']);
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => 'li',
|
||||
'indentation' => $matches[1],
|
||||
'last' => true,
|
||||
'lines' => array(
|
||||
preg_replace('/^[ ]{0,4}/', '', $matches[3]),
|
||||
),
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($element['interrupted']))
|
||||
{
|
||||
if ($line[0] === ' ')
|
||||
{
|
||||
$element['lines'] []= '';
|
||||
$line = preg_replace('/^[ ]{0,4}/', '', $line);
|
||||
$element['lines'] []= $line;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$line = preg_replace('/^[ ]{0,4}/', '', $line);
|
||||
$element['lines'] []= $line;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
# paragraph
|
||||
if ($line[0] >= 'a' or $line[0] >= 'A' and $line[0] <= 'Z')
|
||||
{
|
||||
goto paragraph;
|
||||
}
|
||||
|
||||
# code block
|
||||
if ($line[0] === ' ' and preg_match('/^[ ]{4}(.*)/', $line, $matches))
|
||||
{
|
||||
if (trim($line) === ''){continue;}
|
||||
if ($element['type'] === 'code')
|
||||
{
|
||||
if (isset($element['interrupted']))
|
||||
{
|
||||
$element['text'] .= "\n";
|
||||
unset ($element['interrupted']);
|
||||
}
|
||||
$element['text'] .= "\n".$matches[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => 'code',
|
||||
'text' => $matches[1],
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
# setext heading (---)
|
||||
|
||||
if ($line[0] === '-' and $element['type'] === 'p' and ! isset($element['interrupted']) and preg_match('/^[-]+[ ]*$/', $line))
|
||||
{
|
||||
$element['type'] = 'h.';
|
||||
$element['level'] = 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
# atx heading (#)
|
||||
|
||||
if ($line[0] === '#' and preg_match('/^(#{1,6})[ ]*(.+?)[ ]*#*$/', $line, $matches))
|
||||
{
|
||||
$elements []= $element;
|
||||
$level = strlen($matches[1]);
|
||||
$element = array(
|
||||
'type' => 'h.',
|
||||
'text' => $matches[2],
|
||||
'level' => $level,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
# setext heading (===)
|
||||
if ($line[0] === '=' and $element['type'] === 'p' and ! isset($element['interrupted']) and preg_match('/^[=]+[ ]*$/', $line))
|
||||
{
|
||||
$element['type'] = 'h.';
|
||||
$element['level'] = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
$deindented_line = $line[0] !== ' ' ? $line : ltrim($line);
|
||||
if ($deindented_line === ''){continue;}
|
||||
|
||||
# reference
|
||||
if ($deindented_line[0] === '[' and preg_match('/^\[(.+?)\]:[ ]*([^ ]+)/', $deindented_line, $matches))
|
||||
{
|
||||
$label = strtolower($matches[1]);
|
||||
$url = trim($matches[2], '<>');
|
||||
$reference_map[$label] = $url;
|
||||
continue;
|
||||
}
|
||||
|
||||
# blockquote
|
||||
if ($deindented_line[0] === '>' and preg_match('/^>[ ]?(.*)/', $deindented_line, $matches))
|
||||
{
|
||||
if ($element['type'] === 'blockquote')
|
||||
{
|
||||
if (isset($element['interrupted']))
|
||||
{
|
||||
$element['lines'] []= '';
|
||||
unset($element['interrupted']);
|
||||
}
|
||||
$element['lines'] []= $matches[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => 'blockquote',
|
||||
'lines' => array(
|
||||
$matches[1],
|
||||
),
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
# markup
|
||||
|
||||
if ($deindented_line[0] === '<')
|
||||
{
|
||||
# self-closing tag
|
||||
if (preg_match('{^<.+?/>$}', $deindented_line))
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => '',
|
||||
'text' => $deindented_line,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
# opening tag
|
||||
if (preg_match('{^<(\w+)(?:[ ].*?)?>}', $deindented_line, $matches))
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => 'markup',
|
||||
'subtype' => strtolower($matches[1]),
|
||||
'text' => $deindented_line,
|
||||
'depth' => 0,
|
||||
);
|
||||
preg_match('{</'.$matches[1].'>\s*$}', $deindented_line) and $element['closed'] = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
# horizontal rule
|
||||
if (preg_match('/^([-*_])([ ]{0,2}\1){2,}[ ]*$/', $deindented_line))
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array('type' => 'hr',);
|
||||
continue;
|
||||
}
|
||||
|
||||
# list item
|
||||
if (preg_match('/^([ ]*)(\d+[.]|[*+-])[ ](.*)/', $line, $matches))
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => 'li',
|
||||
'ordered' => isset($matches[2][1]),
|
||||
'indentation' => $matches[1],
|
||||
'last' => true,
|
||||
'lines' => array(
|
||||
preg_replace('/^[ ]{0,4}/', '', $matches[3]),
|
||||
),
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
paragraph:
|
||||
if ($element['type'] === 'p')
|
||||
{
|
||||
if (isset($element['interrupted']))
|
||||
{
|
||||
$elements []= $element;
|
||||
$element['text'] = $line;
|
||||
unset($element['interrupted']);
|
||||
}
|
||||
else {$element['text'] .= "\n".$line;}
|
||||
}
|
||||
else
|
||||
{
|
||||
$elements []= $element;
|
||||
$element = array(
|
||||
'type' => 'p',
|
||||
'text' => $line,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$elements []= $element;
|
||||
array_shift($elements);
|
||||
|
||||
|
||||
$markup = '';
|
||||
foreach ($elements as $index => $element)
|
||||
{
|
||||
switch ($element['type'])
|
||||
{
|
||||
case 'p':
|
||||
$text = parse_span_elements($element['text']);
|
||||
$text = preg_replace('/[ ]{2}\n/', '<br />'."\n", $text);
|
||||
if ($context === 'li' and $index === 0)
|
||||
{
|
||||
if (isset($element['interrupted'])) { $markup .= "\n".'<p>'.$text.'</p>'."\n";}
|
||||
else {$markup .= $text;}
|
||||
}
|
||||
else{$markup .= '<p>'.$text.'</p>'."\n";}
|
||||
break;
|
||||
|
||||
case 'blockquote':
|
||||
$text =parse_block_elements($element['lines']);
|
||||
$markup .= '<blockquote>'."\n".$text.'</blockquote>'."\n";
|
||||
break;
|
||||
|
||||
case 'code':
|
||||
$text = htmlentities($element['text'], ENT_NOQUOTES);
|
||||
strpos($text, "\x1A\\") !== FALSE and $text = strtr($text, $escape_sequence_map);
|
||||
$markup .= '<pre><code>'.$text.'</code></pre>'."\n";
|
||||
break;
|
||||
|
||||
case 'h.':
|
||||
$text = parse_span_elements($element['text']);
|
||||
$markup .= '<h'.$element['level'].'>'.$text.'</h'.$element['level'].'>'."\n";
|
||||
break;
|
||||
|
||||
case 'hr':
|
||||
$markup .= '<hr />'."\n";
|
||||
break;
|
||||
|
||||
case 'li':
|
||||
if (isset($element['ordered'])) # first
|
||||
{
|
||||
$list_type = $element['ordered'] ? 'ol' : 'ul';
|
||||
$markup .= '<'.$list_type.'>'."\n";
|
||||
}
|
||||
if (isset($element['interrupted']) and ! isset($element['last']))
|
||||
{
|
||||
$element['lines'] []= '';
|
||||
}
|
||||
$text = parse_block_elements($element['lines'], 'li');
|
||||
$markup .= '<li>'.$text.'</li>'."\n";
|
||||
isset($element['last']) and $markup .= '</'.$list_type.'>'."\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
$markup .= $element['text']."\n";
|
||||
}
|
||||
}
|
||||
return $markup;
|
||||
}
|
||||
|
||||
function parse_span_elements($text)
|
||||
{
|
||||
$map = array();
|
||||
$index = 0;
|
||||
|
||||
# code span
|
||||
if (strpos($text, '`') !== FALSE and preg_match_all('/`(.+?)`/', $text, $matches, PREG_SET_ORDER))
|
||||
{
|
||||
foreach ($matches as $matches)
|
||||
{
|
||||
$element_text = $matches[1];
|
||||
$element_text = htmlentities($element_text, ENT_NOQUOTES);
|
||||
|
||||
# decodes escape sequences
|
||||
$escape_sequence_map
|
||||
and strpos($element_text, "\x1A") !== FALSE
|
||||
and $element_text = strtr($element_text, $escape_sequence_map);
|
||||
|
||||
# composes element
|
||||
$element = '<code>'.$element_text.'</code>';
|
||||
|
||||
# encodes element
|
||||
$code = "\x1A".'$'.$index;
|
||||
$text = str_replace($matches[0], $code, $text);
|
||||
$map[$code] = $element;
|
||||
$index ++;
|
||||
}
|
||||
}
|
||||
|
||||
# inline link or image
|
||||
|
||||
if (strpos($text, '](') !== FALSE and preg_match_all('/(!?)(\[((?:[^\[\]]|(?2))*)\])\((.*?)\)/', $text, $matches, PREG_SET_ORDER)) # inline
|
||||
{
|
||||
foreach ($matches as $matches)
|
||||
{
|
||||
$url = $matches[4];
|
||||
strpos($url, '&') !== FALSE and $url = preg_replace('/&(?!#?\w+;)/', '&', $url);
|
||||
if ($matches[1]) # image
|
||||
{
|
||||
$element = '<img alt="'.$matches[3].'" src="'.$url.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$element_text =parse_span_elements($matches[3]);
|
||||
$element = '<a href="'.$url.'">'.$element_text.'</a>';
|
||||
}
|
||||
|
||||
|
||||
$code = "\x1A".'$'.$index;
|
||||
$text = str_replace($matches[0], $code, $text);
|
||||
$map[$code] = $element;
|
||||
$index ++;
|
||||
}
|
||||
}
|
||||
|
||||
# reference link or image
|
||||
if (strpos($text, '[') !== FALSE and preg_match_all('/(!?)\[(.+?)\](?:\n?[ ]?\[(.*?)\])?/ms', $text, $matches, PREG_SET_ORDER))
|
||||
{
|
||||
foreach ($matches as $matches)
|
||||
{
|
||||
$link_definition = isset($matches[3]) && $matches[3]
|
||||
? $matches[3]
|
||||
: $matches[2]; # implicit
|
||||
|
||||
$link_definition = strtolower($link_definition);
|
||||
if (isset($reference_map[$link_definition]))
|
||||
{
|
||||
$url = $reference_map[$link_definition];
|
||||
strpos($url, '&') !== FALSE and $url = preg_replace('/&(?!#?\w+;)/', '&', $url);
|
||||
if ($matches[1]) # image
|
||||
{
|
||||
$element = '<img alt="'.$matches[2].'" src="'.$url.'">';
|
||||
}
|
||||
else # anchor
|
||||
{
|
||||
$element_text = parse_span_elements($matches[2]);
|
||||
$element = '<a href="'.$url.'">'.$element_text.'</a>';
|
||||
}
|
||||
|
||||
|
||||
$code = "\x1A".'$'.$index;
|
||||
$text = str_replace($matches[0], $code, $text);
|
||||
$map[$code] = $element;
|
||||
$index ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# automatic link
|
||||
|
||||
if (strpos($text, '<') !== FALSE and preg_match_all('/<((https?|ftp|dict):[^\^\s]+?)>/i', $text, $matches, PREG_SET_ORDER))
|
||||
{
|
||||
foreach ($matches as $matches)
|
||||
{
|
||||
$url = $matches[1];
|
||||
strpos($url, '&') !== FALSE and $url = preg_replace('/&(?!#?\w+;)/', '&', $url);
|
||||
$element = '<a href=":href">:text</a>';
|
||||
$element = str_replace(':text', $url, $element);
|
||||
$element = str_replace(':href', $url, $element);
|
||||
|
||||
$code = "\x1A".'$'.$index;
|
||||
$text = str_replace($matches[0], $code, $text);
|
||||
$map[$code] = $element;
|
||||
$index ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
strpos($text, '&') !== FALSE and $text = preg_replace('/&(?!#?\w+;)/', '&', $text);
|
||||
strpos($text, '<') !== FALSE and $text = preg_replace('/<(?!\/?\w.*?>)/', '<', $text);
|
||||
|
||||
if (strpos($text, '_') !== FALSE)
|
||||
{
|
||||
$text = preg_replace('/__(?=\S)(.+?)(?<=\S)__(?!_)/s', '<strong>$1</strong>', $text);
|
||||
$text = preg_replace('/_(?=\S)(.+?)(?<=\S)_/s', '<em>$1</em>', $text);
|
||||
}
|
||||
|
||||
if (strpos($text, '*') !== FALSE)
|
||||
{
|
||||
$text = preg_replace('/\*\*(?=\S)(.+?)(?<=\S)\*\*(?!\*)/s', '<strong>$1</strong>', $text);
|
||||
$text = preg_replace('/\*(?=\S)(.+?)(?<=\S)\*/s', '<em>$1</em>', $text);
|
||||
}
|
||||
|
||||
$text = strtr($text, $map);
|
||||
return $text;
|
||||
}
|
||||
?>
|
|
@ -1,197 +0,0 @@
|
|||
en<?php
|
||||
/**
|
||||
* BoZoN share page:
|
||||
* handles a user share request
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
|
||||
$id=strip_tags($_GET['f']);
|
||||
$f=id2file($id); # complete filepath including profile folder
|
||||
|
||||
$qrcode='
|
||||
<script src="core/js/qr.js"></script>
|
||||
<script>
|
||||
function qrcode() {
|
||||
qr=document.getElementById("qrcode");
|
||||
id=qr.getAttribute("data-src");
|
||||
var data = "'.$_SESSION["home"].'?f="+id;
|
||||
var options = {ecclevel:"M"};
|
||||
var url = QRCode.generatePNG(data, options);
|
||||
qr.src = url;
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
';
|
||||
$m3u='
|
||||
<script type="text/javascript" src="core/js/m3uStreamPlayer.js"></script>
|
||||
<script type="text/javascript">m3uStreamPlayer.init({selector: "#video", debug: true});</script>
|
||||
<script type="text/javascript">
|
||||
/**
|
||||
* Buttons
|
||||
*/
|
||||
var buttonNextSource = document.querySelector("#video-next-source");
|
||||
var buttonRandomizeSource = document.querySelector("#video-randomize-source");
|
||||
buttonNextSource.addEventListener("click", function(){ m3uStreamPlayer.nextSource(document.querySelector("#video")); })
|
||||
buttonRandomizeSource.addEventListener("click", function(){ v.randomizeSource(document.querySelector("#video")); })
|
||||
</script>
|
||||
|
||||
';
|
||||
if(!empty($f)){
|
||||
set_time_limit (0);
|
||||
store_access_stat($f,$id);
|
||||
$call_qrcode='<img id="qrcode" data-src="'.$id.'" src=""/><script>qrcode();</script>';
|
||||
|
||||
# password mode
|
||||
if (isset($_POST['password'])){
|
||||
# the file id is a md5 password.original id
|
||||
$blured=blur_password($_POST['password']);
|
||||
$sub_id=str_replace($blured,'',$id); # here we try to recover the original id to compare
|
||||
}
|
||||
if (strlen($id)>23 && empty($_POST['password'])){
|
||||
require(THEME_PATH.'/header.php');
|
||||
echo '
|
||||
<div id="lock">
|
||||
<p id="message"><img src="'.THEME_PATH.'/img/home/locked.png"/>'.e('This share is protected, please type the correct password:',false).'</p>
|
||||
<form action="index.php?f='.$id.'" method="post">
|
||||
<input type="password" name="password" class="npt"/>
|
||||
<input type="submit" value="Ok" class="btn"/>
|
||||
</form>
|
||||
</div>
|
||||
';
|
||||
require(THEME_PATH.'/footer.php');
|
||||
}else if(empty($_POST['password'])||!empty($_POST['password']) && $blured.$sub_id==$id){
|
||||
# normal mode or access granted
|
||||
if ($f && is_file($f)){
|
||||
|
||||
# file request => return file according to $behaviour var (see core.php)
|
||||
$type=_mime_content_type($f);
|
||||
$ext=strtolower(pathinfo($f,PATHINFO_EXTENSION));
|
||||
if ($ext=='md'){
|
||||
include('core/markdown.php');
|
||||
require(THEME_PATH.'/header_markdown.php');
|
||||
echo $qrcode;
|
||||
echo parse(url2link(file_get_contents($f)));
|
||||
echo $call_qrcode;
|
||||
require(THEME_PATH.'/footer_markdown.php');
|
||||
|
||||
}else if ($ext=='m3u'){
|
||||
require(THEME_PATH.'/header.php');
|
||||
echo $qrcode;
|
||||
echo str_replace('index.php?f='.$id,'#m3u_link',$templates['dialog_share']);
|
||||
echo $call_qrcode;
|
||||
require(THEME_PATH.'/footer.php');
|
||||
|
||||
}else if (is_in($ext,'FILES_TO_ECHO')!==false){
|
||||
require(THEME_PATH.'/header.php');
|
||||
echo $qrcode;
|
||||
echo '<pre>'.htmlspecialchars(file_get_contents($f)).'</pre>';
|
||||
echo $call_qrcode;
|
||||
require(THEME_PATH.'/footer.php');
|
||||
}else if (is_in($ext,'FILES_TO_RETURN')!==false||$type=='text/plain'&&empty($ext)){
|
||||
header('Content-type: '.$type.'; charset=utf-8');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Length: '.filesize($f));
|
||||
readfile($f);
|
||||
}else{
|
||||
header('Content-type: '.$type);
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Length: '.filesize($f));
|
||||
# lance le téléchargement des fichiers non affichables
|
||||
header('Content-Disposition: attachment; filename="'._basename($f).'"');
|
||||
readfile($f);
|
||||
}
|
||||
# burn access ?
|
||||
burned($id);
|
||||
exit();
|
||||
|
||||
}else if ($f && is_dir($f)){
|
||||
# folder request: return the folder & subfolders tree
|
||||
$tree=tree($f,return_owner($id),false,true);
|
||||
if (!isset($_GET['rss'])&&!isset($_GET['json'])){ # no html, header etc for rss feed & json data
|
||||
require(THEME_PATH.'/header.php');
|
||||
echo $qrcode;
|
||||
echo '<div id="share">';
|
||||
draw_tree($tree);
|
||||
echo '</div>';
|
||||
echo '
|
||||
<div class="feeds">'.$call_qrcode;
|
||||
if ($allow_shared_folder_RSS_feed||$allow_shared_folder_JSON_feed){
|
||||
echo '<br/>'.e('This page in',false);
|
||||
}
|
||||
if ($allow_shared_folder_RSS_feed){
|
||||
echo ' <a href="'.$_SESSION['home'].'?f='.$id.'&rss" class="rss btn">RSS</a>';
|
||||
}
|
||||
if ($allow_shared_folder_JSON_feed){
|
||||
echo '<a href="'.$_SESSION['home'].'?f='.$id.'&json" class="json btn blue">Json</a>';
|
||||
}
|
||||
if ($allow_shared_folder_download){
|
||||
echo '<br/>
|
||||
<a class="zipfolder" href="index.php?zipfolder='.$id.'" title ="zip"><span class="icon-download-cloud"></span> '.e('Download a zip from this folder',false).'</a>';
|
||||
}
|
||||
echo '</div>';
|
||||
require(THEME_PATH.'/footer.php');
|
||||
}
|
||||
|
||||
}else{
|
||||
require(THEME_PATH.'/header.php');
|
||||
echo '<div class="error">
|
||||
<br/>
|
||||
'.e('This link is no longer available, sorry.',false).'
|
||||
<br/>
|
||||
</div>';
|
||||
require(THEME_PATH.'/footer.php');
|
||||
}
|
||||
|
||||
# json format of a shared folder (but not for a locked one)
|
||||
if (isset($_GET['json']) && !empty($tree) && strlen($id)<=23){
|
||||
$upload_path_size=strlen($_SESSION['upload_root_path']);
|
||||
foreach ($tree as $branch){
|
||||
$id_tree[file2id($branch)]=$branch;
|
||||
}
|
||||
# burn access ?
|
||||
burned($id);
|
||||
exit(json_encode($id_tree));
|
||||
}
|
||||
|
||||
# RSS format of a shared folder (but not for a locked one)
|
||||
if (isset($_GET['rss']) && !empty($tree) && strlen($id)<=23){
|
||||
$rss=array('infos'=>'','items'=>'');
|
||||
$rss['infos']=array(
|
||||
'title'=>_basename($f),
|
||||
'description'=>e('Rss feed of ',false)._basename($f),
|
||||
//'guid'=>$_SESSION['home'].'?f='.$id,
|
||||
'link'=>htmlentities($_SESSION['home'].'?f='.$id.'&rss'),
|
||||
);
|
||||
|
||||
include('core/Array2feed.php');
|
||||
$upload_path_size=strlen($_SESSION['upload_root_path']);
|
||||
foreach ($tree as $branch){
|
||||
$id_branch=file2id($branch);
|
||||
$rss['items'][]=array(
|
||||
'title'=>_basename($branch),
|
||||
'description'=>'',
|
||||
'pubDate'=>makeRSSdate(date("d-m-Y H:i:s.",filemtime($branch))),
|
||||
'link'=>$_SESSION['home'].'?f='.$id_branch,
|
||||
'guid'=>$_SESSION['home'].'?f='.$id_branch,
|
||||
);
|
||||
}
|
||||
array2feed($rss);
|
||||
# burn access ?
|
||||
burned($id);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
require(THEME_PATH.'/header.php');
|
||||
echo '<div class="link_error">
|
||||
<br/>
|
||||
'.e('This link is no longer available, sorry.',false).'
|
||||
<br/>
|
||||
</div>';
|
||||
require(THEME_PATH.'/footer.php');
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN templates file
|
||||
* This file handles loading templates and inserting data in it
|
||||
* Do not change the #CODE parts !
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
|
||||
if (function_exists('returnToken')){$token=returnToken();}
|
||||
|
||||
$replacement=array(
|
||||
'#tooltip_close'=>e('Delete this file',false),
|
||||
'#tooltip_link'=>e('Get the share link',false),
|
||||
'#tooltip_qrcode'=>e('Get the qrcode of this link',false),
|
||||
'#tooltip_rename'=>e('Rename this file (share link will not change)',false),
|
||||
'#tooltip_lock'=>e('Put a password on this share',false),
|
||||
'#tooltip_burn'=>e('Turn this share into a burn after access share',false),
|
||||
'#tooltip_renew'=>e('Regen the share link',false),
|
||||
'#tooltip_zipfolder'=>e('Download a zip from this folder',false),
|
||||
'#Move_file_or_folder'=>e('Move file or folder',false),
|
||||
'#Move_to'=>e('Move to',false),
|
||||
'#Move'=>e('Move',false),
|
||||
'#To'=>e('To',false),
|
||||
'#Lock_access'=>e('Lock access',false),
|
||||
'#Please_give_a_password'=>e('Please give a password to lock access to this file',false),
|
||||
'#Rename_file'=>e('Rename this file?',false),
|
||||
'#Rename_item'=>e('Rename this item?',false),
|
||||
'#Rename'=>e('Rename',false),
|
||||
'#Delete_item'=>e('Delete this item?',false),
|
||||
'#Delete'=>e('Delete',false),
|
||||
'#Share_folder'=>e('Share folder',false),
|
||||
'#Share_link'=>e('Share link',false),
|
||||
'#share_text'=>e('Select the users you want to share with',false),
|
||||
'#Copy_link'=>e('Copy this share link',false),
|
||||
'#theme'=>THEME_PATH,
|
||||
'#YES'=>e('Yes',false),
|
||||
'#Move_to'=>e('Move this file to another directory',false),
|
||||
'#Create_new_folder'=>e('Create a subfolder',false),
|
||||
'#Create_folder_title'=>e('Create a subfolder in this folder',false),
|
||||
'#New_folder'=>e('New folder',false),
|
||||
'#paste_url'=>e('Paste a file\'s URL',false),
|
||||
'#paste_url_title'=>e('Paste a file\'s URL to get it on this server',false),
|
||||
'#Read_m3u_playlist'=>e('Read m3u playlist',false),
|
||||
'#local_filename'=>e('Force local filename (leave empty=no change)',false),
|
||||
'#filename'=>e('filename (optionnal)',false),
|
||||
|
||||
);
|
||||
if (!empty($token)){
|
||||
$replacement['#TOKEN']=$token;
|
||||
}
|
||||
function load_templates($tpl_array=null){
|
||||
global $replacement;
|
||||
$k=array_keys($replacement);
|
||||
$r=array_values($replacement);
|
||||
$path=THEME_PATH.'/templates/';
|
||||
if (empty($tpl_array)){
|
||||
$tpl_array=_glob($path,$pattern='html');
|
||||
}
|
||||
foreach($tpl_array as $key=>$tpl){
|
||||
$tpl=_basename($tpl);
|
||||
$tpl_name=substr($tpl,0,strlen($tpl)-5);
|
||||
$templates[$tpl_name]=str_replace($k,$r,file_get_contents($path.$tpl));
|
||||
}
|
||||
return $templates;
|
||||
}
|
||||
|
||||
$templates=load_templates();
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN index page:
|
||||
* joins all bozon parts and handles requests
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
#########################################################################################
|
||||
# Secure process by Timo ( http://lehollandaisvolant.net/?mode=links&id=20160319122329 )
|
||||
#########################################################################################
|
||||
if (basename($_SERVER['SCRIPT_NAME']) === 'index.php' and strpos(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 'index.php') === FALSE ) {
|
||||
$var_request_URI = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH).'index.php';
|
||||
} else {
|
||||
$var_request_URI = $_SERVER['REQUEST_URI'];
|
||||
}
|
||||
if (parse_url($var_request_URI, PHP_URL_PATH) !== $_SERVER['SCRIPT_NAME']) {
|
||||
header('Location: '.$_SERVER['SCRIPT_NAME']);
|
||||
}
|
||||
#########################################################################################
|
||||
$root=dirname(realpath(__FILE__)).'/';
|
||||
require('core/core.php');
|
||||
require('core/commands_GET_vars.php');# handle no html content requests
|
||||
#########################################################################################
|
||||
require(THEME_PATH.'/header.php');
|
||||
#########################################################################################
|
||||
if (!empty($message)){echo '<div class="info" onclick="addClass(this,\'hidden\');" title="'.e('Click to remove',false).'">'.$message.'</div>';}
|
||||
# page request
|
||||
if (!empty($page)&&is_file(THEME_PATH.$page.'.php')){
|
||||
# request for a specific page
|
||||
include(THEME_PATH.$page.'.php');
|
||||
}else{
|
||||
# no page request -> home
|
||||
include(THEME_PATH.'home.php');
|
||||
}
|
||||
#########################################################################################
|
||||
require(THEME_PATH.'/footer.php');
|
||||
$_SESSION['ERRORS']='';
|
||||
?>
|
|
@ -1,292 +0,0 @@
|
|||
<?php
|
||||
##################################################
|
||||
# de
|
||||
##################################################
|
||||
|
||||
$lang=array(
|
||||
|
||||
##################################################
|
||||
# ./core/auto_dropzone.php
|
||||
##################################################
|
||||
"Drop your files here or click to select a local file" => "Lasse die Dateien hier fallen oder wähle eine lokale Datei aus",
|
||||
# "Error, max filelength:" => "",
|
||||
# ": Error, forbidden file format !" => "",
|
||||
# "The file to big for the server\'s config" => "",
|
||||
# "The file to big for this page" => "",
|
||||
# "There was a problem during upload (file was truncated)" => "",
|
||||
# "No file upload" => "",
|
||||
# "No temp folder" => "",
|
||||
# "Write error on server" => "",
|
||||
# "The file doesn\'t fit" => "",
|
||||
# "Upload error" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/auto_restrict.php
|
||||
##################################################
|
||||
# "Account created:" => "",
|
||||
# "New password saved for " => "",
|
||||
# "Error saving new password for " => "",
|
||||
|
||||
##################################################
|
||||
# ./core/commands_GET_vars.php
|
||||
##################################################
|
||||
# "Rss feed of stats" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/core.php
|
||||
##################################################
|
||||
# "Private folder is not writable" => "",
|
||||
# "Private folder is not readable" => "",
|
||||
# "Temp folder is not writable" => "",
|
||||
# "Temp folder is not readable" => "",
|
||||
# "Problem accessing tree folder: not readable" => "",
|
||||
# "Problem accessing tree/folder file: not writable" => "",
|
||||
# "Problem accessing " => "",
|
||||
# ": folder not readable" => "",
|
||||
# ": folder not writable" => "",
|
||||
# "is not installed on this server" => "",
|
||||
"More info" => "Mehr Infos",
|
||||
"Problem accessing ID file: not readable" => "Fehler beim Zugriff auf ID-Datei: nicht lesbar",
|
||||
"Problem accessing ID file: not writable" => "Fehler beim Zugriff auf ID-Datei: nicht schreibbar",
|
||||
# "Problem accessing stats file: not readable" => "",
|
||||
# "Problem accessing stats file: not writable" => "",
|
||||
"Logout" => "Abmelden",
|
||||
"Connection" => "Verbindung",
|
||||
# "See as icon" => "",
|
||||
# "See as file list" => "",
|
||||
"Manage files" => "Dateien verwalten",
|
||||
"Manage links" => "Links verwalten",
|
||||
# "Deleted" => "",
|
||||
# "used" => "",
|
||||
# "free" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/GET_POST_admin_data.php
|
||||
##################################################
|
||||
# "is not writable" => "",
|
||||
# "created" => "",
|
||||
"Problem accessing remote file." => "Fehler beim Zugriff auf Remote-Datei",
|
||||
# "moved to" => "",
|
||||
# "Changes saved" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/listfiles.php
|
||||
##################################################
|
||||
"The user can access this only one time" => "Zugriff nur einmalig",
|
||||
"The user can access this only with the password" => "Zugriff nur mit Passwort",
|
||||
"View this share" => "Datei öffnen",
|
||||
# "View this file" => "",
|
||||
# "Edit this file" => "",
|
||||
# "Share this folder with another user" => "",
|
||||
"Convert this zip file to folder" => "Dieses Archiv in einen Ordner entpacken",
|
||||
# "Check all" => "",
|
||||
# "Filename" => "",
|
||||
# "Filesize" => "",
|
||||
# "Foldersize" => "",
|
||||
# "Load" => "",
|
||||
# "more" => "",
|
||||
# "No file or folder" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/share.php
|
||||
##################################################
|
||||
"This share is protected, please type the correct password:" => "Diese Freigabe ist passwortgesichert, bitte gib das richtige Passwort ein: ",
|
||||
"This page in" => "Diese Seite in ???",
|
||||
"Download a zip from this folder" => "Ordner als Zip-Archiv herunterladen",
|
||||
"This link is no longer available, sorry." => "Oh nein, dieser Link ist nicht mehr verfügbar.",
|
||||
# "Rss feed of " => "",
|
||||
|
||||
##################################################
|
||||
# ./core/templates.php
|
||||
##################################################
|
||||
"Delete this file" => "Datei löschen",
|
||||
"Get the share link" => "Freigabe-Link generieren",
|
||||
# "Get the qrcode of this link" => "",
|
||||
"Rename this file (share link will not change)" => "Datei umbenennen (Freigabe-Link bleibt unverändert)",
|
||||
"Put a password on this share" => "Diese Freigabe mit einem Passwort sichern",
|
||||
"Turn this share into a burn after access share" => "Diese Freigabe in eine Einmal-Freigabe verwandeln",
|
||||
"Regen the share link" => "Freigabe-Link erneuern",
|
||||
"Move file or folder" => "Datei/Ordner verschieben",
|
||||
"Move to" => "Verschieben nach",
|
||||
"Move" => "Verschieben",
|
||||
"To" => "Nach",
|
||||
"Lock access" => "Zugriff sperren",
|
||||
"Please give a password to lock access to this file" => "Gib ein Passwort ein, um diese Datei zu sichern",
|
||||
# "Rename this file?" => "",
|
||||
# "Rename this item?" => "",
|
||||
"Rename" => "Umbenennen",
|
||||
# "Delete this item?" => "",
|
||||
"Delete" => "Löschen",
|
||||
# "Share folder" => "",
|
||||
"Share link" => "Freigabe-Link",
|
||||
# "Select the users you want to share with" => "",
|
||||
"Copy this share link" => "Freigabe-Link kopieren",
|
||||
"Yes" => "Ja",
|
||||
"Move this file to another directory" => "Datei in einen anderen Ordner verschieben",
|
||||
"Create a subfolder" => "Unterordner erstellen",
|
||||
"Create a subfolder in this folder" => "Unterordner in diesem Ordner erstellen",
|
||||
# "New folder" => "",
|
||||
"Paste a file\'s URL" => "Datei-URL einfügen",
|
||||
"Paste a file\'s URL to get it on this server" => "Datei-URL einfügen, um sie auf den Server zu laden",
|
||||
# "Read m3u playlist" => "",
|
||||
# "Force local filename (leave empty=no change)" => "",
|
||||
# "filename (optionnal)" => "",
|
||||
|
||||
##################################################
|
||||
# ./index.php
|
||||
##################################################
|
||||
# "Click to remove" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/admin.php
|
||||
##################################################
|
||||
"Choose a folder" => "Ordner auswählen",
|
||||
# "Root:" => "",
|
||||
# "Filter:" => "",
|
||||
# "Paste a file\'s URL to get it on this server" => "",
|
||||
# "Delete selected items" => "",
|
||||
# "Zip and download selected items" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/editor.php
|
||||
##################################################
|
||||
# "Path:" => "",
|
||||
# "Write" => "",
|
||||
# "See" => "",
|
||||
# "Help" => "",
|
||||
# "Filename" => "",
|
||||
# "Save" => "",
|
||||
# "markdown_help" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/edit_profiles.php
|
||||
##################################################
|
||||
# "New profile" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/footer.php
|
||||
##################################################
|
||||
# "Fork me on github" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header.php
|
||||
##################################################
|
||||
"Drag, drop, share." => "Drag, Drop, Share.",
|
||||
# "Home" => "",
|
||||
# "Edit profiles rights" => "",
|
||||
"Users list" => "Liste der Benutzer",
|
||||
"New user" => "Neuer Benutzer",
|
||||
"Access log file" => "Logs ansehen",
|
||||
# "Change password" => "",
|
||||
# "Rebuild base" => "",
|
||||
# "Text editor" => "",
|
||||
# "Click or dragover to reveal dropzone" => "",
|
||||
# "Upload" => "",
|
||||
"Search in the uploaded files" => "In den hochgeladenen Daten suchen",
|
||||
"Filter" => "Filter",
|
||||
# "Markdown editor" => "",
|
||||
# "Access log" => "",
|
||||
# "Create an account" => "",
|
||||
"Please, login" => "Anmelden, bitte",
|
||||
# "Users profiles" => "",
|
||||
# "Configure profiles rights" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header_markdown.php
|
||||
##################################################
|
||||
|
||||
##################################################
|
||||
# ./templates/default/home.php
|
||||
##################################################
|
||||
"BoZoN is a simple filesharing app." => "BoZoN ist eine unkomplizierte Filesharing-App.",
|
||||
"Easy to install, free and opensource" => "Einfach zu installieren, gratis und Open Source",
|
||||
"Just copy BoZoN\'s files on your server. That\'s it." => "Kopiere die Dateien einfach auf deinen Server. Das war's.",
|
||||
"You can freely fork BoZoN and use it as specified in the AGPL licence" => "Du kannst BoZoN einfach auschecken und benutzen, wie in der AGPL beschrieben.",
|
||||
# "Easy to use!" => "",
|
||||
"Drag the file you want to share to upload it on the server" => "Lade Dateien per Drag & Drop auf den Server hoch!",
|
||||
"Share the link with your friends" => "Teile Freigabe-Links mit deinen Freunden!",
|
||||
# "BoZoN can do more!" => "",
|
||||
# "No database: easy to backup or move to a new server." => "",
|
||||
# "Lock the access to the file/folder with a password." => "",
|
||||
"Share a file or a folder with a unique acces link with the «burn mode»:" => "Teile Dateien & Ordner über einen Einmal-Link mit dem 'Burn-Modus'!",
|
||||
"Renew a share link with a single clic" => "Erneuere Freigabe-Links mit nur einem Klick!",
|
||||
"Download a folder content into a zip" => "Lade Orderninhalte als Zip herunter!",
|
||||
"Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "Greife mit deinem Smartphone auf BoZoN zu: Dein Browser genügt!",
|
||||
# "Use a qrcode to share your link with smartphone users." => "",
|
||||
# "Add, remove users and manage their rights" => "",
|
||||
"To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "Lade ganze Ordner als Archiv hoch: Entpacke sie auf dem Server mit nur einem Klick!",
|
||||
"Modify the templates & style to make your own BoZoN" => "Modifiziere die Templates & Themes und mach' dir dein eigenes BoZoN",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/login.php
|
||||
##################################################
|
||||
"Login" => "Anmelden",
|
||||
# "New account" => "",
|
||||
# "Change password" => "",
|
||||
"This login is not available, please try another one" => "Dieser Login ist nicht verfügbar, probiere einen anderen",
|
||||
"Wrong combination login/pass" => "Benutzername/Passwort falsch",
|
||||
# "The passwords doesn\'t match." => "",
|
||||
# "Problem with admin password." => "",
|
||||
# "Account created:" => "",
|
||||
# "Password changed" => "",
|
||||
# "User:" => "",
|
||||
# "Old password" => "",
|
||||
"Password" => "Passwort",
|
||||
# "Repeat password" => "",
|
||||
"Stay connected" => "Angemeldet bleiben",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/stats.php
|
||||
##################################################
|
||||
# "No stats" => "",
|
||||
"Date" => "Datum",
|
||||
"File" => "Datei",
|
||||
# "Owner" => "",
|
||||
# "IP" => "",
|
||||
"Origin" => "Quelle",
|
||||
"Host" => "Host",
|
||||
"Delete all stat data" => "Statistik löschen",
|
||||
# "Export log:" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/users.php
|
||||
##################################################
|
||||
# "Status" => "",
|
||||
# "Space" => "",
|
||||
"Check users to delete account and files" => "Benutzer auswählen, um den Account und die Daten zu löschen",
|
||||
# "Select new status for the users" => "",
|
||||
# "User" => "",
|
||||
# "Admin" => "",
|
||||
# "Configure folders max size" => "",
|
||||
# "Change users\'passwords" => "",
|
||||
# "Double-clic to generate a password" => "",
|
||||
|
||||
##################################################
|
||||
# Orphans
|
||||
##################################################
|
||||
"Easy to use !" => "Benutzerfreundlich !",
|
||||
"BoZoN can do more !" => "BoZoN kann mehr !",
|
||||
"When burn is on, the user can access the file/folder only once" => "Wenn der Burn-Modus aktiviert ist, kann der User nur ein Mal auf die Freigabe zufreifen.",
|
||||
"account created" => "Account angelegt",
|
||||
"tiny file sharing app, coded with love and php by " => "tiny file sharing app, coded with love and php by ",
|
||||
"Type to filter the list" => "Liste filtern",
|
||||
"Create your account" => "Erstelle deinen Account",
|
||||
"No file on the server" => "Keine Dateien auf dem Server",
|
||||
"Delete this file ?" => "Diese Datei löschen?",
|
||||
"Rename this file ?" => "Diese Datei umbenennen?",
|
||||
"New_folder" => "Neuer_Ordner",
|
||||
"Move files" => "Dateien verschieben",
|
||||
"Files list" => "Liste der Dateien",
|
||||
"Move a file by clicking on it and choosing the destination folder in the list" => "Zum Verschieben Datei anklicken und Zielordner wählen",
|
||||
"Move a folder by clicking on the move icon and choosing the destination folder in the list" => "Zum Verschieben eines Ordners auf das Verschieben-Symbol klicken und Zielordner auswählen",
|
||||
"Lock the access to the file/folder with a password" => "Sichere den Zugriff auf Dateien & Ordner mit einem Passwort",
|
||||
"Renew the share link of the file/folder (in case of a stolen link for example)" => "Freigabe-Link erneuern (z.B. wenn der Link gestohlen wurde)",
|
||||
"Root" => "Root",
|
||||
"If you want to remove the password, just click on Renew button" => "Klicke auf den Renew-Button, um das Passwort zu ändern",
|
||||
"List" => "List",
|
||||
"Icons" => "Icons",
|
||||
"Change theme" => "Theme ändern",
|
||||
"Connect" => "Verbinden",
|
||||
|
||||
);
|
||||
?>
|
|
@ -1,355 +0,0 @@
|
|||
<?php
|
||||
##################################################
|
||||
# en
|
||||
##################################################
|
||||
|
||||
$lang=array(
|
||||
|
||||
##################################################
|
||||
# ./core/auto_dropzone.php
|
||||
##################################################
|
||||
# "Drop your files here or click to select a local file" => "",
|
||||
# "Error, max filelength:" => "",
|
||||
# ": Error, forbidden file format !" => "",
|
||||
# "The file to big for the server\'s config" => "",
|
||||
# "The file to big for this page" => "",
|
||||
# "There was a problem during upload (file was truncated)" => "",
|
||||
# "No file upload" => "",
|
||||
# "No temp folder" => "",
|
||||
# "Write error on server" => "",
|
||||
# "The file doesn\'t fit" => "",
|
||||
# "Upload error" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/auto_restrict.php
|
||||
##################################################
|
||||
# "Account created:" => "",
|
||||
# "New password saved for " => "",
|
||||
# "Error saving new password for " => "",
|
||||
|
||||
##################################################
|
||||
# ./core/commands_GET_vars.php
|
||||
##################################################
|
||||
# "Rss feed of stats" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/core.php
|
||||
##################################################
|
||||
# "Private folder is not writable" => "",
|
||||
# "Private folder is not readable" => "",
|
||||
# "Temp folder is not writable" => "",
|
||||
# "Temp folder is not readable" => "",
|
||||
# "Problem accessing tree folder: not readable" => "",
|
||||
# "Problem accessing tree/folder file: not writable" => "",
|
||||
# "Problem accessing " => "",
|
||||
# ": folder not readable" => "",
|
||||
# ": folder not writable" => "",
|
||||
# "is not installed on this server" => "",
|
||||
# "More info" => "",
|
||||
# "Problem accessing ID file: not readable" => "",
|
||||
# "Problem accessing ID file: not writable" => "",
|
||||
# "Problem accessing stats file: not readable" => "",
|
||||
# "Problem accessing stats file: not writable" => "",
|
||||
# "Logout" => "",
|
||||
# "Connection" => "",
|
||||
# "See as icon" => "",
|
||||
# "See as file list" => "",
|
||||
# "Manage files" => "",
|
||||
# "Manage links" => "",
|
||||
# "Deleted" => "",
|
||||
# "used" => "",
|
||||
# "free" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/GET_POST_admin_data.php
|
||||
##################################################
|
||||
# "is not writable" => "",
|
||||
# "created" => "",
|
||||
# "Problem accessing remote file." => "",
|
||||
# "moved to" => "",
|
||||
# "Changes saved" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/listfiles.php
|
||||
##################################################
|
||||
# "The user can access this only one time" => "",
|
||||
# "The user can access this only with the password" => "",
|
||||
# "View this share" => "",
|
||||
# "View this file" => "",
|
||||
# "Edit this file" => "",
|
||||
# "Share this folder with another user" => "",
|
||||
# "Convert this zip file to folder" => "",
|
||||
# "Check all" => "",
|
||||
# "Filename" => "",
|
||||
# "Filesize" => "",
|
||||
# "Foldersize" => "",
|
||||
# "Load" => "",
|
||||
# "more" => "",
|
||||
# "No file or folder" => "",
|
||||
|
||||
##################################################
|
||||
# ./core/share.php
|
||||
##################################################
|
||||
# "This share is protected, please type the correct password:" => "",
|
||||
# "This page in" => "",
|
||||
# "Download a zip from this folder" => "",
|
||||
# "This link is no longer available, sorry." => "",
|
||||
# "Rss feed of " => "",
|
||||
|
||||
##################################################
|
||||
# ./core/templates.php
|
||||
##################################################
|
||||
# "Delete this file" => "",
|
||||
# "Get the share link" => "",
|
||||
# "Get the qrcode of this link" => "",
|
||||
# "Rename this file (share link will not change)" => "",
|
||||
# "Put a password on this share" => "",
|
||||
# "Turn this share into a burn after access share" => "",
|
||||
# "Regen the share link" => "",
|
||||
# "Download a zip from this folder" => "",
|
||||
# "Move file or folder" => "",
|
||||
# "Move to" => "",
|
||||
# "Move" => "",
|
||||
# "To" => "",
|
||||
# "Lock access" => "",
|
||||
# "Please give a password to lock access to this file" => "",
|
||||
# "Rename this file?" => "",
|
||||
# "Rename this item?" => "",
|
||||
# "Rename" => "",
|
||||
# "Delete this item?" => "",
|
||||
# "Delete" => "",
|
||||
# "Share folder" => "",
|
||||
# "Share link" => "",
|
||||
# "Select the users you want to share with" => "",
|
||||
# "Copy this share link" => "",
|
||||
# "Yes" => "",
|
||||
# "Move this file to another directory" => "",
|
||||
# "Create a subfolder" => "",
|
||||
# "Create a subfolder in this folder" => "",
|
||||
# "New folder" => "",
|
||||
# "Paste a file\'s URL" => "",
|
||||
# "Paste a file\'s URL to get it on this server" => "",
|
||||
# "Read m3u playlist" => "",
|
||||
# "Force local filename (leave empty=no change)" => "",
|
||||
# "filename (optionnal)" => "",
|
||||
|
||||
##################################################
|
||||
# ./index.php
|
||||
##################################################
|
||||
# "Click to remove" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/admin.php
|
||||
##################################################
|
||||
# "Choose a folder" => "",
|
||||
# "Root:" => "",
|
||||
# "Filter:" => "",
|
||||
# "Create a subfolder in this folder" => "",
|
||||
# "Paste a file\'s URL to get it on this server" => "",
|
||||
# "Delete selected items" => "",
|
||||
# "Zip and download selected items" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/editor.php
|
||||
##################################################
|
||||
# "Path:" => "",
|
||||
# "Write" => "",
|
||||
# "See" => "",
|
||||
# "Help" => "",
|
||||
# "Filename" => "",
|
||||
# "Save" => "",
|
||||
"markdown_help" => "# Title 1
|
||||
## Title 2
|
||||
### Title 3
|
||||
#### Title 4
|
||||
##### Title 5
|
||||
###### Title 6
|
||||
|
||||
*italic* or _italic_
|
||||
**bold** or __bold__
|
||||
**_bold italic_**
|
||||
~~strike~~
|
||||
|
||||
1. First ordered list item
|
||||
2. Another item
|
||||
⋅⋅* Unordered sub-list.
|
||||
1. Actual numbers doesn't matter, just that it's a number
|
||||
⋅⋅1. Ordered sub-list
|
||||
4. And another item.
|
||||
⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
|
||||
|
||||
⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
|
||||
⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
|
||||
⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
|
||||
|
||||
* Unordered list can use asterisks
|
||||
- Or minuses
|
||||
+ Or pluses
|
||||
|
||||
Links
|
||||
[I'm an inline-style link](https://www.google.com)
|
||||
|
||||
[I'm an inline-style link with title](https://www.google.com 'Google's Homepage')
|
||||
|
||||
[I'm a reference-style link][Arbitrary case-insensitive reference text]
|
||||
|
||||
[I'm a relative reference to a repository file](../blob/master/LICENSE)
|
||||
|
||||
[You can use numbers for reference-style link definitions][1]
|
||||
|
||||
Or leave it empty and use the [link text itself].
|
||||
|
||||
URLs and URLs in angle brackets will automatically get turned into links.
|
||||
http://www.example.com or <http://www.example.com> and sometimes
|
||||
example.com (but not on Github, for example).
|
||||
|
||||
Some text to show that the reference links can follow later.
|
||||
|
||||
[arbitrary case-insensitive reference text]: https://www.mozilla.org
|
||||
[1]: http://slashdot.org
|
||||
[link text itself]: http://www.reddit.com
|
||||
|
||||
Images
|
||||
Inline-style:
|
||||
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 1')
|
||||
|
||||
Reference-style:
|
||||
![alt text][logo]
|
||||
|
||||
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 2'
|
||||
|
||||
Code
|
||||
```javascript
|
||||
var s = 'JavaScript syntax highlighting';
|
||||
alert(s);
|
||||
```
|
||||
|
||||
| Tables | Are | Cool |
|
||||
| ------------- |:-------------:| -----:|
|
||||
| col 3 is | right-aligned | $1600 |
|
||||
| col 2 is | centered | $12 |
|
||||
| zebra stripes | are neat | $1 |
|
||||
|
||||
> Blockquotes are very handy in email to emulate reply text.
|
||||
> This line is part of the same quote.
|
||||
|
||||
Horizontal rules
|
||||
Three or more...
|
||||
|
||||
--- Hyphens
|
||||
*** Asterisks
|
||||
___ Underscores
|
||||
",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/edit_profiles.php
|
||||
##################################################
|
||||
# "New profile" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/footer.php
|
||||
##################################################
|
||||
# "Fork me on github" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header.php
|
||||
##################################################
|
||||
# "Drag, drop, share." => "",
|
||||
# "Home" => "",
|
||||
# "Edit profiles rights" => "",
|
||||
# "Users list" => "",
|
||||
# "New user" => "",
|
||||
# "Access log file" => "",
|
||||
# "Change password" => "",
|
||||
# "Rebuild base" => "",
|
||||
# "Text editor" => "",
|
||||
# "Click or dragover to reveal dropzone" => "",
|
||||
# "Upload" => "",
|
||||
# "Search in the uploaded files" => "",
|
||||
# "Filter" => "",
|
||||
# "Markdown editor" => "",
|
||||
# "Access log" => "",
|
||||
# "Create an account" => "",
|
||||
# "Please, login" => "",
|
||||
# "Users profiles" => "",
|
||||
# "Configure profiles rights" => "",
|
||||
# "Manage links" => "",
|
||||
# "Manage files" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header_markdown.php
|
||||
##################################################
|
||||
# "Drag, drop, share." => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/home.php
|
||||
##################################################
|
||||
# "BoZoN is a simple filesharing app." => "",
|
||||
# "Easy to install, free and opensource" => "",
|
||||
# "Just copy BoZoN\'s files on your server. That\'s it." => "",
|
||||
# "You can freely fork BoZoN and use it as specified in the AGPL licence" => "",
|
||||
# "More info" => "",
|
||||
# "Easy to use!" => "",
|
||||
# "Drag the file you want to share to upload it on the server" => "",
|
||||
# "Share the link with your friends" => "",
|
||||
# "BoZoN can do more!" => "",
|
||||
# "No database: easy to backup or move to a new server." => "",
|
||||
# "Lock the access to the file/folder with a password." => "",
|
||||
# "Share a file or a folder with a unique acces link with the «burn mode»:" => "",
|
||||
# "Renew a share link with a single clic" => "",
|
||||
# "Download a folder content into a zip" => "",
|
||||
# "Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "",
|
||||
# "Use a qrcode to share your link with smartphone users." => "",
|
||||
# "Add, remove users and manage their rights" => "",
|
||||
# "To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "",
|
||||
# "Modify the templates & style to make your own BoZoN" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/login.php
|
||||
##################################################
|
||||
# "Login" => "",
|
||||
# "New account" => "",
|
||||
# "Change password" => "",
|
||||
# "Please, login" => "",
|
||||
# "This login is not available, please try another one" => "",
|
||||
# "Wrong combination login/pass" => "",
|
||||
# "The passwords doesn\'t match." => "",
|
||||
# "Problem with admin password." => "",
|
||||
# "Account created:" => "",
|
||||
# "Password changed" => "",
|
||||
# "User:" => "",
|
||||
# "Old password" => "",
|
||||
# "Password" => "",
|
||||
# "Repeat password" => "",
|
||||
# "Stay connected" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/stats.php
|
||||
##################################################
|
||||
# "No stats" => "",
|
||||
# "Date" => "",
|
||||
# "File" => "",
|
||||
# "Owner" => "",
|
||||
# "IP" => "",
|
||||
# "Origin" => "",
|
||||
# "Host" => "",
|
||||
# "Delete all stat data" => "",
|
||||
# "Export log:" => "",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/users.php
|
||||
##################################################
|
||||
# "Delete" => "",
|
||||
# "Status" => "",
|
||||
# "Space" => "",
|
||||
# "Password" => "",
|
||||
# "Check users to delete account and files" => "",
|
||||
# "Select new status for the users" => "",
|
||||
# "User" => "",
|
||||
# "Admin" => "",
|
||||
# "Configure folders max size" => "",
|
||||
# "Change users\'passwords" => "",
|
||||
# "Double-clic to generate a password" => "",
|
||||
|
||||
);
|
||||
?>
|
|
@ -1,338 +0,0 @@
|
|||
<?php
|
||||
##################################################
|
||||
# es
|
||||
##################################################
|
||||
|
||||
$lang=array(
|
||||
|
||||
##################################################
|
||||
# ./core/auto_dropzone.php
|
||||
##################################################
|
||||
"Drop your files here or click to select a local file" => "Deposita los archivos aquí o haz clic para escoger uno en tu ordenador",
|
||||
"Error, max filelength:" => "Error, tamaño máximo para los archivos:",
|
||||
# ": Error, forbidden file format !" => "",
|
||||
# "The file to big for the server\'s config" => "",
|
||||
# "The file to big for this page" => "",
|
||||
# "There was a problem during upload (file was truncated)" => "",
|
||||
# "No file upload" => "",
|
||||
# "No temp folder" => "",
|
||||
# "Write error on server" => "",
|
||||
"The file doesn\'t fit" => "El archivos no cabe",
|
||||
"Upload error" => "Error subiendo el archivo",
|
||||
|
||||
##################################################
|
||||
# ./core/auto_restrict.php
|
||||
##################################################
|
||||
"Account created:" => "Cuenta creada:",
|
||||
"New password saved for " => "Nueva contraseña cambiada para ",
|
||||
"Error saving new password for " => "Error guardando la nueva contraseña para ",
|
||||
|
||||
##################################################
|
||||
# ./core/commands_GET_vars.php
|
||||
##################################################
|
||||
"Rss feed of stats" => "Enlace RSS de las estadísticas",
|
||||
|
||||
##################################################
|
||||
# ./core/core.php
|
||||
##################################################
|
||||
"Private folder is not writable" => "Carpeta Private protegida contra la escritura",
|
||||
"Private folder is not readable" => "Carpeta Private protegida contra la lectura",
|
||||
"Temp folder is not writable" => "Carpeta Temp protegida contra la escritura",
|
||||
"Temp folder is not readable" => "Carpeta Temp protegida contra la lectura",
|
||||
"Problem accessing tree folder: not readable" => "Carpeta Tree protegida contra la lectura",
|
||||
"Problem accessing tree/folder file: not writable" => "Carpeta Tree protegida contra la escritura",
|
||||
"Problem accessing " => "Problema accediendo a ",
|
||||
": folder not readable" => ": Carpeta protegida contra la lectura",
|
||||
": folder not writable" => ": Carpeta protegida contra la escritura",
|
||||
"is not installed on this server" => "no está instalado en este servidor",
|
||||
"More info" => "Más informaciones",
|
||||
"Problem accessing ID file: not readable" => "Error de acceso leyendo el archivo ID.",
|
||||
"Problem accessing ID file: not writable" => "Error de acceso escribiendo al archivo ID.",
|
||||
"Problem accessing stats file: not readable" => "",
|
||||
"Problem accessing stats file: not writable" => "",
|
||||
"Logout" => "Salir",
|
||||
"Connection" => "Connección",
|
||||
"See as icon" => "Ver como iconos",
|
||||
"See as file list" => "Ver como lista",
|
||||
"Manage files" => "Gestionar los archivos",
|
||||
"Manage links" => "Gestionar los enlaces",
|
||||
"Deleted" => "Borrado",
|
||||
"used" => "utilizado",
|
||||
"free" => "libre",
|
||||
|
||||
##################################################
|
||||
# ./core/GET_POST_admin_data.php
|
||||
##################################################
|
||||
"is not writable" => "está protegido contra la escritura",
|
||||
"created" => "creado",
|
||||
"Problem accessing remote file." => "Imposible acceder al archivo remoto",
|
||||
"moved to" => "movido a",
|
||||
"Changes saved" => "Cambios almacenados",
|
||||
|
||||
##################################################
|
||||
# ./core/listfiles.php
|
||||
##################################################
|
||||
"The user can access this only one time" => "El usuario solo puede acceder al archivo una vez",
|
||||
"The user can access this only with the password" => "El usuario solo puede acceder al archivo con una contraseña",
|
||||
"View this share" => "Ver este archivo",
|
||||
"View this file" => "Ver el archivo",
|
||||
"Edit this file" => "Modificar el archivo",
|
||||
"Share this folder with another user" => "Comparte esta carpeta con otro usuario",
|
||||
"Convert this zip file to folder" => "Convertir este archivo Zip en carpeta",
|
||||
"Check all" => "Seleccionar todo",
|
||||
"Filename" => "Nombre del archivo",
|
||||
"Filesize" => "Tamaño del archivo",
|
||||
"Foldersize" => "Tamaño de la carpeta",
|
||||
"Load" => "Cargar",
|
||||
"more" => "más",
|
||||
"No file or folder" => "Ningún archivo",
|
||||
|
||||
##################################################
|
||||
# ./core/share.php
|
||||
##################################################
|
||||
"This share is protected, please type the correct password:" => "Este enlace está protegido por una contraseña:",
|
||||
"This page in" => "Esta página en formato ",
|
||||
"Download a zip from this folder" => "Bajar un zip con esta carpeta",
|
||||
"This link is no longer available, sorry." => "Este enlace está caducado.",
|
||||
"Rss feed of " => "Enlace RSS de ",
|
||||
|
||||
##################################################
|
||||
# ./core/templates.php
|
||||
##################################################
|
||||
"Delete this file" => "Borra este archivo",
|
||||
"Get the share link" => "Conseguir el enlace público",
|
||||
"Get the qrcode of this link" => "Consigue el código qr del enlace",
|
||||
"Rename this file (share link will not change)" => "Cambiar el nombre (el enlace no cambiará)",
|
||||
"Put a password on this share" => "Proteger con una contraseña",
|
||||
"Turn this share into a burn after access share" => "Pasar al modo acceso único",
|
||||
"Regen the share link" => "Renovar el enlace público",
|
||||
"Move file or folder" => "Mover archivo/carpeta",
|
||||
"Move to" => "Mover a",
|
||||
"Move" => "Mover",
|
||||
"To" => "A",
|
||||
"Lock access" => "Impedir el acceso",
|
||||
"Please give a password to lock access to this file" => "Por favor, ingresa una contraseña para el archivo",
|
||||
"Rename this file?" => "Renombrar el archivo",
|
||||
"Rename this item?" => "¿ Cambiar el nombre del archivo ?",
|
||||
"Rename" => "Cambiar el nombre",
|
||||
"Delete this item?" => "¿ Borrar este elemento ?",
|
||||
"Delete" => "Borrar",
|
||||
"Share folder" => "Compartir carpeta",
|
||||
"Share link" => "Enlace público",
|
||||
"Select the users you want to share with" => "Selecciona los usuarios con quien compartir la carpeta",
|
||||
"Copy this share link" => "Copia este enlace público",
|
||||
"Yes" => "Sí",
|
||||
"Move this file to another directory" => "Desplazar este archivo a otra carpeta",
|
||||
"Create a subfolder" => "Crear una carpeta nueva",
|
||||
"Create a subfolder in this folder" => "Crear una subcarpeta nueva en esta carpeta",
|
||||
"New folder" => "Nueva carpeta",
|
||||
"Paste a file\'s URL" => "Pegar una dirección",
|
||||
"Paste a file\'s URL to get it on this server" => "Pega la dirección de un archivo para duplicarlo",
|
||||
# "Read m3u playlist" => "",
|
||||
"Force local filename (leave empty=no change)" => "Cambiar el nombre del archivo (vacío = nombre original)",
|
||||
"filename (optionnal)" => "Nombre del archivo (facultativo)",
|
||||
|
||||
##################################################
|
||||
# ./index.php
|
||||
##################################################
|
||||
"Click to remove" => "Haz clic para quitar",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/admin.php
|
||||
##################################################
|
||||
"Choose a folder" => "Escoja una carpeta",
|
||||
"Root:" => "Raíz :",
|
||||
"Filter:" => "Filtro :",
|
||||
"Paste a file\'s URL to get it on this server" => "Pegar una dirección para guardar el archivo",
|
||||
"Delete selected items" => "Borrar los archivos seleccionados",
|
||||
"Zip and download selected items" => "Crea un archivo Zip con la selección",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/editor.php
|
||||
##################################################
|
||||
"Path:" => "Camino:",
|
||||
"Write" => "Escribir",
|
||||
"See" => "Ver",
|
||||
"Help" => "Ayuda",
|
||||
"Save" => "Guardar",
|
||||
"markdown_help" => "# Título 1
|
||||
## Título 2
|
||||
### Título 3
|
||||
#### Título 4
|
||||
##### Título 5
|
||||
###### Título 6
|
||||
|
||||
*bastardilla* o _bastardilla_
|
||||
**negrilla** ou __negrilla__
|
||||
**_negrilla bastardilla_**
|
||||
~~tachado~~
|
||||
|
||||
1. lista ordenada
|
||||
2. segunda línea
|
||||
⋅⋅* no ordenado
|
||||
1. los números no tienen importancia
|
||||
⋅⋅1. ordenado
|
||||
|
||||
+ lista no ordenada
|
||||
- lista no ordenada
|
||||
* lista no ordenada
|
||||
|
||||
[Texto del enlace](https://direccion.com)
|
||||
![Alt de la imagen](http://direccion/imagen.jpg)
|
||||
|
||||
```javascript
|
||||
var s = 'JavaScript syntax highlighting';
|
||||
alert(s);
|
||||
```
|
||||
|
||||
| Tableros | son | Chulos |
|
||||
| -------------- |:-----------------:| ------:|
|
||||
| col 3 está | alienada derecha | $1600 |
|
||||
| col 2 está | centrada | $12 |
|
||||
|
||||
> para las citas
|
||||
> éste carácter primero:'>'
|
||||
|
||||
--- o *** o ___ = línea",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/edit_profiles.php
|
||||
##################################################
|
||||
"New profile" => "Nuevo perfil",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/footer.php
|
||||
##################################################
|
||||
"Fork me on github" => "Forkéame en github",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header.php
|
||||
##################################################
|
||||
"Drag, drop, share." => "Arrastra, deposita, comparte.",
|
||||
"Home" => "Entrada",
|
||||
"Edit profiles rights" => "Cambiar los derechos de los perfiles",
|
||||
"Users list" => "Lista de usuarios",
|
||||
"New user" => "Nuevo usuario",
|
||||
"Access log file" => "Estadísticas de acceso",
|
||||
"Change password" => "Cambiar la contraseña.",
|
||||
"Rebuild base" => "Completar la base",
|
||||
"Text editor" => "Editor de texto",
|
||||
"Click or dragover to reveal dropzone" => "Haz click o arrastra un archivo para desubrir la zona de upload",
|
||||
"Upload" => "Subir",
|
||||
"Search in the uploaded files" => "Buscar en los archivos del servidor",
|
||||
"Filter" => "Filtrar",
|
||||
"Markdown editor" => "Editor Markdown",
|
||||
"Access log" => "Log de accesos",
|
||||
"Create an account" => "Crear una cuenta",
|
||||
"Please, login" => "Conéctate",
|
||||
"Users profiles" => "Usuarios",
|
||||
"Configure profiles rights" => "Configurar los derechos de los perfiles",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header_markdown.php
|
||||
##################################################
|
||||
|
||||
##################################################
|
||||
# ./templates/default/home.php
|
||||
##################################################
|
||||
"BoZoN is a simple filesharing app." => "BoZoN es una simple utilidad de almacenamiento y de reparto de archivos.",
|
||||
"Easy to install, free and opensource" => "Fácil de instalar, libre y de código abierto",
|
||||
"Just copy BoZoN\'s files on your server. That\'s it." => "Solo tienes que subir los archivos de Bozon a tu servidor y ¡ ya está !",
|
||||
"You can freely fork BoZoN and use it as specified in the AGPL licence" => "Puedes copiar y modificar libremente esta utilidad según la licencia AGPL",
|
||||
"Easy to use!" => "Fácil de utilizar",
|
||||
"Drag the file you want to share to upload it on the server" => "Deposita el archivo que quieras subir al servidor",
|
||||
"Share the link with your friends" => "Comparte la dirección con los demás...",
|
||||
"BoZoN can do more!" => "¡ Hay más !",
|
||||
"No database: easy to backup or move to a new server." => "Ningún base de datos: fácil de guardar o de trasladar a otro servidor.",
|
||||
"Lock the access to the file/folder with a password." => "Pónle una contraseña al archivo.",
|
||||
"Share a file or a folder with a unique acces link with the «burn mode»:" => "Comparte un archivo o una carpeta con un enlace público de acceso único con el modo «burn».",
|
||||
"Renew a share link with a single clic" => "Cambia un enlace público con solo un clic.",
|
||||
"Download a folder content into a zip" => "Baja una carpeta de tu BoZoN directamente en formato zip.",
|
||||
"Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "Ingresa en tu BoZoN desde tu móvil solo con el navegador.",
|
||||
"Use a qrcode to share your link with smartphone users." => "Utiliza un QRcode para compartir enlaces con móviles",
|
||||
"Add, remove users and manage their rights" => "Añade y borra cuentas de usuarios y gestiona sus derechos",
|
||||
"To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "Sube una carpeta completa: la zipeas, la subes al servidor y la dezipeas con un clic.",
|
||||
"Modify the templates & style to make your own BoZoN" => "Crea tu propio BoZoN cambiando el tema y el estilo css",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/login.php
|
||||
##################################################
|
||||
"Login" => "Login",
|
||||
"New account" => "Nueva cuenta",
|
||||
"This login is not available, please try another one" => "Este nombre ya existe, por favor, ingrese uno diferente.",
|
||||
"Wrong combination login/pass" => "Error en el nombre o en la contraseña",
|
||||
"The passwords doesn\'t match." => "Las contraseñas no corresponden",
|
||||
"Problem with admin password." => "La contraseña anterior es falsa.",
|
||||
"Password changed" => "Contraseña cambiada",
|
||||
"User:" => "Usuario:",
|
||||
"Old password" => "Contraseña anterior.",
|
||||
"Password" => "Contraseña",
|
||||
"Repeat password" => "Repetir la contraseña.",
|
||||
"Stay connected" => "Permanecer conectado",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/stats.php
|
||||
##################################################
|
||||
"No stats" => "Ninguna estadística",
|
||||
"Date" => "Fecha",
|
||||
"File" => "archivo",
|
||||
"Owner" => "Propietario",
|
||||
# "IP" => "",
|
||||
"Origin" => "Página de origen",
|
||||
"Host" => "Huésped",
|
||||
"Delete all stat data" => "Borrar las estadìsticas",
|
||||
"Export log:" => "Exportar el log :",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/users.php
|
||||
##################################################
|
||||
"Status" => "Estatus",
|
||||
"Space" => "Espacio",
|
||||
"Check users to delete account and files" => "Selecciona los usuarios para borrar su cuenta y sus archivos",
|
||||
"Select new status for the users" => "Cambia el estatus de los usuarios",
|
||||
"User" => "Usuario",
|
||||
"Admin" => "Administrador",
|
||||
"Configure folders max size" => "Limitar la capacidad de las carpetas de usuarios",
|
||||
"Change users\'passwords" => "Cambiar la contraseña de los usuarios",
|
||||
"Double-clic to generate a password" => "Doble clic para generar una contraseña",
|
||||
|
||||
##################################################
|
||||
# Orphans
|
||||
##################################################
|
||||
"When burn is on, the user can access the file/folder only once" => "En modo burn, el usuario solo puede acceder al archivo una vez",
|
||||
"Edit this file" => "",
|
||||
"No file in your personal folder" => "Ningún archivo en tu carpeta personal",
|
||||
"Move files" => "Mover archivos",
|
||||
"Root" => "Raíz",
|
||||
"Manage users" => "Gestionar los usuarios",
|
||||
"Users status" => "estatus des los usuarios",
|
||||
"Type to filter the list" => "Filtrar la lista",
|
||||
"List" => "Lista",
|
||||
"Icons" => "Íconos",
|
||||
"Change theme" => "Cambiar el aspecto",
|
||||
"Connect" => "Conectarse",
|
||||
"Error, forbidden file format!" => "¡ Error, formato prohibido !",
|
||||
"Delete this file?" => "¿ Borrar este archivo ?",
|
||||
"Files list" => "Lista de archivos",
|
||||
"tiny file sharing app, coded with love and php by " => "Mini utilidad para compartir archivos, creada con amor y php por ",
|
||||
"user" => "usuario",
|
||||
"guest" => "invitado",
|
||||
"admin" => "administrador",
|
||||
"add user" => "Añadir usuario",
|
||||
"upload" => "Subir archivos",
|
||||
"delete user" => "Borrar usuario",
|
||||
"change user status" => "cambiar el estatus del usuario",
|
||||
"change folder size" => "cambiar el tamaño de la carpeta",
|
||||
"change status rights" => "cambiar los derechos de los estatuses",
|
||||
"change passes" => "cambiar las contraseñas",
|
||||
"markdown editor" => "Editor Markdown",
|
||||
"regen ID base" => "regenerar la base",
|
||||
"acces logfile" => "log de accesos",
|
||||
"users page" => "página de usuario",
|
||||
"Move a file by clicking on it and choosing the destination folder in the list" => "Mueve un archivo haciendo clic en él y escogiendo el destino en la lista",
|
||||
"Move a folder by clicking on the move icon and choosing the destination folder in the list" => "Mueve una carpeta pinchando en 'Mover' y escogiendo el destino en la lista",
|
||||
"Renew the share link of the file/folder (in case of a stolen link for example)" => "Cambia el enlace de un archivo con solo un clic",
|
||||
"If you want to remove the password, just click on Renew button" => "Si quiere quitarle la contraseña, solo tiene que pinchar en el botón Renovar el enlace",
|
||||
|
||||
);
|
||||
?>
|
|
@ -1,343 +0,0 @@
|
|||
<?php
|
||||
##################################################
|
||||
# fr
|
||||
##################################################
|
||||
|
||||
$lang=array(
|
||||
|
||||
##################################################
|
||||
# ./core/auto_dropzone.php
|
||||
##################################################
|
||||
"Drop your files here or click to select a local file" => "Glisser les fichiers ici ou cliquer pour sélectionner un fichier local",
|
||||
"Error, max filelength:" => "Erreur, taille max par fichier :",
|
||||
# ": Error, forbidden file format !" => "",
|
||||
# "The file to big for the server\'s config" => "",
|
||||
# "The file to big for this page" => "",
|
||||
# "There was a problem during upload (file was truncated)" => "",
|
||||
# "No file upload" => "",
|
||||
# "No temp folder" => "",
|
||||
# "Write error on server" => "",
|
||||
"The file doesn\'t fit" => "Pas assez d'espace libre",
|
||||
"Upload error" => "Erreur lors de l'envoi",
|
||||
|
||||
##################################################
|
||||
# ./core/auto_restrict.php
|
||||
##################################################
|
||||
"Account created:" => "Compte créé :",
|
||||
"New password saved for " => "Nouveau mot de passe sauvé pour ",
|
||||
"Error saving new password for " => "Erreur en sauvant le mot de passe pour ",
|
||||
|
||||
##################################################
|
||||
# ./core/commands_GET_vars.php
|
||||
##################################################
|
||||
"Rss feed of stats" => "RSS des stats",
|
||||
|
||||
##################################################
|
||||
# ./core/core.php
|
||||
##################################################
|
||||
"Private folder is not writable" => "Le dossier private/ est verrouillé en écriture",
|
||||
"Private folder is not readable" => "Le dossier private/ est verrouillé en lecture",
|
||||
"Temp folder is not writable" => "Le dossier private/temp est verrouillé en écriture",
|
||||
"Temp folder is not readable" => "Le dossier private/temp est verrouillé en lecture",
|
||||
# "Problem accessing tree folder: not readable" => "",
|
||||
# "Problem accessing tree/folder file: not writable" => "",
|
||||
"Problem accessing " => "Problème lors de l'accès à ",
|
||||
": folder not readable" => ": dossier verrouillé en lecture",
|
||||
": folder not writable" => ": dossier verrouillé en écriture",
|
||||
"is not installed on this server" => "n'est pas installé sur ce serveur",
|
||||
"More info" => "En savoir plus",
|
||||
"Problem accessing ID file: not readable" => "Erreur d'accès en lecture au fichier ID.",
|
||||
"Problem accessing ID file: not writable" => "Erreur d'accès en écriture au fichier ID.",
|
||||
"Problem accessing stats file: not readable" => "Fichier de stats verrouillé en lecture",
|
||||
"Problem accessing stats file: not writable" => "Fichier de stats verrouillé en écriture",
|
||||
"Logout" => "Déconnexion",
|
||||
"Connection" => "Connexion",
|
||||
"See as icon" => "Voir sous forme d'icônes",
|
||||
"See as file list" => "Voir sous forme de liste",
|
||||
"Manage files" => "Gérer les fichiers",
|
||||
"Manage links" => "Gérer les liens",
|
||||
"Deleted" => "Supprimé",
|
||||
"used" => "utilisé",
|
||||
"free" => "libre",
|
||||
|
||||
##################################################
|
||||
# ./core/GET_POST_admin_data.php
|
||||
##################################################
|
||||
"is not writable" => "est verrouillé en écriture",
|
||||
"created" => "créé",
|
||||
"Problem accessing remote file." => "Problème d'acces au fichier distant",
|
||||
"moved to" => "déplacé vers",
|
||||
"Changes saved" => "Changements sauvegardés",
|
||||
|
||||
##################################################
|
||||
# ./core/listfiles.php
|
||||
##################################################
|
||||
"The user can access this only one time" => "L'utilisateur ne pourra y accéder qu'une fois",
|
||||
"The user can access this only with the password" => "L'utilisateur ne pourra y accéder qu'avec un mot de passe.",
|
||||
"View this share" => "Voir ce partage",
|
||||
"View this file" => "Voir ce fichier",
|
||||
"Edit this file" => "Editer ce fichier",
|
||||
"Share this folder with another user" => "Partager ce dossier avec un autre utilisateur",
|
||||
"Convert this zip file to folder" => "Convertir ce fichier Zip en dossier",
|
||||
"Check all" => "Tout cocher",
|
||||
"Filename" => "Nom de fichier",
|
||||
"Filesize" => "Taille de fichier",
|
||||
"Foldersize" => "Taille du dossier",
|
||||
"Load" => "Charger",
|
||||
"more" => "de plus",
|
||||
"No file or folder" => "Aucun fichier ou dossier",
|
||||
|
||||
##################################################
|
||||
# ./core/share.php
|
||||
##################################################
|
||||
"This share is protected, please type the correct password:" => "Ce lien est protégé: veuillez taper le mot de passe.",
|
||||
"This page in" => "Cette page au format ",
|
||||
"Download a zip from this folder" => "Télécharger un zip à partir de ce dossier",
|
||||
"This link is no longer available, sorry." => "Ce lien n'est plus valable, désolé.",
|
||||
"Rss feed of " => "Flux RSS de ",
|
||||
|
||||
##################################################
|
||||
# ./core/templates.php
|
||||
##################################################
|
||||
"Delete this file" => "Supprimer ce fichier",
|
||||
"Get the share link" => "Obtenir le lien de partage",
|
||||
"Get the qrcode of this link" => "Voir le qrcode de ce lien",
|
||||
"Rename this file (share link will not change)" => "Renommer ce fichier (le lien de partage ne changera pas)",
|
||||
"Put a password on this share" => "Protéger l'accès par mot de passe",
|
||||
"Turn this share into a burn after access share" => "Passer ce partage en mode accès unique",
|
||||
"Regen the share link" => "Régénérer le lien de partage",
|
||||
"Move file or folder" => "Dépl. fichier/dossier",
|
||||
"Move to" => "Déplacer vers",
|
||||
"Move" => "Déplacer",
|
||||
"To" => "Vers",
|
||||
"Lock access" => "Verrouiller l'accès",
|
||||
"Please give a password to lock access to this file" => "Saisir un mot de passe pour verrouiller cette ressource",
|
||||
"Rename this file?" => "Renommer ce fichier ?",
|
||||
"Rename this item?" => "Renommer cet élément ?",
|
||||
"Rename" => "Renommer",
|
||||
"Delete this item?" => "Supprimer cet élément ?",
|
||||
"Delete" => "Supprimer",
|
||||
"Share folder" => "Partager dossier.",
|
||||
"Share link" => "Lien de partage",
|
||||
"Select the users you want to share with" => "Sélectionnez les utilisateurs avec qui partager ce dossier",
|
||||
"Copy this share link" => "Copiez ce lien de partage",
|
||||
"Yes" => "Oui",
|
||||
"Move this file to another directory" => "Déplacer ce fichier vers un autre dossier",
|
||||
"Create a subfolder" => "Créer un nouveau dossier",
|
||||
"Create a subfolder in this folder" => "Créer un sous-dossier dans ce dossier",
|
||||
"New folder" => "Nouveau dossier",
|
||||
"Paste a file\'s URL" => "Coller l'URL d'un fichier",
|
||||
"Paste a file\'s URL to get it on this server" => "Coller l'URL d'un fichier pour le récupérer sur ce serveur",
|
||||
# "Read m3u playlist" => "",
|
||||
"Force local filename (leave empty=no change)" => "Changer le nom du fichier (vide = nom original)",
|
||||
"filename (optionnal)" => "Nom de fichier (facultatif)",
|
||||
|
||||
##################################################
|
||||
# ./index.php
|
||||
##################################################
|
||||
"Click to remove" => "Cliquer pour retirer",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/admin.php
|
||||
##################################################
|
||||
"Choose a folder" => "Choisissez un dossier",
|
||||
"Root:" => "Racine :",
|
||||
"Filter:" => "Filtre :",
|
||||
"Paste a file\'s URL to get it on this server" => "Coller l'url d'un fichier pour le récupérer sur ce serveur",
|
||||
"Delete selected items" => "Supprimer les items sélectionnés",
|
||||
"Zip and download selected items" => "Zipper et télécharger les items sélectionnés",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/editor.php
|
||||
##################################################
|
||||
"Path:" => "Chemin:",
|
||||
"Write" => "Écrire",
|
||||
"See" => "Voir",
|
||||
"Help" => "Aide",
|
||||
"Save" => "Sauvegarder",
|
||||
"markdown_help" => "# Titre 1
|
||||
## Titre 2
|
||||
### Titre 3
|
||||
#### Titre 4
|
||||
##### Titre 5
|
||||
###### Titre 6
|
||||
|
||||
*italique* ou _italique_
|
||||
**gras** ou __gras__
|
||||
**_gras italique_**
|
||||
~~barré~~
|
||||
|
||||
1. liste ordonnée
|
||||
2. deuxième item
|
||||
⋅⋅* sous-item non ordonné.
|
||||
1. Les nombres ne sont pas importants
|
||||
⋅⋅1. sous-item ordonné
|
||||
|
||||
+ liste non ordonnée
|
||||
- liste non ordonnée
|
||||
* liste non ordonnée
|
||||
|
||||
[Texte du lien](https://adresse.com)
|
||||
![Alt de l\'image](http://adressede/image.jpg)
|
||||
|
||||
par référence (permet de répéter un lien/une image sans retaper l\'adresse):
|
||||
[Texte lien][ref1]
|
||||
[ref1]: http://adresse.fr
|
||||
|
||||
![alt text][logo]
|
||||
[logo]: http://adresse/image.jpg
|
||||
|
||||
|
||||
```javascript
|
||||
var s = 'JavaScript syntax highlighting';
|
||||
alert(s);
|
||||
```
|
||||
|
||||
| Tableaux | sont | Cools |
|
||||
| -------------- |:-----------------:| -----:|
|
||||
| col 3 est | alignée à droite | $1600 |
|
||||
| col 2 est | centrée | $12 |
|
||||
|
||||
> pour les citations
|
||||
> ce signe en début de ligne
|
||||
|
||||
--- ou *** ou ___ = ligne",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/edit_profiles.php
|
||||
##################################################
|
||||
"New profile" => "Nouveau profil",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/footer.php
|
||||
##################################################
|
||||
"Fork me on github" => "Forkez-moi sur github",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header.php
|
||||
##################################################
|
||||
"Drag, drop, share." => "Glisser, déposer, partager.",
|
||||
"Home" => "Accueil",
|
||||
"Edit profiles rights" => "Éditer les droits d'accès des profils",
|
||||
"Users list" => "Liste des utilisateurs",
|
||||
"New user" => "Nouvel utilisateur",
|
||||
"Access log file" => "Voir le fichier d'accès",
|
||||
"Change password" => "Changer le mot de passe",
|
||||
"Rebuild base" => "Régénérer la base",
|
||||
"Text editor" => "Editeur de texte",
|
||||
"Click or dragover to reveal dropzone" => "Cliquez ou glisser un fichier pour révéler la zone d'upload",
|
||||
"Upload" => "Envoyer",
|
||||
"Search in the uploaded files" => "Rechercher dans les fichiers envoyés",
|
||||
"Filter" => "Mot-clé",
|
||||
"Markdown editor" => "Editeur markdown",
|
||||
"Access log" => "Journal des accès",
|
||||
"Create an account" => "Créer un compte",
|
||||
"Please, login" => "Se connecter",
|
||||
"Users profiles" => "Profils utilisateurs",
|
||||
"Configure profiles rights" => "Configurer les droits d'accès",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/header_markdown.php
|
||||
##################################################
|
||||
|
||||
##################################################
|
||||
# ./templates/default/home.php
|
||||
##################################################
|
||||
"BoZoN is a simple filesharing app." => "BoZoN est une application simplifiée de stockage et de partage de fichiers.",
|
||||
"Easy to install, free and opensource" => "Simple à installer, libre et opensource",
|
||||
"Just copy BoZoN\'s files on your server. That\'s it." => "Copiez simplement les fichiers de BoZoN sur votre serveur. C'est tout.",
|
||||
"You can freely fork BoZoN and use it as specified in the AGPL licence" => "Vous pouvez librement forker et utiliser BoZoN comme spécifié dans la licence AGPL",
|
||||
"Easy to use!" => "Simple à utiliser",
|
||||
"Drag the file you want to share to upload it on the server" => "Glisser le fichier à partager pour l'envoyer sur le serveur",
|
||||
"Share the link with your friends" => "Partager un lien avec vos amis...",
|
||||
"BoZoN can do more!" => "Ce n'est pas tout !",
|
||||
"No database: easy to backup or move to a new server." => "Pas de base de données: backup et migration faciles.",
|
||||
"Lock the access to the file/folder with a password." => "Verrouillez l'accès au fichier/dossier à l'aide d'un mot de passe.",
|
||||
"Share a file or a folder with a unique acces link with the «burn mode»:" => "Partagez un fichier ou un dossier pour un accès unique avec le mode «burn».",
|
||||
"Renew a share link with a single clic" => "Renouvelez un lien de partage en un clic.",
|
||||
"Download a folder content into a zip" => "Téléchargez tout un dossier sous la forme d'un fichier zip.",
|
||||
"Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "Accédez à votre BoZoN depuis votre smartphone sans application spécifique.",
|
||||
"Use a qrcode to share your link with smartphone users." => "Utilisez un QRcode pour partager un lien avec un smartphone",
|
||||
"Add, remove users and manage their rights" => "Ajoutez, retirez des utilisateurs et gérez leurs droits",
|
||||
"To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "Envoyez un dossier complet en le zippant puis en dézippant sur le serveur en un clic.",
|
||||
"Modify the templates & style to make your own BoZoN" => "Modifiez le thème par défaut pour créer votre propre style.",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/login.php
|
||||
##################################################
|
||||
"Login" => "Identifiant",
|
||||
"New account" => "Nouveau compte",
|
||||
"This login is not available, please try another one" => "Ce nom est déjà utilisé, veuillez en choisir un autre.",
|
||||
"Wrong combination login/pass" => "Identifiant ou mot de passe incorrect",
|
||||
"The passwords doesn\'t match." => "Les mots de passe ne correspondent pas.",
|
||||
"Problem with admin password." => "Le mot de passe de l'admin est incorrect.",
|
||||
"Password changed" => "Mot de passe changé",
|
||||
"User:" => "Utilisateur :",
|
||||
"Old password" => "Ancien mot de passe",
|
||||
"Password" => "Mot de passe",
|
||||
"Repeat password" => "Resaisir le mot de passe",
|
||||
"Stay connected" => "Rester connecté",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/stats.php
|
||||
##################################################
|
||||
"No stats" => "Aucune statistique",
|
||||
"Date" => "Date",
|
||||
"File" => "Fichier",
|
||||
"Owner" => "Propriétaire",
|
||||
# "IP" => "",
|
||||
"Origin" => "Page d'origine",
|
||||
"Host" => "Hôte",
|
||||
"Delete all stat data" => "Supprimer les données statistiques",
|
||||
"Export log:" => "Exporter le journal :",
|
||||
|
||||
##################################################
|
||||
# ./templates/default/users.php
|
||||
##################################################
|
||||
"Status" => "Statut",
|
||||
"Space" => "Espace",
|
||||
"Check users to delete account and files" => "Selectionnez les utilisateurs pour supprimer leur compte et leurs fichiers.",
|
||||
"Select new status for the users" => "Sélectionnez un nouveau statut pour les utilisateurs",
|
||||
"User" => "Utilisateur",
|
||||
"Admin" => "Administrateur",
|
||||
"Configure folders max size" => "Fixer la taille maximum des dossiers",
|
||||
"Change users\'passwords" => "Changer les mots de passe des utilisateurs",
|
||||
"Double-clic to generate a password" => "Double-cliquez pour générer un mot de passe",
|
||||
|
||||
##################################################
|
||||
# Orphans
|
||||
##################################################
|
||||
"When burn is on, the user can access the file/folder only once" => "Quand l'item est en mode burn, l'utilisateur ne pourra accéder à la ressource qu'une seule fois",
|
||||
"Move files" => "Déplacer des fichiers",
|
||||
"Root" => "Racine",
|
||||
"Manage users" => "Gérer les utilisateurs",
|
||||
"Users status" => "Statut des utilisateurs",
|
||||
"Type to filter the list" => "Filtrer la liste",
|
||||
"List" => "Liste",
|
||||
"Icons" => "Icônes",
|
||||
"Change theme" => "Changer le thème",
|
||||
"Connect" => "Se connecter",
|
||||
"Error, forbidden file format!" => "Erreur, format de fichier interdit !",
|
||||
"Delete this file?" => "Supprimer ce fichier ?",
|
||||
"Files list" => "Liste de fichiers",
|
||||
"tiny file sharing app, coded with love and php by " => "mini app de partage de fichier, codée avec amour et php par ",
|
||||
"guest" => "invité",
|
||||
"user" => "utilisateur",
|
||||
"admin" => "administrateur",
|
||||
"add user" => "ajouter utilisateur",
|
||||
"delete user" => "supprimer utilisateur",
|
||||
"change user status" => "modifier statut",
|
||||
"change folder size" => "modifier espace alloué",
|
||||
"change status rights" => "modifier droits d'accès",
|
||||
"change passes" => "modifier les passes",
|
||||
"markdown editor" => "éditeur markdown",
|
||||
"regen ID base" => "régénérer la base",
|
||||
"acces logfile" => "accéder au log",
|
||||
"users page" => "page utilisateurs",
|
||||
"Move a file by clicking on it and choosing the destination folder in the list" => "Déplacer un fichier en cliquant dessus puis en sélectionnant la destination dans la liste",
|
||||
"Move a folder by clicking on the move icon and choosing the destination folder in the list" => "Déplacer un dossier en cliquant sur 'Déplacer' puis en sélectionnant la destination dans la liste",
|
||||
"Renew the share link of the file/folder (in case of a stolen link for example)" => "Renouveler le lien de partage d'un fichier/dossier quand celui-ci a fuité par exemple",
|
||||
"If you want to remove the password, just click on Renew button" => "Si vous voulez retirer le mot de passe, cliquez sur le bouton Régénérer le lien",
|
||||
|
||||
);
|
||||
?>
|
|
@ -1,60 +0,0 @@
|
|||
# BoZoN
|
||||
|
||||
|
||||
|
||||
## Minimalist Drag & drop file sharing app
|
||||
( http://bozon.warriordudimanche.net/ )
|
||||
- Install: just unzip on your server; no database/ php 5.2. Then go to index.php?p=admin page and create your login/pass.
|
||||
- Config: just change config.php file.
|
||||
- Upload a file: go to index.php?p=admin page, connect and then drop files in the dashed area... that's it !
|
||||
- Organize files & folders, share them, manage the shared access etc.
|
||||
|
||||
The share link is the file link in the admin's view (you can also access it by the button link on the file or the folder.)
|
||||
|
||||
## Required
|
||||
Php 5 min, php5-gd, ZipArchive
|
||||
|
||||
|
||||
## used libraries
|
||||
I used a few libs I made
|
||||
- auto_restrict : to easily lock access to a page and handle basic security features
|
||||
- auto_thumbs : a function to generate all the thumbnails
|
||||
- auto_dropzone : a lib that handle the drag and drop function only by including it in a script
|
||||
- Array2feed.php : a function used to convert an array into a RSS feed without commiting suicide XD
|
||||
- "On-the-fly CSS Compression" (a personal modified version of https://gist.github.com/manastungare/2625128)
|
||||
|
||||
and
|
||||
|
||||
- sorttables.js (http://www.kryogenix.org/code/browser/sorttable)
|
||||
- b-lazy (http://dinbror.dk/blazy)
|
||||
- qr-js (http://hg.mearie.org/qrjs)
|
||||
- m3uStreamPlayer.js (https://github.com/opi/m3uStreamPlayer)
|
||||
- audiojs (http://kolber.github.io/audiojs)
|
||||
- scrolltotop : (https://github.com/jerrywham-pluxml5-2/scrollToTop/)
|
||||
- marked.js : (https://github.com/chjj/marked)
|
||||
- vanillajs : (my own lib, very tiny)
|
||||
|
||||
|
||||
## Licence
|
||||
All Bozon code and all the personal libs used in it are distributed under AGPL: feel free to fork, adapt, distribute, comment etc but please, keep your fork free too ;-)
|
||||
|
||||
## FAQ
|
||||
- _I want to add a user_ : There's a [New user] link in the admin's page top menu, click on it and put a login/pass
|
||||
- _I want to remove a user_ : Click on the [Users list] link in the admin's page top menu, check the user(s) you want to remove and click on ok.
|
||||
- _I've changed some config variables and nothing appends !_ : that's not an issue; all variables are in the Session, so you need to restart chromium/firefox/opera etc to see the changes
|
||||
- _can't see icons / problems uploading / list refresh problem_ : take a look to access rights (folders / files)
|
||||
- _I want to change my password_ : Use the change password function (top menu)
|
||||
- _I forgot my password !_ : just use your FTP client and delete «private/auto_restrict*.php» files, then try to login again and create a new login/pass.
|
||||
- _I want to change the default language !_ : see in config.php file you can set fr/en/es but you can also make your own traduction (see in lang.php)
|
||||
- _I don't want a stolen link works anymore (but I don't want to delete the file/folder) !_ : in links mode, click on the regen button (recycle icon) and the share link for this item will automatically change.
|
||||
- _How to lock a share link with a password ?_ : click on the left menu, use the manage links button; then click on the lock icon on the file/folder and give an password. The file/folder will turn blue with a small lock meaning nobody can now use the share link without the password.
|
||||
- _Yes, ok, but how to remove the password ?_ : just click on regen button, the id will be regenerated and the password will be destroyed (the share link will change)
|
||||
- _What if I upload, create a folder or move an item with a name conflict ?_ : Don't worry, BoZoN will just rename the file to avoid overwriting.
|
||||
- _How to create my own skin ?_ : just copy the default folder in templates/ and make the changes you want, then change the config.php ($default_theme='default';)
|
||||
- _How to upload a complete folder with subfolders in one time ?_ : make a zip, upload it and use the convert icon (a folder) The uploaded zip will be unzipped on the server and all files and directory structure will be restored.
|
||||
|
||||
## Special thanks
|
||||
To Cyrille Borne [ https://github.com/cborne & http://www.cyrille-borne.com ]: without your comments, issues reporting and enhancement ideas this app would never have been so complete ;-)
|
||||
To Eauland for his great job on my poor css/html code (a pain in the ass it seems ! ^^)
|
||||
|
||||
|
|
@ -1,266 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN admin page:
|
||||
* allows upload / delete / filter files
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
*
|
||||
**/
|
||||
require_once('core/auto_restrict.php'); # Connected user only !
|
||||
?>
|
||||
|
||||
<?php
|
||||
# Initialisation
|
||||
$layout=$_SESSION['aspect'];
|
||||
$shared_folders=$back_link='';
|
||||
if (empty($_SESSION['mode'])){$mode='view';}else{$mode=$_SESSION['mode'];}
|
||||
$upload_path_size=strlen($_SESSION['upload_root_path'].$_SESSION['upload_user_path']);
|
||||
$lb_token=TOKEN;
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_link']);
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_rename']);
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_delete']);
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_new_folder']);
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_download_url']);
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_qrcode']);
|
||||
echo str_replace('#TOKEN',$lb_token,$templates['dialog_share']);
|
||||
if ($mode=='links'){
|
||||
# Add lock dialogbox to the page
|
||||
$array=array(
|
||||
'#TOKEN' => TOKEN
|
||||
);
|
||||
echo template('dialog_password',$array);
|
||||
}
|
||||
if ($mode=='view'){
|
||||
# Add shares from others users
|
||||
$shared_with=load_folder_share();
|
||||
if (!empty($shared_with[$_SESSION['login']])){
|
||||
$shared_folders.= '<div class="shared_folders">';
|
||||
$saveshare=false;
|
||||
foreach($shared_with[$_SESSION['login']] as $id=>$data){
|
||||
if (is_dir($data['folder'])&&!empty($ids[$id])){
|
||||
$folder=_basename($data['folder']);
|
||||
$array=array(
|
||||
'#CLASS' => 'shared_folder',
|
||||
'#ID' => $id,
|
||||
'#FICHIER' => $folder,
|
||||
'#TOKEN' => TOKEN,
|
||||
'#NAME' => $folder,
|
||||
'#FROM' => $data['from'],
|
||||
);
|
||||
$shared_folders.= template($mode.'_shared_folder_'.$layout,$array);
|
||||
}else{
|
||||
# remove obsolete shared IDs
|
||||
unset($shared_with[$_SESSION['login']][$id]);
|
||||
$saveshare=true;
|
||||
}
|
||||
}
|
||||
$shared_folders.= '</div>';
|
||||
save_folder_share($shared_with);
|
||||
}
|
||||
|
||||
# Prepare folder tree for move dialog box
|
||||
$select_folder='<select name="destination" class="folder_list button"><option value="">'.e('Choose a folder',false).'</option>';
|
||||
$folders_list=user_folder_tree();
|
||||
if (isset($folders_list[0])){$folders_list[0].='/';}
|
||||
|
||||
foreach($folders_list as $folder){
|
||||
$folder=substr($folder,$upload_path_size);
|
||||
$select_folder.='<option value="'.$folder.'">'.$folder.'</option>';
|
||||
}
|
||||
|
||||
$select_folder.='</select>';
|
||||
# Add move dialogbox to the page
|
||||
$array=array(
|
||||
'#LIST_FILES_SELECT' => $select_folder,
|
||||
'#TOKEN' => TOKEN,
|
||||
);
|
||||
|
||||
$dia=str_replace('#LIST_FILES_SELECT',$select_folder,$templates['dialog_move']);
|
||||
$dia=str_replace('#TOKEN',TOKEN,$dia);
|
||||
echo $dia;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div id="admin">
|
||||
|
||||
|
||||
<div id="fil_ariane">
|
||||
<a class="ariane_home" href="index.php?p=admin&path=/&token=<?php echo TOKEN;?>" title="<?php echo e('Root:',false);?>"><span class="icon-home_folder" ></span></a>/
|
||||
|
||||
<?php
|
||||
$ariane=explode('/',$_SESSION['current_path']);
|
||||
$previous_path = $ariane;
|
||||
$nb_folders=count($previous_path);
|
||||
if ($nb_folders>1){unset($previous_path[$nb_folders-1]);$previous_path = implode('/',$previous_path);}
|
||||
elseif($nb_folders=1&&!empty($previous_path[0])){$previous_path='/';}
|
||||
else{$previous_path='';}
|
||||
|
||||
|
||||
$chemin='';
|
||||
foreach($ariane as $nb=>$folder){
|
||||
if (!empty($folder)){
|
||||
$chemin.=$folder;
|
||||
echo '<a class="ariane_item" href="index.php?p=admin&path='.$chemin.'&token='.TOKEN.'">'.$folder.'</a>';
|
||||
$chemin.='/';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($previous_path)&&$show_back_button){
|
||||
$back_button='<a class="back" href="index.php?p=admin&path='.$previous_path.'&token='.TOKEN.'"><span class="icon-left-circle" ></span></a>';
|
||||
$back_link='
|
||||
<tr class="folder"><td class="table_check"></td><td></td><td class="table_filename"><a class="root" href="index.php?p=admin&path=/&token='.TOKEN.'">.</a></td><td></td><td></td></tr>
|
||||
<tr class="folder"><td></td><td></td><td class="table_filename"><a class="back" href="index.php?p=admin&path='.$previous_path.'&token='.TOKEN.'">..</a></td><td></td></td><td></tr>
|
||||
';
|
||||
echo $back_button;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($_SESSION['filter'])){
|
||||
echo '<p id="filter">'.e('Filter:',false).' '.$_SESSION['filter'].'</p>';
|
||||
}
|
||||
?>
|
||||
<div id="menu">
|
||||
<?php
|
||||
if (empty($_GET['f'])){
|
||||
/* you can change the generated link using another pattern as argument (keep the # tags !):
|
||||
'<a id="#MENU" href="index.php?p=#PAGE&aspect=#MENU&token=#TOKEN"> </a>'*/
|
||||
make_menu_link();
|
||||
}
|
||||
?>
|
||||
<a id="new_folder" title="<?php e('Create a subfolder in this folder');?>" href="#New_folder_box"><span class="icon-folder-add" ></span></a>
|
||||
<a id="download_url" title="<?php e('Paste a file\'s URL to get it on this server');?>" href="#download_box"><span class="icon-globe" ></span></a>
|
||||
<?php make_mode_link(); ?>
|
||||
<span id="delete_selection" title="<?php e('Delete selected items');?>"><span class="icon-trash" ></span></span>
|
||||
<span id="zip_selection" title="<?php e('Zip and download selected items');?>"><span class="icon-download-cloud" ></span></span>
|
||||
</div>
|
||||
|
||||
<div id="list_files" class="<?php echo $_SESSION['aspect'];?>">
|
||||
<?php
|
||||
include('core/listfiles.php');
|
||||
?>
|
||||
</div>
|
||||
<script src="core/js/qr.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
function downloadImage() {
|
||||
data = document.getElementById('outputimg').src;
|
||||
document.getElementById('outputlink').href = data;
|
||||
}
|
||||
|
||||
function loadMore(button){
|
||||
event.preventDefault;
|
||||
list=document.getElementById('async_load');
|
||||
link=attr(button,'data-url');
|
||||
nb=parseInt(attr(button,'data-from'));
|
||||
max=parseInt(attr(button,'data-max'));
|
||||
text=button.innerHTML;
|
||||
button.innerHTML='...';
|
||||
addClass(button,'loading');
|
||||
if (max>nb){attr(button,'data-from',nb+1);}
|
||||
else{remove(button);}
|
||||
appendAjax(link+'&from='+nb,'','get',list,function(){button.innerHTML=text;removeClass(button,'loading');});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Click on move button
|
||||
on('click','#list_files a.movefolder',function(){
|
||||
name=attr(this,"data-name");
|
||||
document.getElementById('filename').value=name;
|
||||
document.getElementById('filename_hidden').value=name;
|
||||
});
|
||||
// Click on delete button
|
||||
on('click','#list_files a.close',function(){
|
||||
fileid=attr(this,"data-id");
|
||||
document.getElementById('ID_Delete').value=fileid;
|
||||
});
|
||||
// Click on rename button
|
||||
on('click','#list_files a.rename',function(){
|
||||
fileid=attr(this,"data-id");
|
||||
name=attr(this,"data-name");
|
||||
document.getElementById('FILE_Rename').value=name;
|
||||
document.getElementById('ID_Rename').value=fileid;
|
||||
});
|
||||
// Click on link button
|
||||
on('click','#list_files a.link',function(){
|
||||
fileid=attr(this,"data-id");
|
||||
document.getElementById('link').value="<?php echo $_SESSION['home'];?>?f="+fileid;
|
||||
});
|
||||
// Click on usershare button
|
||||
on('click','#list_files a.usershare',function(){
|
||||
fileid=attr(this,"data-id");
|
||||
name=attr(this,"data-name");
|
||||
document.getElementById('ID_folder').innerHTML=name;
|
||||
document.getElementById('ID_share').value=fileid;
|
||||
ajax('index.php?users_share_list='+fileid+'&token=<?php echo TOKEN;?>',null,'GET','#Users_list');
|
||||
});
|
||||
// Click on locked button
|
||||
on('click','#list_files a.locked',function(){
|
||||
fileid=attr(this,"data-id");
|
||||
document.getElementById('ID_hidden').value=fileid;
|
||||
});
|
||||
// Click on qrcode button
|
||||
on('click','#list_files a.qrcode',function(){
|
||||
fileid=attr(this,"data-id");
|
||||
var data = "<?php echo $_SESSION['home'];?>?f="+fileid;
|
||||
var options = {ecclevel:'M'};
|
||||
var url = QRCode.generatePNG(data, options);
|
||||
document.getElementById('qrcode_img').src = url;
|
||||
return false;
|
||||
});
|
||||
|
||||
// Check for multiselection
|
||||
on('click','.table_check input',function(){
|
||||
tr=parent(parent(this));
|
||||
if (this.checked==true){
|
||||
addClass(tr,"checked");
|
||||
}else{
|
||||
removeClass(tr,"checked");
|
||||
}
|
||||
if (first(".view .checked")){
|
||||
addClass("#delete_selection","show");
|
||||
addClass("#zip_selection","show");
|
||||
}else{
|
||||
removeClass("#delete_selection","show");
|
||||
removeClass("#zip_selection","show");
|
||||
}
|
||||
|
||||
});
|
||||
on('click','#delete_selection',function(){
|
||||
document.getElementById('multiselect_command').setAttribute("value","delete");
|
||||
document.getElementById('multiselect').submit();
|
||||
});
|
||||
on('click','#zip_selection',function(){
|
||||
document.getElementById('multiselect_command').setAttribute("value","zip");
|
||||
document.getElementById('multiselect').submit();
|
||||
});
|
||||
on('click','#check_all',function(){
|
||||
checked=this.checked;
|
||||
each(".table_check input:not(#check_all)",function(obj){
|
||||
tr=parent(parent(obj));
|
||||
obj.checked=checked;
|
||||
if (checked==true){addClass(tr,"checked");}
|
||||
else{removeClass(tr,"checked");}
|
||||
});
|
||||
if (checked==true){
|
||||
addClass("#delete_selection","show");
|
||||
addClass("#zip_selection","show");
|
||||
}
|
||||
else{
|
||||
removeClass("#delete_selection","show");
|
||||
removeClass("#zip_selection","show");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<script src="core/js/sorttable.js"></script>
|
||||
<script type="text/javascript" src="core/js/scrolltotop.js"></script>
|
|
@ -1,139 +0,0 @@
|
|||
/* Admin */
|
||||
#admin {
|
||||
width: calc(100% - 8px);
|
||||
margin: 0 auto;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* menu */
|
||||
#admin #menu{display:block;}
|
||||
#admin #menu a.active{box-shadow:inset 0 0 10px #basic_color_superdark!important;}
|
||||
#admin #menu a {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
float: left;
|
||||
margin-bottom: 10px;
|
||||
border-top: 1px solid #888;
|
||||
border-bottom: 1px solid #888;
|
||||
}
|
||||
#admin #menu a:hover {background-color: #hover_color_dark!important}
|
||||
|
||||
#admin #menu a:first-of-type {
|
||||
border-left: 1px solid #888;
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
|
||||
#admin #menu a:last-of-type {
|
||||
border-right: 1px solid #888;
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
#admin #menu #delete_selection
|
||||
{background:#e20;}
|
||||
#admin #menu #delete_selection.show
|
||||
{opacity:100;max-width:200px;transition:all 300ms;margin-left:2px;}
|
||||
#admin #menu #delete_selection:hover
|
||||
{background-color:#f30!important;transition:all 300ms;}
|
||||
#admin #menu #delete_selection,#admin #menu #zip_selection
|
||||
{
|
||||
font-size:18px;
|
||||
color:rgba(255,255,255,0.7);
|
||||
text-align:center;
|
||||
line-height:30px;
|
||||
cursor:pointer;transition:all 300ms;
|
||||
opacity:0;max-width:0;
|
||||
overflow:hidden;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 3px;
|
||||
margin-left:0;
|
||||
}
|
||||
#admin #menu #zip_selection.show
|
||||
{opacity:100;max-width:200px;transition:all 300ms;margin-left:2px;}
|
||||
#admin #menu #zip_selection:hover
|
||||
{background-color:#03F!important;transition:all 300ms;}
|
||||
#admin #menu #zip_selection{background: #02e;}
|
||||
|
||||
#admin #menu a:hover{color:white;}
|
||||
#admin #menu a{
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
color:rgba(255,255,255,0.8);
|
||||
font-size:18px;
|
||||
background: #basic_color_neutral
|
||||
}
|
||||
|
||||
|
||||
/* fil ariane */
|
||||
#admin #fil_ariane{
|
||||
clear: both;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
border-bottom: 1px solid #888;
|
||||
font-size: 1.2em;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
#admin #fil_ariane .ariane_home {
|
||||
display: inline-block;
|
||||
width: 25px;
|
||||
height: inherit;
|
||||
font-size:20px;
|
||||
line-height:15px;
|
||||
}
|
||||
#admin #fil_ariane .back {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: inherit;
|
||||
font-size:20px;
|
||||
line-height:15px;
|
||||
}
|
||||
#admin #fil_ariane a:hover{color:#hover_color_neutral;}
|
||||
#admin #fil_ariane a.ariane_item{margin-left:5px;}
|
||||
#admin #fil_ariane a.ariane_item:after{
|
||||
content:"/";
|
||||
margin-left:5px;
|
||||
margin-right:5px;
|
||||
height:38px;
|
||||
display:inline-block;
|
||||
line-height: 30px;
|
||||
color:rgba(0,0,0,0.5);
|
||||
|
||||
text-decoration: none;
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
#folder_size{
|
||||
color:rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
/* filtre */
|
||||
#admin #filter {
|
||||
margin: 15px 0;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
|
||||
#ID_folder{text-align:center;color:rgba(0,0,0,0.8);font-size:1.2em;}
|
||||
|
||||
#toplink a{color:rgba(0,0,0,0.5)}
|
||||
#toplink{
|
||||
font-size:2em;
|
||||
padding:5px;
|
||||
background-color:rgba(0,0,0,0.2);
|
||||
border-radius:3px;
|
||||
width:48px;height: 48px;
|
||||
text-align:center;
|
||||
position:fixed;
|
||||
bottom:5px;right:5px;
|
||||
}
|
||||
|
||||
.info{text-align: center;padding:10px;border-radius: 3px;background-color: rgba(100,100,100,0.5);margin:5px;color:white;text-shadow:0 1px 1px rgba(0,0,0,0.2);}
|
|
@ -1,154 +0,0 @@
|
|||
/* Dialog boxes */
|
||||
.dialog {
|
||||
display: none;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.dialog:target {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.dialog figure {
|
||||
display: table-cell;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.dialog figure figcaption {
|
||||
display: block;
|
||||
margin: auto;
|
||||
padding: 0;
|
||||
background: linear-gradient(#ddd,#eee);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 1px #888 solid;
|
||||
border-top: 1px #basic_color_light solid;
|
||||
border-bottom: 1px #777 solid;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.4);
|
||||
text-align: justify;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dialog figure figcaption p{margin:10px;}
|
||||
|
||||
.dialog figure .closemsg {
|
||||
display: block;
|
||||
margin: auto;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
text-align: right;
|
||||
z-index: 2;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.dialog figure .closemsg,
|
||||
.dialog figure figcaption {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.dialog figure .closemsg::after {
|
||||
content: "\00D7";
|
||||
font-size: 20px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
right: 8px;
|
||||
top: 11px;
|
||||
z-index: 3;
|
||||
color: rgba(255,255,255,0.8);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dialog figure .closemsg::before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
.dialog select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
color: rgba(0,0,0,0.7);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.dialog h1 {
|
||||
background: linear-gradient(#basic_color_dark,#basic_color_neutral);
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px rgba(0,0,0,0.1) solid;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
|
||||
text-shadow: 0 0px 1px rgba(0,0,0,0.9);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.dialog form{
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.dialog label{
|
||||
color: rgba(0,0,0,0.7);
|
||||
padding-bottom: 7px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dialog input[type=text],
|
||||
.dialog textarea,
|
||||
.dialog select {
|
||||
display: block;
|
||||
background: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.2));
|
||||
border: 1px solid rgba(0,0,0,0.3);
|
||||
border-bottom: 1px rgba(255,255,255,0.3) solid;
|
||||
font-size: 14px;
|
||||
color: rgba(0,0,0,0.5);
|
||||
text-shadow: 0 1px 1px rgba(255,255,255,0.5);
|
||||
margin:20px 0 20px 0;
|
||||
width:340px;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.dialog input[type=submit]{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
margin-top: 25px;
|
||||
margin-bottom:15px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#link_box textarea {
|
||||
resize:none;
|
||||
}
|
||||
|
||||
|
||||
#qrcode_img {
|
||||
display: block;
|
||||
margin: 5px auto;
|
||||
width: 256px;
|
||||
height: 256px;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
#edit_profiles {text-align: center;}
|
||||
#edit_profiles input[type=checkbox]:checked+.btn{background-color:#0a0;color:white;}
|
||||
#edit_profiles input[type=checkbox]{display:none;}
|
||||
#edit_profiles input[type=submit]{display:block;width:200px;margin:auto;}
|
||||
#edit_profiles .btn{font-size:0.9em;background-color:#a00;color:rgba(255,255,255,0.5);}
|
||||
#edit_profiles .npt{width:100%;max-width:200px;}
|
||||
#edit_profiles table{ text-align: left; border-collapse: collapse;display:inline-block;}
|
||||
#edit_profiles td:first-of-type{}
|
||||
#edit_profiles td{vertical-align: middle;padding:10px;}
|
||||
#edit_profiles tr{}
|
||||
#edit_profiles .add .btn{background:#basic_color_light;}
|
||||
#edit_profiles input[type=checkbox]:disabled+.btn{opacity:0.2;}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#editor{
|
||||
width:100%;
|
||||
min-height: 500px;
|
||||
text-indent: 7px;
|
||||
margin-bottom: 7px;
|
||||
color: #85888b;
|
||||
border: 1px solid #d6ecfc;
|
||||
border-radius: 5px;
|
||||
background-color:white;
|
||||
padding:10px;
|
||||
}
|
||||
#editor_page textarea{padding:15px;min-height:500px;resize:vertical;}
|
||||
#editor_page {max-width:1200px;padding:20px;margin:auto}
|
||||
#editor_page .npt{width:100%;font-size:1.3em;}
|
||||
#editor_page .btn{width:200px;font-size:1.4em;display:block;margin:auto;}
|
||||
#editor_page .dialog figcaption{
|
||||
padding:15px;
|
||||
max-width:1200px;width:100%;
|
||||
}
|
||||
#editor_page .tab_space{
|
||||
width:100%;
|
||||
margin:5px auto;
|
||||
max-width:1200px;
|
||||
}
|
||||
#editor_page #visu{
|
||||
min-height: 500px;
|
||||
margin:0;
|
||||
max-width:100%;
|
||||
}
|
||||
#editor_page .tabs>li{
|
||||
display: inline-block;
|
||||
}
|
||||
#editor_page .help_tab{padding:30px;font-size: 1.2em;font-family: monospace;}
|
||||
#editor_page .npt{margin:0;margin-bottom:15px;width:calc(100% - 30px);}
|
|
@ -1,108 +0,0 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="bozon" horiz-adv-x="1000" >
|
||||
<font-face font-family="bozon" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="search" unicode="" d="M643 386q0 103-74 176t-176 74-177-74-73-176 73-177 177-73 176 73 74 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 152-31 126-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="video" unicode="" d="M214-43v72q0 14-10 25t-25 10h-72q-14 0-25-10t-11-25v-72q0-14 11-25t25-11h72q14 0 25 11t10 25z m0 214v72q0 14-10 25t-25 11h-72q-14 0-25-11t-11-25v-72q0-14 11-25t25-10h72q14 0 25 10t10 25z m0 215v71q0 15-10 25t-25 11h-72q-14 0-25-11t-11-25v-71q0-15 11-25t25-11h72q14 0 25 11t10 25z m572-429v286q0 14-11 25t-25 11h-429q-14 0-25-11t-10-25v-286q0-14 10-25t25-11h429q15 0 25 11t11 25z m-572 643v71q0 15-10 26t-25 10h-72q-14 0-25-10t-11-26v-71q0-15 11-25t25-11h72q14 0 25 11t10 25z m786-643v72q0 14-11 25t-25 10h-71q-15 0-25-10t-11-25v-72q0-14 11-25t25-11h71q15 0 25 11t11 25z m-214 429v285q0 15-11 26t-25 10h-429q-14 0-25-10t-10-26v-285q0-15 10-25t25-11h429q15 0 25 11t11 25z m214-215v72q0 14-11 25t-25 11h-71q-15 0-25-11t-11-25v-72q0-14 11-25t25-10h71q15 0 25 10t11 25z m0 215v71q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-71q0-15 11-25t25-11h71q15 0 25 11t11 25z m0 214v71q0 15-11 26t-25 10h-71q-15 0-25-10t-11-26v-71q0-15 11-25t25-11h71q15 0 25 11t11 25z m71 89v-750q0-37-26-63t-63-26h-893q-36 0-63 26t-26 63v750q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="th-large" unicode="" d="M429 279v-215q0-29-22-50t-50-21h-286q-29 0-50 21t-21 50v215q0 29 21 50t50 21h286q29 0 50-21t22-50z m0 428v-214q0-29-22-50t-50-22h-286q-29 0-50 22t-21 50v214q0 29 21 50t50 22h286q29 0 50-22t22-50z m500-428v-215q0-29-22-50t-50-21h-286q-29 0-50 21t-21 50v215q0 29 21 50t50 21h286q29 0 50-21t22-50z m0 428v-214q0-29-22-50t-50-22h-286q-29 0-50 22t-21 50v214q0 29 21 50t50 22h286q29 0 50-22t22-50z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="th-list" unicode="" d="M286 154v-108q0-22-16-37t-38-16h-178q-23 0-38 16t-16 37v108q0 22 16 38t38 15h178q22 0 38-15t16-38z m0 285v-107q0-22-16-38t-38-15h-178q-23 0-38 15t-16 38v107q0 23 16 38t38 16h178q22 0 38-16t16-38z m714-285v-108q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v108q0 22 16 38t38 15h535q23 0 38-15t16-38z m-714 571v-107q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v107q0 22 16 38t38 16h178q22 0 38-16t16-38z m714-286v-107q0-22-16-38t-38-15h-535q-23 0-38 15t-16 38v107q0 23 16 38t38 16h535q23 0 38-16t16-38z m0 286v-107q0-22-16-38t-38-16h-535q-23 0-38 16t-16 38v107q0 22 16 38t38 16h535q23 0 38-16t16-38z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="cancel-circled" unicode="" d="M641 224q0 14-10 25l-101 101 101 101q10 11 10 25 0 15-10 26l-51 50q-10 11-25 11-15 0-25-11l-101-101-101 101q-11 11-26 11-15 0-25-11l-50-50q-11-11-11-26 0-14 11-25l101-101-101-101q-11-11-11-25 0-15 11-26l50-50q10-11 25-11 15 0 26 11l101 101 101-101q10-11 25-11 15 0 25 11l51 50q10 11 10 26z m216 126q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="info-circled" unicode="" d="M571 82v89q0 8-5 13t-12 5h-54v286q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h53v-179h-53q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h250q7 0 12 5t5 13z m-71 500v89q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h107q8 0 13 5t5 13z m357-232q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="download-cloud" unicode="" d="M714 332q0 8-5 13t-13 5h-125v196q0 8-5 13t-12 5h-108q-7 0-12-5t-5-13v-196h-125q-8 0-13-5t-5-13q0-8 5-13l196-196q5-5 13-5t13 5l196 196q5 6 5 13z m357-125q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="upload-cloud" unicode="" d="M714 368q0 8-5 13l-196 196q-5 5-13 5t-13-5l-196-196q-5-6-5-13 0-8 5-13t13-5h125v-196q0-8 5-13t12-5h108q7 0 12 5t5 13v196h125q8 0 13 5t5 13z m357-161q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="doc-inv" unicode="" d="M571 564v264q13-8 21-16l227-228q8-7 16-20h-264z m-71-18q0-22 16-38t38-15h303v-589q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h446v-304z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="doc-text-inv" unicode="" d="M819 584q8-7 16-20h-264v264q13-8 21-16z m-265-91h303v-589q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h446v-304q0-22 16-38t38-15z m89-411v36q0 8-5 13t-13 5h-393q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h393q8 0 13 5t5 13z m0 143v36q0 8-5 13t-13 5h-393q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h393q8 0 13 5t5 13z m0 143v36q0 7-5 12t-13 5h-393q-8 0-13-5t-5-12v-36q0-8 5-13t13-5h393q8 0 13 5t5 13z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="rss-squared" unicode="" d="M286 136q0 29-21 50t-51 21-50-21-21-50 21-51 50-21 51 21 21 51z m196-53q-8 130-99 221t-221 99q-8 1-14-5t-5-13v-71q0-8 5-13t12-5q86-6 147-68t67-147q1-7 6-12t12-5h72q7 0 13 6t5 13z m214 0q-3 86-31 166t-78 145-115 114-145 78-166 31q-8 1-13-5-5-5-5-13v-71q0-7 5-12t12-6q114-4 211-62t156-155 62-211q0-8 5-13t13-5h71q7 0 13 6 6 5 5 13z m161 535v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="cog-alt" unicode="" d="M500 350q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m429-286q0 29-22 51t-50 21-50-21-21-51q0-29 21-50t50-21 51 21 21 50z m0 572q0 29-22 50t-50 21-50-21-21-50q0-30 21-51t50-21 51 21 21 51z m-215-235v-103q0-6-4-11t-9-6l-86-14q-6-19-18-42 19-27 50-64 4-6 4-11 0-7-4-11-13-17-46-50t-44-33q-6 0-11 4l-64 50q-21-11-43-17-6-60-13-87-4-13-17-13h-104q-6 0-11 4t-5 10l-13 85q-19 6-42 18l-66-50q-4-4-11-4-6 0-12 4-80 75-80 90 0 5 4 10 5 8 23 30t26 34q-13 24-20 46l-85 13q-5 1-9 5t-4 11v103q0 6 4 11t9 6l86 14q7 19 18 42-19 27-50 64-4 6-4 11 0 7 4 11 12 17 46 50t44 33q6 0 12-4l64-50q19 10 43 18 6 60 13 86 3 13 16 13h104q6 0 11-4t6-10l13-85q19-6 41-17l66 49q5 4 11 4 7 0 12-4 81-75 81-90 0-5-4-10-7-9-24-30t-25-34q13-27 19-46l85-12q5-2 9-6t4-11z m357-298v-78q0-9-83-17-6-15-16-29 28-63 28-77 0-2-2-4-68-40-69-40-5 0-26 27t-29 37q-11-1-17-1t-17 1q-7-11-29-37t-25-27q-1 0-69 40-3 2-3 4 0 14 29 77-10 14-17 29-83 8-83 17v78q0 9 83 18 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 1 17 1t17-1q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-9 83-18z m0 572v-78q0-9-83-18-6-15-16-29 28-63 28-77 0-2-2-4-68-39-69-39-5 0-26 26t-29 38q-11-1-17-1t-17 1q-7-12-29-38t-25-26q-1 0-69 39-3 2-3 4 0 14 29 77-10 14-17 29-83 9-83 18v78q0 9 83 17 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 2 17 2t17-2q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-8 83-17z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="logout" unicode="" d="M357 46q0-2 1-11t0-14-2-14-5-11-12-3h-178q-67 0-114 47t-47 114v392q0 67 47 114t114 47h178q8 0 13-5t5-13q0-2 1-11t0-15-2-13-5-11-12-3h-178q-37 0-63-27t-27-63v-392q0-37 27-63t63-27h174t6 0 7-2 4-3 4-5 1-8z m518 304q0-14-11-25l-303-304q-11-10-25-10t-25 10-11 25v161h-250q-14 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 11 25t25 10 25-10l303-304q11-10 11-25z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="angle-circled-left" unicode="" d="M507 72l57 56q11 11 11 26t-11 25l-171 171 171 171q11 11 11 25t-11 26l-57 56q-10 11-25 11t-25-11l-253-253q-11-10-11-25t11-25l253-253q11-11 25-11t25 11z m350 278q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="play" unicode="" d="M772 333l-741-412q-13-7-22-2t-9 20v822q0 14 9 20t22-2l741-412q13-7 13-17t-13-17z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="stop" unicode="" d="M857 743v-786q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v786q0 14 11 25t25 11h785q15 0 26-11t10-25z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="pause" unicode="" d="M857 743v-786q0-14-10-25t-26-11h-285q-15 0-25 11t-11 25v786q0 14 11 25t25 11h285q15 0 26-11t10-25z m-500 0v-786q0-14-10-25t-26-11h-285q-15 0-25 11t-11 25v786q0 14 11 25t25 11h285q15 0 26-11t10-25z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="globe" unicode="" d="M429 779q116 0 215-58t156-156 57-215-57-215-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58z m152-291q-1-1-5-5t-7-6q1 0 2 3t3 6 2 4q3 4 12 8 8 4 29 7 19 5 29-6-1 1 5 7t8 7q2 1 8 2t9 5l1 12q-7-1-10 4t-3 12q0-2-4-5 0 4-2 5t-7-1-5-1q-5 2-8 5t-5 9-2 8q-1 3-5 6t-5 6q-1 1-2 3t-2 4-2 3-3 1-4-3-4-5-2-3q-2 1-4 1t-2-1-3-1-3-2q-1-2-4-2t-5-1q8 3-1 6-5 2-9 2 5 2 5 6t-5 8h3q-1 2-5 5t-10 5-7 3q-5 3-19 5t-18 1q-3-4-3-6t2-8 2-7q1-3-3-7t-3-7q0-4 7-9t6-12q-2-4-9-9t-9-6q-3-5-1-11t6-9q1-1 1-2t-2-3-3-2-4-2l-1-1q-7-3-12 3t-7 15q-4 14-9 17-13 4-17-1-2 7-22 15-14 5-33 2 4 0 0 8-4 9-10 7 1 3 2 10t0 7q2 7 7 13 1 1 4 5t5 7 1 4q19-3 28 6 2 3 6 9t6 10q5 3 8 3t8-3 8-3q8-1 8 6t-4 11q7 0 2 10-3 4-5 5-6 2-15-3-4-2 2-4-1 0-6-6t-9-10-9 3q0 0-3 7t-5 8q-5 0-9-9 1 5-6 9t-14 4q11 7-4 15-4 3-12 3t-11-2q-2-4-3-7t3-4 6-3 6-2 5-2q8-6 5-8-1 0-5-2t-6-2-4-3q-2-2 0-7t-1-8q-3 3-5 10t-4 9q4-5-14-4l-5 1q-3 0-9-1t-12-1-7 5q-3 4 0 11 0 2 2 1-2 2-6 5t-6 5q-25-8-52-23 3 0 6 1 3 1 8 3t5 4q19 7 24 3l3 3q7-9 11-14-4 3-17 1-11-4-12-7 4-7 2-10-2 2-6 6t-8 6-8 3q-9 0-13-1-81-45-131-124 4-4 7-4 2-1 3-5t1-6 6 1q5-4 2-10 1 0 25-15 10-10 11-12 2-6-5-10-1 1-5 5t-5 2q-2-3 0-10t6-7q-4 0-5-9t-2-20 0-13l1-1q-2-6 3-19t12-11q-7-1 11-24 3-4 4-5 2-1 7-4t9-6 5-5q2-3 6-13t8-13q-2-3 5-11t6-13q-1 0-2-1t-1 0q2-4 9-8t8-7q1-2 1-6t2-6 4-1q2 11-13 34-8 14-9 17-2 2-4 8t-2 8q1 0 3 0t5-2 4-3 1-1q-1-4 1-10t7-10 10-11 6-7q4-4 8-11t0-8q5 0 11-5t10-11q3-5 4-15t3-13q1-4 5-8t7-5l9-5t7-3q3-2 10-6t12-7q6-2 9-2t8 1 8 2q8 1 16-8t12-12q20-10 30-6-1 0 1-4t4-9 5-8 3-5q3-3 10-8t10-8q4 2 4 5-1-5 4-11t10-6q8 2 8 18-17-9-27 10 0 0-2 3t-2 5-1 4 0 5 2 1q5 0 6 2t-1 7-2 8q-1 4-6 11t-7 8q-3-5-9-4t-9 5q0-1-1-3t-1-4q-7 0-8 0 1 2 1 10t2 13q1 2 3 6t5 9 2 7-3 5-9 1q-11 0-15-11-1-2-2-6t-2-6-5-4q-4-2-14-1t-13 3q-8 4-13 16t-5 20q0 6 1 15t2 14-3 14q2 1 5 5t5 6q2 1 3 1t2 0 3 1 1 3q0 1-2 2-2 1-2 1 4-1 16 1t15-1q9-6 12 1 0 1-1 6t0 7q3-15 16-5 2-1 9-3t9-2q2-1 4-3t3-3 3 0 5 4q5-8 7-13 6-23 10-25 4-2 6-1t3 5 0 8-1 7l-1 4v11l0 4q-8 2-10 7t0 10 9 10q0 1 4 2t9 4 7 4q12 11 8 20 4 0 6 5 0 0-2 2t-5 2-2 2q5 2 1 8 3 2 4 7t4 5q5-7 12-1 4 5 1 9 2 4 11 6t10 5q4-1 5 1t0 7 2 7q2 2 8 5t8 2l9 7q2 2 0 2 10-1 18 6 5 6-4 11 2 3-2 5t-8 3q2 1 7 1t5 1q9 5-4 9-9 2-24-7z m-90-490q114 21 195 106-1 2-7 2t-7 2q-10 4-13 5 1 4-1 7t-5 5-7 5-6 4q-1 1-4 3t-4 3-4 2-5 2-5-1l-2-1q-2 0-3-1t-3-2-2-1 0-2q-12 10-20 13-3 0-7 3t-5 4-6 0-6-4q-3-2-4-8t-1-7q-4 3 0 10t1 10q-1 3-6 2t-6-2-7-5-5-3-4-3-5-5q-2-2-4-6t-2-7q-1 3-7 4t-5 3q1-5 2-19t3-22q4-17-7-26-15-14-16-23-2-12 7-14 0-4-5-12t-4-12q0-3 2-9z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="align-left" unicode="" d="M1000 100v-71q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25v71q0 15 11 25t25 11h928q15 0 25-11t11-25z m-214 214v-71q0-15-11-25t-25-11h-714q-15 0-25 11t-11 25v71q0 15 11 25t25 11h714q15 0 25-11t11-25z m143 215v-72q0-14-11-25t-25-11h-857q-15 0-25 11t-11 25v72q0 14 11 25t25 10h857q14 0 25-10t11-25z m-215 214v-72q0-14-10-25t-25-10h-643q-15 0-25 10t-11 25v72q0 14 11 25t25 11h643q14 0 25-11t10-25z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="qrcode" unicode="" d="M214 207v-71h-71v71h71z m0 429v-72h-71v72h71z m429 0v-72h-72v72h72z m-572-571h215v214h-215v-214z m0 428h215v214h-215v-214z m429 0h214v214h-214v-214z m-143-143v-357h-357v357h357z m286-286v-71h-72v71h72z m143 0v-71h-72v71h72z m0 286v-214h-215v71h-71v-214h-71v357h214v-71h71v71h72z m-429 429v-358h-357v358h357z m429 0v-358h-357v358h357z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="github-circled" unicode="" d="M857 350q0-140-82-252t-211-155q-15-3-22 4t-7 17v118q0 54-29 79 32 3 57 10t53 22 45 37 30 58 11 84q0 68-44 115 21 51-5 114-15 5-45-6t-51-25l-21-13q-52 15-107 15t-108-15q-8 6-23 15t-47 22-48 7q-24-63-4-114-44-47-44-115 0-47 12-83t29-59 45-37 52-22 57-10q-22-20-27-58-12-5-25-8t-32-3-36 12-31 35q-11 18-27 29t-28 14l-11 1q-12 0-16-2t-3-7 5-8 7-6l4-3q12-6 24-21t18-29l5-13q8-21 25-34t37-17 39-4 31 2l13 3q0-22 0-50t1-30q0-10-8-17t-22-4q-129 43-211 155t-82 252q0 117 58 215t155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="users" unicode="" d="M1000-90l-224 0 0 150q0 54-30 81t-154 89q40 30 40 84 0 16-13 33t-19 51q-2 8-14 16t-14 42q0 24 12 30-6 34-8 60-4 38 23 78t95 40 96-40 24-78l-8-60q12-6 12-30-2-34-14-42t-14-16q-6-34-19-51t-13-33q0-42 21-66t77-48q112-46 130-80 6-8 9-61t5-101l0-48z m-488 262q182-78 182-124l0-138-694 0 0 184q0 44 84 78 76 32 104 64t28 88q0 20-19 44t-25 68q-2 10-18 22t-20 56q0 14 3 23t7 13l4 2q-6 46-10 82-4 50 33 103t127 53 127-53 33-103l-10-82q14-8 14-38-4-44-20-56t-18-22q-6-44-25-68t-19-44q0-56 28-88t104-64z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="user-add" unicode="" d="M620 128q180-64 180-122l0-106-800 0 0 202q36 14 82 26 94 34 129 69t35 95q0 22-23 48t-31 74q-2 12-23 25t-25 61q0 16 5 26t9 12l4 4q-8 50-12 88-6 54 40 112t160 58 160-58 42-112l-14-88q18-8 18-42-2-28-9-43t-14-17-14-8-9-18q-10-46-33-73t-23-49q0-60 36-95t130-69z m230 272l150 0 0-100-150 0 0-150-100 0 0 150-150 0 0 100 150 0 0 150 100 0 0-150z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="eye" unicode="" d="M500 630q92 0 177-25t141-62 99-77 63-71 20-45-20-44-63-71-99-78-141-62-177-25-177 25-141 62-99 78-63 71-20 44 20 45 63 71 99 77 141 62 177 25z m0-494q92 0 157 63t65 151q0 90-65 153t-157 63-157-63-65-153q0-88 65-151t157-63z m0 214q8-8 37-2t50 11 25-9q0-44-33-75t-79-31-78 31-32 75q0 46 32 77t78 31q14 0 10-23t-12-47 2-38z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="folder-1" unicode="" d="M954 500q32 0 40-12t6-36l-42-452q-2-24-12-37t-42-13l-806 0q-52 0-56 50l-42 452q-2 24 6 36t40 12l908 0z m-34 110l10-40-846 0 14 132q4 20 20 34t36 14l164 0q52 0 86-34l30-30q32-36 86-36l340 0q20 0 38-12t22-28z" horiz-adv-x="1001" />
|
||||
|
||||
<glyph glyph-name="flow-tree" unicode="" d="M868 112q72-34 72-112 0-50-35-85t-85-35-85 35-35 85q0 78 72 112l0 114q0 78-76 78l-100 0q-44 0-78 12l0-204q72-34 72-112 0-50-35-85t-85-35-85 35-35 85q0 78 72 112l0 204q-30-12-76-12l-100 0q-34 0-53-19t-22-33-3-26l0-114q72-34 72-112 0-50-35-85t-85-35-85 35-35 85q0 78 72 112l0 114q0 64 43 118t131 54l100 0q76 0 76 52l0 140q-72 34-72 110 0 50 35 85t85 35 85-35 35-85q0-76-72-110l0-140q0-52 78-52l100 0q86 0 129-54t43-118l0-114z m-678-112q0 30-21 50t-49 20-48-20-20-50q0-28 20-48t48-20 49 20 21 48z m212 700q0-28 20-48t48-20 49 20 21 48q0 30-21 50t-49 20-48-20-20-50z m138-700q0 30-21 50t-49 20-48-20-20-50q0-28 20-48t48-20 49 20 21 48z m280-68q28 0 49 20t21 48q0 30-21 50t-49 20-48-20-20-50q0-28 20-48t48-20z" horiz-adv-x="940" />
|
||||
|
||||
<glyph glyph-name="home" unicode="" d="M521 819q322-279 500-429 20-16 20-40 0-21-15-37t-36-15l-105 0 0-364q0-21-15-37t-36-16l-156 0q-22 0-37 16t-16 37l0 208-209 0 0-208q0-21-15-37t-36-16l-156 0q-21 0-37 16t-16 37l0 364-103 0q-22 0-37 15t-16 37 19 40z" horiz-adv-x="1041" />
|
||||
|
||||
<glyph glyph-name="folder-add" unicode="" d="M781 663q65 0 111-46t46-110l0-417q0-65-46-110t-111-46l-625 0q-65 0-110 46t-46 110l0 520q0 65 46 111t110 46l209 0q43 0 73-31t31-73l312 0z m0-625q22 0 37 15t16 37l0 364-209 0q-10 0-18 8t-8 18 8 18 18 9l209 0q0 21-16 36t-37 16l-312 0q-44 0-74 31t-30 73l-209 0q-21 0-37-16t-15-37l0-103 209 0q10 0 18-9t8-18-8-18-18-8l-209 0 0-364q0-21 15-37t37-15l625 0z m-156 312q21 0 37-15t16-37-16-36-37-15l-104 0 0-105q0-22-15-37t-37-15-37 15-16 37l0 105-103 0q-22 0-37 15t-16 36 16 37 37 15l103 0 0 104q0 21 16 37t37 16 37-16 15-37l0-104 104 0z" horiz-adv-x="938" />
|
||||
|
||||
<glyph glyph-name="cancel-circled2" unicode="" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m109 0q0-162 115-276t276-115 276 115 115 276-115 276-276 115-276-115-115-276z m145-137l137 137-137 137 109 109 137-137 137 137 109-109-137-137 137-137-109-109-137 137-137-137z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="pencil" unicode="" d="M0-143l68 343 274-273z m137 392l422 422 259-260-421-422z m531 494q2 39 31 69t69 31 66-25l131-131q25-26 24-66t-30-69-69-30-66 24l-131 131q-27 27-25 66z" horiz-adv-x="989" />
|
||||
|
||||
<glyph glyph-name="edit" unicode="" d="M0-150l0 818 188 182 521 0 0-226 31 31 162-160-380-381-239-78 76 238 262 262 0 226-369 0 0-156-164 0 0-668 533 0 0 143 88 87 0-318-709 0z m361 264l119 39-80 82z" horiz-adv-x="902" />
|
||||
|
||||
<glyph glyph-name="fire" unicode="" d="M7 238q10 41 50 131t44 146q39-72 45-145 148 184 154 428 10-6 25-17t58-45 74-74 61-96 34-118q15 36 19 79t-9 80q15-12 41-39t56-75 56-99 31-118-9-127-72-127-152-120q64 129 25 278t-154 229q10-43-11-141t-65-150q7 63 4 102t-12 59l-10 17q-12-70-60-140-26-38-39-69t-9-80 30-105q-135 76-181 154t-24 182z" horiz-adv-x="748" />
|
||||
|
||||
<glyph glyph-name="cancel-circle" unicode="" d="M1000 349q0-136-67-251t-182-182-251-67-251 67-182 182-67 251 67 251 182 182 251 67 251-67 182-182 67-251z m-339-232l71 71-161 161 161 161-71 71-161-161-161 161-71-71 161-161-161-161 71-71 161 161z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="left-circle" unicode="" d="M1000 349q0-136-67-251t-182-182-251-67-251 67-182 182-67 251 67 251 182 182 251 67 251-67 182-182 67-251z m-453-232l71 71-161 161 161 161-71 71-233-232z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="right-circle" unicode="" d="M1000 349q0-136-67-251t-182-182-251-67-251 67-182 182-67 251 67 251 182 182 251 67 251-67 182-182 67-251z m-547-232l233 232-233 232-71-71 161-161-161-161z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="trash" unicode="" d="M0 569l0 68q2 37 29 63t65 25l94 0 0 31q0 39 27 67t66 27l313 0q39 0 66-27t28-67l0-31 93 0q37 0 65-25t29-63l0-68q0-26-19-44t-44-19l0-531q0-53-36-89t-88-36l-500 0q-53 0-89 36t-36 89l0 531q-26 0-44 19t-19 44z m63 0l749 0 0 62q0 14-8 23t-23 8l-687 0q-14 0-23-8t-8-23l0-62z m62-594q0-25 19-44t44-19l500 0q25 0 43 19t19 44l0 531-625 0 0-531z m63 31l0 407q0 13 8 22t23 9l62 0q14 0 23-9t9-22l0-407q0-13-9-22t-23-9l-62 0q-14 0-23 9t-8 22z m31 0l62 0 0 407-62 0 0-407z m31 719l375 0 0 31q0 14-9 23t-22 8l-313 0q-13 0-22-8t-9-23l0-31z m125-719l0 407q0 13 9 22t22 9l63 0q13 0 22-9t9-22l0-407q0-13-9-22t-22-9l-63 0q-13 0-22 9t-9 22z m31 0l63 0 0 407-63 0 0-407z m157 0l0 407q0 13 8 22t23 9l62 0q14 0 23-9t9-22l0-407q0-13-9-22t-23-9l-62 0q-14 0-23 9t-8 22z m31 0l62 0 0 407-62 0 0-407z" horiz-adv-x="875" />
|
||||
|
||||
<glyph glyph-name="shuffle" unicode="" d="M754 516q-54 0-105-32t-80-66-83-104q-48-62-75-94t-78-77-107-66-122-21l-104 0 0 140 104 0q54 0 106 32t81 66 83 104q62 82 101 126t116 88 163 44l36 0 0 120 210-180-210-180 0 100-36 0z m-484-88q-74 78-166 78l-104 0 0 140 104 0q140 0 254-108-14-16-37-45t-27-33q-8-12-24-32z m520-242l0 100 210-180-210-180 0 120-36 0q-140 0-260 116 46 58 72 92 0 2 6 9t8 11q84-88 174-88l36 0z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="link" unicode="" d="M294 116q14 14 34 14t36-14q32-34 0-70l-42-40q-56-56-132-56-78 0-134 56t-56 132q0 78 56 134l148 148q70 68 144 77t128-43q16-16 16-36t-16-36q-36-32-70 0-50 48-132-34l-148-146q-26-26-26-64t26-62q26-26 63-26t63 26z m450 574q56-56 56-132 0-78-56-134l-158-158q-74-72-150-72-62 0-112 50-14 14-14 34t14 36q14 14 35 14t35-14q50-48 122 24l158 156q28 28 28 64 0 38-28 62-24 26-56 31t-60-21l-50-50q-16-14-36-14t-34 14q-34 34 0 70l50 50q54 54 127 51t129-61z" horiz-adv-x="800" />
|
||||
|
||||
<glyph glyph-name="lock" unicode="" d="M625 480q43 0 73-31t31-73l0-365q0-42-31-73t-73-31l-521 0q-44 0-74 31t-30 73l0 365q0 43 30 73t74 31l52 0 0 105q0 86 62 147t147 61 147-61 61-147l0-105 52 0z m-260-431q28 0 48 20t20 47-20 48-48 20-47-20-20-48 20-47 47-20z m104 380l0 156q0 44-31 74t-73 30q-44 0-74-31t-31-73l0-156 209 0z" horiz-adv-x="729" />
|
||||
|
||||
<glyph glyph-name="renew" unicode="" d="M703 610q96 0 165-76t70-184-77-183-183-77q-22 0-37 15t-16 37 16 36 37 16q65 0 110 46t46 110-39 111-92 46l-108 0 66-68q15-15 15-37t-15-37-36-15-36 15l-194 194 194 193q15 15 36 15t36-15 15-37-15-37l-66-68 108 0z m-427-275q15 15 37 15t36-15l194-193-194-193q-15-15-36-15t-37 15-15 37 15 37l67 67-108 0q-96 0-166 77t-69 183 76 184 184 76q21 0 37-15t16-36-16-37-37-15q-65 0-111-46t-45-111 39-110 92-46l108 0-67 68q-15 15-15 36t15 37z" horiz-adv-x="938" />
|
||||
|
||||
<glyph glyph-name="userfolder" unicode="" d="M214 803c-30 0-57-24-60-53l-16-160 903 0-10 64c-6 23-35 42-65 42l-364 0c-29 0-70 17-91 38l-32 31c-21 21-62 38-92 38l-173 0z m-134-267c-18 0-32-15-30-34l49-515c2-21 19-38 41-38l885 0c21 0 39 17 41 38l49 515c2 19-13 34-31 34l-1004 0z m508-86c12 1 23-1 27-4 44-13 55-54 54-73-2-18-6-42-6-42 0 0 8-4 8-20-3-40-16-22-19-40-7-42-22-35-22-58 0-39 16-56 66-78 50-21 101-48 101-95l0-24-421 0 0 24c0 47 51 74 101 95 50 22 66 39 66 78 0 23-15 16-22 58-3 18-16 0-19 40 0 16 8 20 8 20 0 0-4 24-6 42-1 15 6 43 29 61 0 0 6 8 29 13 4 1 15 3 26 3z" horiz-adv-x="1133" />
|
||||
|
||||
<glyph glyph-name="addfolder" unicode="" d="M193 829c-29 0-56-24-60-53l-15-160 903 0-11 64c-6 23-35 42-64 42l-364 0c-29 0-71 17-92 38l-31 31c-21 21-63 38-92 38l-174 0z m-133-266c-18 0-33-16-31-34l49-516c2-21 20-37 41-37l886 0c21 0 39 16 40 37l50 516c1 18-13 34-31 34l-1004 0z m697-41l43 0 0-144 144 0 0-44-144 0 0-144-43 0 0 144-144 0 0 44 144 0 0 144z" horiz-adv-x="1133" />
|
||||
|
||||
<glyph glyph-name="newpass" unicode="" d="M147 834c-67 0-122-54-122-121l0-687c0-67 55-122 122-122l687 0c67 0 121 55 121 122l0 687c0 67-54 121-121 121l-687 0z m325-338l35 0 0-112 103 60 18-29-110-58 110-58-18-29-103 61 0-113-35 0 0 113-103-61-18 29 110 58-110 58 18 29 103-60 0 112z m296 0l35 0 0-112 103 60 18-29-110-58 110-58-18-29-103 61 0-113-35 0 0 113-103-61-18 29 110 58-110 58 18 29 103-60 0 112z m-595-2l35 0 0-112 103 61 18-30-110-57 110-58-18-29-103 60 0-112-35 0 0 112-103-60-18 29 110 58-110 57 18 30 103-61 0 112z" horiz-adv-x="966" />
|
||||
|
||||
<glyph glyph-name="crown" unicode="" d="M419 822c-39 0-71-32-71-72 0-40 32-72 71-72 39 0 74 32 74 72 0 40-35 72-74 72z m-48-222c-40-119-101-151-101-151s-52 145-109 231c-23-52-47-86-96-100-1-44 51-208 55-290l601 0c2 79 55 256 55 288-38 16-85 51-96 102-63-86-109-231-109-231s-61 32-101 151c-27-13-77-13-99 0z m-297 222c-40 0-74-32-74-72 0-40 34-72 74-72 39 0 70 32 70 72 0 40-31 72-70 72z m47-603l0-119 600 0c0 43 0 81 0 119z m644 603c-40 0-72-32-72-72 0-40 32-72 72-72 40 0 72 32 72 72 0 40-32 72-72 72z" horiz-adv-x="837" />
|
||||
|
||||
<glyph glyph-name="bat2" unicode="" d="M365 194q-21 0-37 15t-15 37l0 209q0 21 15 36t37 15 36-15 15-36l0-209q0-21-15-37t-36-15z m-156 0q-21 0-37 15t-16 37l0 209q0 21 16 36t37 15 36-15 15-36l0-209q0-21-15-37t-36-15z m676 312q44 0 74-30t31-73l0-104q0-44-31-75t-74-30q0-65-46-111t-110-45l-573 0q-65 0-110 45t-46 111l0 312q0 65 46 111t110 46l573 0q65 0 110-46t46-111z m-104-312l0 312q0 22-15 37t-37 16l-573 0q-21 0-37-16t-15-37l0-312q0-21 15-36t37-15l573 0q21 0 37 15t15 36z" horiz-adv-x="990" />
|
||||
|
||||
<glyph glyph-name="user" unicode="" d="M736 128q204-72 204-122l0-106-940 0 0 106q0 50 204 122 94 34 128 69t34 95q0 22-22 49t-32 73q-2 12-9 18t-14 8-14 17-9 43q0 16 5 26t9 12l4 4q-8 50-12 88-4 54 41 112t157 58 158-58 40-112l-12-88q18-8 18-42-2-28-9-43t-14-17-14-8-9-18q-8-48-31-74t-23-48q0-60 35-95t127-69z" horiz-adv-x="940" />
|
||||
|
||||
<glyph glyph-name="block" unicode="" d="M732 352q0 90-48 164l-421-420q76-50 166-50 62 0 118 25t96 65 65 97 24 119z m-557-167l421 421q-75 50-167 50-83 0-153-40t-110-111-41-153q0-91 50-167z m682 167q0-88-34-168t-91-137-137-92-166-34-167 34-137 92-91 137-34 168 34 167 91 137 137 91 167 34 166-34 137-91 91-137 34-167z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="home_folder" unicode="" d="M231 807c-30 0-57-24-60-54l-16-160 903 0-11 65c-6 23-34 42-64 42l-364 0c-29 0-70 17-91 38l-32 31c-21 21-62 38-92 38l-173 0z m-134-267c-18 0-32-16-31-34l50-515c2-22 19-38 41-38l885 0c21 0 39 16 41 38l49 515c2 18-13 34-31 34l-1004 0z m499-70c10 0 19-4 26-9l84-71 0 68c0 3 1 5 3 7 2 2 5 3 8 3l66 0c3 0 6-1 8-3 2-2 3-4 3-7l0-141 76-63c2-2 3-4 3-7 1-3 0-6-2-8l-21-26c-2-2-5-3-8-3l-1 0c-3 0-5 0-7 2l-238 199-238-199c-3-2-6-3-9-2-3 0-5 1-7 3l-21 26c-2 2-3 5-3 8 1 3 2 5 4 7l248 207c7 5 16 9 26 9z m0-90l198-163c0 0 0-1 0-2l0-165c0-6-2-11-6-16-5-4-10-6-16-6l-132 0 0 132-88 0 0-132-132 0c-6 0-12 2-16 6-4 5-6 10-6 16l0 165c0 0 0 1 0 1 0 1 0 1 0 1l198 163z" horiz-adv-x="1133" />
|
||||
|
||||
<glyph glyph-name="help-circled" unicode="" d="M500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 25 KiB |
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2012 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="location" unicode="" d="M429 493q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m143 0q0-61-18-100l-203-432q-9-18-27-29t-38-11-38 11-26 29l-204 432q-18 39-18 100 0 118 84 202t202 84 202-84 84-202z" horiz-adv-x="571.429" />
|
||||
<glyph glyph-name="fit" unicode="" d="M429 314l0-250q0-15-11-25t-25-11-25 11l-80 80-185-185q-6-6-13-6t-13 6l-64 64q-6 6-6 13t6 13l185 185-80 80q-11 11-11 25t11 25 25 11l250 0q15 0 25-11t11-25z m421 375q0-7-6-13l-185-185 80-80q11-11 11-25t-11-25-25-11l-250 0q-15 0-25 11t-11 25l0 250q0 15 11 25t25 11 25-11l80-80 185 185q6 6 13 6t13-6l64-64q6-6 6-13z" horiz-adv-x="857.143" />
|
||||
<glyph glyph-name="bold" unicode="" d="M310 1q42-18 78-18 73 0 121 23t68 63q21 39 21 101 0 64-23 100-32 52-79 70-45 18-138 18-41 0-56-6l0-80-1-97 2-151q0-8 7-25z m-8 416q24-4 61-4 98 0 147 36t50 125q0 62-47 104t-142 42q-29 0-73-7 0-25 1-43 4-68 3-156l-1-55q0-24 1-43z m-302-496l1 52q25 5 38 7 43 7 69 17 9 15 12 28 5 37 5 108l-1 277q-3 143-5 225-1 49-6 61-1 2-7 7-10 7-39 8-17 1-64 7l-2 46 145 3 212 7 25 1q3 0 8 0t8 0q1 0 12 0t23 0l41 0q49 0 107-15 24-7 54-22 32-16 57-42t36-58 12-68q0-39-18-71t-53-59q-15-11-84-43 99-23 149-81 51-59 51-132 0-42-16-90-12-35-40-65-37-40-78-60t-113-33q-46-8-110-6l-110 2q-47 1-166-6-18-2-152-6z" horiz-adv-x="785.714" />
|
||||
<glyph glyph-name="italic" unicode="" d="M0-77l9 47q2 1 43 11 42 11 65 22 16 21 23 56l15 78 31 150 7 36q4 25 9 47t9 37 7 26 5 17 2 6l16 88 9 35 12 75 4 28 0 21q-23 12-80 16-16 1-21 2l11 57 177-8q22-1 41-1 37 0 119 5 18 1 38 3t20 1q-1-11-3-21-4-16-7-28-31-11-61-17-36-9-56-17-7-17-13-49-5-25-7-46-25-111-37-171l-34-174-21-88-24-131-7-25q-1-4 1-15 36-8 66-12 20-3 37-6-1-16-4-32-4-17-5-23-10 0-13-1-13-1-23-1-5 0-16 2t-81 9l-110 1q-23 1-97-6-41-4-55-5z" horiz-adv-x="571.429" />
|
||||
<glyph glyph-name="justifyleft" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-714 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l714 0q15 0 25-11t11-25z m143 214l0-71q0-15-11-25t-25-11l-857 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l857 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-643 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l643 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="justifycenter" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-500 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l500 0q15 0 25-11t11-25z m143 214l0-71q0-15-11-25t-25-11l-786 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l786 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-357 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l357 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="justifyright" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-714 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l714 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-857 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l857 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-643 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l643 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="justifyfull" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="outdent" unicode="" d="M214 546l0-321q0-7-5-13t-13-5q-8 0-13 5l-161 161q-5 5-5 13t5 13l161 161q5 5 13 5 7 0 13-5t5-13z m786-429l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="indent" unicode="" d="M196 386q0-8-5-13l-161-161q-5-5-13-5-7 0-13 5t-5 13l0 321q0 7 5 13t13 5q8 0 13-5l161-161q5-5 5-13z m804-268l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="mode" unicode="" d="M429 46l0 607q-83 0-152-41t-110-110-41-152 41-152 110-110 152-41z m429 304q0-117-57-215t-156-156-215-57-215 57-156 156-57 215 57 215 156 156 215 57 215-57 156-156 57-215z" horiz-adv-x="857.143" />
|
||||
<glyph glyph-name="fullscreen" unicode="" d="M716 548l-198-198 198-198 80 80q16 17 39 8 22-9 22-33l0-250q0-15-11-25t-25-11l-250 0q-23 0-33 22-9 22 8 39l80 80-198 198-198-198 80-80q17-17 8-39t-33-22l-250 0q-15 0-25 11t-11 25l0 250q0 23 22 33 22 9 39-8l80-80 198 198-198 198-80-80q-11-11-25-11-7 0-13 3-22 9-22 33l0 250q0 15 11 25t25 11l250 0q23 0 33-22 9-22-8-39l-80-80 198-198 198 198-80 80q-17 17-8 39t33 22l250 0q15 0 25-11t11-25l0-250q0-23-22-33-7-3-14-3-15 0-25 11z" horiz-adv-x="857.143" />
|
||||
<glyph glyph-name="insertunorderedlist" unicode="" d="M214 64q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m0 286q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z m0 286l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="insertorderedlist" unicode="" d="M213-54q0-45-30-70t-76-26q-59 0-96 37l32 49q27-25 59-25 16 0 28 8t12 24q0 36-59 31l-15 31q4 6 18 24t24 30 21 21l0 1q-9 0-27-1t-27-1l0-30-59 0 0 85 186 0 0-49-53-64q28-7 45-27t17-49z m1 350l0-89-202 0q-3 20-3 30 0 28 13 52t32 38 37 27 32 24 13 25q0 14-8 21t-22 8q-26 0-45-32l-47 33q13 28 40 44t59 16q41 0 69-23t28-63q0-28-19-51t-42-36-42-28-20-29l71 0 0 33 59 0z m786-178l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 8 5 13t13 5l679 0q7 0 13-5t5-13z m-786 502l0-55-187 0 0 55 60 0q0 23 0 68t0 68l0 7-1 0q-4-9-28-30l-40 42 76 71 59 0 0-225 60 0z m786-216l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 8 5 13t13 5l679 0q7 0 13-5t5-13z m0 286l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="strikethrough" unicode="" d="M982 350q8 0 13-5t5-13l0-36q0-8-5-13t-13-5l-964 0q-8 0-13 5t-5 13l0 36q0 8 5 13t13 5l964 0z m-713 36q-16 20-28 45-27 54-27 105 0 101 75 172 74 71 219 71 28 0 93-11 37-7 99-27 6-21 12-66 8-69 8-102 0-10-3-25l-7-2-47 3-8 1q-28 83-57 114-49 51-117 51-64 0-102-33-37-32-37-81 0-41 37-78t156-72q39-11 97-37 32-16 53-29l-415 0z m283-143l229 0q4-22 4-51 0-62-23-118-13-31-40-58-21-20-61-45-45-27-85-37-45-12-113-12-64 0-109 13l-78 22q-32 9-40 16-4 4-4 12l0 7q0 60-1 87-1 17 0 38l1 21 0 25 57 1q8-19 17-40t13-31 7-15q20-32 45-52 24-20 59-32 33-12 74-12 36 0 78 15 43 15 68 48 26 34 26 72 0 47-45 88-19 16-76 40z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="underline" unicode="" d="M27 726q-21 1-25 2l-2 49q7 1 22 1 33 0 62-2 74-4 93-4 48 0 94 2 65 2 81 3 31 0 48 1l-1-8 1-36 0-5q-33-5-69-5-33 0-44-14-7-8-7-74 0-7 0-18t0-14l1-128 8-156q3-69 28-113 20-33 54-51 49-26 99-26 58 0 107 16 31 10 55 28 27 20 36 36 20 31 30 64 12 41 12 128 0 44-2 71t-6 68-8 89l-2 33q-3 37-13 49-19 20-43 19l-56-1-8 2 1 48 47 0 114-6q42-2 109 6l10-1q3-21 3-28 0-4-2-17-25-7-47-7-41-6-44-9-8-8-8-23 0-4 1-15t1-17q4-11 12-221 3-109-8-170-8-42-23-68-21-36-62-69-42-32-102-50-61-18-142-18-93 0-158 26-66 26-100 68t-46 109q-9 45-9 132l0 186q0 105-9 119-14 20-82 22z m830-786l0 36q0 8-5 13t-13 5l-821 0q-8 0-13-5t-5-13l0-36q0-8 5-13t13-5l821 0q8 0 13 5t5 13z" horiz-adv-x="857.143" />
|
||||
<glyph glyph-name="blockquote" unicode="" d="M429 671l0-393q0-58-23-111t-61-91-91-61-111-23l-36 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l36 0q59 0 101 42t42 101l0 18q0 22-16 38t-38 16l-125 0q-45 0-76 31t-31 76l0 214q0 45 31 76t76 31l214 0q45 0 76-31t31-76z m500 0l0-393q0-58-23-111t-61-91-91-61-111-23l-36 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l36 0q59 0 101 42t42 101l0 18q0 22-16 38t-38 16l-125 0q-45 0-76 31t-31 76l0 214q0 45 31 76t76 31l214 0q45 0 76-31t31-76z" horiz-adv-x="928.571" />
|
||||
<glyph glyph-name="undo" unicode="" d="M1000 225q0-93-71-252-2-4-6-13t-8-17-7-12q-7-9-16-9-8 0-13 6t-5 14q0 5 1 15t1 13q3 38 3 69 0 56-10 101t-27 77-45 56-59 39-74 24-86 12-98 3l-125 0 0-143q0-15-11-25t-25-11-25 11l-286 286q-11 11-11 25t11 25l286 286q11 11 25 11t25-11 11-25l0-143 125 0q398 0 488-225 30-75 30-186z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="code" unicode="" d="M344 69l-28-28q-6-6-13-6t-13 6l-260 260q-6 6-6 13t6 13l260 260q6 6 13 6t13-6l28-28q6-6 6-13t-6-13l-219-219 219-219q6-6 6-13t-6-13z m330 595l-208-720q-2-7-9-11t-13-1l-35 9q-7 2-11 9t-1 14l208 720q2 7 9 11t13 1l35-9q7-2 11-9t1-14z m367-363l-260-260q-6-6-13-6t-13 6l-28 28q-6 6-6 13t6 13l219 219-219 219q-6 6-6 13t6 13l28 28q6 6 13 6t13-6l260-260q6-6 6-13t-6-13z" horiz-adv-x="1071.429" />
|
||||
<glyph glyph-name="unlink" unicode="" d="M245 141l-143-143q-6-5-13-5t-13 5q-5 6-5 13t5 13l143 143q6 5 13 5t13-5q5-6 5-13t-5-13z m94-23l0-179q0-8-5-13t-13-5-13 5-5 13l0 179q0 8 5 13t13 5 13-5 5-13z m-125 125q0-8-5-13t-13-5l-179 0q-8 0-13 5t-5 13 5 13 13 5l179 0q8 0 13-5t5-13z m705-71q0-67-47-113l-82-81q-46-46-113-46-68 0-114 47l-186 187q-12 12-23 31l133 10 152-153q15-15 38-15t38 15l82 81q16 16 16 37 0 22-16 38l-153 153 10 133q20-12 31-23l187-187q47-48 47-114z m-344 404l-133-10-152 153q-16 16-38 16t-38-15l-82-81q-16-16-16-37 0-22 16-38l153-153-10-134q-20 12-31 23l-187 187q-47 48-47 114 0 67 47 113l82 81q46 46 113 46 68 0 114-47l186-187q12-12 23-31z m353-47q0-8-5-13t-13-5l-179 0q-8 0-13 5t-5 13 5 13 13 5l179 0q8 0 13-5t5-13z m-304 304l0-179q0-8-5-13t-13-5-13 5-5 13l0 179q0 8 5 13t13 5 13-5 5-13z m227-84l-143-143q-6-5-13-5t-13 5q-5 6-5 13t5 13l143 143q6 5 13 5t13-5q5-6 5-13t-5-13z" horiz-adv-x="928.571" />
|
||||
<glyph glyph-name="superscript" unicode="" d="M501 86l0-93-138 0-89 141-13 23q-4 5-6 12l-2 0-5-12q-6-11-14-25l-86-140-144 0 0 93 71 0 110 162-103 152-76 0 0 94 154 0 78-127q1-2 13-23 4-5 6-12l2 0q2 5 6 12l14 23 78 127 143 0 0-94-70 0-103-149 114-165 61 0z m355 379l0-115-287 0-2 15q-2 16-2 26 0 36 15 65t36 48 47 36 47 30 36 30 15 36q0 21-16 35t-39 14q-28 0-54-22-8-6-20-21l-59 51q15 21 35 37 46 36 105 36 61 0 99-33t38-88q0-31-14-57t-35-43-45-33-46-28-37-29-17-35l129 0 0 45 70 0z" horiz-adv-x="857.143" />
|
||||
<glyph glyph-name="subscript" unicode="" d="M501 86l0-93-138 0-89 141-13 23q-4 5-6 12l-2 0-5-12q-6-11-14-25l-86-140-144 0 0 93 71 0 110 162-103 152-76 0 0 94 154 0 78-127q1-2 13-23 4-5 6-12l2 0q2 5 6 12l14 23 78 127 143 0 0-94-70 0-103-149 114-165 61 0z m357-121l0-115-287 0-2 15q-2 25-2 26 0 36 15 65t36 48 47 36 47 30 36 30 15 36q0 21-16 35t-39 14q-28 0-54-22-8-6-20-21l-59 51q15 21 35 37 45 36 105 36 61 0 99-33t38-88q0-37-19-66t-47-48-56-35-49-35-23-41l129 0 0 45 70 0z" horiz-adv-x="857.143" />
|
||||
<glyph glyph-name="inserthorizontalrule" unicode="" d="M214 439l0-107q0-22-16-38t-38-16l-107 0q-22 0-38 16t-16 38l0 107q0 22 16 38t38 16l107 0q22 0 38-16t16-38z m286 0l0-107q0-22-16-38t-38-16l-107 0q-22 0-38 16t-16 38l0 107q0 22 16 38t38 16l107 0q22 0 38-16t16-38z m286 0l0-107q0-22-16-38t-38-16l-107 0q-22 0-38 16t-16 38l0 107q0 22 16 38t38 16l107 0q22 0 38-16t16-38z" horiz-adv-x="785.714" />
|
||||
<glyph glyph-name="pin" unicode="" d="M268 368l0 250q0 8-5 13t-13 5-13-5-5-13l0-250q0-8 5-13t13-5 13 5 5 13z m375-196q0-15-11-25t-25-11l-239 0-28-270q-1-7-6-11t-11-5l-1 0q-15 0-18 15l-42 271-225 0q-15 0-25 11t-11 25q0 69 44 124t99 55l0 286q-29 0-50 21t-21 50 21 50 50 21l357 0q29 0 50-21t21-50-21-50-50-21l0-286q55 0 99-55t44-124z" horiz-adv-x="642.857" />
|
||||
<glyph glyph-name="createlink" unicode="" d="M812 171q0 22-16 38l-116 116q-16 16-38 16-23 0-40-18 2-2 11-10t12-12 8-11 7-14 2-15q0-22-16-38t-38-16q-8 0-15 2t-14 7-11 8-12 12-10 11q-18-17-18-41 0-22 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-392 393q0 22-16 38l-115 116q-16 16-38 16t-38-15l-82-81q-16-16-16-37 0-22 16-38l116-116q15-15 38-15t40 17q-2 2-11 10t-12 12-8 11-7 14-2 15q0 22 16 38t38 16q8 0 15-2t14-7 11-8 12-12 10-11q18 17 18 41z m499-393q0-67-47-113l-82-81q-46-46-113-46-68 0-114 47l-115 116q-46 46-46 113 0 69 49 117l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 81q46 46 113 46 68 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.571" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 13 KiB |
|
@ -1,26 +0,0 @@
|
|||
/* Footer */
|
||||
body footer {
|
||||
padding: 25px 0 15px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
footer a#github {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
opacity: 0.5;
|
||||
font-size:32px;
|
||||
color:rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
footer a#github:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
footer #version {
|
||||
font-size: 0.8em;
|
||||
color: rgba(0,0,0,0.4);
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/* gallery */
|
||||
.gallery{padding:10px;text-align:center;}
|
||||
body .gallery h1{text-align:center;font-size:48px;}
|
||||
.image,.blank{
|
||||
display:inline-block;
|
||||
vertical-align: bottom;
|
||||
overflow: hidden;
|
||||
height: 256px;
|
||||
width:256px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.image img{border-radius: 3px;}
|
||||
.image .info{
|
||||
background-color:rgba(0,0,0,0.4);
|
||||
color:rgba(255,255,255,0.6);
|
||||
text-shadow: 0 1px 1px black;
|
||||
padding:10px;
|
||||
padding-top:20px;
|
||||
position: relative;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
word-wrap: break-word;
|
||||
width: 256px;
|
||||
height:256px;
|
||||
display: block;
|
||||
margin:0;
|
||||
border-radius:3px;
|
||||
opacity:0;
|
||||
|
||||
}
|
||||
.image:hover .info{top:-259px;opacity:100;}
|
||||
.image .info em{display:block;color:white;margin-bottom:5px;}
|
||||
.video{/*background:url(img/video.png) no-repeat;*/}
|
|
@ -1,282 +0,0 @@
|
|||
/* Header */
|
||||
body>header {
|
||||
min-height: 80px;
|
||||
background: #basic_color_neutral;/* change this color in style.php*/
|
||||
text-align: center;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.2);
|
||||
margin-bottom:20px;
|
||||
}
|
||||
#title_page{
|
||||
text-align:left;
|
||||
font-size:1.7em;
|
||||
color:rgba(255,255,255,0.9);
|
||||
padding-left:10px;
|
||||
display:block;
|
||||
margin:0;
|
||||
text-shadow: 0 1px 1px rgba(0,0,0,0.5)
|
||||
}
|
||||
#top_bar {
|
||||
background: rgba(0,0,0,0.4);
|
||||
margin-bottom: 5px;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
#top_bar a {line-height: 23px;}
|
||||
#top_bar a:hover {
|
||||
color: #hover_color_light;
|
||||
background-color: #hover_color_superdark!important;
|
||||
}
|
||||
|
||||
#top_bar #icons a {
|
||||
min-width: 22px;
|
||||
height: 22px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
#top_bar #icons {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#top_bar #icons a:hover {color:white;}
|
||||
#top_bar #icons a {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#top_bar #icons a,
|
||||
#top_bar #lang a {
|
||||
color: rgba(255,255,255,0.6);
|
||||
border: 1px solid rgba(0,0,0,0.2);
|
||||
border-left:none;
|
||||
}
|
||||
|
||||
#top_bar #lang {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#top_bar #lang a {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
min-width: 22px;height: 22px;
|
||||
width: auto;
|
||||
border-left: 1px solid rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
#top_bar #lang a.active {
|
||||
color: #fff;
|
||||
}
|
||||
#top_bar .profile_rights .icon-crown:before{vertical-align: sub;}
|
||||
#search {
|
||||
float: right;
|
||||
display: block;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
#search input[type=text]{
|
||||
margin-top: 3px;
|
||||
height: 28px;
|
||||
width: 5px;
|
||||
padding-left: 26px;
|
||||
background: #e9e9e9 url('../img/header/search.png') 8px center no-repeat;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#search input[type=text]:hover,
|
||||
#search input[type=text]:focus {
|
||||
width: 200px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#connect {
|
||||
clear: both;
|
||||
display: block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#connect #admin_button {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
vertical-align: middle;
|
||||
min-width: 22px;
|
||||
padding-left:20px;margin-right:5px;
|
||||
text-align: center;
|
||||
background: rgba(0,0,0,0.2) url('../img/header/user.png') 5px center no-repeat;
|
||||
color: rgba(255,255,255,0.7);
|
||||
float: right;
|
||||
}
|
||||
#connect #admin_button.superadmin{padding-left:5px;background-image:none;color:white;text-shadow:0 0 2px rgba(255,255,255,0.5);}
|
||||
#connect #admin_button.admin{padding-left:5px;background-image:none;}
|
||||
#connect #admin_button.user{padding-left:5px;background-image:none;}
|
||||
|
||||
#connect #logout_button,
|
||||
#connect #login_button {
|
||||
height: 22px;
|
||||
width: 22px;line-height: 25px;
|
||||
float: right;
|
||||
}
|
||||
#connect a:hover{
|
||||
background-color: #hover_color_dark!important;
|
||||
color:#hover_color_light!important;
|
||||
}
|
||||
|
||||
#connect #login_button{
|
||||
color:rgba(255,255,255,0.8);
|
||||
font-size:18px;line-height: 16px;
|
||||
}
|
||||
|
||||
#connect #logout_button:hover{color:white!important}
|
||||
#connect #logout_button {
|
||||
font-size: 20px;
|
||||
line-height: 18px;
|
||||
color:rgba(255,255,255,0.8);
|
||||
}
|
||||
|
||||
body.login #connect #login_button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#logo {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
/*height: 150px;*/
|
||||
padding-top: 118px;
|
||||
background: transparent url('../img/header/logo.png') center top no-repeat;
|
||||
color: #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/* Slogan seulement sur l'accueil */
|
||||
.slogan {
|
||||
display:none;
|
||||
}
|
||||
|
||||
body.home .slogan {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Dropzone */
|
||||
#upload.hidden, .info.hidden{
|
||||
max-height:0;
|
||||
opacity:0;
|
||||
transition: all 300ms;
|
||||
|
||||
}
|
||||
#upload{
|
||||
max-height:300px;
|
||||
opacity:100;
|
||||
overflow:hidden;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
.DD_dropzone {
|
||||
clear: both;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
padding-top: 118px;
|
||||
min-height: 100px;
|
||||
min-width: 300px;
|
||||
background: transparent url('../img/header/logo.png') center top no-repeat;
|
||||
}
|
||||
|
||||
.DD_uploading {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,5,0.8);
|
||||
}
|
||||
|
||||
.DD_uploading .DD_text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.DD_hover {
|
||||
background-color: #hover_color_neutral;
|
||||
}
|
||||
|
||||
.DD_text {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
margin-top: 15px;
|
||||
font-weight: bold;
|
||||
min-width: 300px;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
text-shadow: 0 1px 1px rgba(0,0,0,0.4);
|
||||
border:none;
|
||||
}
|
||||
|
||||
.DD_text em {
|
||||
font-size: 0.8em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.DD_file,.DD_error {
|
||||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
li.DD_success {
|
||||
background-color: rgba(0,255,0,0.8);
|
||||
}
|
||||
|
||||
li.DD_error {
|
||||
font-weight: bold;
|
||||
background-color: rgba(255,0,0,0.8);
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 1px rgba(155,0,0,0.8)
|
||||
}
|
||||
|
||||
li.DD_warning {
|
||||
font-weight: bold;
|
||||
background-color: rgba(255,150,0,0.8);
|
||||
color: #fff;
|
||||
line-height: 20px;
|
||||
text-shadow: 0 1px 1px rgba(155,80,0,0.8)
|
||||
}
|
||||
|
||||
.DD_info {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.DD_info li.DD_file {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#DD_progressbar {
|
||||
overflow: hidden;
|
||||
font-size: 0.8em;
|
||||
border-radius: 3px;
|
||||
padding: 3px 0;
|
||||
text-align: center;
|
||||
background: #bAd3ed;
|
||||
box-shadow: 0 0 3px #405bff;
|
||||
color: #000;
|
||||
height: 20px;
|
||||
width: 0%
|
||||
}
|
||||
|
||||
.DD_hidden{
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 0;
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
/* Home */
|
||||
#home {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#home a {
|
||||
color: #3e58f7;
|
||||
}
|
||||
|
||||
#home a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#home #center {
|
||||
text-align: center;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
#home #logos,
|
||||
#home .img {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#home #agpl {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#home #easy {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
#home #easy #notes div {
|
||||
width: 46%;
|
||||
margin: 0 2%;
|
||||
text-align: center;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#home #easy #notes img {
|
||||
width: 128px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#home #easy h2,
|
||||
#home #more h2 {
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#home #more {
|
||||
clear: both;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
#home #more ul li {
|
||||
display: block;
|
||||
margin: 0 4px 6px 4px;
|
||||
}
|
||||
|
||||
#home #more ul li:hover {
|
||||
background-color: #bAd3ed;
|
||||
box-shadow: 0px 0px 2px rgba(0, 126, 255, 0.5);
|
||||
}
|
||||
|
||||
#home #more ul li span {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#home #more ul li span.img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
#home #more ul li span.img img {
|
||||
height: inherit;
|
||||
display: inline;
|
||||
}
|
||||
.home header #title_page{display:none;}
|
|
@ -1,99 +0,0 @@
|
|||
@font-face {
|
||||
font-family: 'bozon';
|
||||
src: url('font/bozon.eot?8687479');
|
||||
src: url('font/bozon.eot?8687479#iefix') format('embedded-opentype'),
|
||||
url('font/bozon.woff?8687479') format('woff'),
|
||||
url('font/bozon.ttf?8687479') format('truetype'),
|
||||
url('font/bozon.svg?8687479#bozon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
/*
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'bozon';
|
||||
src: url('../font/bozon.svg?8687479#bozon') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "bozon";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
#admin .icon .icon-file:before { content: '\e808';color:rgba(0,0,0,0.8); font-size:64px;} /* '' */
|
||||
|
||||
|
||||
|
||||
.icon-search:before { content: '\e800'; } /* '' */
|
||||
.icon-video:before { content: '\e801'; } /* '' */
|
||||
.icon-th-large:before,.icon-icon:before { content: '\e802'; } /* '' */
|
||||
.icon-th-list:before,.icon-list:before { content: '\e803'; } /* '' */
|
||||
.icon-cancel-circled:before { content: '\e804'; } /* '' */
|
||||
.icon-info-circled:before { content: '\e805'; } /* '' */
|
||||
.icon-download-cloud:before { content: '\e806'; } /* '' */
|
||||
.icon-upload-cloud:before { content: '\e807'; } /* '' */
|
||||
.icon-doc-inv:before,.icon-view:before,.icon-file:before { content: '\e808'; } /* '' */
|
||||
.icon-doc-text-inv:before { content: '\e809'; } /* '' */
|
||||
.icon-rss-squared:before { content: '\e80a'; } /* '' */
|
||||
.icon-cog-alt:before { content: '\e80b'; } /* '' */
|
||||
.icon-logout:before { content: '\e80c'; } /* '' */
|
||||
.icon-angle-circled-left:before { content: '\e80d'; } /* '' */
|
||||
.icon-play:before { content: '\e80e'; } /* '' */
|
||||
.icon-stop:before { content: '\e80f'; } /* '' */
|
||||
.icon-pause:before { content: '\e810'; } /* '' */
|
||||
.icon-globe:before { content: '\e811'; } /* '' */
|
||||
.icon-align-left:before { content: '\e812'; } /* '' */
|
||||
.icon-qrcode:before { content: '\e813'; } /* '' */
|
||||
.icon-github-circled:before { content: '\e814'; } /* '' */
|
||||
.icon-users:before { content: '\e815'; } /* '' */
|
||||
.icon-user-add:before,.icon-admin:before { content: '\e816'; } /* '' */
|
||||
.icon-eye:before { content: '\e817'; } /* '' */
|
||||
.icon-folder-1:before { content: '\e818'; } /* '' */
|
||||
.icon-flow-tree:before { content: '\e819'; } /* '' */
|
||||
.icon-home:before { content: '\e81a'; } /* '' */
|
||||
.icon-folder-add:before { content: '\e829'; } /* '' */
|
||||
.icon-cancel-circled2:before { content: '\e81c'; } /* '' */
|
||||
.icon-pencil:before { content: '\e81d'; } /* '' */
|
||||
.icon-edit:before { content: '\e81e'; } /* '' */
|
||||
.icon-fire:before { content: '\e81f'; } /* '' */
|
||||
.icon-cancel-circle:before { content: '\e820'; } /* '' */
|
||||
.icon-left-circle:before { content: '\e821'; } /* '' */
|
||||
.icon-right-circle:before { content: '\e822'; } /* '' */
|
||||
.icon-trash:before { content: '\e823'; } /* '' */
|
||||
.icon-shuffle:before { content: '\e824'; } /* '' */
|
||||
.icon-link:before,.icon-links:before { content: '\e825'; } /* '' */
|
||||
.icon-lock:before { content: '\e826'; } /* '' */
|
||||
.icon-renew:before { content: '\e827'; } /* '' */
|
||||
.icon-userfolder:before { content: '\e828'; } /* '' */
|
||||
.icon-addfolder:before { content: '\e829'; } /* '' */
|
||||
.icon-newpass:before { content: '\e82a'; } /* '' */
|
||||
.icon-crown:before,.icon-superadmin:before { content: '\e82B'; } /* '' */
|
||||
.icon-bat2:before { content: '\e82c'; } /* '' */
|
||||
.icon-user:before { content: '\e82d'; } /* '' */
|
||||
.icon-block:before { content: '\e82e'; } /* '' */
|
||||
.icon-home_folder:before { content: '\e82f'; } /* '' */
|
||||
.icon-help-circled:before { content: '\e830'; } /* '' */
|
|
@ -1,149 +0,0 @@
|
|||
/* Initialisation */
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a {
|
||||
color: rgba(0,0,0,0.7);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color:#hover_color_light;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color:rgba(0,0,0,0.9);
|
||||
}
|
||||
|
||||
a:active{
|
||||
color:#333;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #basic_color_neutral;
|
||||
text-shadow:0 1px 1px #basic_color_superdark;
|
||||
font-size: 2em;
|
||||
margin: 20px auto;
|
||||
text-align: center;
|
||||
width: calc(100% - 8px);
|
||||
}
|
||||
body input[required].npt{
|
||||
padding-left:23px;
|
||||
background:url(../img/dialog/required.png) no-repeat 5px center rgba(255,255,255,0.8);
|
||||
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
body{
|
||||
min-width: 320px;
|
||||
background: #e9e9e9;
|
||||
font-family: verdana, sans-serif;
|
||||
}
|
||||
|
||||
.checked,.checked .table_buttons{
|
||||
background-color:#basic_color_dark!important;
|
||||
color:white!important;
|
||||
}
|
||||
.checked a{ color:white}
|
||||
.checked a:hover{ color:white!important;}
|
||||
.error{padding:20px;background-color:rgba(255,0,0,0.6);color:white;border-radius: 3px;}
|
||||
.error a{color:pink;}
|
||||
.error a:hover{color:white;}
|
||||
.npt{
|
||||
width: 400px;
|
||||
height: 35px;
|
||||
text-indent: 7px;
|
||||
margin-bottom: 7px;
|
||||
color: #85888b;
|
||||
border: 1px solid #d6ecfc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
border: 1px solid rgba(0,0,0,0.2);
|
||||
background-color: #basic_color_neutral;
|
||||
color: rgba(255,255,255,0.8);
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: #hover_color_neutral;
|
||||
|
||||
}
|
||||
.home .link_error{
|
||||
text-align: center;
|
||||
padding:10px;
|
||||
border-radius: 3px;
|
||||
background:url(../img/home/error_link.png) no-repeat top center;
|
||||
margin:5px;
|
||||
color:rgba(0,0,0,0.7);
|
||||
font-size:1.5em;
|
||||
padding-top:100px;
|
||||
}
|
||||
#submit {
|
||||
width: 200px;
|
||||
height: 35px;
|
||||
text-indent: 0;
|
||||
background: #basic_color_neutral;
|
||||
box-shadow: inset 0 0 15px #basic_color_dark;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.feeds{text-align:center;}
|
||||
/*.hidden{display:none;}*/
|
||||
|
||||
img, a, input, li, .DD_dropzone, .DD_dropzone *,
|
||||
label, .lang, #menu, #menu_icon, select,
|
||||
#search input, .image .info {
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
img:hover, a:hover, input:hover, li:hover,
|
||||
form:hover , .lang:hover, #menu_icon:hover,
|
||||
select:hover, #search input:hover,
|
||||
.image:hover .info {
|
||||
transition: all 300ms;
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#lb_overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
opacity:0;
|
||||
background: #000; /* IE 8 not support rgba */
|
||||
filter: alpha(opacity = 90); /* IE 8 not support opacity */
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
z-index: 9999;
|
||||
overflow:hidden;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
#lb_overlay iframe{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border:none;
|
||||
background:white;
|
||||
}
|
||||
#lb_nav{
|
||||
/*background:rgba(0,0,0,0.4);*/
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
left:0;
|
||||
width:100%;
|
||||
height:0;
|
||||
opacity:0;
|
||||
z-index: 1;
|
||||
|
||||
}
|
||||
#lb_content-info {
|
||||
background:rgba(0,0,0,0.4);
|
||||
line-height: 1.8em;
|
||||
font-size: 1.2em;
|
||||
display: block;
|
||||
width:auto;
|
||||
height: 40px;
|
||||
margin:auto;
|
||||
color:white;
|
||||
text-shadow:0 0 2px black;
|
||||
text-align:center;
|
||||
}
|
||||
#lb_close{
|
||||
background:url(../img/lightbox/close_white.png) no-repeat center center;
|
||||
width:32px;height:32px;
|
||||
z-index: 10000;
|
||||
float:right;
|
||||
cursor:pointer;
|
||||
margin-top: 3px;
|
||||
}
|
||||
#lb_next,#lb_prev{
|
||||
width:32px;height:32px; margin-top: 3px;
|
||||
z-index: 10000;
|
||||
float:left;
|
||||
cursor:pointer;
|
||||
}
|
||||
#lb_next:hover,#lb_prev:hover{background-color:rgba(0,0,0,0.7);}
|
||||
#lb_next{
|
||||
background:url(../img/lightbox/next.png) no-repeat center center;
|
||||
}
|
||||
#lb_prev{
|
||||
background:url(../img/lightbox/prev.png) no-repeat center center;
|
||||
}
|
||||
#lb_content {
|
||||
max-height: 100%; transition: all 300ms; height:100%;
|
||||
}
|
||||
|
||||
#lb_content img {
|
||||
transition: all 300ms;
|
||||
/* Keeps image from going outside the screen */
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
/* Keeps image from beeing distorted */
|
||||
height: auto;
|
||||
width: auto;
|
||||
/* centering horizontally AND vertically */
|
||||
/* 50% of container */
|
||||
position: relative;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
/* 50% of image */
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
|
@ -1,322 +0,0 @@
|
|||
/* List */
|
||||
/*
|
||||
Aucun fichier:
|
||||
.icon et .list ayant un min-height à 200px, on fixe ici la hauteur pour center le message verticalement
|
||||
*/
|
||||
#nofile {
|
||||
height: 200px;
|
||||
line-height: 200px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.free_space_text{padding:10px;}
|
||||
#admin #more_button{
|
||||
display:block;
|
||||
max-width:200px;
|
||||
margin:20px auto;
|
||||
text-align:center;
|
||||
transition: all 400ms;
|
||||
}
|
||||
#admin .loading{background-color:#0F3; color:#050;transition: all 400ms;}
|
||||
#async_loading{transition: all 400ms;}
|
||||
#nb_items{display:inline-block;}
|
||||
/*
|
||||
* Vue en listes
|
||||
*/
|
||||
|
||||
/* afficher les actions au survol d'un fichier ou dossier de la liste */
|
||||
#admin .list table {
|
||||
width:100%; border-collapse: collapse
|
||||
}
|
||||
#admin .list table thead th{
|
||||
padding-top:10px;
|
||||
font-size: 1.3em;text-align: left;
|
||||
}
|
||||
#admin .list table thead th.sorttable_sorted{
|
||||
font-weight:bold;
|
||||
}
|
||||
#admin .list td.table_check {
|
||||
width:10px;vertical-align: middle
|
||||
}
|
||||
#admin .list td.table_image {
|
||||
width:20px;
|
||||
text-align: center;
|
||||
}
|
||||
#admin .list td.table_filename {
|
||||
|
||||
}
|
||||
#admin .list td.table_filesize {
|
||||
|
||||
}
|
||||
#admin .list td.table_buttons {
|
||||
background-color:#basic_color_light;
|
||||
}
|
||||
#admin .list td.table_buttons:empty {
|
||||
background-color:transparent;
|
||||
}
|
||||
#admin .list td{padding: 3px;}
|
||||
#admin .list td a.back,#admin .list td a.root{display:block;font-size:1.4em;width:100%;font-weight: bolder}
|
||||
|
||||
|
||||
/* les listes */
|
||||
#admin .list tr, #admin #Users_list li{
|
||||
min-height: 26px;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
word-spacing: word-wrap;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
z-index: 1;
|
||||
border-top:1px solid rgba(0,0,0,0.1);
|
||||
}
|
||||
#admin #Users_list li label{display:inline-block;width:90%;cursor:pointer;}
|
||||
#admin #Users_list li:hover{background:transparent}
|
||||
#admin #Users_list li{
|
||||
cursor:default;
|
||||
text-align:left;
|
||||
height:26px;
|
||||
display:block;
|
||||
width:auto;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#admin .list tr a:hover{color:#hover_color_dark;}
|
||||
#admin .list tr a {
|
||||
max-height: 30px;
|
||||
width: 100%;
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#admin .list tr a img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
margin: auto;
|
||||
border-radius: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Vue en listes et en icones
|
||||
*/
|
||||
|
||||
#admin .icon #folder_size{text-align:center;margin-top:20px;}
|
||||
|
||||
#admin .list,
|
||||
#admin .icon {
|
||||
padding: 0;
|
||||
min-height: 200px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#admin .list .folder,
|
||||
#admin .icon .folder {
|
||||
background: rgba(0,50,100,0.1);
|
||||
}
|
||||
#admin .list .folder .table_image{
|
||||
font-size:18px;
|
||||
|
||||
}
|
||||
|
||||
#admin .list .folder .over,
|
||||
#admin .icon .folder .over {
|
||||
color: rgba(0,0,0,0.5);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#admin .list tr:hover{background-color:#hover_color_light;}
|
||||
#admin .icon li:hover {
|
||||
background-color:#hover_color_neutral;
|
||||
}
|
||||
|
||||
#admin .list tr.burn .table_buttons{background-color: rgba(200,10,0,0.5)}
|
||||
#admin .list tr.burn,
|
||||
#admin .icon li.burn {
|
||||
background-color: rgba(255,10,0,0.5) ;
|
||||
}
|
||||
|
||||
#admin .list tr.burn:hover,
|
||||
#admin .icon li.burn:hover {
|
||||
background-color: rgba(255,10,0,0.2) !important;
|
||||
box-shadow: 0 0 2px rgba(255,10,0,0.5);
|
||||
}
|
||||
|
||||
#admin .list tr.locked .table_buttons{background-color: rgba(0,126,200,0.5)}
|
||||
#admin .list tr.locked,
|
||||
#admin .icon li.locked {
|
||||
background-color: rgba(0,126,255,0.5);
|
||||
}
|
||||
|
||||
#admin .list tr.locked:hover,
|
||||
#admin .icon li.locked:hover {
|
||||
background-color: rgba(0,126,255,0.2) !important;
|
||||
box-shadow: 0 0 2px rgba(0,100,255,0.5);
|
||||
}
|
||||
|
||||
|
||||
.links .list tr:hover{background-color: #hover_color_light;}
|
||||
.links .icon li:hover {
|
||||
background-color: #hover_color_neutral !important;
|
||||
}
|
||||
|
||||
.shared_folder a{color:rgba(0,0,0,0.5)!important;}
|
||||
.shared_folder a:hover{color:rgba(0,0,0,0.8)!important;}
|
||||
.shared_folder .owner{color:rgba(0,50,100,0.5)!important;}
|
||||
.shared_folder,.shared_folder .table_buttons{
|
||||
background: rgba(0,50,100,0.2)!important;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#admin .list tr .table_buttons a:hover,#admin .icon li .buttons a:hover{color:rgba(255,255,255,1);}
|
||||
#admin .list tr .table_buttons a{
|
||||
display:inline-block;
|
||||
line-height: 100%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 3px;
|
||||
font-size: 18px;
|
||||
color:rgba(255,255,255,0.6);
|
||||
}
|
||||
#admin .icon li .buttons a {
|
||||
display: none;
|
||||
line-height: 100%;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
margin: 1px;
|
||||
color:rgba(255,255,255,0.6);
|
||||
}
|
||||
|
||||
#admin .icon li:hover .buttons {
|
||||
background-color: #hover_color_dark;
|
||||
padding:3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#admin .list tr:hover .buttons *,
|
||||
#admin .icon li:hover .buttons * {
|
||||
display: inline-block;
|
||||
}
|
||||
#admin .blue{color:rgba(0,100,255,0.7);}
|
||||
#admin .blue:hover{color:rgba(0,100,255,1);}
|
||||
|
||||
|
||||
#admin .icon .folder span{display:block;font-size:64px;}
|
||||
#admin .icon .folder span.owner{font-size:1em;}
|
||||
|
||||
#admin .icon .folder .buttons span{font-size:14px;}
|
||||
#admin .table_image{font-size:18px;}
|
||||
#admin .ext{overflow:hidden;}
|
||||
#admin .table_image .ext em{
|
||||
font-size:7px;
|
||||
color:white;
|
||||
position:absolute;
|
||||
margin-left: -16px;
|
||||
margin-top: 10px;
|
||||
width: 17px;
|
||||
overflow: hidden;
|
||||
height: 10px;
|
||||
}
|
||||
#admin .icon .ext em{
|
||||
font-size:18px;
|
||||
color:white;
|
||||
position:absolute;
|
||||
margin-left: 42px;
|
||||
margin-top: -30px;
|
||||
width: 45px;
|
||||
overflow: hidden;
|
||||
height: 23px;
|
||||
text-align: left;
|
||||
}
|
||||
td.burn {background-image: url('../img/list/burn.png') !important;
|
||||
background-position: center center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
td.locked,li.locked {background-image: url('../img/list/locked.png') !important;
|
||||
background-position: center center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
|
||||
/* extensions */
|
||||
|
||||
.zip:before,.rar:before,.gz:before,.tgz:before {color:rgba(255,180,0,0.9)!important;}
|
||||
.zip em,.rar em,.gz em,.tgz em {color:rgba(0,0,0,0.5)!important;}
|
||||
|
||||
.txt:before,.ini:before,.nfo:before, .css:before, .md:before {color:rgba(100,100,100,0.9)!important;}
|
||||
|
||||
.doc:before,.odt:before,.odg:before,.xdoc:before {color:rgba(0,0,255,0.8)!important;}
|
||||
.pdf:before{color:rgba(200,0,0,0.8)!important;}
|
||||
.xls:before{color:rgba(130,130,130,0.8)!important;}
|
||||
.css:before{color:rgba(0,200,0,0.7)!important;}
|
||||
.js:before {color:rgba(0,100,250,0.5)!important;}
|
||||
.swf:before{color:rgba(100,0,100,0.5)!important;}
|
||||
.mp3:before{color:rgba(0,100,200,0.9)!important;}
|
||||
.ogg:before{color:rgba(0,150,200,0.9)!important;}
|
||||
.mp4:before,.flv:before, .avi:before, .mkv:before {color:rgba(150,0,20,0.9)!important;}
|
||||
.php:before, .sphp:before {color:rgba(150,0,150,0.9)!important;}
|
||||
.html:before,.htm:before,.shtml:before,.shtm:before {color:rgba(0,200,100,0.9)!important;}
|
||||
.exe:before,.bat:before,.iso:before,.bin:before{color:rgba(50,50,100,0.6)!important;}
|
||||
|
||||
/*
|
||||
* Vue en icones
|
||||
*/
|
||||
|
||||
#admin .icon li {
|
||||
width: 132px;
|
||||
height: 132px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
font-size: 12px;
|
||||
border-radius: 3px;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
word-spacing: word-wrap;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
|
||||
}
|
||||
|
||||
#admin .icon li .buttons {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#admin .icon li a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#admin .icon li>em {
|
||||
font-style: italic;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#admin .icon li a em {
|
||||
max-height: 30px;
|
||||
font-style: normal;
|
||||
margin-bottom: 3px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#admin .icon li a img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
display: block;
|
||||
margin: auto;
|
||||
border-radius: 2px;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* Lock */
|
||||
#lock #message {
|
||||
margin: 20px auto;
|
||||
text-align: center;
|
||||
width: calc(100% - 8px);
|
||||
}
|
||||
#lock #message img {display:block;margin:auto;}
|
||||
#lock form {
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#lock form input:not(#submit) {
|
||||
width: 400px;
|
||||
height: 35px;
|
||||
text-indent: 7px;
|
||||
margin-bottom: 7px;
|
||||
color: #85888b;
|
||||
border: 1px solid #d6ecfc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#lock form #submit {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/* Login */
|
||||
#login #form {
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#login #form .error,
|
||||
#login #form .success {
|
||||
font-size: 0.8em;
|
||||
margin-bottom: 2px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
/*
|
||||
#login #form .error {
|
||||
color: #e82110;
|
||||
}
|
||||
|
||||
#login #form .success {
|
||||
color: #87c540;
|
||||
}*/
|
||||
|
||||
#login #form #user {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
#login #form input:not(#submit) {
|
||||
width: 400px;
|
||||
height: 35px;
|
||||
text-indent: 7px;
|
||||
margin-bottom: 7px;
|
||||
color: #85888b;
|
||||
border: 1px solid #d6ecfc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#login #form #cookie {
|
||||
width: 20px !important; /* force, mauvaise interprétation de firefox avec :not(#submit) ci-dessus */
|
||||
float: left;
|
||||
}
|
||||
|
||||
#login #form label {
|
||||
display: block;
|
||||
width: 160px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
vertical-align: bottom;
|
||||
font-size: 0.8em;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#login #form #submit {
|
||||
float: right;
|
||||
}
|
|
@ -1,425 +0,0 @@
|
|||
/*
|
||||
This document has been created with Marked.app <http://marked2app.com>, Copyright 2013 Brett Terpstra
|
||||
Content is property of the document author
|
||||
Please leave this notice in place, along with any additional credits below.
|
||||
---------------------------------------------------------------
|
||||
Title: GitHub
|
||||
Author: Brett Terpstra
|
||||
Description: Github README style. Includes theme for Pygmentized code blocks.
|
||||
*/
|
||||
html, .markdown {
|
||||
color: black; }
|
||||
.markdown {padding:20px;margin:20px auto;max-width:1024px;border:1px solid #ddd;background:url(img/noise.png);}
|
||||
.markdown *:not('#mkdbuttons') {
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.markdown #wrapper {
|
||||
font: 15px helvetica,arial,freesans,clean,sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
line-height: 1.7;
|
||||
padding: 3px;
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px; }
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0; }
|
||||
|
||||
.markdown a {
|
||||
color: #4183c4;
|
||||
text-decoration: none; }
|
||||
|
||||
.markdown #wrapper {
|
||||
background-color: #fff;
|
||||
padding: 30px;
|
||||
margin: 15px;
|
||||
font-size: 15px;
|
||||
line-height: 1.6; }
|
||||
.markdown #wrapper > *:first-child {
|
||||
margin-top: 0 !important; }
|
||||
.markdown #wrapper > *:last-child {
|
||||
margin-bottom: 0 !important; }
|
||||
|
||||
@media screen {
|
||||
.markdown #wrapper {
|
||||
box-shadow: 0 0 0 1px #cacaca, 0 0 0 4px #eee; } }
|
||||
.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 {
|
||||
font-weight: 700;
|
||||
line-height: 1.7;
|
||||
cursor: text;
|
||||
position: relative;
|
||||
margin: 1em 0 15px;
|
||||
padding: 0; }
|
||||
.markdown i{font-style:italic;}
|
||||
.markdown b{font-weight:bold;}
|
||||
.markdown h1 {
|
||||
font-size: 2.5em;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #eee; }
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 1.5em; }
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 1.2em; }
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 1em; }
|
||||
|
||||
.markdown h6 {
|
||||
color: #777;
|
||||
font-size: 1em; }
|
||||
|
||||
.markdown p, .markdown blockquote, .markdown table, .markdown pre {
|
||||
margin: 15px 0; }
|
||||
|
||||
.markdown ul {
|
||||
padding-left: 30px; }
|
||||
.markdown ul li {
|
||||
list-style-type: disc!important; }
|
||||
|
||||
.markdown ol {
|
||||
padding-left: 30px; }
|
||||
.markdown ol li ul:first-of-type {
|
||||
margin-top: 0px; }
|
||||
|
||||
.markdown hr {
|
||||
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;
|
||||
border: 0 none;
|
||||
color: #ccc;
|
||||
height: 4px;
|
||||
margin: 15px 0;
|
||||
padding: 0; }
|
||||
|
||||
.markdown #wrapper > h2:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
.markdown #wrapper > h1:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
#wrapper > h1:first-child + h2 {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
.markdown #wrapper > h3:first-child, #wrapper > h4:first-child, #wrapper > h5:first-child, #wrapper > h6:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
|
||||
.markdown a:first-child h1, .markdown a:first-child h2, .markdown a:first-child h3, .markdown a:first-child h4, .markdown a:first-child h5, .markdown a:first-child h6 {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
|
||||
.markdown h1 + p, .markdown h2 + p, .markdown h3 + p, .markdown h4 + p, .markdown h5 + p, .markdown h6 + p, .markdown ul li > :first-child, .markdown ol li > :first-child {
|
||||
margin-top: 0; }
|
||||
|
||||
.markdown dl {
|
||||
padding: 0; }
|
||||
.markdown dl dt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
padding: 0;
|
||||
margin: 15px 0 5px; }
|
||||
.markdown dl dt:first-child {
|
||||
padding: 0; }
|
||||
.markdown dl dt > :first-child {
|
||||
margin-top: 0; }
|
||||
.markdown dl dt > :last-child {
|
||||
margin-bottom: 0; }
|
||||
.markdown dl dd {
|
||||
margin: 0 0 15px;
|
||||
padding: 0 15px; }
|
||||
.markdown dl dd > :first-child {
|
||||
margin-top: 0; }
|
||||
.markdown dl dd > :last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.markdown blockquote {
|
||||
border-left: 4px solid #DDD;
|
||||
padding: 0 15px;
|
||||
color: #777; }
|
||||
.markdown blockquote > :first-child {
|
||||
margin-top: 0; }
|
||||
.markdown blockquote > :last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.markdown table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
font-size: 100%;
|
||||
font: inherit; }
|
||||
.markdown table th {
|
||||
font-weight: bold;
|
||||
border: 1px solid #ccc;
|
||||
padding: 6px 13px; }
|
||||
.markdown table td {
|
||||
border: 1px solid #ccc;
|
||||
padding: 6px 13px; }
|
||||
.markdown table tr {
|
||||
border-top: 1px solid #ccc;
|
||||
background-color: #fff; }
|
||||
.markdown table tr:nth-child(2n) {
|
||||
background-color: #f8f8f8; }
|
||||
|
||||
.markdown img {
|
||||
max-width: 100%; }
|
||||
|
||||
.markdown code, .markdown tt {
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #eaeaea;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 3px;
|
||||
font-family: Consolas, 'Liberation Mono', Courier, monospace;
|
||||
font-size: 12px;
|
||||
color: #333333; }
|
||||
|
||||
.markdown pre > code {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
border: none;
|
||||
background: transparent; }
|
||||
|
||||
.markdown .highlight pre {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 13px;
|
||||
line-height: 19px;
|
||||
overflow: auto;
|
||||
padding: 6px 10px;
|
||||
border-radius: 3px; }
|
||||
|
||||
.markdown pre {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 14px;
|
||||
line-height: 19px;
|
||||
overflow: auto;
|
||||
padding: 6px 10px;
|
||||
border-radius: 3px;
|
||||
margin: 26px 0; }
|
||||
.markdown pre code, .markdown pre tt {
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.markdown .poetry pre {
|
||||
font-family: Georgia, Garamond, serif !important;
|
||||
font-style: italic;
|
||||
font-size: 110% !important;
|
||||
line-height: 1.6em;
|
||||
display: block;
|
||||
margin-left: 1em; }
|
||||
.markdown .poetry pre code {
|
||||
font-family: Georgia, Garamond, serif !important;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
/* Non standard for webkit */
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
white-space: pre-wrap; }
|
||||
|
||||
.markdown sup, .markdown sub, .markdown a.footnote {
|
||||
font-size: 1.4ex;
|
||||
height: 0;
|
||||
line-height: 1;
|
||||
vertical-align: super;
|
||||
position: relative; }
|
||||
|
||||
.markdown sub {
|
||||
vertical-align: sub;
|
||||
top: -1px; }
|
||||
|
||||
@media print {
|
||||
.markdown {
|
||||
background: #fff; }
|
||||
|
||||
.markdown img, .markdown pre, .markdown blockquote, .markdown table, .markdown figure {
|
||||
page-break-inside: avoid; }
|
||||
|
||||
.markdown #wrapper {
|
||||
background: #fff;
|
||||
border: none; }
|
||||
|
||||
.markdown pre code {
|
||||
overflow: visible; } }
|
||||
@media screen {
|
||||
body.inverted {
|
||||
color: #eee !important;
|
||||
border-color: #555;
|
||||
box-shadow: none; }
|
||||
|
||||
.inverted #wrapper, .inverted hr, .inverted p, .inverted td, .inverted li, .inverted h1, .inverted h2, .inverted h3, .inverted h4, .inverted h5, .inverted h6, .inverted th, .inverted .math, .inverted caption, .inverted dd, .inverted dt, .inverted blockquote {
|
||||
color: #eee !important;
|
||||
border-color: #555;
|
||||
box-shadow: none; }
|
||||
.inverted td, .inverted th {
|
||||
background: #333; }
|
||||
.inverted pre, .inverted code, .inverted tt {
|
||||
background: #eeeeee !important;
|
||||
color: #111; }
|
||||
.inverted h2 {
|
||||
border-color: #555555; }
|
||||
.inverted hr {
|
||||
border-color: #777;
|
||||
border-width: 1px !important; }
|
||||
|
||||
.markdown ::selection {
|
||||
background: rgba(157, 193, 200, 0.5); }
|
||||
|
||||
.markdown h1::selection {
|
||||
background-color: rgba(45, 156, 208, 0.3); }
|
||||
|
||||
.markdown h2::selection {
|
||||
background-color: rgba(90, 182, 224, 0.3); }
|
||||
|
||||
.markdown h3::selection, .markdown h4::selection, .markdown h5::selection, .markdown h6::selection, .markdown li::selection, .markdown ol::selection {
|
||||
background-color: rgba(133, 201, 232, 0.3); }
|
||||
|
||||
.markdown code::selection {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
color: #eeeeee; }
|
||||
.markdown code span::selection {
|
||||
background-color: rgba(0, 0, 0, 0.7) !important;
|
||||
color: #eeeeee !important; }
|
||||
|
||||
.markdown a::selection {
|
||||
background-color: rgba(255, 230, 102, 0.2); }
|
||||
|
||||
.inverted a::selection {
|
||||
background-color: rgba(255, 230, 102, 0.6); }
|
||||
|
||||
.markdown td::selection, .markdown th::selection, .markdown caption::selection {
|
||||
background-color: rgba(180, 237, 95, 0.5); }
|
||||
|
||||
.inverted {
|
||||
background: #0b2531;
|
||||
background: #252a2a; }
|
||||
.inverted #wrapper {
|
||||
background: #252a2a; }
|
||||
.inverted a {
|
||||
color: #acd1d5; } }
|
||||
.markdown .highlight .c {
|
||||
color: #998;
|
||||
font-style: italic; }
|
||||
.markdown .highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.markdown .highlight .k, .highlight .o {
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .cm {
|
||||
color: #998;
|
||||
font-style: italic; }
|
||||
.markdown .highlight .cp {
|
||||
color: #999;
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .c1 {
|
||||
color: #998;
|
||||
font-style: italic; }
|
||||
.markdown .highlight .cs {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.markdown .highlight .gd {
|
||||
color: #000;
|
||||
background-color: #fdd; }
|
||||
.markdown .highlight .gd .x {
|
||||
color: #000;
|
||||
background-color: #faa; }
|
||||
.markdown .highlight .ge {
|
||||
font-style: italic; }
|
||||
.markdown .highlight .gr {
|
||||
color: #a00; }
|
||||
.markdown .highlight .gh {
|
||||
color: #999; }
|
||||
.markdown .highlight .gi {
|
||||
color: #000;
|
||||
background-color: #dfd; }
|
||||
.markdown .highlight .gi .x {
|
||||
color: #000;
|
||||
background-color: #afa; }
|
||||
.markdown .highlight .go {
|
||||
color: #888; }
|
||||
.markdown .highlight .gp {
|
||||
color: #555; }
|
||||
.markdown .highlight .gs {
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .gu {
|
||||
color: #800080;
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .gt {
|
||||
color: #a00; }
|
||||
.markdown .highlight .kc, .markdown .highlight .kd, .markdown .highlight .kn, .markdown .highlight .kp, .markdown .highlight .kr {
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .kt {
|
||||
color: #458;
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .m {
|
||||
color: #099; }
|
||||
.markdown .highlight .s {
|
||||
color: #d14; }
|
||||
.markdown .highlight .na {
|
||||
color: #008080; }
|
||||
.markdown .highlight .nb {
|
||||
color: #0086B3; }
|
||||
.markdown .highlight .nc {
|
||||
color: #458;
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .no {
|
||||
color: #008080; }
|
||||
.markdown .highlight .ni {
|
||||
color: #800080; }
|
||||
.markdown .highlight .ne, .highlight .nf {
|
||||
color: #900;
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .nn {
|
||||
color: #555; }
|
||||
.markdown .highlight .nt {
|
||||
color: #000080; }
|
||||
.markdown .highlight .nv {
|
||||
color: #008080; }
|
||||
.markdown .highlight .ow {
|
||||
font-weight: bold; }
|
||||
.markdown .highlight .w {
|
||||
color: #bbb; }
|
||||
.markdown .highlight .mf, .markdown .highlight .mh, .markdown .highlight .mi, .markdown .highlight .mo {
|
||||
color: #099; }
|
||||
.markdown .highlight .sb, .markdown .highlight .sc, .markdown .highlight .sd, .markdown .highlight .s2, .markdown .highlight .se, .markdown .highlight .sh, .markdown .highlight .si, .markdown .highlight .sx {
|
||||
color: #d14; }
|
||||
.markdown .highlight .sr {
|
||||
color: #009926; }
|
||||
.markdown .highlight .s1 {
|
||||
color: #d14; }
|
||||
.markdown .highlight .ss {
|
||||
color: #990073; }
|
||||
.markdown .highlight .bp {
|
||||
color: #999; }
|
||||
.markdown .highlight .vc, .highlight .vg, .highlight .vi {
|
||||
color: #008080; }
|
||||
.markdown .highlight .il {
|
||||
color: #099; }
|
||||
.markdown .highlight .gc {
|
||||
color: #999;
|
||||
background-color: #EAF2F5; }
|
||||
|
||||
.markdown .type-csharp .highlight .k, .markdown .type-csharp .highlight .kt {
|
||||
color: #00F; }
|
||||
.markdown .type-csharp .highlight .nf {
|
||||
color: #000;
|
||||
font-weight: normal; }
|
||||
.markdown .type-csharp .highlight .nc {
|
||||
color: #2B91AF; }
|
||||
.markdown .type-csharp .highlight .nn {
|
||||
color: #000; }
|
||||
.markdown .type-csharp .highlight .s, .type-csharp .highlight .sc {
|
||||
color: #A31515; }
|
||||
|
||||
body.dark #wrapper {
|
||||
background: transparent !important;
|
||||
box-shadow: none !important; }
|
|
@ -1,55 +0,0 @@
|
|||
/* Mobile */
|
||||
@media screen and (max-width:480px) {
|
||||
/* Ini */
|
||||
#submit {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
#search {
|
||||
float: left;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
#search input[type=text]:hover,
|
||||
#search input[type=text]:focus {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
/* Login */
|
||||
#login #form {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#login #form input:not(#submit) {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#login #form label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
#login #form #cookie {
|
||||
margin-top: 12px;
|
||||
display: inline-block !important;
|
||||
width: 20px !important;
|
||||
height: 20px;
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
/* Stats */
|
||||
#stats table th.ip,
|
||||
#stats table td.ip,
|
||||
#stats table th.origin,
|
||||
#stats table td.origin,
|
||||
#stats table th.host,
|
||||
#stats table td.host {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Dialog */
|
||||
div.dialog figure .closemsg,
|
||||
div.dialog figure figcaption {
|
||||
width: 280px;
|
||||
}
|
||||
}
|
|
@ -1,205 +0,0 @@
|
|||
/* music player */
|
||||
.audiojs audio {
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
}
|
||||
.audiojs {
|
||||
cursor:default;
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
/*background-color:#405bff;border-color:#05E;box-shadow: 0 1px 1px #04d;*/
|
||||
overflow: hidden;
|
||||
border-top:1px solid rgba(0,0,0,0.2);
|
||||
border-bottom:1px solid rgba(0,0,0,0.2);
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
margin-bottom:20px;
|
||||
display: inline-flex;
|
||||
x-justify-content: space-around;
|
||||
x-align-items: stretch;
|
||||
}
|
||||
.audiojs .play-pause:hover {background-color:rgba(0,100,255,0.2);}
|
||||
.audiojs .play-pause {
|
||||
flex: 0 0 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
padding: 4px 6px;
|
||||
margin: 0px;
|
||||
|
||||
overflow: hidden;
|
||||
cursor:pointer;
|
||||
background-color:rgba(0,0,0,0.1);
|
||||
}
|
||||
.audiojs p {
|
||||
display: none;
|
||||
width: 25px;
|
||||
height: 40px;
|
||||
margin: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.audiojs .play {
|
||||
display: block;
|
||||
}
|
||||
.audiojs .scrubber {
|
||||
cursor:pointer;
|
||||
position: relative;
|
||||
width:100%;
|
||||
background: rgba(0,0,0,0.1);
|
||||
height: 14px;
|
||||
margin: 10px;
|
||||
border-top: 1px solid rgba(0,0,0,0.3);
|
||||
border-left: 0px;
|
||||
border-bottom: 0px;
|
||||
overflow: hidden;
|
||||
border-radius:3px;
|
||||
}
|
||||
.audiojs .progress {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
height: 13px;
|
||||
width: 0px;
|
||||
background: rgba(0,0,0,0.1);
|
||||
border-radius: 0 4px 4px 0;
|
||||
box-shadow:inset 0 0 2px 2px rgba(255,255,255,0.1);
|
||||
z-index: 1;
|
||||
|
||||
}
|
||||
.audiojs .loaded {
|
||||
position: absolute;border-radius: 0 4px 4px 0;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
height: 13px;
|
||||
width: 0px;
|
||||
background: rgba(0,0,0,0.1);box-shadow:inset 0 0 2px 2px rgba(255,255,255,0.1);
|
||||
|
||||
}
|
||||
.audiojs .time {
|
||||
text-shadow:0 1px 1px rgba(255,255,255,0.5);
|
||||
width:100px;
|
||||
flex: 0 0 100px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
margin: 0px 0px 0px 6px;
|
||||
padding: 0px 6px 0px 12px;
|
||||
color: #333;
|
||||
}
|
||||
.audiojs .time em {
|
||||
padding: 0px 2px 0px 0px;
|
||||
color: #444;
|
||||
font-style: normal;
|
||||
}
|
||||
.audiojs .time strong {
|
||||
padding: 0px 0px 0px 2px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.audiojs .error-message {
|
||||
float: left;
|
||||
display: none;
|
||||
margin: 0px 10px;
|
||||
height: 36px;
|
||||
width: 400px;
|
||||
overflow: hidden;
|
||||
line-height: 36px;
|
||||
white-space: nowrap;
|
||||
color: #fff;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
-icab-text-overflow: ellipsis;
|
||||
-khtml-text-overflow: ellipsis;
|
||||
-moz-text-overflow: ellipsis;
|
||||
-webkit-text-overflow: ellipsis;
|
||||
}
|
||||
.audiojs .error-message a {
|
||||
color: #eee;
|
||||
text-decoration: none;
|
||||
padding-bottom: 1px;
|
||||
border-bottom: 1px solid #999;
|
||||
white-space: wrap;
|
||||
}
|
||||
.audiojs .play {
|
||||
background: url("../img/player-graphics.png") -2px -1px no-repeat ;
|
||||
}
|
||||
.audiojs .loading {
|
||||
background: url("../img/player-graphics.png") -2px -31px no-repeat;
|
||||
}
|
||||
.audiojs .error {
|
||||
background: url("../img/player-graphics.png") -2px -61px no-repeat;
|
||||
}
|
||||
.audiojs .pause {
|
||||
background: url("../img/player-graphics.png") -2px -91px no-repeat;
|
||||
}
|
||||
.playing .play,
|
||||
.playing .loading,
|
||||
.playing .error {
|
||||
display: none;
|
||||
background-color:rgba(0,0,0,0.1);
|
||||
}
|
||||
.playing .pause {
|
||||
display: block;
|
||||
}
|
||||
.loading .play,
|
||||
.loading .pause,
|
||||
.loading .error {
|
||||
display: none;
|
||||
}
|
||||
.loading .loading {
|
||||
display: block;
|
||||
}
|
||||
.error .time,
|
||||
.error .play,
|
||||
.error .pause,
|
||||
.error .scrubber,
|
||||
.error .loading {
|
||||
display: none;
|
||||
}
|
||||
.error .error {
|
||||
display: block;
|
||||
}
|
||||
.error .play-pause p {
|
||||
cursor: auto;
|
||||
}
|
||||
.error .error-message {
|
||||
display: block;
|
||||
}
|
||||
#share section.music_player{padding:10px;display:block;}
|
||||
.music_player a {
|
||||
display:block;
|
||||
padding:5px;
|
||||
margin-bottom:5px;
|
||||
margin-top:5px;
|
||||
border-bottom:1px solid rgba(0,0,0,0.1);
|
||||
text-shadow:0 1px 1px rgba(255,255,255,0.5);
|
||||
}
|
||||
.music_player .audiojs {}
|
||||
|
||||
.music_player .audiojs p{margin:0;}
|
||||
|
||||
.music_player a.playing{color:white;text-shadow:0 1px 1px rgba(0,0,0,0.3);background-color:rgba(0,0,0,0.4);border-radius:3px;padding:10px;}
|
||||
.music_player a.playing:hover{color:#cef;}
|
||||
|
||||
.music_player table {border-collapse: collapse;}
|
||||
.music_player table td:first-of-type{width:100%;vertical-align: middle;}
|
||||
.music_player table td:last-of-type{width:40px;}
|
||||
.music_player #volume{
|
||||
padding:3px;
|
||||
|
||||
background:rgba(0,0,0,0.2);
|
||||
display:inline-block;
|
||||
text-align:center;
|
||||
border-top:1px solid rgba(0,0,0,0.1);
|
||||
border-bottom:1px solid rgba(0,0,0,0.1);
|
||||
}
|
||||
.music_player .volume:hover{background-image:url(../img/barw.png);}
|
||||
.music_player .volume{
|
||||
border-radius: 1px 1px 0 0;
|
||||
vertical-align:bottom;
|
||||
display:inline-block;
|
||||
width:3px;
|
||||
height:30px;
|
||||
background:url(../img/barb.png) no-repeat rgba(255,255,255,0.1);
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
.music_player .volume.active{ background:url(../img/barw.png) no-repeat transparent;}
|
||||
.music_player a:hover{ color:rgba(0,0,0,0.5);}
|
|
@ -1,175 +0,0 @@
|
|||
/*! Licensed under MIT, https://github.com/sofish/pen */
|
||||
|
||||
/* basic reset */
|
||||
.pen, .pen-menu, .pen-input, .pen textarea{font:400 1.16em/1.45 Palatino, Optima, Georgia, serif;color:#331;}
|
||||
.pen:focus{outline:none;}
|
||||
.pen fieldset, img {border: 0;}
|
||||
.pen blockquote{padding-left:10px;margin-left:-14px;border-left:4px solid #1abf89;}
|
||||
.pen a{color:#1abf89;}
|
||||
.pen del{text-decoration:line-through;}
|
||||
.pen sub, .pen sup {font-size:75%;position:relative;vertical-align:text-top;}
|
||||
:root .pen sub, :root .pen sup{vertical-align:baseline; /* for ie9 and other mordern browsers */}
|
||||
.pen sup {top:-0.5em;}
|
||||
.pen sub {bottom:-0.25em;}
|
||||
.pen hr{border:none;border-bottom:1px solid #cfcfcf;margin-bottom:25px;*color:pink;*filter:chroma(color=pink);height:10px;*margin:-7px 0 15px;}
|
||||
.pen small{font-size:0.8em;color:#888;}
|
||||
.pen em, .pen b, .pen strong{font-weight:700;}
|
||||
.pen pre{white-space:pre-wrap;padding:0.85em;background:#f8f8f8;}
|
||||
|
||||
/* block-level element margin */
|
||||
.pen p, .pen pre, .pen ul, .pen ol, .pen dl, .pen form, .pen table, .pen blockquote{margin-bottom:16px;}
|
||||
|
||||
/* headers */
|
||||
.pen h1, .pen h2, .pen h3, .pen h4, .pen h5, .pen h6{margin-bottom:16px;font-weight:700;line-height:1.2;}
|
||||
.pen h1{font-size:2em;}
|
||||
.pen h2{font-size:1.8em;}
|
||||
.pen h3{font-size:1.6em;}
|
||||
.pen h4{font-size:1.4em;}
|
||||
.pen h5, .pen h6{font-size:1.2em;}
|
||||
|
||||
/* list */
|
||||
.pen ul, .pen ol{margin-left:1.2em;}
|
||||
.pen ul, .pen-ul{list-style:disc;}
|
||||
.pen ol, .pen-ol{list-style:decimal;}
|
||||
.pen li ul, .pen li ol, .pen-ul ul, .pen-ul ol, .pen-ol ul, .pen-ol ol{margin:0 2em 0 1.2em;}
|
||||
.pen li ul, .pen-ul ul, .pen-ol ul{list-style: circle;}
|
||||
|
||||
/* pen menu */
|
||||
.pen-menu [class^="icon-"], .pen-menu [class*=" icon-"] { /* reset to avoid conflicts with Bootstrap */
|
||||
background: transparent;
|
||||
background-image: none;
|
||||
}
|
||||
.pen-menu { min-width: 320px; }
|
||||
.pen-menu, .pen-input{font-size:14px;line-height:1;}
|
||||
.pen-menu{white-space:nowrap;box-shadow:1px 2px 3px -2px #222;background:#333;background-image:linear-gradient(to bottom, #222, #333);opacity:0.9;position:fixed;height:36px;border:1px solid #333;border-radius:3px;display:none;z-index:1000;}
|
||||
.pen-menu:after {top:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;}
|
||||
.pen-menu:after {border-color:rgba(51, 51, 51, 0);border-top-color:#333;border-width:6px;left:50%;margin-left:-6px;}
|
||||
.pen-menu-below:after {top: -11px; display:block; -moz-transform: rotate(180deg); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg);}
|
||||
.pen-icon{font:normal 900 16px/40px Georgia serif;min-width:20px;display:inline-block;padding:0 10px;height:36px;overflow:hidden;color:#fff;text-align:center;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
.pen-icon:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;}
|
||||
.pen-icon:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;}
|
||||
.pen-icon:hover{background:#000;}
|
||||
.pen-icon.active{color:#1abf89;background:#000;box-shadow:inset 2px 2px 4px #000;}
|
||||
.pen-input{position:absolute;width:100%;left:0;top:0;height:36px;line-height:20px;background:#333;color:#fff;border:none;text-align:center;display:none;font-family:arial, sans-serif;}
|
||||
.pen-input:focus{outline:none;}
|
||||
|
||||
.pen-textarea{display:block;background:#f8f8f8;padding:20px;}
|
||||
.pen textarea{font-size:14px;border:none;background:none;width:100%;_height:200px;min-height:200px;resize:none;}
|
||||
|
||||
@font-face {
|
||||
font-family: 'pen';
|
||||
src: url('font/fontello.eot?370dad08');
|
||||
src: url('font/fontello.eot?370dad08#iefix') format('embedded-opentype'),
|
||||
url('font/fontello.woff?370dad08') format('woff'),
|
||||
url('font/fontello.ttf?370dad08') format('truetype'),
|
||||
url('font/fontello.svg?370dad08#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.pen-menu [class^="icon-"]:before, .pen-menu [class*=" icon-"]:before {
|
||||
font-family: "pen";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1em;
|
||||
margin-left: .2em;
|
||||
}
|
||||
.pen-menu .icon-location:before { content: '\e815'; } /* '' */
|
||||
.pen-menu .icon-fit:before { content: '\e80f'; } /* '' */
|
||||
.pen-menu .icon-bold:before { content: '\e805'; } /* '' */
|
||||
.pen-menu .icon-italic:before { content: '\e806'; } /* '' */
|
||||
.pen-menu .icon-justifyleft:before { content: '\e80a'; } /* '' */
|
||||
.pen-menu .icon-justifycenter:before { content: '\e80b'; } /* '' */
|
||||
.pen-menu .icon-justifyright:before { content: '\e80c'; } /* '' */
|
||||
.pen-menu .icon-justifyfull:before { content: '\e80d'; } /* '' */
|
||||
.pen-menu .icon-outdent:before { content: '\e800'; } /* '' */
|
||||
.pen-menu .icon-indent:before { content: '\e801'; } /* '' */
|
||||
.pen-menu .icon-mode:before { content: '\e813'; } /* '' */
|
||||
.pen-menu .icon-fullscreen:before { content: '\e80e'; } /* '' */
|
||||
.pen-menu .icon-insertunorderedlist:before { content: '\e802'; } /* '' */
|
||||
.pen-menu .icon-insertorderedlist:before { content: '\e803'; } /* '' */
|
||||
.pen-menu .icon-strikethrough:before { content: '\e807'; } /* '' */
|
||||
.pen-menu .icon-underline:before { content: '\e804'; } /* '' */
|
||||
.pen-menu .icon-blockquote:before { content: '\e814'; } /* '' */
|
||||
.pen-menu .icon-undo:before { content: '\e817'; } /* '' */
|
||||
.pen-menu .icon-code:before { content: '\e816'; } /* '' */
|
||||
.pen-menu .icon-pre:before { content: '\e816'; } /* '' */
|
||||
.pen-menu .icon-unlink:before { content: '\e811'; } /* '' */
|
||||
.pen-menu .icon-superscript:before { content: '\e808'; } /* '' */
|
||||
.pen-menu .icon-subscript:before { content: '\e809'; } /* '' */
|
||||
.pen-menu .icon-inserthorizontalrule:before { content: '\e818'; } /* '' */
|
||||
.pen-menu .icon-pin:before { content: '\e812'; } /* '' */
|
||||
.pen-menu .icon-createlink:before { content: '\e810'; } /* '' */
|
||||
.pen-menu .icon-h1:before { content: 'H1'; }
|
||||
.pen-menu .icon-h2:before { content: 'H2'; }
|
||||
.pen-menu .icon-h3:before { content: 'H3'; }
|
||||
.pen-menu .icon-h4:before { content: 'H4'; }
|
||||
.pen-menu .icon-h5:before { content: 'H5'; }
|
||||
.pen-menu .icon-h6:before { content: 'H6'; }
|
||||
.pen-menu .icon-p:before { content: 'P'; }
|
||||
.pen-menu .icon-insertimage:before { width:1.8em;margin:0;position:relative;top:-2px;content:'IMG';font-size:12px;border:1px solid #fff;padding:2px;border-radius:2px; }
|
||||
.pen {
|
||||
position: relative;
|
||||
}
|
||||
.pen.hinted h1:before,
|
||||
.pen.hinted h2:before,
|
||||
.pen.hinted h3:before,
|
||||
.pen.hinted h4:before,
|
||||
.pen.hinted h5:before,
|
||||
.pen.hinted h6:before,
|
||||
.pen.hinted blockquote:before,
|
||||
.pen.hinted hr:before {
|
||||
color: #eee;
|
||||
position: absolute;
|
||||
right: 100%;
|
||||
white-space: nowrap;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.pen.hinted blockquote { border-left: 0; margin-left: 0; padding-left: 0; }
|
||||
.pen.hinted blockquote:before {
|
||||
color: #1abf89;
|
||||
content: ">";
|
||||
font-weight: bold;
|
||||
vertical-align: center;
|
||||
}
|
||||
.pen.hinted h1:before { content: "#";}
|
||||
.pen.hinted h2:before { content: "##";}
|
||||
.pen.hinted h3:before { content: "###";}
|
||||
.pen.hinted h4:before { content: "####";}
|
||||
.pen.hinted h5:before { content: "#####";}
|
||||
.pen.hinted h6:before { content: "######";}
|
||||
.pen.hinted hr:before { content: "﹘﹘﹘"; line-height: 1.2; vertical-align: bottom; }
|
||||
|
||||
.pen.hinted pre:before, .pen.hinted pre:after {
|
||||
content: "```";
|
||||
display: block;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.pen.hinted ul { list-style: none; }
|
||||
.pen.hinted ul li:before {
|
||||
content: "*";
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
vertical-align: bottom;
|
||||
margin-left: -1.2em;
|
||||
display: inline-block;
|
||||
width: 1.2em;
|
||||
}
|
||||
|
||||
.pen.hinted b:before, .pen.hinted b:after { content: "**"; color: #eee; font-weight: normal; }
|
||||
.pen.hinted i:before, .pen.hinted i:after { content: "*"; color: #eee; }
|
||||
|
||||
.pen.hinted a { text-decoration: none; }
|
||||
.pen.hinted a:before {content: "["; color: #ddd; }
|
||||
.pen.hinted a:after { content: "](" attr(href) ")"; color: #ddd; }
|
||||
|
||||
.pen-placeholder:after { position: absolute; top: 0; left: 0; content: attr(data-placeholder); color: #999; cursor: text; }
|
|
@ -1,51 +0,0 @@
|
|||
#share {text-align: center;}
|
||||
#share section.tree{margin-bottom:50px;}
|
||||
#share section{
|
||||
font-size:1.3em;
|
||||
display:inline-block;
|
||||
padding:20px;
|
||||
text-align:left;
|
||||
}
|
||||
#share section ul{margin-left:20px;}
|
||||
#share section li{
|
||||
cursor:pointer;list-style-type: none;
|
||||
padding-left:30px;
|
||||
background-size: contain;
|
||||
background-position: 2px center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
#share section li a:hover{color:#hover_color_dark;}
|
||||
|
||||
|
||||
#share .folder:after{
|
||||
content:"▸";
|
||||
padding-left:5px;
|
||||
}
|
||||
#share .folder.unfolded:after{
|
||||
content:"▾";
|
||||
|
||||
}
|
||||
#share .folder{
|
||||
padding-top:3px;
|
||||
padding-bottom:3px;
|
||||
color:rgba(0,0,0,0.5);
|
||||
text-shadow:0 0 1px rgba(0,0,0,0.2);
|
||||
}
|
||||
#share .icon-file em{
|
||||
font-size:8px;
|
||||
color:white;
|
||||
position:absolute;
|
||||
margin-left: -15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#share .folder_content{
|
||||
padding-left:5px;
|
||||
border-left:1px solid rgba(0,0,0,0.1);
|
||||
display: none;
|
||||
margin-left: 40px;
|
||||
}
|
||||
#share .folder_content.show{
|
||||
|
||||
display:block;
|
||||
transition:all 300ms;
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
/* Stats */
|
||||
#stats a {
|
||||
color: #3e58f7;
|
||||
}
|
||||
|
||||
#stats a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#stats h1 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#stats .pagination {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#stats table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
width: calc(100% - 8px);
|
||||
table-layout: fixed;
|
||||
background: #ddd;
|
||||
box-shadow: inset 0 0 3px rgba(0,0,0,0.35);
|
||||
}
|
||||
|
||||
#stats table thead th {
|
||||
background: #bbb;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
#stats table thead th,
|
||||
#stats table td {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#stats table th.date,
|
||||
#stats table td.date,
|
||||
#stats table th.owner,
|
||||
#stats table td.owner,
|
||||
#stats table th.ip,
|
||||
#stats table td.ip,
|
||||
#stats table th.host,
|
||||
#stats table td.host {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
#stats table tr:nth-child(odd) {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
#stats table td {
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
#stats .origin{padding:5px;}
|
||||
#stats #trash,
|
||||
#stats #feeds {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#stats #trash a {
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
vertical-align: middle;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
#stats #message {
|
||||
padding: 40px 0;
|
||||
text-align: center;
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* On-the-fly CSS Compression
|
||||
* Copyright (c) 2009 and onwards, Manas Tungare. (changes by bronco)
|
||||
* Creative Commons Attribution, Share-Alike.
|
||||
*
|
||||
* In order to minimize the number and size of HTTP requests for CSS content,
|
||||
* this script combines multiple CSS files into a single file and compresses
|
||||
* it on-the-fly.
|
||||
*
|
||||
* To use this in your HTML, link to it in the usual way:
|
||||
* <link rel="stylesheet" type="text/css" media="screen, print, projection" href="/css/compressed.css.php" />
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* this version detects css files and allow very basic replacements (bronco@warriordudimanche.net)
|
||||
*/
|
||||
# replacement rules: "String to replace" => "Replacement"
|
||||
# You can change the colors here !
|
||||
$replace=array(
|
||||
'#basic_color_neutral'=>'#456',
|
||||
'#basic_color_dark'=>'#345',
|
||||
'#basic_color_superdark'=>'#123',
|
||||
'#basic_color_light'=>'#678',
|
||||
'#hover_color_light'=>'#DEF',
|
||||
'#hover_color_neutral'=>'#789',
|
||||
'#hover_color_dark'=>'#234',
|
||||
'#hover_color_superdark'=>'#123',
|
||||
|
||||
);
|
||||
|
||||
|
||||
# function
|
||||
if (!function_exists('_glob')){
|
||||
function _glob($path,$pattern='') {
|
||||
# glob function fallback by Cyril MAGUIRE (thx bro' ;-)
|
||||
if($path=='/'){
|
||||
$path='';
|
||||
}
|
||||
$liste = array();
|
||||
$pattern=str_replace('*','',$pattern);
|
||||
if ($handle = opendir($path)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if(stripos($file, $pattern)!==false || $pattern=='' && $file!='.' && $file!='..' && $file!='.htaccess') {
|
||||
$liste[] = $path.$file;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
natcasesort($liste);
|
||||
return $liste;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
$cssFiles = _glob('./','css');
|
||||
|
||||
/**
|
||||
* Ideally, you wouldn't need to change any code beyond this point.
|
||||
*/
|
||||
$buffer = "";
|
||||
foreach ($cssFiles as $cssFile) {
|
||||
$buffer .= file_get_contents($cssFile);
|
||||
}
|
||||
|
||||
$buffer=str_replace(array_keys($replace),array_values($replace),$buffer);
|
||||
// Remove unnecessary characters
|
||||
$buffer = preg_replace("|/\*[^*]*\*+([^/][^*]*\*+)*/|", "", $buffer);
|
||||
$buffer = preg_replace("/[\s]*([\:\{\}\;\,])[\s]*/", "$1", $buffer);
|
||||
|
||||
// Remove whitespace
|
||||
$buffer = str_replace(array("\r\n", "\r", "\n"), '', $buffer);
|
||||
|
||||
// Enable GZip encoding.
|
||||
ob_start("ob_gzhandler");
|
||||
|
||||
// Enable caching
|
||||
header('Cache-Control: public');
|
||||
|
||||
// Expire in one day
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT');
|
||||
|
||||
// Set the correct MIME type, because Apache won't set it for us
|
||||
header("Content-type: text/css");
|
||||
|
||||
// Write everything out
|
||||
echo($buffer);
|
||||
?>
|
|
@ -1,124 +0,0 @@
|
|||
#users_page table{width:100%;border-collapse: collapse}
|
||||
#users_page td{vertical-align: top;width:50%;padding:10px;}
|
||||
#editor_page .dialog, #users_page .dialog{display:block;position:relative;width:100%;}
|
||||
#users_page .dialog td{width:auto;vertical-align: middle;padding-left:0;font-size:1.4em;}
|
||||
#users_page .dialog tr{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid rgba(0,0,0,0.1);vertical-align: middle;}
|
||||
#users_page .dialog figcaption{width:100%;max-width:600px;}
|
||||
#editor_page .dialog figure,#users_page .dialog figure{width:100%;display:block;}
|
||||
#editor_page .dialog h2,#users_page .dialog h2{padding:15px;}
|
||||
#editor_page .dialog label,#users_page .dialog label{cursor:pointer;word-break: break-all;padding:0;}
|
||||
#users_page .dialog .folder_size_users_list li {vertical-align: middle}
|
||||
#users_page .dialog .admin{color:rgba(100,0,0,0.8);}
|
||||
#users_page .dialog .user{color:rgba(0,0,0,0.6);}
|
||||
#users_page .dialog .guest{color:rgba(0,100,0,0.6);}
|
||||
#users_page label span{padding:3px;}
|
||||
#users_page label span em{color:rgba(0,0,0,0.5);}
|
||||
#users_page select{font-size:1em;}
|
||||
#users_page input[type=number]:focus{background-color:rgba(255,255,255,0.9);color:rgba(0,0,0,0.9);}
|
||||
#users_page input[type=number]:focus{background-color:rgba(255,255,255,0.9);color:rgba(0,0,0,0.9);}
|
||||
#users_page input[type=number]{
|
||||
|
||||
text-indent: 7px;
|
||||
width:100%;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px;
|
||||
color: rgba(0,0,0,0.4);
|
||||
font-size:1.2em;
|
||||
background:rgba(255,255,255,0.5);
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#editor_page .hidden, #users_page .hidden{
|
||||
max-height:0;
|
||||
opacity:0;
|
||||
border:none;
|
||||
overflow:hidden;
|
||||
transition:all 300ms;
|
||||
}
|
||||
#editor_page .tab_space .dialog, #users_page .tab_space .dialog{
|
||||
transition:all 300ms;
|
||||
top: auto;
|
||||
}
|
||||
#editor_page .tabs .btn, #users_page .tabs .btn{
|
||||
margin:0;border:0;
|
||||
padding:10px;
|
||||
border-radius:3px 3px 0 0;
|
||||
box-shadow: inset 0 -1px 3px rgba(0,0,0,0.5);
|
||||
border:1px solid rgba(0,0,0,0.1);
|
||||
border-bottom:none;
|
||||
}
|
||||
#editor_page .btn.active, #users_page .btn.active{
|
||||
background:rgba(0,0,0,0.1);
|
||||
color:#basic_color_dark;
|
||||
box-shadow:none;
|
||||
}
|
||||
#editor_page .tab_space .tabs, #users_page .tab_space .tabs{}
|
||||
#users_page .tab_space{
|
||||
width:100%;
|
||||
margin:5px auto;
|
||||
max-width:600px;
|
||||
}
|
||||
#editor_page .tab_space .dialog h2, #users_page .tab_space .dialog h2{
|
||||
color:rgba(0,0,0,0.5);
|
||||
}
|
||||
#editor_page .tab_space .tab_space .dialog h1, #users_page .tab_space .dialog h1{
|
||||
background:transparent;
|
||||
text-align: left;
|
||||
font-size:16px;
|
||||
color:#basic_color_dark;
|
||||
font-weight: normal;
|
||||
text-shadow: none;
|
||||
}
|
||||
#editor_page .tab_space .dialog figure figcaption, #users_page .tab_space .dialog figure figcaption{
|
||||
background-image:none;
|
||||
background:rgba(0,0,0,0.1);
|
||||
box-shadow: none;
|
||||
border:none;
|
||||
border-radius:0 3px 3px 3px;
|
||||
border-left:1px solid rgba(0,0,0,0.1);
|
||||
border-right:1px solid rgba(0,0,0,0.1);
|
||||
border-bottom:1px solid rgba(0,0,0,0.1);
|
||||
border-top:none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* Users List */
|
||||
#userslist p {
|
||||
width: calc(100% - 8px);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#userslist ul {
|
||||
width: 312px;
|
||||
margin: 15px auto 0 auto;
|
||||
}
|
||||
|
||||
#userslist ul li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#userslist ul li input,
|
||||
#userslist ul li span {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#userslist ul li span {
|
||||
width: calc(100% - 20px);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#userslist .clear {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
#userslist #submit {
|
||||
display: block;
|
||||
margin: 15px auto 0 auto;
|
||||
}
|
||||
|
||||
#users_page .tab_space .users_pass_list .npt{
|
||||
width:100%;margin:0;
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/* Users List */
|
||||
#userslist p {
|
||||
width: calc(100% - 8px);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#userslist ul {
|
||||
width: 312px;
|
||||
margin: 15px auto 0 auto;
|
||||
}
|
||||
|
||||
#userslist ul li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#userslist ul li input,
|
||||
#userslist ul li span {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#userslist ul li span {
|
||||
width: calc(100% - 20px);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#userslist .clear {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
#userslist #submit {
|
||||
display: block;
|
||||
margin: 15px auto 0 auto;
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN users page:
|
||||
* delete profiles, edit maximum size for user's folder
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
require_once('core/auto_restrict.php'); # Connected user only !
|
||||
if (!is_allowed('change status rights')){safe_redirect('index.php?p=admin&token='.TOKEN);}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
<div id="edit_profiles">
|
||||
|
||||
<table><form action="#" method="POST">
|
||||
<?php
|
||||
foreach($PROFILES as $num=>$profile){
|
||||
echo '<tr>';
|
||||
echo '<td><input class="npt" type="text" name="profile_name[]" value="'.$profile.'" title="'.e($profile,false).'"/></td><td>';
|
||||
foreach($ACTIONS as $action){
|
||||
$eaction=e($action,false);
|
||||
if(is_allowed($action,$profile)){$checked='checked';}else{$checked='';}
|
||||
echo '<input id="'.$profile.$eaction.'" type="checkbox" name="'.$num.'[]" value="'.$action.'" '.$checked.'/><label class="btn" for="'.$profile.$eaction.'">'.$eaction.'</label>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="add">
|
||||
<td><input class="npt" type="text" name="profile_name[]" value="" placeholder="<?php e('New profile');?>"/></td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($ACTIONS as $action){
|
||||
$eaction=e($action,false);
|
||||
echo '<input id="new'.$eaction.'" type="checkbox" name="'.count($PROFILES).'[]" value="'.$action.'" disabled="true"/><label class="btn" for="new'.$eaction.'">'.$eaction.'</label>';
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td><td><input type="submit" value="Ok" class="btn"/></td></tr>
|
||||
<?php newToken();?>
|
||||
</form></table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
on('keyup','.add .npt',function(){
|
||||
if (this.value){removeAttr('input[type=checkbox]:disabled','disabled')}
|
||||
else{attr('.add input[type=checkbox]','disabled','true');}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* BoZoN editor page:
|
||||
* edit and create markdown files
|
||||
* @author: Bronco (bronco@warriordudimanche.net)
|
||||
**/
|
||||
require_once('core/auto_restrict.php'); # Connected user only !
|
||||
require_once('core/markdown.php');
|
||||
if (!is_allowed('markdown editor')){safe_redirect('index.php?p=admin&token='.TOKEN);}
|
||||
if (isset($_GET['overwrite'])){$overwrite='<input type="hidden" name="overwrite" value="1"/>';}else{$overwrite='';}
|
||||
?>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
<div id="editor_page">
|
||||
|
||||
<h1><?php e('Path:');echo ' '.$_SESSION['upload_user_path'].$_SESSION['current_path'];?></h1>
|
||||
<div class="tab_space">
|
||||
<form action="#" method="POST" id="editor_form">
|
||||
<ul class="tabs">
|
||||
<li class="btn active" data-target=".editor_tab"><span class="icon-pencil"></span> <?php e('Write');?></li>
|
||||
<li class="btn" data-target=".result_tab" id="see"><span class="icon-eye"></span> <?php e('See');?></li>
|
||||
<li class="btn" data-target=".help_tab"><span class="icon-help-circled"></span> <?php e('Help');?></li>
|
||||
</ul>
|
||||
<div class="dialog"><figure><figcaption>
|
||||
|
||||
<div class="editor_tab">
|
||||
<input type="text" class="npt" name="editor_filename" class="npt" value="<?php if (isset($file)){echo _basename($file);}?>" required placeholder="<?php e('Filename');?>"/>
|
||||
<textarea name="editor_content" id="raw" class="npt"><?php if (isset($editor_content)){echo $editor_content;}?></textarea>
|
||||
<input type="submit" class="btn" value="<?php e('Save');?>"/>
|
||||
</div>
|
||||
<input type="hidden" name="token" value="<?php newToken(TRUE);?>"/>
|
||||
<?php echo $overwrite;?>
|
||||
<div class="result_tab hidden"><div id="visu" class="markdown"></div></div>
|
||||
<div class="help_tab hidden"><?php echo nl2br(str_replace(' ',' ',e('markdown_help',false)));?></div>
|
||||
|
||||
|
||||
</figcaption></figure></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="core/js/marked.js"></script>
|
||||
<script>
|
||||
visu=document.getElementById('visu');
|
||||
raw=document.getElementById('raw');
|
||||
marked.setOptions({
|
||||
renderer: new marked.Renderer(),
|
||||
gfm: true,
|
||||
tables: true,
|
||||
breaks: true,
|
||||
pedantic: false,
|
||||
sanitize: true,
|
||||
smartLists: true,
|
||||
smartypants: true
|
||||
});
|
||||
on('click','#see',function(){
|
||||
var input = raw.value;
|
||||
visu.innerHTML = marked(input);
|
||||
});
|
||||
on('click',visu,function(){
|
||||
toggleClass(visu,'hidden');
|
||||
});
|
||||
on('submit','#editor_form',function(){
|
||||
txtarea=document.getElementById('editor_content');
|
||||
editorarea=document.getElementById('editor');
|
||||
txtarea.value=editor.toMd();
|
||||
});
|
||||
on("click","li[data-target]",function(){
|
||||
target=attr(this,"data-target");
|
||||
addClass("figcaption>div","hidden");
|
||||
removeClass(target,"hidden");
|
||||
removeClass("li[data-target]","active");
|
||||
addClass(this,"active");
|
||||
});
|
||||
|
||||
</script>
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1,23 +0,0 @@
|
|||
|
||||
<footer>
|
||||
<p><a id="github" href="https://github.com/broncowdd/BoZoN" title="<?php e('Fork me on github'); ?>" target="_blank"><span class="icon-github-circled" ></span></a></p>
|
||||
<p id="version">BoZoN <?php echo VERSION; ?></p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
// click on lightbox link
|
||||
on('click','a[data-type]',function(event){
|
||||
lb_show(this);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
})
|
||||
|
||||
// click on folder to ufold content on share page
|
||||
on('click','.folder',function(){
|
||||
toggleClass(this.nextElementSibling,'show');
|
||||
toggleClass(this,'unfolded');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
<footer>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -1,111 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>BoZoN | <?php e('Drag, drop, share.'); ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="application-name" content="BoZoN">
|
||||
<meta name="msapplication-tooltip" content="<?php e('Drag, drop, share.'); ?>">
|
||||
<meta name="msapplication-TileImage" content="<?php echo THEME_PATH; ?>favicon.png">
|
||||
<meta name="msapplication-TileColor" content="#2c4aff">
|
||||
<link rel="apple-touch-icon" href="<?php echo THEME_PATH; ?>favicon.png">
|
||||
<link rel="shortcut icon" type="image/png" href="<?php echo THEME_PATH; ?>favicon.png">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo THEME_PATH; ?>css/style.php">
|
||||
<script src="core/js/VanillaJS.js"></script>
|
||||
<script src="core/js/lightbox.js"></script>
|
||||
<?php
|
||||
#########################################
|
||||
# hide functions if libs are not installed
|
||||
#########################################
|
||||
$hide='';
|
||||
if (!$_SESSION['zip']){$hide.='#zip_selection, .zipfolder{display:none!important}'; }
|
||||
if (!$_SESSION['curl']){$hide.='#download_url{display:none!important}'; }
|
||||
if (!empty($hide)){echo "\n<style>\n$hide\n</style>";}
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body class="<?php body_classes();?>">
|
||||
<?php /* generate the lightbox */ echo $templates['lightbox']; ?>
|
||||
<header>
|
||||
<div id="top_bar">
|
||||
<span id="icons">
|
||||
<?php
|
||||
if (!isset($_GET['f'])){
|
||||
|
||||
}
|
||||
|
||||
if (empty($_GET['f'])){
|
||||
$connected=is_user_connected();
|
||||
if ($connected){echo '<a class="home" href="index.php?p=admin&token='.TOKEN.'" title="'.e('Home',false).'"><span class="icon-home" ></span></a>';}
|
||||
if (is_allowed('change status rights')){echo '<a class="profiles_rights" href="index.php?p=edit_profiles&token='.TOKEN.'" class="edit_profile_link" title="'.e('Edit profiles rights',false).'"><span class="icon-block" ></span></a>';}
|
||||
if (is_allowed('users page')){generate_users_list_link(e('Users list',false));}
|
||||
if (is_allowed('add user')){generate_new_users_link(e('New user',false));}
|
||||
if (is_allowed('acces logfile')){echo '<a class="log_file" href="index.php?p=stats&token='.TOKEN.'" class="log_link" title="'.e('Access log file',false).'"><span class="icon-info-circled" ></span></a>';}
|
||||
if ($connected){generate_new_password_link(e('Change password',false));}
|
||||
if (is_allowed('regen ID base')){echo '<a href="index.php?regen&token='.TOKEN.'" id="regen_button" title="'.e('Rebuild base',false).'"><span class="icon-renew" ></span></a>';}
|
||||
if (is_allowed('markdown editor')){echo '<a href="index.php?p=editor&token='.TOKEN.'" id="editor_button" title="'.e('Text editor',false).'"><span class="icon-doc-text-inv" ></span></a>';}
|
||||
if (is_allowed('upload')){echo '<a href="#" id="upload_button" onclick="toggleClass(\'#upload\',\'hidden\')" ondragenter="toggleClass(\'#upload\',\'hidden\')" title="'.e('Click or dragover to reveal dropzone',false).'"><span class="icon-upload-cloud" ></span> '.e('Upload',false).'</a>';}
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span id="lang">
|
||||
<?php
|
||||
/* you can change the generated link using another pattern as argument (keep the # tags !):
|
||||
'<a #CLASS href="index.php?p=#PAGE&lang=#LANG&token=#TOKEN">#LANG</a>'*/
|
||||
make_lang_link();
|
||||
?>
|
||||
</span>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
|
||||
<div id="connect">
|
||||
<?php
|
||||
if (empty($_GET['f'])){
|
||||
/* you can add labels if you want like make_connect_link('Admin','Logout','Connection') */
|
||||
make_connect_link();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (is_user_connected()&&!empty($page)&&empty($_GET['f'])){
|
||||
?>
|
||||
<div id="search" >
|
||||
<form action="index.php" method="get" class="searchform">
|
||||
<input type="text" class="npt" name="filter" value="<?php if (!empty($_SESSION['filter'])){echo $_SESSION['filter'];} ?>" title="<?php e('Search in the uploaded files'); ?>" placeholder="<?php e('Filter'); ?>"/>
|
||||
<input type="hidden" value="admin" name="p"/>
|
||||
<?php newToken();?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if (!is_user_connected()||!empty($_GET['f'])){ ?>
|
||||
<p id="logo" href="index.php">BoZoN</p>
|
||||
<h2 class="slogan"><?php e('Drag, drop, share.');?></h2>
|
||||
<?php
|
||||
}else{
|
||||
if (is_allowed('upload')){include('core/auto_dropzone.php');}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div id="title_page">
|
||||
<?php
|
||||
if (!empty($_GET['p'])&&$_GET['p']=='editor'){e('Markdown editor'); }
|
||||
elseif (!empty($_GET['p'])&&$_GET['p']=='stats'){e('Access log'); }
|
||||
elseif (!empty($_GET['p'])&&$_GET['p']=='login'&&isset($_GET['change_password'])){e('Change password'); }
|
||||
elseif (!empty($_GET['p'])&&$_GET['p']=='login'&&isset($_GET['newuser'])){e('Create an account'); }
|
||||
elseif (!empty($_GET['p'])&&$_GET['p']=='login'){e('Please, login'); }
|
||||
elseif (!empty($_GET['p'])&&$_GET['p']=='users'){e('Users profiles'); }
|
||||
elseif (!empty($_GET['p'])&&$_GET['p']=='edit_profiles'){e('Configure profiles rights'); }
|
||||
elseif ($_SESSION['mode']=='links'){e('Manage links');}
|
||||
else{e('Manage files');}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
</header>
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>BoZoN | <?php e('Drag, drop, share.'); ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="application-name" content="BoZoN">
|
||||
<meta name="msapplication-tooltip" content="<?php e('Drag, drop, share.'); ?>">
|
||||
<meta name="msapplication-TileImage" content="<?php echo THEME_PATH;?>/favicon.png">
|
||||
<meta name="msapplication-TileColor" content="#2c4aff">
|
||||
<link rel="apple-touch-icon" href="<?php echo THEME_PATH;?>/img/favicon.png">
|
||||
<link rel="shortcut icon" type="image/png" href="<?php echo THEME_PATH;?>/favicon.png">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo THEME_PATH;?>/css/markdown.css">
|
||||
</head>
|
||||
|
||||
<body class="markdown <?php body_classes();?>">
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<div id="home">
|
||||
|
||||
<div id="center">
|
||||
<h1><?php e('BoZoN is a simple filesharing app.'); ?></h1>
|
||||
<p><?php e('Easy to install, free and opensource'); ?></p>
|
||||
<p><?php e('Just copy BoZoN\'s files on your server. That\'s it.'); ?> </p>
|
||||
<p id="logos">
|
||||
<img src="<?php echo THEME_PATH;?>img/home/logo_php.png" alt="logo php"/>
|
||||
<img src="<?php echo THEME_PATH;?>img/home/logo_js.png" alt="logo js"/>
|
||||
<img src="<?php echo THEME_PATH;?>img/home/logo_css.png" alt="logo css"/>
|
||||
<img src="<?php echo THEME_PATH;?>img/home/logo_html.png" alt="logo css"/>
|
||||
</p>
|
||||
|
||||
<div id="agpl">
|
||||
<p><?php e('You can freely fork BoZoN and use it as specified in the AGPL licence'); ?> (<a title="AGPL 3" href="http://www.gnu.org/licenses/agpl-3.0.fr.html" target="_blank"><?php e('More info'); ?></a>)</p>
|
||||
<p class="img"><img src="<?php echo THEME_PATH; ?>img/home/logo_agpl.png" alt="logo agpl" /></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="easy">
|
||||
<h2><?php e('Easy to use!'); ?></h2>
|
||||
<div id="notes">
|
||||
<div>
|
||||
<img class="big" src="<?php echo THEME_PATH;?>img/home/tosend.png" alt="" />
|
||||
<p><?php e('Drag the file you want to share to upload it on the server'); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<img class="big" src="<?php echo THEME_PATH; ?>img/home/toshare.png" alt="" />
|
||||
<p><?php e('Share the link with your friends'); ?></p></div>
|
||||
</div>
|
||||
|
||||
<div id="more">
|
||||
<h2><?php e('BoZoN can do more!'); ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/nodb.png" alt="lock icon"/></span>
|
||||
<span class="text"><?php e('No database: easy to backup or move to a new server.'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/locked.png" alt="lock icon"/></span>
|
||||
<span class="text"><?php e('Lock the access to the file/folder with a password.'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/burn.png" alt="burn icon"/></span>
|
||||
<span class="text"><?php e('Share a file or a folder with a unique acces link with the «burn mode»:'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img class="medium" src="<?php echo THEME_PATH; ?>img/home/renew.png" alt="renew icon"/></span>
|
||||
<span class="text"><?php e('Renew a share link with a single clic'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/zipfolder.png" alt="upload zip folder icon"/></span>
|
||||
<span class="text"><?php e('Download a folder content into a zip'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/smartphone.png" alt="smartphone icon"/></span>
|
||||
<span class="text"><?php e('Acces to BoZoN on smartphone without any specific app: your browser is enougth'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/qrcode.png" alt="qrcode icon"/></span>
|
||||
<span class="text"><?php e('Use a qrcode to share your link with smartphone users.'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/users.png" alt="users icon"/></span>
|
||||
<span class="text"><?php e('Add, remove users and manage their rights'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/unzipfolder.png" alt="unzip folder icon"/></span>
|
||||
<span class="text"><?php e('To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server.'); ?></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="img"><img src="<?php echo THEME_PATH; ?>img/home/design.png" alt="design icon"/></span>
|
||||
<span class="text"><?php e('Modify the templates & style to make your own BoZoN'); ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
Before Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.7 KiB |