diff options
336 files changed, 17031 insertions, 30011 deletions
diff --git a/.gitignore b/.gitignore index d740c498f..97d341e53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,14 @@ +data/uploads/* +data/client/ +.* +is_installed +!.highlight +!data/uploads/.htaccess +!data/.htaccess +!.gitignore +!system/.htaccess +!application/.htaccess + .DS_Store application/cache/* @@ -6,4 +17,4 @@ application/cache/* application/logs/* !application/logs/index.html -!application/logs/.htaccess
\ No newline at end of file +!application/logs/.htaccess diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..dba13ed2d --- /dev/null +++ b/COPYING @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU 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 + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +<http://www.gnu.org/licenses/>. diff --git a/INSTALL b/INSTALL new file mode 100644 index 000000000..ada32f7cb --- /dev/null +++ b/INSTALL @@ -0,0 +1,26 @@ +# Configuration + +* run install.php to make sure all dependencies are installed + - if you are only creating a basic development installation you will only need: + pygmentize (part of pygments) + +* Copy all files from ./application/config/example to ./application/config +* Change them to fit your needs + - don't change config.php, use config-local.php to override it when needed + +* run `php index.php tools update_database` to initialize your database + +* Copy htaccess.txt to .htaccess if you want shorter URLs + (also set "$config['index_page'] = '';" in config-local.php) + +* Add ./crontab or something similar to the user's crontab + +* Copy ./data/local/examples/contact-info.php to ./data/local/ and edit it + +# Generate the first user + +* Go to http://yourdomain.com/some/where/index.php/user/hash_password to generate a password hash + +* Run the following SQL command in your database: + insert into users (username, password, email, referrer) + values ("your_name", "hash_from_above", "you@foo.com", NULL); @@ -0,0 +1,7 @@ +This file lists major, incompatible or otherwise important changes, you should look at it after every update. + +2013-09-25 New download driver allowing to switch between php echoing chunks + (old behaviour and default) and X-Sendfile (635b0717931df907ee8015a42ad0ed1fcdf967c4) +2013-09-25 Switch to bootstrap 3 (9538bea0908c8a3758b41967d977455af731c344) +2013-08-15 Use CI's caching class. The default disables caching, adjust the config (cache_backend) if you want it back. +2013-08-14 Use python-ansi2html instead of HTML::FromANSI @@ -0,0 +1,6 @@ +More information about this software can be found at +<https://wiki.server-speed.net/projects/filebin>. + +If you have questions, patches or just want to follow the development you can +use the filebin-general mailing list at +<https://lists.server-speed.net/listinfo/filebin-general> diff --git a/application/config/.gitignore b/application/config/.gitignore new file mode 100644 index 000000000..45e1c5158 --- /dev/null +++ b/application/config/.gitignore @@ -0,0 +1,3 @@ +config-local.php +database.php +memcached.php diff --git a/application/config/autoload.php b/application/config/autoload.php index 53129c9c6..a471f3ab2 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -52,7 +52,7 @@ $autoload['packages'] = array(); | $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ -$autoload['libraries'] = array(); +$autoload['libraries'] = array('database'); /* @@ -64,7 +64,7 @@ $autoload['libraries'] = array(); | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = array(); +$autoload['helper'] = array('url'); /* diff --git a/application/config/config.php b/application/config/config.php index 1ec65435e..d386a77b8 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -248,7 +248,7 @@ $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = FALSE; -$config['sess_use_database'] = FALSE; +$config['sess_use_database'] = true; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; @@ -293,7 +293,7 @@ $config['global_xss_filtering'] = FALSE; | 'csrf_cookie_name' = The cookie name | 'csrf_expire' = The number in seconds the token should expire. */ -$config['csrf_protection'] = FALSE; +$config['csrf_protection'] = FALSE; // our controller enables this later $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200; @@ -357,6 +357,94 @@ $config['rewrite_short_tags'] = FALSE; */ $config['proxy_ips'] = ''; +/* +|-------------------------------------------------------------------------- +| FileBin +|-------------------------------------------------------------------------- + */ + +// upload_path should NOT be readable/served by the server, but only by the script +$config['upload_path'] = FCPATH.'data/uploads'; + +// Make sure to adjust PHP's limits (post_max_size, upload_max_filesize) if necessary +$config['upload_max_size'] = 256*1024*1024; // 256MiB + +// Files smaller than this will be highlit, larger ones will simply be downloaded +// even if requested to be highlit. +$config['upload_max_text_size'] = 2*1024*1024; // 2MiB + +// Files older than this will be deleted by the cron job. +// 0 disables deletion. +$config['upload_max_age'] = 60*60*24*5; // 5 days +$config['actions_max_age'] = 60*60*24*5; // 5 days + +// Files smaller than this won't be deleted (even if they are old enough) +$config['small_upload_size'] = 1024*10; // 10KiB + + +// Possible values: +// - apc: needs the apc module and is only useful on long running php processes +// - file: you will have to clean up the cache directory yourself (./application/cache/) +// - memcached: config in application/config/memcached.php; you need the memcached module (with the D) +// - dummy: disables caching +// +// It is highly suggested to enable the cache. +$config['cache_backend'] = "dummy"; + + +// For possible drivers look into ./application/libraries/Duser/drivers/ +$config['authentication_driver'] = 'db'; + +// This is only used it the driver is set to ldap +if (extension_loaded("ldap")) { + $config['auth_ldap'] = array( + "host" => 'ldaps://ldap.example.com', + "port" => 636, + "basedn" => "dc=example,dc=com", + "scope" => "one", // possible values: base, one, subtree + "options" => array( + // key/values pairs for ldap_set_option + // http://php.net/manual/en/function.ldap-set-option.php + LDAP_OPT_PROTOCOL_VERSION => 3 + ), + // Please note that php-ldap converts attributes to lowercase + "userid_field" => "uidnumber", // This has to be a unique integer + "username_field" => "uid" // This is the value the user supplies on the login form + ); +} + +// This is only used it the driver is set to fluxbb +$config['auth_fluxbb'] = array( + 'database' => 'fluxbb' +); + + +// Possible values: production, development +// "development" enables features like profiling and display of SQL queries. +$config['environment'] = "production"; + + +// This sets the download implementation. Possible values are php, nginx and lighttpd. +// The nginx and lighttpd drivers make use of the server's sendfile feature. +// +// The lighttpd driver requires the following directive to be set in your fastcgi.server configuration: +// "allow-x-send-file" => "enable" +// See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI#X-Sendfile +// +// When using the nginx download driver you need to define an internal location +// from which nginx will serve your uploads: +// location ^~ /protected-uploads/ { +// internal; +// alias <upload_path>/; +// } +// See http://wiki.nginx.org/X-accel +$config['download_driver'] = 'php'; + +$config['download_nginx_location'] = '/protected-uploads'; + +if (file_exists(FCPATH.'application/config/config-local.php')) { + include FCPATH.'application/config/config-local.php'; +} /* End of file config.php */ /* Location: ./application/config/config.php */ diff --git a/application/config/constants.php b/application/config/constants.php index 4a879d360..1185dbca0 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -1,5 +1,7 @@ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +putenv('HOME='.FCPATH); + /* |-------------------------------------------------------------------------- | File and Directory Modes diff --git a/application/config/example/.gitignore b/application/config/example/.gitignore new file mode 100644 index 000000000..f9be8dfe0 --- /dev/null +++ b/application/config/example/.gitignore @@ -0,0 +1 @@ +!* diff --git a/application/config/example/config-local.php b/application/config/example/config-local.php new file mode 100644 index 000000000..941c8b119 --- /dev/null +++ b/application/config/example/config-local.php @@ -0,0 +1,16 @@ +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); + +/* + * Use this file to override any settings from config.php + * + * For descriptions of the options please refer to config.php. + */ + +// set this to a 32char random string +$config['encryption_key'] = ''; + +$config['upload_path'] = FCPATH.'data/uploads'; + +$config['index_page'] = 'index.php'; + +$config['cache_backend'] = "dummy"; diff --git a/application/config/database.php b/application/config/example/database.php index b4b34bf66..51b666b38 100644 --- a/application/config/database.php +++ b/application/config/example/database.php @@ -48,18 +48,18 @@ $active_group = 'default'; $active_record = TRUE; -$db['default']['hostname'] = 'localhost'; -$db['default']['username'] = ''; -$db['default']['password'] = ''; -$db['default']['database'] = ''; -$db['default']['dbdriver'] = 'mysql'; -$db['default']['dbprefix'] = ''; +$db['default']['hostname'] = "localhost"; +$db['default']['username'] = ""; +$db['default']['password'] = ""; +$db['default']['database'] = ""; +$db['default']['dbdriver'] = "mysqli"; +$db['default']['dbprefix'] = ""; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; -$db['default']['cachedir'] = ''; -$db['default']['char_set'] = 'utf8'; -$db['default']['dbcollat'] = 'utf8_general_ci'; +$db['default']['cachedir'] = ""; +$db['default']['char_set'] = "utf8"; +$db['default']['dbcollat'] = "utf8_bin"; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE; diff --git a/application/config/example/index.html b/application/config/example/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/application/config/example/index.html @@ -0,0 +1,10 @@ +<html> +<head> + <title>403 Forbidden</title> +</head> +<body> + +<p>Directory access is forbidden.</p> + +</body> +</html>
\ No newline at end of file diff --git a/application/config/example/memcached.php b/application/config/example/memcached.php new file mode 100644 index 000000000..29b145ec8 --- /dev/null +++ b/application/config/example/memcached.php @@ -0,0 +1,17 @@ +<?php + +$config = array( + "default" => array( + "hostname" => "127.0.0.1", + "port" => 11211, + "weight" => 1, + ), + "socket" => array( + "hostname" => FCPATH.'/memcached.sock', + "port" => 0, + "weight" => 2, + ), +); + + +?> diff --git a/application/config/migration.php b/application/config/migration.php index df42a3cae..75e9bc19b 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -8,7 +8,7 @@ | whenever you intend to do a schema migration. | */ -$config['migration_enabled'] = FALSE; +$config['migration_enabled'] = true; /* @@ -21,7 +21,7 @@ $config['migration_enabled'] = FALSE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 0; +$config['migration_version'] = 13; /* @@ -38,4 +38,4 @@ $config['migration_path'] = APPPATH . 'migrations/'; /* End of file migration.php */ -/* Location: ./application/config/migration.php */
\ No newline at end of file +/* Location: ./application/config/migration.php */ diff --git a/application/config/routes.php b/application/config/routes.php index 5f9a58343..e0d963405 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -38,7 +38,11 @@ | */ -$route['default_controller'] = "welcome"; +$route['default_controller'] = "file"; +$route['user/(:any)'] = "user/$1"; +$route['file/(:any)'] = "file/$1"; +$route['tools/(:any)'] = "tools/$1"; +$route['(:any)'] = "file/index/$1"; $route['404_override'] = ''; diff --git a/application/controllers/file.php b/application/controllers/file.php new file mode 100644 index 000000000..e1b43d314 --- /dev/null +++ b/application/controllers/file.php @@ -0,0 +1,1122 @@ +<?php +/* + * Copyright 2009-2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class File extends MY_Controller { + + protected $json_enabled_functions = array( + "upload_history", + "do_upload", + "do_delete", + "do_multipaste", + ); + + function __construct() + { + parent::__construct(); + + $this->load->model('mfile'); + $this->load->model('mmultipaste'); + + if (is_cli_client()) { + $this->var->view_dir = "file_plaintext"; + } else { + $this->var->view_dir = "file"; + } + } + + function index() + { + if ($this->input->is_cli_request()) { + $this->load->library("../controllers/tools"); + return $this->tools->index(); + } + + // Try to guess what the user would like to do. + $id = $this->uri->segment(1); + if (!empty($_FILES)) { + $this->do_upload(); + } elseif (strpos($id, "m-") === 0 && $this->mmultipaste->id_exists($id)) { + $this->_download(); + } elseif ($id != "file" && $this->mfile->id_exists($id)) { + $this->_download(); + } elseif ($id && $id != "file") { + $this->_non_existent(); + } else { + $this->upload_form(); + } + } + + function _download() + { + $id = $this->uri->segment(1); + $lexer = urldecode($this->uri->segment(2)); + + $is_multipaste = false; + if ($this->mmultipaste->id_exists($id)) { + $is_multipaste = true; + + if(!$this->mmultipaste->valid_id($id)) { + return $this->_non_existent(); + } + $files = $this->mmultipaste->get_files($id); + $this->data["title"] = "Multipaste"; + } elseif ($this->mfile->id_exists($id)) { + if (!$this->mfile->valid_id($id)) { + return $this->_non_existent(); + } + + $files = array($this->mfile->get_filedata($id)); + $this->data["title"] = htmlspecialchars($files[0]["filename"]); + } else { + assert(0); + } + + assert($files !== false); + assert(is_array($files)); + assert(count($files) >= 1); + + // don't allow unowned files to be downloaded + foreach ($files as $filedata) { + if ($filedata["user"] == 0) { + return $this->_non_existent(); + } + } + + $etag = ""; + foreach ($files as $filedata) { + $etag = sha1($etag.$filedata["hash"]); + } + + // handle some common "lexers" here + switch ($lexer) { + case "": + break; + + case "qr": + handle_etag($etag); + header("Content-disposition: inline; filename=\"".$id."_qr.png\"\n"); + header("Content-Type: image/png\n"); + passthru('qrencode -s 10 -o - '.escapeshellarg(site_url($id).'/')); + exit(); + + case "info": + return $this->_display_info($id); + + default: + if ($is_multipaste) { + show_error("Invalid action \"".htmlspecialchars($lexer)."\""); + } + break; + } + + $this->load->driver("ddownload"); + + // user wants the plain file + if ($lexer == 'plain') { + assert(count($files) == 1); + handle_etag($etag); + + $filedata = $files[0]; + $filepath = $this->mfile->file($filedata["hash"]); + $this->ddownload->serveFile($filepath, $filedata["filename"], "text/plain"); + exit(); + } + + $this->load->library("output_cache"); + + foreach ($files as $key => $filedata) { + $file = $this->mfile->file($filedata['hash']); + + // autodetect the lexer for highlighting if the URL contains a / after the ID (/ID/) + // /ID/lexer disables autodetection + $autodetect_lexer = !$lexer && substr_count(ltrim($this->uri->uri_string(), "/"), '/') >= 1; + $autodetect_lexer = $is_multipaste ? true : $autodetect_lexer; + if ($autodetect_lexer) { + $lexer = $this->mfile->autodetect_lexer($filedata["mimetype"], $filedata["filename"]); + } + + // resolve aliases + // this is mainly used for compatibility + $lexer = $this->mfile->resolve_lexer_alias($lexer); + + // if there is no mimetype mapping we can't highlight it + $can_highlight = $this->mfile->can_highlight($filedata["mimetype"]); + + $filesize_too_big = filesize($file) > $this->config->item('upload_max_text_size'); + + if (!$can_highlight || $filesize_too_big || !$lexer) { + if (!$is_multipaste) { + // prevent javascript from being executed and forbid frames + // this should allow us to serve user submitted HTML content without huge security risks + foreach (array("X-WebKit-CSP", "X-Content-Security-Policy", "Content-Security-Policy") as $header_name) { + header("$header_name: default-src 'none'; img-src *; media-src *; font-src *; style-src 'unsafe-inline' *; script-src 'none'; object-src *; frame-src 'none'; "); + } + handle_etag($etag); + $this->ddownload->serveFile($file, $filedata["filename"], $filedata["mimetype"]); + exit(); + } else { + switch ($filedata["mimetype"]) { + // TODO: handle video/audio + // TODO: handle more image formats (thumbnails needs to be improved) + case "image/jpeg": + case "image/png": + case "image/gif": + $filedata["tooltip"] = $this->_tooltip_for_image($filedata); + $this->output_cache->add_merge( + array("items" => array($filedata)), + 'file/fragments/thumbnail' + ); + + break; + + default: + $this->output_cache->add_merge( + array("items" => array($filedata)), + 'file/fragments/uploads_table' + ); + break; + } + continue; + } + } + + $this->output_cache->add_function(function() use ($filedata, $lexer, $is_multipaste) { + $this->_highlight_file($filedata, $lexer, $is_multipaste); + }); + } + + // TODO: move lexers json to dedicated URL + $this->data['lexers'] = $this->mfile->get_lexers(); + + // Output everything + // Don't use the output class/append_output because it does too + // much magic ({elapsed_time} and {memory_usage}). + // Direct echo puts us on the safe side. + echo $this->load->view($this->var->view_dir.'/html_header', $this->data, true); + $this->output_cache->render(); + echo $this->load->view($this->var->view_dir.'/html_footer', $this->data, true); + } + + private function _colorify($file, $lexer, $anchor_id = false) + { + $return_value = 0; + $output = ""; + $lines_to_remove = 0; + + $output .= '<div class="code content table">'."\n"; + $output .= '<div class="highlight"><pre>'."\n"; + + ob_start(); + if ($lexer == "ascii") { + passthru('ansi2html -p < '.escapeshellarg($file), $return_value); + // Last line is empty + $lines_to_remove = 1; + } else { + passthru('pygmentize -F codetagify -O encoding=guess,outencoding=utf8,stripnl=False -l '.escapeshellarg($lexer).' -f html '.escapeshellarg($file), $return_value); + // Last 2 items are "</pre></div>" and "" + $lines_to_remove = 2; + } + $buf = ob_get_contents(); + ob_end_clean(); + + + $buf = explode("\n", $buf); + $line_count = count($buf); + + for ($i = 1; $i <= $lines_to_remove; $i++) { + unset($buf[$line_count - $i]); + } + + foreach ($buf as $key => $line) { + $line_number = $key + 1; + if ($key == 0) { + $line = str_replace("<div class=\"highlight\"><pre>", "", $line); + } + + $anchor = "n$line_number"; + if ($anchor_id !== false) { + $anchor = "n-$anchor_id-$line_number"; + } + + // Be careful not to add superflous whitespace here (we are in a <pre>) + $output .= "<div class=\"table-row\">" + ."<a href=\"#$anchor\" class=\"linenumber table-cell\">" + ."<span class=\"anchor\" id=\"$anchor\"> </span>" + ."</a>" + ."<span class=\"line table-cell\">".$line."</span>\n"; + $output .= "</div>"; + } + + $output .= "</pre></div>"; + $output .= "</div>"; + + return array( + "return_value" => $return_value, + "output" => $output + ); + } + + private function _highlight_file($filedata, $lexer, $is_multipaste) + { + // highlight the file and cache the result, fall back to plain text if $lexer fails + foreach (array($lexer, "text") as $lexer) { + $highlit = cache_function($filedata['hash'].'_'.$lexer, 100, + function() use ($filedata, $lexer, $is_multipaste) { + $file = $this->mfile->file($filedata['hash']); + if ($lexer == "rmd") { + ob_start(); + + echo '<div class="code content table markdownrender">'."\n"; + echo '<div class="table-row">'."\n"; + echo '<div class="table-cell">'."\n"; + passthru('perl '.FCPATH.'scripts/Markdown.pl '.escapeshellarg($file), $return_value); + echo '</div></div></div>'; + + return array( + "output" => ob_get_clean(), + "return_value" => $return_value, + ); + } else { + return get_instance()->_colorify($file, $lexer, $is_multipaste ? $filedata["id"] : false); + } + }); + + if ($highlit["return_value"] == 0) { + break; + } else { + $message = "Error trying to process the file. Either the lexer is unknown or something is broken."; + if ($lexer != "text") { + $message .= " Falling back to plain text."; + } + $this->output_cache->render_now( + array("error_message" => "<p>$message</p>"), + "file/fragments/alert-wide" + ); + } + } + + $data = array_merge($this->data, array( + 'title' => htmlspecialchars($filedata['filename']), + 'id' => $filedata["id"], + 'current_highlight' => htmlspecialchars($lexer), + 'timeout' => $this->mfile->get_timeout_string($filedata["id"]), + 'filedata' => $filedata, + )); + + $this->output_cache->render_now($data, $this->var->view_dir.'/html_paste_header'); + $this->output_cache->render_now($highlit["output"]); + $this->output_cache->render_now($data, $this->var->view_dir.'/html_paste_footer'); + } + + private function _tooltip_for_image($filedata) + { + $filesize = format_bytes($filedata["filesize"]); + $dimensions = $this->mfile->image_dimension($this->mfile->file($filedata["hash"])); + $upload_date = date("r", $filedata["date"]); + + $tooltip = "${filedata["id"]} - $filesize<br>"; + $tooltip .= "$upload_date<br>"; + $tooltip .= "$dimensions - ${filedata["mimetype"]}<br>"; + + return $tooltip; + } + + private function _display_info($id) + { + if ($this->mmultipaste->id_exists($id)) { + $files = $this->mmultipaste->get_files($id); + + $this->data["title"] .= " - Info $id"; + + $multipaste = $this->mmultipaste->get_multipaste($id); + $total_size = 0; + $timeout = -1; + foreach($files as $filedata) { + $total_size += $filedata["filesize"]; + $file_timeout = $this->mfile->get_timeout($filedata["id"]); + if ($timeout == -1 || ($timeout > $file_timeout && $file_timeout >= 0)) { + $timeout = $file_timeout; + } + } + + $data = array_merge($this->data, array( + 'timeout_string' => $timeout >= 0 ? date("r", $timeout) : "Never", + 'upload_date' => $multipaste["date"], + 'id' => $id, + 'size' => $total_size, + 'file_count' => count($files), + )); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/multipaste_info', $data); + $this->load->view('footer', $this->data); + return; + } elseif ($this->mfile->id_exists($id)) { + $this->data["title"] .= " - Info $id"; + $this->data["filedata"] = $this->mfile->get_filedata($id); + $this->data["id"] = $id; + $this->data['timeout'] = $this->mfile->get_timeout_string($id); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/file_info', $this->data); + $this->load->view('footer', $this->data); + } + } + + function _non_existent() + { + $this->data["title"] .= " - Not Found"; + $this->output->set_status_header(404); + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/non_existent', $this->data); + $this->load->view('footer', $this->data); + } + + function _show_url($ids, $lexer) + { + $redirect = false; + + if (!$this->muser->logged_in()) { + $this->muser->require_session(); + // keep the upload but require the user to login + $this->session->set_userdata("last_upload", array( + "ids" => $ids, + "lexer" => $lexer + )); + $this->session->set_flashdata("uri", "file/claim_id"); + $this->muser->require_access("basic"); + } + + foreach ($ids as $id) { + if ($lexer) { + $this->data['urls'][] = site_url($id).'/'.$lexer; + } else { + $this->data['urls'][] = site_url($id).'/'; + + if (count($ids) == 1) { + $filedata = $this->mfile->get_filedata($id); + $file = $this->mfile->file($filedata['hash']); + $type = $filedata['mimetype']; + $lexer = $this->mfile->should_highlight($type); + + // If we detected a highlightable file redirect, + // otherwise show the URL because browsers would just show a DL dialog + if ($lexer) { + $redirect = true; + } + } + } + } + + if (static_storage("response_type") == "json") { + return send_json_reply($this->data["urls"]); + } + + if (is_cli_client()) { + $redirect = false; + } + + if ($redirect && count($ids) == 1) { + redirect($this->data['urls'][0], "location", 303); + } else { + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/show_url', $this->data); + $this->load->view('footer', $this->data); + } + } + + function client() + { + $this->data['title'] .= ' - Client'; + + if (file_exists(FCPATH.'data/client/latest')) { + $this->var->latest_client = trim(file_get_contents(FCPATH.'data/client/latest')); + $this->data['client_link'] = base_url().'data/client/fb-'.$this->var->latest_client.'.tar.gz'; + } else { + $this->data['client_link'] = false; + } + $this->data['client_link_dir'] = base_url().'data/client/'; + $this->data['client_link_deb'] = base_url().'data/client/deb/'; + $this->data['client_link_slackware'] = base_url().'data/client/slackware/'; + + if (preg_match('#^https?://(.*?)/.*$#', site_url(), $matches) === 1) { + $this->data["domain"] = $matches[1]; + } else { + $this->data["domain"] = "unknown domain"; + } + + if (!is_cli_client()) { + $this->load->view('header', $this->data); + } + $this->load->view($this->var->view_dir.'/client', $this->data); + if (!is_cli_client()) { + $this->load->view('footer', $this->data); + } + } + + function upload_form() + { + $this->data['title'] .= ' - Upload'; + $this->data['small_upload_size'] = $this->config->item('small_upload_size'); + $this->data['max_upload_size'] = $this->config->item('upload_max_size'); + $this->data['upload_max_age'] = $this->config->item('upload_max_age')/60/60/24; + + $this->data['username'] = $this->muser->get_username(); + + $repaste_id = $this->input->get("repaste"); + + if ($repaste_id) { + $filedata = $this->mfile->get_filedata($repaste_id); + + if ($filedata !== false && $this->mfile->can_highlight($filedata["mimetype"])) { + $this->data["textarea_content"] = file_get_contents($this->mfile->file($filedata["hash"])); + } + } + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/upload_form', $this->data); + if (is_cli_client()) { + $this->client(); + } + $this->load->view('footer', $this->data); + } + + // Allow CLI clients to query the server for the maxium filesize so they can + // stop the upload before wasting time and bandwith + function get_max_size() + { + echo $this->config->item('upload_max_size'); + } + + function thumbnail() + { + $id = $this->uri->segment(3); + + if (!$this->mfile->valid_id($id)) { + return $this->_non_existent(); + } + + $etag = "$id-thumb"; + handle_etag($etag); + + $thumb_size = 150; + + $filedata = $this->mfile->get_filedata($id); + if (!$filedata) { + show_error("Failed to get file data"); + } + + $cache_key = $filedata['hash'].'_thumb_'.$thumb_size; + + $thumb = cache_function($cache_key, 100, function() use ($id, $thumb_size){ + $CI =& get_instance(); + $thumb = $CI->mfile->makeThumb($id, $thumb_size, IMAGETYPE_JPEG); + + if ($thumb === false) { + show_error("Failed to generate thumbnail"); + } + + return $thumb; + }); + + $this->output->set_header("Cache-Control:max-age=31536000, public"); + $this->output->set_header("Expires: ".date("r", time() + 365 * 24 * 60 * 60)); + $this->output->set_content_type("image/jpeg"); + $this->output->set_output($thumb); + } + + function upload_history_thumbnails() + { + $this->muser->require_access(); + + $user = $this->muser->get_userid(); + + $query = $this->db->query(" + SELECT `id`, `filename`, `mimetype`, `date`, `hash`, `filesize` + FROM files + WHERE user = ? + AND mimetype IN ('image/jpeg', 'image/png', 'image/gif') + ORDER BY date DESC + ", array($user))->result_array(); + + foreach($query as $key => $item) { + if (!$this->mfile->valid_id($item["id"])) { + unset($query[$key]); + continue; + } + $query[$key]["tooltip"] = $this->_tooltip_for_image($item); + } + + $this->data["items"] = $query; + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/upload_history_thumbnails', $this->data); + $this->load->view('footer', $this->data); + } + + function upload_history() + { + $this->muser->require_access("apikey"); + + $user = $this->muser->get_userid(); + + $query = array(); + $lengths = array(); + + // key: database field name; value: display name + $fields = array( + "id" => "ID", + "filename" => "Filename", + "mimetype" => "Mimetype", + "date" => "Date", + "hash" => "Hash", + "filesize" => "Size" + ); + + $this->data['title'] .= ' - Upload history'; + foreach($fields as $length_key => $value) { + $lengths[$length_key] = mb_strlen($value); + } + + $order = is_cli_client() ? "ASC" : "DESC"; + + $items = $this->db->query(" + SELECT ".implode(",", array_keys($fields))." + FROM files + WHERE user = ? + ", array($user))->result_array(); + + $query = $this->db->query(" + SELECT m.url_id id, sum(f.filesize) filesize, m.date, '' hash, '' mimetype, concat(count(*), ' file(s)') filename + FROM multipaste m + JOIN multipaste_file_map mfm ON m.multipaste_id = mfm.multipaste_id + JOIN files f ON f.id = mfm.file_url_id + WHERE m.user_id = ? + GROUP BY m.url_id + ", array($user))->result_array(); + + $items = array_merge($items, $query); + uasort($items, function($a, $b) use ($order) { + if ($order == "ASC") { + return $a["date"] - $b["date"]; + } else { + return $b["date"] - $a["date"]; + } + }); + + if (static_storage("response_type") == "json") { + return send_json_reply($items); + } + + foreach($items as $key => $item) { + $items[$key]["filesize"] = format_bytes($item["filesize"]); + if (is_cli_client()) { + // Keep track of longest string to pad plaintext output correctly + foreach($fields as $length_key => $value) { + $len = mb_strlen($items[$key][$length_key]); + if ($len > $lengths[$length_key]) { + $lengths[$length_key] = $len; + } + } + } + } + + $total_size = $this->db->query(" + SELECT sum(filesize) sum + FROM ( + SELECT filesize + FROM files + WHERE user = ? + GROUP BY hash + ) sub + ", array($user))->row_array(); + + $this->data["items"] = $items; + $this->data["lengths"] = $lengths; + $this->data["fields"] = $fields; + $this->data["total_size"] = format_bytes($total_size["sum"]); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/upload_history', $this->data); + $this->load->view('footer', $this->data); + } + + function do_delete() + { + $this->muser->require_access("apikey"); + + $ids = $this->input->post("ids"); + $userid = $this->muser->get_userid(); + $errors = array(); + $deleted = array(); + $deleted_count = 0; + $total_count = 0; + + if (!$ids || !is_array($ids)) { + show_error("No IDs specified"); + } + + foreach ($ids as $id) { + $total_count++; + $next = false; + + foreach (array($this->mfile, $this->mmultipaste) as $model) { + if ($model->id_exists($id)) { + if ($model->get_owner($id) !== $userid) { + $errors[] = array( + "id" => $id, + "reason" => "wrong owner", + ); + continue; + } + if ($model->delete_id($id)) { + $deleted[] = $id; + $deleted_count++; + $next = true; + } else { + $errors[] = array( + "id" => $id, + "reason" => "unknown error", + ); + } + } + } + + if ($next) { + continue; + } + + $errors[] = array( + "id" => $id, + "reason" => "doesn't exist", + ); + } + + if (static_storage("response_type") == "json") { + return send_json_reply(array( + "errors" => $errors, + "deleted" => $deleted, + "total_count" => $total_count, + "deleted_count" => $deleted_count, + )); + } + + $this->data["errors"] = $errors; + $this->data["deleted_count"] = $deleted_count; + $this->data["total_count"] = $total_count; + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'/deleted', $this->data); + $this->load->view('footer', $this->data); + } + + function do_multipaste() + { + $this->muser->require_access("apikey"); + + $ids = $this->input->post("ids"); + $errors = array(); + + if (!$ids || !is_array($ids)) { + show_error("No IDs specified"); + } + + if (count(array_unique($ids)) != count($ids)) { + show_error("Duplicate IDs are not supported"); + } + + foreach ($ids as $id) { + if (!$this->mfile->id_exists($id)) { + $errors[] = array( + "id" => $id, + "reason" => "doesn't exist", + ); + } + + $filedata = $this->mfile->get_filedata($id); + if ($filedata["user"] != $this->muser->get_userid()) { + $errors[] = array( + "id" => $id, + "reason" => "not owned by you", + ); + } + } + + if (!empty($errors)) { + $errorstring = ""; + foreach ($errors as $error) { + $errorstring .= $error["id"]." ".$error["reason"]."<br>\n"; + } + show_error($errorstring); + } + + $limits = $this->muser->get_upload_id_limits(); + $url_id = $this->mmultipaste->new_id($limits[0], $limits[1]); + + $multipaste_id = $this->mmultipaste->get_multipaste_id($url_id); + assert($multipaste_id !== false); + + foreach ($ids as $id) { + $this->db->insert("multipaste_file_map", array( + "file_url_id" => $id, + "multipaste_id" => $multipaste_id, + )); + } + + return $this->_show_url(array($url_id), false); + } + + function delete() + { + $this->muser->require_access("apikey"); + + if (!is_cli_client()) { + show_error("Not a listed cli client, please use the history to delete uploads.\n", 403); + } + + $id = $this->uri->segment(3); + $this->data["id"] = $id; + $userid = $this->muser->get_userid(); + + foreach (array($this->mfile, $this->mmultipaste) as $model) { + if ($model->id_exists($id)) { + if ($model->get_owner($id) !== $userid) { + echo "You don't own this file\n"; + return; + } + if ($model->delete_id($id)) { + echo "$id has been deleted.\n"; + } else { + echo "Deletion failed. Unknown error\n"; + } + return; + } + } + + show_error("Unknown ID '$id'.", 404); + } + + // Handle pastes + // TODO: merge with do_upload and also merge the forms + // TODO: add support for multiple textareas (+ view) + function do_paste() + { + // stateful clients get a cookie to claim the ID later + // don't force them to log in just yet + if (!stateful_client()) { + $this->muser->require_access(); + } + + $content = $this->input->post("content"); + $filesize = strlen($content); + $filename = "stdin"; + + if (!$content) { + show_error("Nothing was pasted, content is empty.", 400); + } + + if ($filesize > $this->config->item('upload_max_size')) { + show_error("Error while uploading: File too big", 413); + } + + $limits = $this->muser->get_upload_id_limits(); + $id = $this->mfile->new_id($limits[0], $limits[1]); + $hash = md5($content); + + $folder = $this->mfile->folder($hash); + file_exists($folder) || mkdir ($folder); + $file = $this->mfile->file($hash); + + file_put_contents($file, $content); + $this->mfile->add_file($hash, $id, $filename); + $this->_show_url(array($id), false); + } + + // Handles uploaded files + function do_upload() + { + // stateful clients get a cookie to claim the ID later + // don't force them to log in just yet + if (!stateful_client()) { + $this->muser->require_access("basic"); + } + + $ids = array(); + + $extension = $this->input->post('extension'); + $multipaste = $this->input->post('multipaste'); + + $files = getNormalizedFILES(); + + if (empty($files)) { + show_error("No file was uploaded or unknown error occured."); + } + + // Check for errors before doing anything + // First error wins and is displayed, these shouldn't happen that often anyway. + foreach ($files as $key => $file) { + // getNormalizedFILES() removes any file with error == 4 + if ($file['error'] !== UPLOAD_ERR_OK) { + // ERR_OK only for completeness, condition above ignores it + $errors = array( + UPLOAD_ERR_OK => "There is no error, the file uploaded with success", + UPLOAD_ERR_INI_SIZE => "The uploaded file exceeds the upload_max_filesize directive in php.ini", + UPLOAD_ERR_FORM_SIZE => "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", + UPLOAD_ERR_PARTIAL => "The uploaded file was only partially uploaded", + UPLOAD_ERR_NO_FILE => "No file was uploaded", + UPLOAD_ERR_NO_TMP_DIR => "Missing a temporary folder", + UPLOAD_ERR_CANT_WRITE => "Failed to write file to disk", + UPLOAD_ERR_EXTENSION => "A PHP extension stopped the file upload", + ); + + $msg = "Unknown error."; + + if (isset($errors[$file['error']])) { + $msg = $errors[$file['error']]; + } else { + $msg = "Unknown error code: ".$file['error'].". Please report a bug."; + } + + show_error("Error while uploading: ".$msg, 400); + } + + $filesize = filesize($file['tmp_name']); + if ($filesize > $this->config->item('upload_max_size')) { + show_error("Error while uploading: File too big", 413); + } + } + + foreach ($files as $key => $file) { + $limits = $this->muser->get_upload_id_limits(); + $id = $this->mfile->new_id($limits[0], $limits[1]); + $hash = md5_file($file['tmp_name']); + + // work around a curl bug and allow the client to send the real filename base64 encoded + // TODO: this interface currently sets the same filename for every file if you use multiupload + $filename = $this->input->post("filename"); + if ($filename !== false) { + $filename = base64_decode($filename, true); + } + + // fall back if base64_decode failed + if ($filename === false) { + $filename = $file['name']; + } + + $filename = trim($filename, "\r\n\0\t\x0B"); + + $folder = $this->mfile->folder($hash); + file_exists($folder) || mkdir ($folder); + $file_path = $this->mfile->file($hash); + + move_uploaded_file($file['tmp_name'], $file_path); + $this->mfile->add_file($hash, $id, $filename); + $ids[] = $id; + } + + if ($multipaste !== false) { + $multipaste_url_id = $this->mmultipaste->new_id($limits[0], $limits[1]); + + $multipaste_id = $this->mmultipaste->get_multipaste_id($multipaste_url_id); + assert($multipaste_id !== false); + + foreach ($ids as $id) { + $this->db->insert("multipaste_file_map", array( + "file_url_id" => $id, + "multipaste_id" => $multipaste_id, + )); + } + $ids[] = $multipaste_url_id; + } + + $this->_show_url($ids, $extension); + } + + function claim_id() + { + $this->muser->require_access(); + + $last_upload = $this->session->userdata("last_upload"); + + if ($last_upload === false) { + show_error("Failed to get last upload data"); + } + + $ids = $last_upload["ids"]; + $errors = array(); + + assert(is_array($ids)); + + foreach ($ids as $key => $id) { + $filedata = $this->mfile->get_filedata($id); + + if ($filedata["user"] != 0) { + $errors[] = $id; + } + + $this->mfile->adopt($id); + } + + if (!empty($errors)) { + show_error("Someone already owns '".implode(", ", $errors)."', can't reassign."); + } + + $this->session->unset_userdata("last_upload"); + + $this->_show_url($ids, $last_upload["lexer"]); + } + + function contact() + { + $file = FCPATH."data/local/contact-info.php"; + if (file_exists($file)) { + $this->data["contact_info"] = file_get_contents($file); + } else { + $this->data["contact_info"] = '<p>Contact info not available.</p>'; + } + + $this->load->view('header', $this->data); + $this->load->view('contact', $this->data); + $this->load->view('footer', $this->data); + } + + /* Functions below this comment can only be run via the CLI + * `php index.php file <function name>` + */ + + // Removes old files + function cron() + { + if (!$this->input->is_cli_request()) return; + + // 0 age disables age checks + if ($this->config->item('upload_max_age') == 0) return; + + $oldest_time = (time() - $this->config->item('upload_max_age')); + $oldest_session_time = (time() - $this->config->item("sess_expiration")); + + $small_upload_size = $this->config->item('small_upload_size'); + + $query = $this->db->query(' + SELECT hash, id, user + FROM files + WHERE date < ? OR (user = 0 AND date < ?)', + array($oldest_time, $oldest_session_time)); + + foreach($query->result_array() as $row) { + $file = $this->mfile->file($row['hash']); + if (!file_exists($file)) { + $this->mfile->delete_id($row["id"]); + continue; + } + + if ($row["user"] == 0 || filesize($file) > $small_upload_size) { + if (filemtime($file) < $oldest_time) { + unlink($file); + $this->mfile->delete_hash($row["hash"]); + } else { + $this->mfile->delete_id($row["id"]); + if ($this->mfile->stale_hash($row["hash"])) { + unlink($file); + } + } + } + } + } + + /* remove files without database entries */ + function clean_stale_files() + { + if (!$this->input->is_cli_request()) return; + + $upload_path = $this->config->item("upload_path"); + $outer_dh = opendir($upload_path); + + while (($dir = readdir($outer_dh)) !== false) { + if (!is_dir($upload_path."/".$dir) || $dir == ".." || $dir == ".") { + continue; + } + + $dh = opendir($upload_path."/".$dir); + + $empty = true; + + while (($file = readdir($dh)) !== false) { + if ($file == ".." || $file == ".") { + continue; + } + + $query = $this->db->query("SELECT hash FROM files WHERE hash = ? LIMIT 1", array($file))->row_array(); + + if (empty($query)) { + unlink($upload_path."/".$dir."/".$file); + } else { + $empty = false; + } + } + + closedir($dh); + + if ($empty) { + rmdir($upload_path."/".$dir); + } + } + closedir($outer_dh); + } + + function nuke_id() + { + if (!$this->input->is_cli_request()) return; + + $id = $this->uri->segment(3); + + $file_data = $this->mfile->get_filedata($id); + + if (empty($file_data)) { + echo "unknown id \"$id\"\n"; + return; + } + + $hash = $file_data["hash"]; + $this->mfile->delete_hash($hash); + echo "removed hash \"$hash\"\n"; + } + + function update_file_metadata() + { + if (!$this->input->is_cli_request()) return; + + $chunk = 500; + + $total = $this->db->count_all("files"); + + for ($limit = 0; $limit < $total; $limit += $chunk) { + $query = $this->db->query(" + SELECT hash + FROM files + GROUP BY hash + LIMIT $limit, $chunk + ")->result_array(); + + foreach ($query as $key => $item) { + $hash = $item["hash"]; + $filesize = intval(filesize($this->mfile->file($hash))); + $mimetype = $this->mfile->mimetype($this->mfile->file($hash)); + + $this->db->query(" + UPDATE files + SET filesize = ?, mimetype = ? + WHERE hash = ? + ", array($filesize, $mimetype, $hash)); + } + } + } +} + +# vim: set noet: diff --git a/application/controllers/tools.php b/application/controllers/tools.php new file mode 100644 index 000000000..b80dc5024 --- /dev/null +++ b/application/controllers/tools.php @@ -0,0 +1,45 @@ +<?php +/* + * Copyright 2014 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Tools extends MY_Controller { + + function __construct() + { + parent::__construct(); + + $this->load->model('mfile'); + if (!$this->input->is_cli_request()) { + show_error("This can only be called via CLI"); + } + } + + function index() + { + echo "php index.php <controller> <function> [arguments]\n"; + echo "\n"; + echo "Functions:\n"; + echo " file cron Cronjob\n"; + echo " file nuke_id <ID> Nukes all IDs sharing the same hash\n"; + echo " user cron Cronjob\n"; + echo " tools update_database Update/Initialise the database\n"; + echo "\n"; + echo "Functions that shouldn't have to be run:\n"; + echo " file clean_stale_files Remove files without database entries\n"; + echo " file update_file_metadata Update filesize and mimetype in database\n"; + exit; + } + + function update_database() + { + $this->load->library('migration'); + if ( ! $this->migration->current()) { + show_error($this->migration->error_string()); + } + } +} diff --git a/application/controllers/user.php b/application/controllers/user.php new file mode 100644 index 000000000..079f1665c --- /dev/null +++ b/application/controllers/user.php @@ -0,0 +1,516 @@ +<?php +/* + * Copyright 2012-2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class User extends MY_Controller { + protected $json_enabled_functions = array( + "create_apikey", + "apikeys", + ); + + + function __construct() + { + parent::__construct(); + + $this->var->view_dir = "user/"; + } + + function index() + { + if ($this->input->is_cli_request()) { + $this->load->library("../controllers/tools"); + return $this->tools->index(); + } + + $this->data["username"] = $this->muser->get_username(); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'index', $this->data); + $this->load->view('footer', $this->data); + } + + function test_login() + { + $username = $this->input->post('username'); + $password = $this->input->post('password'); + + if ($this->muser->login($username, $password)) { + $this->output->set_status_header(204); + } else { + $this->output->set_status_header(401); + } + } + + function login() + { + $this->muser->require_session(); + $this->session->keep_flashdata("uri"); + + if ($this->input->post('process') !== false) { + $username = $this->input->post('username'); + $password = $this->input->post('password'); + + $result = $this->muser->login($username, $password); + + if ($result !== true) { + $this->data['login_error'] = true; + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'login', $this->data); + $this->load->view('footer', $this->data); + } else { + $uri = $this->session->flashdata("uri"); + if ($uri) { + redirect($uri); + } else { + redirect("/"); + } + } + } else { + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'login', $this->data); + $this->load->view('footer', $this->data); + } + } + + function create_apikey() + { + $this->muser->require_access(); + + $userid = $this->muser->get_userid(); + $comment = $this->input->post("comment"); + $comment = $comment === false ? "" : $comment; + $access_level = $this->input->post("access_level"); + + if ($access_level === false) { + $access_level = "apikey"; + } + + $valid_levels = $this->muser->get_access_levels(); + if (array_search($access_level, $valid_levels) === false) { + show_error("Invalid access levels requested."); + } + + if (strlen($comment) > 255) { + show_error("Comment may only be 255 chars long."); + } + + $key = random_alphanum(32); + + $this->db->query(" + INSERT INTO `apikeys` + (`key`, `user`, `comment`, `access_level`) + VALUES (?, ?, ?, ?) + ", array($key, $userid, $comment, $access_level)); + + if (static_storage("response_type") == "json") { + return send_json_reply(array("new_key" => $key)); + } + + if (is_cli_client()) { + echo "$key\n"; + } else { + redirect("user/apikeys"); + } + } + + function delete_apikey() + { + $this->muser->require_access(); + + $userid = $this->muser->get_userid(); + $key = $this->input->post("key"); + + $this->db->query(" + DELETE FROM `apikeys` + WHERE `user` = ? + AND `key` = ? + ", array($userid, $key)); + + redirect("user/apikeys"); + } + + function apikeys() + { + $this->muser->require_access(); + + $userid = $this->muser->get_userid(); + + $query = $this->db->query(" + SELECT `key`, UNIX_TIMESTAMP(`created`) `created`, `comment`, `access_level` + FROM `apikeys` + WHERE `user` = ? order by created desc + ", array($userid))->result_array(); + + if (static_storage("response_type") == "json") { + return send_json_reply($query); + } + + $this->data["query"] = $query; + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'apikeys', $this->data); + $this->load->view('footer', $this->data); + } + + function create_invitation_key() + { + $this->duser->require_implemented("can_register_new_users"); + $this->muser->require_access(); + + $userid = $this->muser->get_userid(); + + $query = $this->db->query(" + SELECT count(*) count + FROM `actions` + WHERE `user` = ? + AND `action` = 'invitation' + ", array($userid))->row_array(); + + if ($query["count"] + 1 > 3) { + show_error("You can't create more invitation keys at this time."); + } + + $key = random_alphanum(12, 16); + + $this->db->query(" + INSERT INTO `actions` + (`key`, `user`, `date`, `action`) + VALUES (?, ?, ?, 'invitation') + ", array($key, $userid, time())); + + redirect("user/invite"); + } + + function invite() + { + $this->duser->require_implemented("can_register_new_users"); + $this->muser->require_access(); + + $userid = $this->muser->get_userid(); + + $query = $this->db->query(" + SELECT `key`, `date` + FROM `actions` + WHERE `user` = ? + AND `action` = 'invitation' + ", array($userid))->result_array(); + + $this->data["query"] = $query; + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'invite', $this->data); + $this->load->view('footer', $this->data); + } + + function register() + { + $this->duser->require_implemented("can_register_new_users"); + $key = $this->uri->segment(3); + $process = $this->input->post("process"); + $values = array( + "username" => "", + "email" => "" + ); + $error = array(); + + $query = $this->muser->get_action("invitation", $key); + + $referrer = $query["user"]; + + if ($process !== false) { + $username = $this->input->post("username"); + $email = $this->input->post("email"); + $password = $this->input->post("password"); + $password_confirm = $this->input->post("password_confirm"); + + if (!$username || strlen($username) > 32 || !preg_match("/^[a-z0-9]+$/", $username)) { + $error[]= "Invalid username (only up to 32 chars of a-z0-9 are allowed)."; + } else { + if ($this->muser->username_exists($username)) { + $error[] = "Username already exists."; + } + } + + $this->load->helper("email"); + if (!valid_email($email)) { + $error[]= "Invalid email."; + } + + if (!$password || $password != $password_confirm) { + $error[]= "No password or passwords don't match."; + } + + if (empty($error)) { + $this->db->query(" + INSERT INTO users + (`username`, `password`, `email`, `referrer`) + VALUES(?, ?, ?, ?) + ", array( + $username, + $this->muser->hash_password($password), + $email, + $referrer + )); + $this->db->query(" + DELETE FROM actions + WHERE `key` = ? + ", array($key)); + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'registered', $this->data); + $this->load->view('footer', $this->data); + return; + } else { + $values["username"] = $username; + $values["email"] = $email; + } + } + + $this->data["key"] = $key; + $this->data["values"] = $values; + $this->data["error"] = $error; + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'register', $this->data); + $this->load->view('footer', $this->data); + } + + // This routes the different steps of a password reset + function reset_password() + { + $this->duser->require_implemented("can_reset_password"); + $key = $this->uri->segment(3); + + if ($_SERVER["REQUEST_METHOD"] == "GET" && $key === false) { + return $this->_reset_password_username_form(); + } + + if ($key === false) { + return $this->_reset_password_send_mail(); + } + + if ($key !== false) { + return $this->_reset_password_form(); + } + } + + // This simply queries the username + function _reset_password_username_form() + { + $this->data['username'] = $this->muser->get_username(); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'reset_password_username_form', $this->data); + $this->load->view('footer', $this->data); + } + + // This sends a mail to the user containing the reset link + function _reset_password_send_mail() + { + $key = random_alphanum(12, 16); + $username = $this->input->post("username"); + + if (!$this->muser->username_exists($username)) { + show_error("Invalid username"); + } + + $userinfo = $this->db->query(" + SELECT id, email, username + FROM users + WHERE username = ? + ", array($username))->row_array(); + + $this->load->library("email"); + + $this->db->query(" + INSERT INTO `actions` + (`key`, `user`, `date`, `action`) + VALUES (?, ?, ?, 'passwordreset') + ", array($key, $userinfo["id"], time())); + + $admininfo = $this->db->query(" + SELECT email + FROM users + WHERE referrer is null + ORDER BY id asc + LIMIT 1 + ")->row_array(); + + $this->email->from($admininfo["email"]); + $this->email->to($userinfo["email"]); + $this->email->subject("FileBin password reset"); + $this->email->message("" + ."Someone requested a password reset for the account '${userinfo["username"]}'\n" + ."from the IP address '${_SERVER["REMOTE_ADDR"]}'.\n" + ."\n" + ."Please follow this link to reset your password:\n" + .site_url("user/reset_password/$key") + ); + $this->email->send(); + + // don't disclose full email addresses + $this->data["email_domain"] = substr($userinfo["email"], strpos($userinfo["email"], "@") + 1); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'reset_password_link_sent', $this->data); + $this->load->view('footer', $this->data); + } + + // This displays a form and handles the reset if the form has been filled out correctly + function _reset_password_form() + { + $process = $this->input->post("process"); + $key = $this->uri->segment(3); + $error = array(); + + $query = $this->muser->get_action("passwordreset", $key); + + $userid = $query["user"]; + + if ($process !== false) { + $password = $this->input->post("password"); + $password_confirm = $this->input->post("password_confirm"); + + if (!$password || $password != $password_confirm) { + $error[]= "No password or passwords don't match."; + } + + if (empty($error)) { + $this->db->query(" + UPDATE users + SET `password` = ? + WHERE `id` = ? + ", array($this->muser->hash_password($password), $userid)); + $this->db->query(" + DELETE FROM actions + WHERE `key` = ? + ", array($key)); + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'reset_password_success', $this->data); + $this->load->view('footer', $this->data); + return; + } + } + + $this->data["key"] = $key; + $this->data["error"] = $error; + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'reset_password_form', $this->data); + $this->load->view('footer', $this->data); + } + + function profile() + { + $this->muser->require_access(); + + if ($this->input->post("process") !== false) { + $this->_save_profile(); + } + + $this->data["profile_data"] = $this->muser->get_profile_data(); + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'profile', $this->data); + $this->load->view('footer', $this->data); + } + + private function _save_profile() + { + $this->muser->require_access(); + + /* + * Key = name of the form field + * Value = function that sanatizes the value and returns it + * TODO: some kind of error handling that doesn't loose correctly filled out fields + */ + $value_processor = array(); + + $value_processor["upload_id_limits"] = function($value) { + $values = explode("-", $value); + + if (!is_array($values) || count($values) != 2) { + show_error("Invalid upload id limit value"); + } + + $lower = intval($values[0]); + $upper = intval($values[1]); + + if ($lower > $upper) { + show_error("lower limit > upper limit"); + } + + if ($lower < 3 || $upper > 64) { + show_error("upper or lower limit out of bounds (3-64)"); + } + + return $lower."-".$upper; + }; + + $data = array(); + foreach (array_keys($value_processor) as $field) { + $value = $this->input->post($field); + + if ($value !== false) { + $data[$field] = $value_processor[$field]($value); + } + } + + if (!empty($data)) { + $this->muser->update_profile($data); + } + + $this->data["alerts"][] = array( + "type" => "success", + "message" => "Changes saved", + ); + + return true; + } + + function logout() + { + $this->muser->logout(); + redirect('/'); + } + + function hash_password() + { + $process = $this->input->post("process"); + $password = $this->input->post("password"); + $password_confirm = $this->input->post("password_confirm"); + $this->data["hash"] = false; + $this->data["password"] = $password; + + if ($process !== false) { + if (!$password || $password != $password_confirm) { + $error[]= "No password or passwords don't match."; + } else { + $this->data["hash"] = $this->muser->hash_password($password); + } + } + + $this->load->view('header', $this->data); + $this->load->view($this->var->view_dir.'hash_password', $this->data); + $this->load->view('footer', $this->data); + } + + function cron() + { + if (!$this->input->is_cli_request()) return; + + if ($this->config->item('actions_max_age') == 0) return; + + $oldest_time = (time() - $this->config->item('actions_max_age')); + + $this->db->query(" + DELETE FROM actions + WHERE date < ? + ", array($oldest_time)); + } +} diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php deleted file mode 100644 index 21bef43d9..000000000 --- a/application/controllers/welcome.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); - -class Welcome extends CI_Controller { - - /** - * Index Page for this controller. - * - * Maps to the following URL - * http://example.com/index.php/welcome - * - or - - * http://example.com/index.php/welcome/index - * - or - - * Since this controller is set as the default controller in - * config/routes.php, it's displayed at http://example.com/ - * - * So any other public methods not prefixed with an underscore will - * map to /index.php/welcome/<method_name> - * @see http://codeigniter.com/user_guide/general/urls.html - */ - public function index() - { - $this->load->view('welcome_message'); - } -} - -/* End of file welcome.php */ -/* Location: ./application/controllers/welcome.php */
\ No newline at end of file diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php new file mode 100644 index 000000000..a98245b1b --- /dev/null +++ b/application/core/MY_Controller.php @@ -0,0 +1,119 @@ +<?php +/* + * Copyright 2009-2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class MY_Controller extends CI_Controller { + public $data = array(); + public $var; + + protected $json_enabled_functions = array( + ); + + function __construct() + { + parent::__construct(); + + $this->var = new StdClass(); + $csrf_protection = true; + + // check if DB is up to date + if (!$this->input->is_cli_request()) { + if (!$this->db->table_exists('migrations')){ + show_error("Database not initialized. Can't find migrations table. Please run the migration script."); + } else { + $this->config->load("migration", true); + $target_version = $this->config->item("migration_version", "migration"); + + // TODO: wait 20 seconds for an update so requests don't get lost for short updates? + $row = $this->db->get('migrations')->row(); + + $current_version = $row ? $row->version : 0; + if ($current_version != $target_version) { + show_error("Database version is $current_version, we want $target_version. Please run the migration script."); + } + } + } + + $old_path = getenv("PATH"); + putenv("PATH=$old_path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"); + + mb_internal_encoding('UTF-8'); + $this->load->helper(array('form', 'filebin')); + + // TODO: proper accept header handling or is this enough? + if (isset($_SERVER["HTTP_ACCEPT"])) { + if ($_SERVER["HTTP_ACCEPT"] == "application/json") { + static_storage("response_type", "json"); + } + } + + // Allow for easier testing in browser + if ($this->input->get("json") !== false) { + static_storage("response_type", "json"); + } + + if (static_storage("response_type") == "json" && ! in_array($this->uri->rsegment(2), $this->json_enabled_functions)) { + show_error("Function not JSON enabled"); + } + + if ($this->input->post("apikey") !== false) { + /* This relies on the authentication code always verifying the supplied + * apikey. If the key is not verified/logged in an attacker could simply + * add an empty "apikey" field to the CSRF form to circumvent the + * protection. If we always log in if a key is supplied we can ensure + * that an attacker (and the victim since they get a cookie) can only + * access the attacker's account. + */ + $csrf_protection = false; + } + + $uri_start = $this->uri->rsegment(1)."/".$this->uri->rsegment(2); + $csrf_whitelisted_handlers = array( + "always" => array( + /* Whitelist the upload pages because they don't cause harm and a user + * might keep the upload page open for more than csrf_expire seconds + * and we don't want to annoy them when they upload a big file and the + * CSRF check fails. + */ + "file/do_upload", + "file/do_paste", + ), + "cli_client" => array( + "file/do_delete", + "file/delete", + "file/upload_history", + "user/create_apikey", + "file/get_max_size", + ), + ); + if (in_array($uri_start, $csrf_whitelisted_handlers["always"])) { + $csrf_protection = false; + } + + if (is_cli_client() && in_array($uri_start, $csrf_whitelisted_handlers["cli_client"])) { + $csrf_protection = false; + } + + if ($csrf_protection && !$this->input->is_cli_request()) { + // 2 functions for accessing config options, really? + $this->config->set_item('csrf_protection', true); + config_item("csrf_protection", true); + $this->security->__construct(); + $this->security->csrf_verify(); + } + + if ($this->config->item("environment") == "development" && static_storage("response_type") != "json") { + $this->output->enable_profiler(true); + } + + $this->data['title'] = "FileBin"; + + $this->load->model("muser"); + $this->data["user_logged_in"] = $this->muser->logged_in(); + } +} diff --git a/application/errors/error_404.php b/application/errors/error_404.php index 792726a67..cfe923d63 100644 --- a/application/errors/error_404.php +++ b/application/errors/error_404.php @@ -1,62 +1,3 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<title>404 Page Not Found</title> -<style type="text/css"> - -::selection{ background-color: #E13300; color: white; } -::moz-selection{ background-color: #E13300; color: white; } -::webkit-selection{ background-color: #E13300; color: white; } - -body { - background-color: #fff; - margin: 40px; - font: 13px/20px normal Helvetica, Arial, sans-serif; - color: #4F5155; -} - -a { - color: #003399; - background-color: transparent; - font-weight: normal; -} - -h1 { - color: #444; - background-color: transparent; - border-bottom: 1px solid #D0D0D0; - font-size: 19px; - font-weight: normal; - margin: 0 0 14px 0; - padding: 14px 15px 10px 15px; -} - -code { - font-family: Consolas, Monaco, Courier New, Courier, monospace; - font-size: 12px; - background-color: #f9f9f9; - border: 1px solid #D0D0D0; - color: #002166; - display: block; - margin: 14px 0 14px 0; - padding: 12px 10px 12px 10px; -} - -#container { - margin: 10px; - border: 1px solid #D0D0D0; - -webkit-box-shadow: 0 0 8px #D0D0D0; -} - -p { - margin: 12px 15px 12px 15px; -} -</style> -</head> -<body> - <div id="container"> - <h1><?php echo $heading; ?></h1> - <?php echo $message; ?> - </div> -</body> -</html>
\ No newline at end of file +<?php +$title = "404 Page Not Found"; +include "application/errors/error_general.php"; diff --git a/application/errors/error_db.php b/application/errors/error_db.php index b396cda9f..255513634 100644 --- a/application/errors/error_db.php +++ b/application/errors/error_db.php @@ -1,62 +1,3 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<title>Database Error</title> -<style type="text/css"> - -::selection{ background-color: #E13300; color: white; } -::moz-selection{ background-color: #E13300; color: white; } -::webkit-selection{ background-color: #E13300; color: white; } - -body { - background-color: #fff; - margin: 40px; - font: 13px/20px normal Helvetica, Arial, sans-serif; - color: #4F5155; -} - -a { - color: #003399; - background-color: transparent; - font-weight: normal; -} - -h1 { - color: #444; - background-color: transparent; - border-bottom: 1px solid #D0D0D0; - font-size: 19px; - font-weight: normal; - margin: 0 0 14px 0; - padding: 14px 15px 10px 15px; -} - -code { - font-family: Consolas, Monaco, Courier New, Courier, monospace; - font-size: 12px; - background-color: #f9f9f9; - border: 1px solid #D0D0D0; - color: #002166; - display: block; - margin: 14px 0 14px 0; - padding: 12px 10px 12px 10px; -} - -#container { - margin: 10px; - border: 1px solid #D0D0D0; - -webkit-box-shadow: 0 0 8px #D0D0D0; -} - -p { - margin: 12px 15px 12px 15px; -} -</style> -</head> -<body> - <div id="container"> - <h1><?php echo $heading; ?></h1> - <?php echo $message; ?> - </div> -</body> -</html>
\ No newline at end of file +<?php +$title = "Database Error"; +include "application/errors/error_general.php"; diff --git a/application/errors/error_general.php b/application/errors/error_general.php index fd63ce2c5..be495e4f6 100644 --- a/application/errors/error_general.php +++ b/application/errors/error_general.php @@ -1,3 +1,51 @@ +<?php + +// fancy error page only works if we can load helpers +if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) { + if (!isset($title)) { + $title = "Error"; + } + $GLOBALS["is_error_page"] = true; + + $CI =& get_instance(); + $CI->load->helper("filebin"); + $CI->load->helper("url"); + + if ($CI->input->is_cli_request()) { + is_cli_client(true); + } + + if (static_storage("response_type") == "json") { + $message = str_replace("</p>", "</p>\n", $message); + $array = array( + "status" => "error", + "message" => strip_tags($message), + ); + header('Content-type: application/json'); + echo json_encode($array); + exit(); + } + + if (is_cli_client()) { + $message = str_replace("</p>", "</p>\n", $message); + $message = strip_tags($message); + echo "$heading: $message\n"; + exit(); + } + + include 'application/views/header.php'; + + ?> + <div class="error"> + <h1><?php echo $heading; ?></h1> + <?php echo $message; ?> + </div> + + <?php + include 'application/views/footer.php'; +} else { + // default CI error page +?> <!DOCTYPE html> <html lang="en"> <head> @@ -59,4 +107,6 @@ p { <?php echo $message; ?> </div> </body> -</html>
\ No newline at end of file +</html> +<?php +} diff --git a/application/errors/error_php.php b/application/errors/error_php.php index f085c2037..5f91e07a0 100644 --- a/application/errors/error_php.php +++ b/application/errors/error_php.php @@ -7,4 +7,5 @@ <p>Filename: <?php echo $filepath; ?></p> <p>Line Number: <?php echo $line; ?></p> -</div>
\ No newline at end of file +</div> +<?php exit(); diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php new file mode 100644 index 000000000..e5637ce94 --- /dev/null +++ b/application/helpers/filebin_helper.php @@ -0,0 +1,286 @@ +<?php + +function format_bytes($size) +{ + $suffixes = array('B', 'KiB', 'MiB', 'GiB', 'TiB' , 'PiB' , 'EiB', 'ZiB', 'YiB'); + $boundary = 2048.0; + + for ($suffix_pos = 0; $suffix_pos + 1 < count($suffixes); $suffix_pos++) { + if ($size <= $boundary && $size >= -$boundary) { + break; + } + $size /= 1024.0; + } + + # don't print decimals for bytes + if ($suffix_pos != 0) { + return sprintf("%.2f%s", $size, $suffixes[$suffix_pos]); + } else { + return sprintf("%.0f%s", $size, $suffixes[$suffix_pos]); + } +} + +function even_odd($reset = false) +{ + static $counter = 1; + + if ($reset) { + $counter = 1; + } + + if ($counter++%2 == 0) { + return 'even'; + } else { + return 'odd'; + } +} + +// Source: http://hu.php.net/manual/en/function.str-pad.php#71558 +// This is a multibyte enabled str_pad +function mb_str_pad($ps_input, $pn_pad_length, $ps_pad_string = " ", $pn_pad_type = STR_PAD_RIGHT, $ps_encoding = NULL) +{ + $ret = ""; + + if (is_null($ps_encoding)) + $ps_encoding = mb_internal_encoding(); + + $hn_length_of_padding = $pn_pad_length - mb_strlen($ps_input, $ps_encoding); + $hn_psLength = mb_strlen($ps_pad_string, $ps_encoding); // pad string length + + if ($hn_psLength <= 0 || $hn_length_of_padding <= 0) { + // Padding string equal to 0: + // + $ret = $ps_input; + } + else { + $hn_repeatCount = floor($hn_length_of_padding / $hn_psLength); // how many times repeat + + if ($pn_pad_type == STR_PAD_BOTH) { + $hs_lastStrLeft = ""; + $hs_lastStrRight = ""; + $hn_repeatCountLeft = $hn_repeatCountRight = ($hn_repeatCount - $hn_repeatCount % 2) / 2; + + $hs_lastStrLength = $hn_length_of_padding - 2 * $hn_repeatCountLeft * $hn_psLength; // the rest length to pad + $hs_lastStrLeftLength = $hs_lastStrRightLength = floor($hs_lastStrLength / 2); // the rest length divide to 2 parts + $hs_lastStrRightLength += $hs_lastStrLength % 2; // the last char add to right side + + $hs_lastStrLeft = mb_substr($ps_pad_string, 0, $hs_lastStrLeftLength, $ps_encoding); + $hs_lastStrRight = mb_substr($ps_pad_string, 0, $hs_lastStrRightLength, $ps_encoding); + + $ret = str_repeat($ps_pad_string, $hn_repeatCountLeft) . $hs_lastStrLeft; + $ret .= $ps_input; + $ret .= str_repeat($ps_pad_string, $hn_repeatCountRight) . $hs_lastStrRight; + } + else { + $hs_lastStr = mb_substr($ps_pad_string, 0, $hn_length_of_padding % $hn_psLength, $ps_encoding); // last part of pad string + + if ($pn_pad_type == STR_PAD_LEFT) + $ret = str_repeat($ps_pad_string, $hn_repeatCount) . $hs_lastStr . $ps_input; + else + $ret = $ps_input . str_repeat($ps_pad_string, $hn_repeatCount) . $hs_lastStr; + } + } + + return $ret; +} + +function is_cli_client($override = null) +{ + static $is_cli = null; + + if ($override !== null) { + $is_cli = $override; + } + + if ($is_cli === null) { + $is_cli = false; + // official client uses "fb-client/$version" as useragent + $clients = array("fb-client", "libcurl", "pyfb", "curl/"); + foreach ($clients as $client) { + if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], $client) !== false) { + $is_cli = true; + } + } + } + return $is_cli; +} + +function random_alphanum($min_length, $max_length = null) +{ + $random = ''; + $char_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + $char_list .= "abcdefghijklmnopqrstuvwxyz"; + $char_list .= "1234567890"; + + if ($max_length === null) { + $max_length = $min_length; + } + $length = mt_rand($min_length, $max_length); + + for($i = 0; $i < $max_length; $i++) { + if (strlen($random) == $length) break; + $random .= substr($char_list, mt_rand(0, strlen($char_list) - 1), 1); + } + return $random; +} + +function link_with_mtime($file) +{ + $link = base_url($file); + + if (file_exists(FCPATH.$file)) { + $link .= "?".filemtime(FCPATH.$file); + } + + return $link; +} + +function include_js($file) +{ + static $included = array(); + if (in_array($file, $included) || $file === null) { + return ""; + } + return "<script src=\"".link_with_mtime($file)."\"></script>\n"; +} + +// kind of hacky, but works well enough for now +function register_js_include($file, $return = false) +{ + static $list = ""; + $list .= include_js($file); + if ($return) { + return $list; + } +} + +function include_registered_js() +{ + return register_js_include(null, true); +} + +function handle_etag($etag) +{ + $etag = strtolower($etag); + $modified = true; + + if(isset($_SERVER['HTTP_IF_NONE_MATCH'])) { + $oldtag = trim(strtolower($_SERVER['HTTP_IF_NONE_MATCH']), '"'); + if($oldtag == $etag) { + $modified = false; + } else { + $modified = true; + } + } + + header('Etag: "'.$etag.'"'); + + if (!$modified) { + header("HTTP/1.1 304 Not Modified"); + exit(); + } +} + +// Reference: http://php.net/manual/en/features.file-upload.multiple.php#109437 +// This is a little different because we don't care about the fieldname +function getNormalizedFILES() +{ + $newfiles = array(); + $ret = array(); + + foreach($_FILES as $fieldname => $fieldvalue) + foreach($fieldvalue as $paramname => $paramvalue) + foreach((array)$paramvalue as $index => $value) + $newfiles[$fieldname][$index][$paramname] = $value; + + $i = 0; + foreach ($newfiles as $fieldname => $field) { + foreach ($field as $file) { + // skip empty fields + if ($file["error"] === 4) { + continue; + } + $ret[$i] = $file; + $ret[$i]["formfield"] = $fieldname; + $i++; + } + } + + return $ret; +} + +// Allow simple checking inside views +function auth_driver_function_implemented($function) +{ + static $result = array(); + if (isset($result[$function])) { + return $result[$function]; + } + + $CI =& get_instance(); + $CI->load->driver("duser"); + $result[$function] = $CI->duser->is_implemented($function);; + + return $result[$function]; +} + +function send_json_reply($array, $status = "success") +{ + $reply = array(); + $reply["status"] = $status; + $reply["data"] = $array; + + $CI =& get_instance(); + $CI->output->set_content_type('application/json'); + $CI->output->set_output(json_encode($reply)); +} + +function static_storage($key, $value = null) +{ + static $storage = array(); + + if ($value !== null) { + $storage[$key] = $value; + } + + if (!isset($storage[$key])) { + $storage[$key] = null; + } + + return $storage[$key]; +} + +function stateful_client() +{ + $CI =& get_instance(); + + if ($CI->input->post("apikey")) { + return false; + } + + if (is_cli_client()) { + return false; + } + + return true; +} + +/** + * Cache the result of the function call + * @param key cache key to use + * @param ttl time to live for the cache entry + * @param function function to call + * @return return value of function (will be cached) + */ +function cache_function($key, $ttl, $function) +{ + $CI =& get_instance(); + $CI->load->driver('cache', array('adapter' => $CI->config->item("cache_backend"))); + if (! $content = $CI->cache->get($key)) { + $content = $function(); + $CI->cache->save($key, $content, $ttl); + } + return $content; +} + +# vim: set noet: diff --git a/application/libraries/Ddownload/Ddownload.php b/application/libraries/Ddownload/Ddownload.php new file mode 100644 index 000000000..808dfe776 --- /dev/null +++ b/application/libraries/Ddownload/Ddownload.php @@ -0,0 +1,34 @@ +<?php +/* + * Copyright 2013 Pierre Schmitz <pierre@archlinux.de> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +abstract class Ddownload_Driver extends CI_Driver { + + abstract public function serveFile($file, $filename, $type); +} + +class Ddownload extends CI_Driver_Library { + + protected $_adapter = null; + + protected $valid_drivers = array( + 'ddownload_php', 'ddownload_nginx', 'ddownload_lighttpd' + ); + + function __construct() + { + $CI =& get_instance(); + + $this->_adapter = $CI->config->item('download_driver'); + } + + public function serveFile($file, $filename, $type) + { + $this->{$this->_adapter}->serveFile($file, $filename, $type); + } +} diff --git a/application/libraries/Ddownload/drivers/Ddownload_lighttpd.php b/application/libraries/Ddownload/drivers/Ddownload_lighttpd.php new file mode 100644 index 000000000..780f60838 --- /dev/null +++ b/application/libraries/Ddownload/drivers/Ddownload_lighttpd.php @@ -0,0 +1,26 @@ +<?php +/* + * Copyright 2013 Pierre Schmitz <pierre@archlinux.de> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Ddownload_lighttpd extends Ddownload_Driver { + + public function serveFile($file, $filename, $type) + { + $CI =& get_instance(); + $upload_path = $CI->config->item('upload_path'); + + if (strpos($file, $upload_path) !== 0) { + show_error('Invalid file path'); + } + + header('Content-disposition: inline; filename="'.$filename."\"\n"); + header('Content-Type: '.$type."\n"); + header('X-Sendfile: '.$file."\n"); + } + +} diff --git a/application/libraries/Ddownload/drivers/Ddownload_nginx.php b/application/libraries/Ddownload/drivers/Ddownload_nginx.php new file mode 100644 index 000000000..2410df4d4 --- /dev/null +++ b/application/libraries/Ddownload/drivers/Ddownload_nginx.php @@ -0,0 +1,29 @@ +<?php +/* + * Copyright 2013 Pierre Schmitz <pierre@archlinux.de> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Ddownload_nginx extends Ddownload_Driver { + + public function serveFile($file, $filename, $type) + { + $CI =& get_instance(); + $upload_path = $CI->config->item('upload_path'); + $download_location = $CI->config->item('download_nginx_location'); + + if (strpos($file, $upload_path) === 0) { + $file_path = substr($file, strlen($upload_path)); + } else { + show_error('Invalid file path'); + } + + header('Content-disposition: inline; filename="'.$filename."\"\n"); + header('Content-Type: '.$type."\n"); + header('X-Accel-Redirect: '.$download_location.$file_path."\n"); + } + +} diff --git a/application/libraries/Ddownload/drivers/Ddownload_php.php b/application/libraries/Ddownload/drivers/Ddownload_php.php new file mode 100644 index 000000000..344db53f0 --- /dev/null +++ b/application/libraries/Ddownload/drivers/Ddownload_php.php @@ -0,0 +1,111 @@ +<?php +/* + * Copyright 2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Ddownload_php extends Ddownload_Driver { + + // Original source: http://www.phpfreaks.com/forums/index.php?topic=198274.msg895468#msg895468 + public function serveFile($file, $filename, $type) + { + $fp = @fopen($file, 'r'); + + $size = filesize($file); // File size + $length = $size; // Content length + $start = 0; // Start byte + $end = $size - 1; // End byte + // Now that we've gotten so far without errors we send the accept range header + /* At the moment we only support single ranges. + * Multiple ranges requires some more work to ensure it works correctly + * and comply with the spesifications: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2 + * + * Multirange support annouces itself with: + * header('Accept-Ranges: bytes'); + * + * Multirange content must be sent with multipart/byteranges mediatype, + * (mediatype = mimetype) + * as well as a boundry header to indicate the various chunks of data. + */ + header("Accept-Ranges: 0-$length"); + // header('Accept-Ranges: bytes'); + // multipart/byteranges + // http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2 + if (isset($_SERVER['HTTP_RANGE'])) + { + $c_start = $start; + $c_end = $end; + // Extract the range string + list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2); + // Make sure the client hasn't sent us a multibyte range + if (strpos($range, ',') !== false) + { + // (?) Shoud this be issued here, or should the first + // range be used? Or should the header be ignored and + // we output the whole content? + header('HTTP/1.1 416 Requested Range Not Satisfiable'); + header("Content-Range: bytes $start-$end/$size"); + // (?) Echo some info to the client? + exit; + } + // If the range starts with an '-' we start from the beginning + // If not, we forward the file pointer + // And make sure to get the end byte if spesified + if ($range{0} == '-') + { + // The n-number of the last bytes is requested + $c_start = $size - substr($range, 1); + } + else + { + $range = explode('-', $range); + $c_start = $range[0]; + $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size; + } + /* Check the range and make sure it's treated according to the specs. + * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + */ + // End bytes can not be larger than $end. + $c_end = ($c_end > $end) ? $end : $c_end; + // Validate the requested range and return an error if it's not correct. + if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) + { + header('HTTP/1.1 416 Requested Range Not Satisfiable'); + header("Content-Range: bytes $start-$end/$size"); + // (?) Echo some info to the client? + exit; + } + $start = $c_start; + $end = $c_end; + $length = $end - $start + 1; // Calculate new content length + fseek($fp, $start); + header('HTTP/1.1 206 Partial Content'); + // Notify the client the byte range we'll be outputting + header("Content-Range: bytes $start-$end/$size"); + } + header("Content-Length: $length"); + header("Content-disposition: inline; filename=\"".$filename."\"\n"); + header("Content-Type: ".$type."\n"); + + // Start buffered download + $buffer = 1024 * 8; + while(!feof($fp) && ($p = ftell($fp)) <= $end) + { + if ($p + $buffer > $end) + { + // In case we're only outputtin a chunk, make sure we don't + // read past the length + $buffer = $end - $p + 1; + } + set_time_limit(0); // Reset time limit for big files + echo fread($fp, $buffer); + flush(); // Free up memory. Otherwise large files will trigger PHP's memory limit. + } + + fclose($fp); + } + +} diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php new file mode 100644 index 000000000..07a16190c --- /dev/null +++ b/application/libraries/Duser/Duser.php @@ -0,0 +1,112 @@ +<?php +/* + * Copyright 2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +abstract class Duser_Driver extends CI_Driver { + + // List of optional functions that are implemented + // + // Possible values are: + // - can_register_new_users (only supported with the DB driver!) + // - can_reset_password (only supported with the DB driver!) + public $optional_functions = array(); + + /* + * The returned array should contain the following keys: + * - username string + * - userid INT > 0 + * + * @param username + * @param password + * @return mixed array on success, false on failure + */ + abstract public function login($username, $password); + + /* + * @param username + * @return boolean true is username exists, false otherwise + */ + public function username_exists($username) { + return null; + } + + /* + * @param userid + * @return string email address of the user + */ + public function get_email($userid) { + return null; + } +} + +class Duser extends CI_Driver_Library { + + protected $_adapter = null; + + protected $valid_drivers = array( + 'duser_db', 'duser_ldap', 'duser_fluxbb' + ); + + function __construct() + { + $CI =& get_instance(); + + $this->_adapter = $CI->config->item("authentication_driver"); + } + + // require an optional function to be implemented + public function require_implemented($function) { + if (!$this->is_implemented($function)) { + show_error("" + ."Optional function '".$function."' not implemented in user adapter '".$this->_adapter."'. " + ."Requested functionally unavailable."); + } + } + + // check if an optional function is implemented + public function is_implemented($function) { + if (in_array($function, $this->{$this->_adapter}->optional_functions)) { + return true; + } + + return false; + } + + public function login($username, $password) + { + $login_info = $this->{$this->_adapter}->login($username, $password); + if ($login_info === false) { + return false; + } + + $CI =& get_instance(); + + $CI->session->set_userdata(array( + 'logged_in' => true, + 'username' => $login_info["username"], + 'userid' => $login_info["userid"], + 'access_level' => 'full', + )); + + return true; + } + + public function username_exists($username) + { + if ($username === false) { + return false; + } + + return $this->{$this->_adapter}->username_exists($username); + } + + public function get_email($userid) + { + return $this->{$this->_adapter}->get_email($userid); + } +} diff --git a/application/libraries/Duser/drivers/Duser_db.php b/application/libraries/Duser/drivers/Duser_db.php new file mode 100644 index 000000000..a58b5a298 --- /dev/null +++ b/application/libraries/Duser/drivers/Duser_db.php @@ -0,0 +1,79 @@ +<?php +/* + * Copyright 2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Duser_db extends Duser_Driver { + + /* FIXME: If you use this driver as a template, remove can_reset_password + * and can_register_new_users. These features require the DB driver and + * will NOT work with other drivers. + */ + public $optional_functions = array( + 'can_reset_password', + 'can_register_new_users', + ); + + public function login($username, $password) + { + $CI =& get_instance(); + + $query = $CI->db->query(' + SELECT username, id, password + FROM `users` + WHERE `username` = ? + ', array($username))->row_array(); + + if (empty($query)) { + return false; + } + + if (crypt($password, $query["password"]) === $query["password"]) { + return array( + "username" => $username, + "userid" => $query["id"] + ); + } else { + return false; + } + } + + public function username_exists($username) + { + $CI =& get_instance(); + + $query = $CI->db->query(" + SELECT id + FROM users + WHERE username = ? + ", array($username)); + + if ($query->num_rows() > 0) { + return true; + } else { + return false; + } + } + + public function get_email($userid) + { + $CI =& get_instance(); + + $query = $CI->db->query(" + SELECT email + FROM users + WHERE id = ? + ", array($userid))->row_array(); + + if (empty($query)) { + show_error("Failed to get email address from db"); + } + + return $query["email"]; + } + +} diff --git a/application/libraries/Duser/drivers/Duser_fluxbb.php b/application/libraries/Duser/drivers/Duser_fluxbb.php new file mode 100644 index 000000000..1790e830b --- /dev/null +++ b/application/libraries/Duser/drivers/Duser_fluxbb.php @@ -0,0 +1,53 @@ +<?php +/* + * Copyright 2013 Pierre Schmitz <pierre@archlinux.de> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Duser_fluxbb extends Duser_Driver { + + private $CI = null; + private $config = array(); + + function __construct() + { + $this->CI =& get_instance(); + $this->config = $this->CI->config->item('auth_fluxbb'); + } + + public function login($username, $password) + { + $query = $this->CI->db->query(' + SELECT username, id + FROM '.$this->config['database'].'.users + WHERE username = ? AND password = ? + ', array($username, sha1($password)))->row_array(); + + if (!empty($query)) { + return array( + 'username' => $query['username'], + 'userid' => $query['id'] + ); + } else { + return false; + } + } + + public function username_exists($username) + { + $query = $this->CI->db->query(' + SELECT id + FROM '.$this->config['database'].'.users + WHERE username = ? + ', array($username)); + + if ($query->num_rows() > 0) { + return true; + } else { + return false; + } + } +} diff --git a/application/libraries/Duser/drivers/Duser_ldap.php b/application/libraries/Duser/drivers/Duser_ldap.php new file mode 100644 index 000000000..1f1581620 --- /dev/null +++ b/application/libraries/Duser/drivers/Duser_ldap.php @@ -0,0 +1,68 @@ +<?php +/* + * Copyright 2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * Contributions by Hannes Rist + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ +class Duser_ldap extends Duser_Driver { + // none supported + public $optional_functions = array(); + + // Original source: http://code.activestate.com/recipes/101525-ldap-authentication/ + public function login($username, $password) { + $CI =& get_instance(); + + $config = $CI->config->item("auth_ldap"); + + if ($username == "" || $password == "") { + return false; + } + + $ds = ldap_connect($config['host'],$config['port']); + if ($ds === false) { + return false; + } + + switch ($config["scope"]) { + case "base": + $r = ldap_read($ds, $config['basedn'], $config["username_field"].'='.$username); + break; + case "one": + $r = ldap_list($ds, $config['basedn'], $config["username_field"].'='.$username); + break; + case "subtree": + $r = ldap_search($ds, $config['basedn'], $config["username_field"].'='.$username); + break; + default: + show_error("Invalid LDAP scope"); + } + if ($r === false) { + return false; + } + + foreach ($config["options"] as $key => $value) { + if (ldap_set_option($ds, $key, $value) === false) { + return false; + } + } + + $result = ldap_get_entries($ds, $r); + if ($result === false || !isset($result[0])) { + return false; + } + + // ignore errors from ldap_bind as it will throw an error if the password is incorrect + if (@ldap_bind($ds, $result[0]['dn'], $password)) { + ldap_unbind($ds); + return array( + "username" => $result[0][$config["username_field"]][0], + "userid" => $result[0][$config["userid_field"]][0] + ); + } + + return false; + } +} diff --git a/application/libraries/MY_Session.php b/application/libraries/MY_Session.php new file mode 100644 index 000000000..0443bca31 --- /dev/null +++ b/application/libraries/MY_Session.php @@ -0,0 +1,38 @@ +<?php +/* + * Copyright 2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class MY_Session extends CI_Session { + private $memory_only = false; + + public function __construct() { + $CI =& get_instance(); + $CI->load->helper("filebin"); + + /* Clients using API keys do not need a persistent session since API keys + * should be sent with each request. This reduces database queries and + * prevents us from sending useless cookies. + */ + if (!stateful_client()) { + $this->memory_only = true; + $CI->config->set_item("sess_use_database", false); + } + + parent::__construct(); + } + + public function _set_cookie($cookie_data = NULL) + { + if ($this->memory_only) { + return; + } + + parent::_set_cookie($cookie_data); + + } +} diff --git a/application/libraries/Output_cache.php b/application/libraries/Output_cache.php new file mode 100644 index 000000000..224e9f95a --- /dev/null +++ b/application/libraries/Output_cache.php @@ -0,0 +1,80 @@ +<?php +/* + * Copyright 2014 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Output_cache { + private $output_cache = array(); + + /** + * Combine multiple objects for the same view into one + * @param data data to pass to the view + * @param view view path + */ + public function add_merge($data, $view) + { + assert($view !== NULL); + + // combine multiple objects for the same view into one + $count = count($this->output_cache); + if ($count > 0 && $this->output_cache[$count - 1]["view"] === $view) { + $this->output_cache[$count - 1]["data"] = array_merge_recursive($this->output_cache[$count - 1]["data"], $data); + } else { + $this->add($data, $view); + } + } + + /** + * Add some data that will be output directly if view is NULL or passed + * to the view otherweise. + * + * @param data data to pass to view or output + * @param view view path or NULL + */ + public function add($data, $view = NULL) + { + $this->output_cache[] = array( + "view" => $view, + "data" => $data, + ); + } + + /** + * Add a function that will be excuted when render() is called. + * This function is supposed to use render_now() to output data. + * + * @param data_function + */ + public function add_function($data_function) + { + $this->output_cache[] = array( + "view" => NULL, + "data_function" => $data_function, + ); + } + + public function render_now($data, $view = NULL) + { + if ($view !== NULL) { + echo get_instance()->load->view($view, $data, true); + } else { + echo $data; + } + } + + public function render() + { + while ($output = array_shift($this->output_cache)) { + if (isset($output["data_function"])) { + $output["data_function"](); + } else { + $data = $output["data"]; + $this->render_now($data, $output["view"]); + } + } + } +} diff --git a/application/migrations/001_add_files.php b/application/migrations/001_add_files.php new file mode 100644 index 000000000..f1f16ea3a --- /dev/null +++ b/application/migrations/001_add_files.php @@ -0,0 +1,27 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_files extends CI_Migration { + + public function up() + { + $this->db->query(" + CREATE TABLE IF NOT EXISTS `files` ( + `hash` varchar(32) CHARACTER SET ascii NOT NULL, + `id` varchar(6) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, + `filename` varchar(256) COLLATE utf8_bin NOT NULL, + `password` varchar(40) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL, + `date` int(11) unsigned NOT NULL, + `mimetype` varchar(255) CHARACTER SET ascii NOT NULL, + PRIMARY KEY (`id`), + KEY `date` (`date`), + KEY `hash` (`hash`,`id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + "); + } + + public function down() + { + $this->dbforge->drop_table('files'); + } +} diff --git a/application/migrations/002_add_users.php b/application/migrations/002_add_users.php new file mode 100644 index 000000000..5675c77e9 --- /dev/null +++ b/application/migrations/002_add_users.php @@ -0,0 +1,46 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_users extends CI_Migration { + + public function up() + { + $this->db->query(" + CREATE TABLE IF NOT EXISTS `users` ( + `id` int(8) UNSIGNED NOT NULL AUTO_INCREMENT, + `username` varchar(32) COLLATE ascii_general_ci NOT NULL, + `password` varchar(60) COLLATE ascii_general_ci NOT NULL, + `email` varchar(255) COLLATE ascii_general_ci NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + "); + + $this->db->query(" + CREATE TABLE IF NOT EXISTS `ci_sessions` ( + `session_id` varchar(40) NOT NULL DEFAULT '0', + `ip_address` varchar(16) NOT NULL DEFAULT '0', + `user_agent` varchar(120) NOT NULL, + `last_activity` int(10) unsigned NOT NULL DEFAULT '0', + `user_data` text NOT NULL, + PRIMARY KEY (`session_id`), + KEY `last_activity_idx` (`last_activity`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "); + + $this->db->query(" + ALTER TABLE `files` + ADD `user` INT(8) UNSIGNED NOT NULL DEFAULT '0', + ADD INDEX (`user`) + "); + } + + public function down() + { + $this->dbforge->drop_table('users'); + $this->dbforge->drop_table('ci_sessions'); + $this->db->query(" + ALTER TABLE `files` + DROP `user` + "); + } +} diff --git a/application/migrations/003_add_referrers.php b/application/migrations/003_add_referrers.php new file mode 100644 index 000000000..524e92ff0 --- /dev/null +++ b/application/migrations/003_add_referrers.php @@ -0,0 +1,33 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_referrers extends CI_Migration { + + public function up() + { + $this->db->query(" + CREATE TABLE `invitations` ( + `user` int(8) unsigned NOT NULL, + `key` varchar(16) CHARACTER SET ascii NOT NULL, + `date` int(11) unsigned NOT NULL, + PRIMARY KEY (`key`), + KEY `user` (`user`), + KEY `date` (`date`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin + "); + $this->db->query(" + ALTER TABLE `users` + ADD `referrer` INT(8) UNSIGNED NOT NULL DEFAULT '0' + "); + } + + public function down() + { + $this->db->query(" + ALTER TABLE `users` + DROP `referrer` + "); + $this->dbforge->drop_table('invitations'); + + } +} diff --git a/application/migrations/004_add_filesize.php b/application/migrations/004_add_filesize.php new file mode 100644 index 000000000..d7a70223d --- /dev/null +++ b/application/migrations/004_add_filesize.php @@ -0,0 +1,22 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_filesize extends CI_Migration { + + public function up() + { + $this->db->query(" + ALTER TABLE `files` + ADD `filesize` INT UNSIGNED NOT NULL + "); + } + + public function down() + { + $this->db->query(" + ALTER TABLE `files` + DROP `filesize` + "); + + } +} diff --git a/application/migrations/005_drop_file_password.php b/application/migrations/005_drop_file_password.php new file mode 100644 index 000000000..bf03490a8 --- /dev/null +++ b/application/migrations/005_drop_file_password.php @@ -0,0 +1,21 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Drop_file_password extends CI_Migration { + + public function up() + { + $this->db->query(" + ALTER TABLE `files` + DROP `password`; + "); + } + + public function down() + { + $this->db->query(" + ALTER TABLE `files` + ADD `password` varchar(40) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL; + "); + } +} diff --git a/application/migrations/006_add_username_index.php b/application/migrations/006_add_username_index.php new file mode 100644 index 000000000..ea5e3ebc0 --- /dev/null +++ b/application/migrations/006_add_username_index.php @@ -0,0 +1,21 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_username_index extends CI_Migration { + + public function up() + { + $this->db->query(" + ALTER TABLE `users` + ADD UNIQUE `username` (`username`); + "); + } + + public function down() + { + $this->db->query(" + ALTER TABLE `users` + DROP INDEX `username`; + "); + } +} diff --git a/application/migrations/007_repurpose_invitations.php b/application/migrations/007_repurpose_invitations.php new file mode 100644 index 000000000..d586c2829 --- /dev/null +++ b/application/migrations/007_repurpose_invitations.php @@ -0,0 +1,37 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Repurpose_invitations extends CI_Migration { + + public function up() + { + $this->db->query(" + ALTER TABLE `invitations` + ADD `action` VARCHAR(255) NOT NULL, + ADD `data` TEXT NULL, + ADD INDEX `action` (`action`); + "); + + $this->db->query(" + UPDATE `invitations` SET `action` = 'invitation' WHERE `action` = ''; + "); + + $this->db->query(" + ALTER TABLE `invitations` RENAME `actions`; + "); + + } + + public function down() + { + $this->db->query(" + ALTER TABLE `actions` RENAME `invitations`; + "); + + $this->db->query(" + ALTER TABLE `invitations` + DROP `action`, + DROP `data`; + "); + } +} diff --git a/application/migrations/008_add_profiles.php b/application/migrations/008_add_profiles.php new file mode 100644 index 000000000..3fea33c08 --- /dev/null +++ b/application/migrations/008_add_profiles.php @@ -0,0 +1,31 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_profiles extends CI_Migration { + + public function up() + { + $this->db->query(" + CREATE TABLE `profiles` ( + `user` int(8) unsigned NOT NULL, + `upload_id_limits` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`user`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin + "); + + $this->db->query(" + ALTER TABLE `files` CHANGE `id` `id` VARCHAR( 255 ); + "); + + } + + public function down() + { + $this->db->query(" + DROP TABLE `profiles`; + "); + $this->db->query(" + ALTER TABLE `files` CHANGE `id` `id` VARCHAR( 6 ); + "); + } +} diff --git a/application/migrations/009_add_apikeys.php b/application/migrations/009_add_apikeys.php new file mode 100644 index 000000000..8e88260a8 --- /dev/null +++ b/application/migrations/009_add_apikeys.php @@ -0,0 +1,24 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_Add_apikeys extends CI_Migration { + + public function up() + { + $this->db->query(" + CREATE TABLE `apikeys` ( + `key` varchar(64) COLLATE utf8_bin NOT NULL, + `user` int(8) unsigned NOT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `comment` varchar(255) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, + PRIMARY KEY (`key`), + KEY `user` (`user`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin + "); + } + + public function down() + { + $this->dbforge->drop_table('apikeys'); + } +} diff --git a/application/migrations/010_files_innodb.php b/application/migrations/010_files_innodb.php new file mode 100644 index 000000000..b32f94724 --- /dev/null +++ b/application/migrations/010_files_innodb.php @@ -0,0 +1,16 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_files_innodb extends CI_Migration { + + public function up() + { + $this->db->query(" + ALTER TABLE `files` ENGINE = InnoDB; + "); + } + + public function down() + { + } +} diff --git a/application/migrations/011_apikeys_add_access_level.php b/application/migrations/011_apikeys_add_access_level.php new file mode 100644 index 000000000..e0f39317b --- /dev/null +++ b/application/migrations/011_apikeys_add_access_level.php @@ -0,0 +1,19 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_apikeys_add_access_level extends CI_Migration { + + public function up() + { + $this->db->query(" + alter table `apikeys` add `access_level` varchar(255) default 'apikey'; + "); + } + + public function down() + { + $this->db->query(" + alter table `apikeys` drop `access_level`; + "); + } +} diff --git a/application/migrations/012_add_constraints.php b/application/migrations/012_add_constraints.php new file mode 100644 index 000000000..2b0764fb0 --- /dev/null +++ b/application/migrations/012_add_constraints.php @@ -0,0 +1,20 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_add_constraints extends CI_Migration { + + public function up() + { + $this->db->query("ALTER TABLE `users` ADD INDEX(`referrer`);"); + $this->db->query("ALTER TABLE `users` CHANGE `referrer` `referrer` + INT(8) UNSIGNED NULL;"); + $this->db->query("UPDATE `users` SET `referrer` = NULL where `referrer` = 0;"); + $this->db->query("ALTER TABLE `users` ADD FOREIGN KEY (`referrer`) + REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;"); + } + + public function down() + { + show_error("downgrade not supported"); + } +} diff --git a/application/migrations/013_add_multipaste.php b/application/migrations/013_add_multipaste.php new file mode 100644 index 000000000..edb4a0748 --- /dev/null +++ b/application/migrations/013_add_multipaste.php @@ -0,0 +1,36 @@ +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +class Migration_add_multipaste extends CI_Migration { + + public function up() + { + $this->db->query(' + CREATE TABLE `multipaste` ( + `url_id` varchar(255) NOT NULL, + `multipaste_id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `date` int(11) NOT NULL, + PRIMARY KEY (`url_id`), + UNIQUE KEY `multipaste_id` (`multipaste_id`), + KEY `user_id` (`user_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'); + + $this->db->query(' + CREATE TABLE `multipaste_file_map` ( + `multipaste_id` int(11) NOT NULL, + `file_url_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `sort_order` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`sort_order`), + UNIQUE KEY `multipaste_id` (`multipaste_id`,`file_url_id`), + KEY `multipaste_file_map_ibfk_2` (`file_url_id`), + CONSTRAINT `multipaste_file_map_ibfk_1` FOREIGN KEY (`multipaste_id`) REFERENCES `multipaste` (`multipaste_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `multipaste_file_map_ibfk_2` FOREIGN KEY (`file_url_id`) REFERENCES `files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;'); + } + + public function down() + { + show_error("downgrade not supported"); + } +} diff --git a/application/models/mfile.php b/application/models/mfile.php new file mode 100644 index 000000000..427c74a18 --- /dev/null +++ b/application/models/mfile.php @@ -0,0 +1,569 @@ +<?php +/* + * Copyright 2009-2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Mfile extends CI_Model { + + function __construct() + { + parent::__construct(); + $this->load->model("muser"); + } + + // Returns an unused ID + function new_id($min = 3, $max = 6) + { + static $id_blacklist = NULL; + + if ($id_blacklist == NULL) { + // This prevents people from being unable to access their uploads + // because of URL rewriting + $id_blacklist = scandir(FCPATH); + $id_blacklist[] = "file"; + $id_blacklist[] = "user"; + } + + $max_tries = 100; + + for ($try = 0; $try < $max_tries; $try++) { + $id = random_alphanum($min, $max); + + if ($this->id_exists($id) || in_array($id, $id_blacklist)) { + continue; + } + + return $id; + } + + show_error("Failed to find unused ID after $max_tries tries."); + } + + function id_exists($id) + { + if (!$id) { + return false; + } + + $sql = ' + SELECT id + FROM `files` + WHERE `id` = ? + LIMIT 1'; + $query = $this->db->query($sql, array($id)); + + if ($query->num_rows() == 1) { + return true; + } else { + return false; + } + } + + public function stale_hash($hash) + { + return $this->unused_file($hash); + } + + function get_filedata($id) + { + $sql = ' + SELECT id, hash, filename, mimetype, date, user, filesize + FROM `files` + WHERE `id` = ? + LIMIT 1'; + $query = $this->db->query($sql, array($id)); + + if ($query->num_rows() > 0) { + return $query->row_array(); + } else { + return false; + } + } + + // return the folder in which the file with $hash is stored + function folder($hash) { + return $this->config->item('upload_path').'/'.substr($hash, 0, 3); + } + + // Returns the full path to the file with $hash + function file($hash) { + return $this->folder($hash).'/'.$hash; + } + + // Return mimetype of file + function mimetype($file) { + $fileinfo = new finfo(FILEINFO_MIME_TYPE); + $mimetype = $fileinfo->file($file); + + return $mimetype; + } + + public function image_dimension($file) + { + list($width, $height) = getimagesize($file); + + return "${width}x${height}"; + } + + /* + * This returns a square thumbnail for the input image + * Source: http://salman-w.blogspot.co.at/2009/04/crop-to-fit-image-using-aspphp.html + */ + public function makeThumb($id, $size = 150, $target_type = null) + { + $filedata = $this->get_filedata($id); + if (!$filedata) { + return false; + } + + $source_path = $this->file($filedata["hash"]); + + $source_gdim = imagecreatefromstring(file_get_contents($source_path)); + if ($source_gdim === false) { + show_error("Unsupported image type"); + } + + list($source_width, $source_height, $source_type) = getimagesize($source_path); + + if ($target_type === null) { + $target_type = $source_type; + } + + $target_width = $size; + $target_height = $size; + + $source_aspect_ratio = $source_width / $source_height; + $desired_aspect_ratio = $target_width / $target_height; + + if ($source_aspect_ratio > $desired_aspect_ratio) { + // Triggered when source image is wider + $temp_height = $target_height; + $temp_width = round(($target_height * $source_aspect_ratio)); + } else { + // Triggered otherwise (i.e. source image is similar or taller) + $temp_width = $target_width; + $temp_height = round(($target_width / $source_aspect_ratio)); + } + + /* + * Resize the image into a temporary GD image + */ + + $temp_gdim = imagecreatetruecolor($temp_width, $temp_height); + imagecopyresampled( + $temp_gdim, + $source_gdim, + 0, 0, + 0, 0, + $temp_width, $temp_height, + $source_width, $source_height + ); + + /* + * Copy cropped region from temporary image into the desired GD image + */ + + $x0 = ($temp_width - $target_width) / 2; + $y0 = ($temp_height - $target_height) / 2; + $thumb = imagecreatetruecolor($target_width, $target_height); + imagecopy( + $thumb, + $temp_gdim, + 0, 0, + $x0, $y0, + $target_width, $target_height + ); + + ob_start(); + switch ($target_type) { + case IMAGETYPE_GIF: + $ret = imagegif($thumb); + break; + case IMAGETYPE_JPEG: + $ret = imagejpeg($thumb); + break; + case IMAGETYPE_PNG: + $ret = imagepng($thumb); + break; + default: + assert(0); + } + $result = ob_get_clean(); + + if (!$ret) { + show_error("Failed to create thumbnail"); + } + + imagedestroy($thumb); + imagedestroy($temp_gdim); + imagedestroy($source_gdim); + + return $result; + } + + // Add a hash to the DB + function add_file($hash, $id, $filename) + { + $userid = $this->muser->get_userid(); + + $mimetype = $this->mimetype($this->file($hash)); + + $filesize = filesize($this->file($hash)); + $this->db->insert("files", array( + "id" => $id, + "hash" => $hash, + "filename" => $filename, + "date" => time(), + "user" => $userid, + "mimetype" => $mimetype, + "filesize" => $filesize, + )); + } + + function adopt($id) + { + $userid = $this->muser->get_userid(); + + $this->db->query(" + UPDATE files + SET user = ? + WHERE id = ? + ", array($userid, $id)); + } + + // remove old/invalid/broken IDs + function valid_id($id) + { + $filedata = $this->get_filedata($id); + if (!$filedata) { + return false; + } + $file = $this->file($filedata['hash']); + + if (!file_exists($file)) { + $this->delete_hash($filedata["hash"]); + return false; + } + + // 0 age disables age checks + if ($this->config->item('upload_max_age') == 0) return true; + + // small files don't expire + if (filesize($file) <= $this->config->item("small_upload_size")) { + return true; + } + + // files older than this should be removed + $remove_before = (time()-$this->config->item('upload_max_age')); + + if ($filedata["date"] < $remove_before) { + // if the file has been uploaded multiple times the mtime is the time + // of the last upload + if (filemtime($file) < $remove_before) { + $this->delete_hash($filedata["hash"]); + } else { + $this->delete_id($id); + } + return false; + } + + return true; + } + + public function get_timeout($id) + { + $filedata = $this->get_filedata($id); + $file = $this->file($filedata["hash"]); + + if ($this->config->item("upload_max_age") == 0) { + return -1; + } + + if (filesize($file) > $this->config->item("small_upload_size")) { + return $filedata["date"] + $this->config->item("upload_max_age"); + } else { + return -1; + } + } + + public function get_timeout_string($id) + { + $timeout = $this->get_timeout($id); + + if ($timeout >= 0) { + return date("r", $timeout); + } else { + return "unknown"; + } + } + + private function unused_file($hash) + { + $sql = ' + SELECT id + FROM `files` + WHERE `hash` = ? + LIMIT 1'; + $query = $this->db->query($sql, array($hash)); + + if ($query->num_rows() == 0) { + return true; + } else { + return false; + } + } + + public function delete_id($id) + { + $filedata = $this->get_filedata($id); + + // Delete the file and all multipastes using it + // Note that this does not delete all relations in multipaste_file_map + // which is actually done by a SQL contraint. + // TODO: make it work properly without the constraint + $this->db->query(' + DELETE m, mfm, f + FROM files f + LEFT JOIN multipaste_file_map mfm ON f.id = mfm.file_url_id + LEFT JOIN multipaste m ON mfm.multipaste_id = m.multipaste_id + WHERE f.id = ? + ', array($id)); + + if ($this->id_exists($id)) { + return false; + } + + if ($filedata !== false) { + assert(isset($filedata["hash"])); + if ($this->unused_file($filedata['hash'])) { + unlink($this->file($filedata['hash'])); + $dir = $this->folder($filedata['hash']); + if (count(scandir($dir)) == 2) { + rmdir($dir); + } + } + } + return true; + } + + public function delete_hash($hash) + { + // Delete all files with this hash and all multipastes using any of those files + // Note that this does not delete all relations in multipaste_file_map + // which is actually done by a SQL contraint. + // TODO: make it work properly without the constraint + $this->db->query(' + DELETE m, mfm, f + FROM files f + LEFT JOIN multipaste_file_map mfm ON f.id = mfm.file_url_id + LEFT JOIN multipaste m ON mfm.multipaste_id = m.multipaste_id + WHERE f.hash = ? + ', array($hash)); + + if (file_exists($this->file($hash))) { + unlink($this->file($hash)); + $dir = $this->folder($hash); + if (count(scandir($dir)) == 2) { + rmdir($dir); + } + } + return true; + } + + public function get_owner($id) + { + return $this->db->query(" + SELECT user + FROM files + WHERE id = ? + ", array($id))->row_array()["user"]; + } + + public function get_lexers() { + return cache_function('lexers', 1800, function() { + $lexers = array(); + $last_desc = ""; + exec("python ".escapeshellarg(FCPATH."scripts/get_lexer_list.py"), $output); + + foreach ($output as $line) { + list($name, $desc) = explode("|", $line); + if ($desc == $last_desc) { + continue; + } + $last_desc = $desc; + $lexers[$name] = $desc; + } + $lexers["text"] = "Plain text"; + return $lexers; + }); + } + + public function should_highlight($type) + { + if ($this->mime2lexer($type)) return true; + + return false; + } + + // Allow certain types to be highlight without doing it automatically + public function can_highlight($type) + { + $typearray = array( + 'image/svg+xml', + ); + if (in_array($type, $typearray)) return true; + + if ($this->mime2lexer($type)) return true; + + return false; + } + + // Return the lexer that should be used for highlighting + public function autodetect_lexer($type, $filename) + { + if (!$this->can_highlight($type)) { + return false; + } + + $lexer = $this->mime2lexer($type); + + // filename lexers overwrite mime type mappings + $filename_lexer = $this->filename2lexer($filename); + if ($filename_lexer) { + return $filename_lexer; + } + + return $lexer; + } + + // Map MIME types to lexers needed for highlighting + private function mime2lexer($type) + { + $typearray = array( + 'application/javascript' => 'javascript', + 'application/mbox' => 'text', + 'application/smil' => 'ocaml', + 'application/x-applix-spreadsheet' => 'actionscript', + 'application/x-awk' => 'awk', + 'application/x-desktop' => 'text', + 'application/x-fluid' => 'text', + 'application/x-genesis-rom' => 'text', + 'application/x-java' => 'java', + 'application/x-m4' => 'text', + 'application/xml-dtd' => "xml", + 'application/xml' => 'xml', + 'application/x-perl' => 'perl', + 'application/x-php' => 'php', + 'application/x-ruby' => 'ruby', + 'application/x-shellscript' => 'bash', + 'application/xslt+xml' => "xml", + 'application/x-x509-ca-cert' => 'text', + 'message/rfc822' => 'text', + 'text/css' => 'css', + 'text/html' => 'xml', + 'text/plain-ascii' => 'ascii', + 'text/plain' => 'text', + 'text/troff' => 'groff', + 'text/x-asm' => 'nasm', + 'text/x-awk' => 'awk', + 'text/x-c' => 'c', + 'text/x-c++' => 'cpp', + 'text/x-c++hdr' => 'c', + 'text/x-chdr' => 'c', + 'text/x-csrc' => 'c', + 'text/x-c++src' => 'cpp', + 'text/x-diff' => 'diff', + 'text/x-gawk' => 'awk', + 'text/x-haskell' => 'haskell', + 'text/x-java' => 'java', + 'text/x-lisp' => 'cl', + 'text/x-literate-haskell' => 'haskell', + 'text/x-lua' => 'lua', + 'text/x-makefile' => 'make', + 'text/x-ocaml' => 'ocaml', + 'text/x-patch' => 'diff', + 'text/x-perl' => 'perl', + 'text/x-php' => 'php', + 'text/x-python' => 'python', + 'text/x-ruby' => 'ruby', + 'text/x-scheme' => 'scheme', + 'text/x-shellscript' => 'bash', + 'text/x-subviewer' => 'bash', + 'text/x-tcl' => 'tcl', + 'text/x-tex' => 'tex', + ); + if (array_key_exists($type, $typearray)) return $typearray[$type]; + + if (strpos($type, 'text/') === 0) return 'text'; + + # default + return false; + } + + // Map special filenames to lexers + private function filename2lexer($name) + { + $namearray = array( + 'PKGBUILD' => 'bash', + '.vimrc' => 'vim' + ); + if (array_key_exists($name, $namearray)) return $namearray[$name]; + + + if (strpos($name, ".") !== false) { + $extension = substr($name, strrpos($name, ".") + 1); + + $extensionarray = array( + 'awk' => 'awk', + 'c' => 'c', + 'coffee' => 'coffee-script', + 'cpp' => 'cpp', + 'diff' => 'diff', + 'h' => 'c', + 'hs' => 'haskell', + 'html' => 'xml', + 'java' => 'java', + 'js' => 'js', + 'lua' => 'lua', + 'mli' => 'ocaml', + 'mll' => 'ocaml', + 'ml' => 'ocaml', + 'mly' => 'ocaml', + 'patch' => 'diff', + 'php' => 'php', + 'pl' => 'perl', + 'py' => 'python', + 'rb' => 'ruby', + 's' => 'asm', + 'sh' => 'bash', + 'tcl' => 'tcl', + 'tex' => 'tex', + ); + if (array_key_exists($extension, $extensionarray)) return $extensionarray[$extension]; + } + + return false; + } + + // Handle lexer aliases + public function resolve_lexer_alias($alias) + { + if ($alias === false) return false; + $aliasarray = array( + 'py' => 'python', + 'sh' => 'bash', + 's' => 'asm', + 'pl' => 'perl' + ); + if (array_key_exists($alias, $aliasarray)) return $aliasarray[$alias]; + + return $alias; + } + +} + +# vim: set noet: diff --git a/application/models/mmultipaste.php b/application/models/mmultipaste.php new file mode 100644 index 000000000..723132a50 --- /dev/null +++ b/application/models/mmultipaste.php @@ -0,0 +1,160 @@ +<?php +/* + * Copyright 2014 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Mmultipaste extends CI_Model { + + function __construct() + { + parent::__construct(); + $this->load->model("muser"); + $this->load->model("mfile"); + } + + /** + * Returns an unused ID + * + * @param min minimal length of the resulting ID + * @param max maximum length of the resulting ID + */ + public function new_id($min = 3, $max = 6) + { + static $id_blacklist = NULL; + + if ($id_blacklist == NULL) { + // This prevents people from being unable to access their uploads + // because of URL rewriting + $id_blacklist = scandir(FCPATH); + $id_blacklist[] = "file"; + $id_blacklist[] = "user"; + } + + $max_tries = 100; + + for ($try = 0; $try < $max_tries; $try++) { + $id = "m-".random_alphanum($min, $max); + + // TODO: try to insert the id into file_groups instead of checking with + // id_exists (prevents race conditio) + if ($this->id_exists($id) || in_array($id, $id_blacklist)) { + continue; + } + + $this->db->insert("multipaste", array( + "url_id" => $id, + "user_id" => $this->muser->get_userid(), + "date" => time(), + )); + + return $id; + } + + show_error("Failed to find unused ID after $max_tries tries."); + } + + public function id_exists($id) + { + if (!$id) { + return false; + } + + $sql = ' + SELECT multipaste.url_id + FROM multipaste + WHERE multipaste.url_id = ? + LIMIT 1'; + $query = $this->db->query($sql, array($id)); + + if ($query->num_rows() == 1) { + return true; + } else { + return false; + } + } + + public function valid_id($id) + { + $files = $this->get_files($id); + foreach ($files as $file) { + if (!$this->mfile->valid_id($file["id"])) { + return false; + } + } + return true; + } + + public function delete_id($id) + { + $this->db->query(' + DELETE m, mfm + FROM multipaste m + LEFT JOIN multipaste_file_map mfm ON mfm.multipaste_id = m.multipaste_id + WHERE m.url_id = ? + ', array($id)); + + if ($this->id_exists($id)) { + return false; + } + + return true; + } + + public function get_owner($id) + { + return $this->db->query(" + SELECT user_id + FROM multipaste + WHERE url_id = ? + ", array($id))->row_array()["user_id"]; + } + + public function get_multipaste($id) + { + return $this->db->query(" + SELECT url_id, user_id, date + FROM multipaste + WHERE url_id = ? + ", array($id))->row_array(); + } + + public function get_files($url_id) + { + $ret = array(); + + $query = $this->db->query(" + SELECT mfm.file_url_id + FROM multipaste_file_map mfm + JOIN multipaste m ON m.multipaste_id = mfm.multipaste_id + WHERE m.url_id = ? + ORDER BY mfm.sort_order + ", array($url_id))->result_array(); + + foreach ($query as $row) { + $filedata = $this->mfile->get_filedata($row["file_url_id"]); + $ret[] = $filedata; + } + + return $ret; + } + + public function get_multipaste_id($url_id) + { + $query = $this->db->query(" + SELECT multipaste_id + FROM multipaste + WHERE url_id = ? + ", array($url_id)); + + if ($query->num_rows() > 0) { + return $query->row_array()["multipaste_id"]; + } + + return false; + } + +} diff --git a/application/models/muser.php b/application/models/muser.php new file mode 100644 index 000000000..a1d8f18e5 --- /dev/null +++ b/application/models/muser.php @@ -0,0 +1,288 @@ +<?php +/* + * Copyright 2012-2013 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +class Muser extends CI_Model { + + private $default_upload_id_limits = "3-6"; + + // last level has the most access + private $access_levels = array("basic", "apikey", "full"); + + function __construct() + { + parent::__construct(); + + if ($this->has_session() && !$this->logged_in()) { + $this->session->keep_flashdata("uri"); + } + + $this->load->helper("filebin"); + $this->load->driver("duser"); + } + + function has_session() + { + // checking $this doesn't work + $CI =& get_instance(); + if (property_exists($CI, "session")) { + return true; + } + + // Only load the session class if we already have a cookie that might need to be renewed. + // Otherwise we just create lots of stale sessions. + if (isset($_COOKIE[$this->config->item("sess_cookie_name")])) { + $this->load->library("session"); + return true; + } + + return false; + } + + function require_session() + { + if (!$this->has_session()) { + $this->load->library("session"); + } + } + + function logged_in() + { + if ($this->has_session()) { + return $this->session->userdata('logged_in') == true; + } + + return false; + } + + function login($username, $password) + { + $this->require_session(); + return $this->duser->login($username, $password); + } + + private function login_cli_client() + { + $username = $this->input->post("username"); + $password = $this->input->post("password"); + + // prefer post parameters if either (username or password) is set + if ($username === false && $password === false) { + if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { + $username = $_SERVER['PHP_AUTH_USER']; + $password = $_SERVER['PHP_AUTH_PW']; + } + } + + if ($username !== false && $password !== false) { + if ($this->login($username, $password)) { + return true; + } else { + show_error("Login failed", 401); + } + } + + return null; + } + + function apilogin($apikey) + { + $this->require_session(); + + // get rid of spaces and newlines + $apikey = trim($apikey); + + $query = $this->db->query(" + SELECT a.user userid, a.access_level + FROM apikeys a + WHERE a.key = ? + ", array($apikey))->row_array(); + + if (isset($query["userid"])) { + $this->session->set_userdata(array( + 'logged_in' => true, + 'username' => '', + 'userid' => $query["userid"], + 'access_level' => $query["access_level"], + )); + return true; + } + + show_error("API key login failed", 401); + } + + function logout() + { + $this->require_session(); + $this->session->unset_userdata('logged_in'); + $this->session->unset_userdata('username'); + $this->session->unset_userdata('userid'); + $this->session->sess_destroy(); + } + + function get_username() + { + if (!$this->logged_in()) { + return ""; + } + + return $this->session->userdata('username'); + } + + function get_userid() + { + if (!$this->logged_in()) { + return 0; + } + + return $this->session->userdata("userid"); + } + + function get_email($userid) + { + return $this->duser->get_email($userid); + } + + public function get_access_levels() + { + return $this->access_levels; + } + + private function check_access_level($wanted_level) + { + $session_level = $this->session->userdata("access_level"); + + $wanted = array_search($wanted_level, $this->access_levels); + $have = array_search($session_level, $this->access_levels); + + if ($wanted === false || $have === false) { + show_error("Failed to determine access level"); + } + + if ($have >= $wanted) { + return true; + } + + show_error("Access denied: Access level too low", 403); + } + + function require_access($wanted_level = "full") + { + if ($this->input->post("apikey") !== false) { + $this->apilogin($this->input->post("apikey")); + } + + if (is_cli_client()) { + $this->login_cli_client(); + } + + if ($this->logged_in()) { + return $this->check_access_level($wanted_level); + } + + if (!stateful_client()) { + show_error("Not authenticated. FileBin requires you to have an account, please go to the homepage for more information.\n", 401); + } + + // desktop clients get redirected to the login form + $this->require_session(); + if (!$this->session->userdata("flash:new:uri")) { + $this->session->set_flashdata("uri", $this->uri->uri_string()); + } + redirect('user/login'); + exit(); + } + + function username_exists($username) + { + return $this->duser->username_exists($username); + } + + function get_action($action, $key) + { + $query = $this->db->query(" + SELECT * + FROM actions + WHERE `key` = ? + AND `action` = ? + ", array($key, $action))->row_array(); + + if (!isset($query["key"]) || $key != $query["key"]) { + show_error("Invalid action key"); + } + + return $query; + } + + public function get_profile_data() + { + $userid = $this->get_userid(); + + $fields = array( + "user" => $userid, + "upload_id_limits" => $this->default_upload_id_limits, + ); + + $query = $this->db->query(" + SELECT ".implode(", ", array_keys($fields))." + FROM `profiles` + WHERE user = ? + ", array($userid))->row_array(); + + $extra_fields = array( + "username" => $this->get_username(), + "email" => $this->get_email($userid), + ); + + return array_merge($fields, $query, $extra_fields); + } + + public function update_profile($data) + { + assert(is_array($data)); + + $data["user"] = $this->get_userid(); + + $exists_in_db = $this->db->get_where("profiles", array("user" => $data["user"]))->num_rows() > 0; + + if ($exists_in_db) { + $this->db->where("user", $data["user"]); + $this->db->update("profiles", $data); + } else { + $this->db->insert("profiles", $data); + } + } + + public function get_upload_id_limits() + { + $userid = $this->get_userid(); + + $query = $this->db->query(" + SELECT upload_id_limits + FROM `profiles` + WHERE user = ? + ", array($userid))->row_array(); + + if (empty($query)) { + return explode("-", $this->default_upload_id_limits); + } + + return explode("-", $query["upload_id_limits"]); + } + + function hash_password($password) + { + + require_once APPPATH."third_party/PasswordHash.php"; + + $hasher = new PasswordHash(9, false); + return $hasher->HashPassword($password); + } + +} + diff --git a/application/third_party/PasswordHash.php b/application/third_party/PasswordHash.php new file mode 100644 index 000000000..84447b277 --- /dev/null +++ b/application/third_party/PasswordHash.php @@ -0,0 +1,253 @@ +<?php +# +# Portable PHP password hashing framework. +# +# Version 0.3 / genuine. +# +# Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in +# the public domain. Revised in subsequent years, still public domain. +# +# There's absolutely no warranty. +# +# The homepage URL for this framework is: +# +# http://www.openwall.com/phpass/ +# +# Please be sure to update the Version line if you edit this file in any way. +# It is suggested that you leave the main version number intact, but indicate +# your project name (after the slash) and add your own revision information. +# +# Please do not change the "private" password hashing method implemented in +# here, thereby making your hashes incompatible. However, if you must, please +# change the hash type identifier (the "$P$") to something different. +# +# Obviously, since this code is in the public domain, the above are not +# requirements (there can be none), but merely suggestions. +# +class PasswordHash { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + + function PasswordHash($iteration_count_log2, $portable_hashes) + { + $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + $iteration_count_log2 = 8; + $this->iteration_count_log2 = $iteration_count_log2; + + $this->portable_hashes = $portable_hashes; + + $this->random_state = microtime(); + if (function_exists('getmypid')) + $this->random_state .= getmypid(); + } + + function get_random_bytes($count) + { + $output = ''; + if (@is_readable('/dev/urandom') && + ($fh = @fopen('/dev/urandom', 'rb'))) { + $output = fread($fh, $count); + fclose($fh); + } + + if (strlen($output) < $count) { + $output = ''; + for ($i = 0; $i < $count; $i += 16) { + $this->random_state = + md5(microtime() . $this->random_state); + $output .= + pack('H*', md5($this->random_state)); + } + $output = substr($output, 0, $count); + } + + return $output; + } + + function encode64($input, $count) + { + $output = ''; + $i = 0; + do { + $value = ord($input[$i++]); + $output .= $this->itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($input[$i]) << 8; + $output .= $this->itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($input[$i]) << 16; + $output .= $this->itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $this->itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return $output; + } + + function gensalt_private($input) + { + $output = '$P$'; + $output .= $this->itoa64[min($this->iteration_count_log2 + + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; + $output .= $this->encode64($input, 6); + + return $output; + } + + function crypt_private($password, $setting) + { + $output = '*0'; + if (substr($setting, 0, 2) == $output) + $output = '*1'; + + $id = substr($setting, 0, 3); + # We use "$P$", phpBB3 uses "$H$" for the same thing + if ($id != '$P$' && $id != '$H$') + return $output; + + $count_log2 = strpos($this->itoa64, $setting[3]); + if ($count_log2 < 7 || $count_log2 > 30) + return $output; + + $count = 1 << $count_log2; + + $salt = substr($setting, 4, 8); + if (strlen($salt) != 8) + return $output; + + # We're kind of forced to use MD5 here since it's the only + # cryptographic primitive available in all versions of PHP + # currently in use. To implement our own low-level crypto + # in PHP would result in much worse performance and + # consequently in lower iteration counts and hashes that are + # quicker to crack (by non-PHP code). + if (PHP_VERSION >= '5') { + $hash = md5($salt . $password, TRUE); + do { + $hash = md5($hash . $password, TRUE); + } while (--$count); + } else { + $hash = pack('H*', md5($salt . $password)); + do { + $hash = pack('H*', md5($hash . $password)); + } while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= $this->encode64($hash, 16); + + return $output; + } + + function gensalt_extended($input) + { + $count_log2 = min($this->iteration_count_log2 + 8, 24); + # This should be odd to not reveal weak DES keys, and the + # maximum valid value is (2**24 - 1) which is odd anyway. + $count = (1 << $count_log2) - 1; + + $output = '_'; + $output .= $this->itoa64[$count & 0x3f]; + $output .= $this->itoa64[($count >> 6) & 0x3f]; + $output .= $this->itoa64[($count >> 12) & 0x3f]; + $output .= $this->itoa64[($count >> 18) & 0x3f]; + + $output .= $this->encode64($input, 3); + + return $output; + } + + function gensalt_blowfish($input) + { + # This one needs to use a different order of characters and a + # different encoding scheme from the one in encode64() above. + # We care because the last character in our encoded string will + # only represent 2 bits. While two known implementations of + # bcrypt will happily accept and correct a salt string which + # has the 4 unused bits set to non-zero, we do not want to take + # chances and we also do not want to waste an additional byte + # of entropy. + $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + $output = '$2a$'; + $output .= chr(ord('0') + $this->iteration_count_log2 / 10); + $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= '$'; + + $i = 0; + do { + $c1 = ord($input[$i++]); + $output .= $itoa64[$c1 >> 2]; + $c1 = ($c1 & 0x03) << 4; + if ($i >= 16) { + $output .= $itoa64[$c1]; + break; + } + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 4; + $output .= $itoa64[$c1]; + $c1 = ($c2 & 0x0f) << 2; + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 6; + $output .= $itoa64[$c1]; + $output .= $itoa64[$c2 & 0x3f]; + } while (1); + + return $output; + } + + function HashPassword($password) + { + $random = ''; + + if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { + $random = $this->get_random_bytes(16); + $hash = + crypt($password, $this->gensalt_blowfish($random)); + if (strlen($hash) == 60) + return $hash; + } + + if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { + if (strlen($random) < 3) + $random = $this->get_random_bytes(3); + $hash = + crypt($password, $this->gensalt_extended($random)); + if (strlen($hash) == 20) + return $hash; + } + + if (strlen($random) < 6) + $random = $this->get_random_bytes(6); + $hash = + $this->crypt_private($password, + $this->gensalt_private($random)); + if (strlen($hash) == 34) + return $hash; + + # Returning '*' on error is safe here, but would _not_ be safe + # in a crypt(3)-like function used _both_ for generating new + # hashes and for validating passwords against existing hashes. + return '*'; + } + + function CheckPassword($password, $stored_hash) + { + $hash = $this->crypt_private($password, $stored_hash); + if ($hash[0] == '*') + $hash = crypt($password, $stored_hash); + + return $hash == $stored_hash; + } +} + +?> diff --git a/application/views/contact.php b/application/views/contact.php new file mode 100644 index 000000000..6497ab6a7 --- /dev/null +++ b/application/views/contact.php @@ -0,0 +1 @@ +<?php echo $contact_info; ?> diff --git a/application/views/file/client.php b/application/views/file/client.php new file mode 100644 index 000000000..1c864437a --- /dev/null +++ b/application/views/file/client.php @@ -0,0 +1,49 @@ +<h1>Client</h1> + +<p> + Development (git): <?php echo anchor("http://git.server-speed.net/users/flo/fb/"); ?><br /> + Latest release: <?php echo $client_link ? anchor($client_link) : "unknown"; ?><br /> + GPG sigs, older versions: <a href="<?php echo $client_link_dir; ?>"><?php echo $client_link_dir; ?></a> +</p> + +<p>To authenticate add the following to your ~/.netrc:</p> + +<pre> +machine <?php echo $domain; ?> login my_username password my_secret_password +</pre> + +<p> + If you are using fb-client ≥1.2 you can + <a href="<?php echo site_url("user/apikeys"); ?>">create an API key</a>, + save it in <code>~/.config/fb-client/apikey</code> and remove + your password from <code>.netrc</code>. Please refer to <code>man + 1 fb</code> for further details. +</p> + +<p> + If you are using fb-client ≥1.1 you can use + <code>~/.config/fb-client/config</code> to upload to a different + pastebin URL (https or you own installation). Please refer to + <code>man 1 fb</code> for further details. +</p> + +<h2>Linux</h2> +<p> + Arch Linux: pacman -S fb-client<br /> + Debian: <?php echo anchor($client_link_deb); ?><br /> + Gentoo: Add <a href="https://publicus.dorado.uberspace.de/cgit/cgit.cgi/holgersson-overlay/tree/README">this overlay</a> and run <code>emerge -a fb-client</code><br /> + Slackware: <?php echo anchor($client_link_slackware); ?> +</p> + +<h2>OS X</h2> +<p> + Get <a href="http://brew.sh">Homebrew</a> and run <code>brew install fb-client</code>. +</p> + +<h1>Shell</h1> + +<pre> +curl -n -F "file=@/home/user/foo" <?php echo site_url("file/do_upload"); ?> (binary safe) +cat file | curl -n -F "file=@-;filename=stdin" <?php echo site_url("file/do_upload"); ?> (binary safe) +</pre> + diff --git a/application/views/file/deleted.php b/application/views/file/deleted.php new file mode 100644 index 000000000..8a5818f2d --- /dev/null +++ b/application/views/file/deleted.php @@ -0,0 +1,11 @@ +<div class="center"> + <?php if (!empty($errors)) { + echo "<p>"; + foreach ($errors as $error) { + echo "${error["id"]}: ${error["reason"]}<br>\n"; + } + echo "</p>"; + } ?> + + <p><?php echo $deleted_count; ?> of <?php echo $total_count; ?> deleted.</p> +</div> diff --git a/application/views/file/file_info.php b/application/views/file/file_info.php new file mode 100644 index 000000000..0620ac9bd --- /dev/null +++ b/application/views/file/file_info.php @@ -0,0 +1,32 @@ +<div class="center simple-container"> + <?php if($filedata): ?> + <div class="table-responive"> + <table class="table" style="margin: auto"> + <tr> + <td class="title">ID</td> + <td class="text"><a href="<?php echo site_url($id); ?>/"><?php echo $id; ?></a></td> + </tr> + <tr> + <td class="title">Filename</td> + <td class="text"><?php echo htmlspecialchars($filedata["filename"]); ?></td> + </tr> + <tr> + <td class="title">Date of upload</td> + <td class="text"><?php echo date("r", $filedata["date"]); ?></td> + </tr> + <tr> + <td class="title">Date of removal</td> + <td class="text"><?php echo $timeout; ?></td> + </tr> + <tr> + <td class="title">Size</td> + <td class="text"><?php echo format_bytes($filedata["filesize"]); ?></td> + </tr> + <tr> + <td class="title">Mimetype</td> + <td class="text"><?php echo $filedata["mimetype"]; ?></td> + </tr> + </table> + </div> + <?php endif; ?> +</div> diff --git a/application/views/file/fragments/alert-wide.php b/application/views/file/fragments/alert-wide.php new file mode 100644 index 000000000..ae303e119 --- /dev/null +++ b/application/views/file/fragments/alert-wide.php @@ -0,0 +1,3 @@ +<div class="alert alert-danger alert-wide"> + <?php echo $error_message; ?> +</div> diff --git a/application/views/file/fragments/thumbnail.php b/application/views/file/fragments/thumbnail.php new file mode 100644 index 000000000..6bd82fcb9 --- /dev/null +++ b/application/views/file/fragments/thumbnail.php @@ -0,0 +1,9 @@ +<!-- Comment markers background: http://stackoverflow.com/a/14776780/953022 --> +<div class="container container-wide"> +<div class="upload_thumbnails"><!-- + <?php foreach($items as $key => $item): ?> + --><a href="<?php echo site_url("/".$item["id"])."/"; ?>" title="<?php echo htmlentities($item["filename"]); ?>" data-content="<?php echo htmlentities($item["tooltip"]); ?>" data-id="<?php echo $item["id"]; ?>"><img class="thumb" src="<?php echo site_url("file/thumbnail/".$item["id"]); ?>"></a><!-- + <?php endforeach; ?> + --> +</div> +</div> diff --git a/application/views/file/fragments/uploads_table.php b/application/views/file/fragments/uploads_table.php new file mode 100644 index 000000000..142d19e91 --- /dev/null +++ b/application/views/file/fragments/uploads_table.php @@ -0,0 +1,26 @@ +<?php register_js_include("/data/js/jquery.tablesorter.min.js"); ?> +<div class="table-responsive container-wide"> + <p>Non-previewable file(s):</p> + <table class="table table-striped tablesorter"> + <thead> + <tr> + <th>ID</th> + <th>Filename</th> + <th>Mimetype</th> + <th>Date</th> + <th>Size</th> + </tr> + </thead> + <tbody> + <?php foreach($items as $item): ?> + <tr> + <td><a href="<?php echo site_url("/".$item["id"]) ?>/"><?php echo $item["id"] ?></a></td> + <td class="wrap"><?php echo htmlspecialchars($item["filename"]); ?></td> + <td><?php echo $item["mimetype"] ?></td> + <td class="nowrap" data-sort-value="<?=$item["date"]; ?>"><?php echo date("r", $item["date"]); ?></td> + <td><?php echo format_bytes($item["filesize"]) ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> +</div> diff --git a/application/views/file/html_footer.php b/application/views/file/html_footer.php new file mode 100644 index 000000000..bd07b63f9 --- /dev/null +++ b/application/views/file/html_footer.php @@ -0,0 +1,4 @@ +<div class="container"> +<?php +$force_full_html = true; +include(FCPATH."application/views/footer.php"); diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php new file mode 100644 index 000000000..fdce101a2 --- /dev/null +++ b/application/views/file/html_header.php @@ -0,0 +1,15 @@ +<?php +$force_full_html = true; +include(FCPATH."application/views/header.php"); ?> + +</div><!-- .container --> + +<script type="text/javascript"> + /* <![CDATA[ */ + window.lexers = <?php echo json_encode($lexers); ?>; + /* ]]> */ +</script> + +<?php if (isset($error_message)) { + include 'framgents/alert-wide.php'; +} ?> diff --git a/application/views/file/html_paste_footer.php b/application/views/file/html_paste_footer.php new file mode 100644 index 000000000..22bc4dabb --- /dev/null +++ b/application/views/file/html_paste_footer.php @@ -0,0 +1,2 @@ +</div><!-- .container .paste-container --> + diff --git a/application/views/file/html_paste_header.php b/application/views/file/html_paste_header.php new file mode 100644 index 000000000..f4d3021ec --- /dev/null +++ b/application/views/file/html_paste_header.php @@ -0,0 +1,79 @@ +<div class="container paste-container container-wide"> + <div style="border:1px solid #ccc;"> + <div class="navbar navbar-default navbar-static-top navbar-paste"> + <ul class="nav navbar-nav navbar-left dont-float"> + <li><a href="<?=site_url($id)."/"; ?>" class="navbar-brand" data-toggle="modal"><?php echo $title ?></a></li> + <li class="divider"></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="language-toggle-<?=$id; ?>"> + Language: <?php echo htmlspecialchars($current_highlight); ?> + <b class="caret"></b> + </a> + <div class="dropdown-menu" style="padding: 15px;"> + <form> + <input data-base-url="<?=site_url($id); ?>" type="text" id="language-<?=$id; ?>" placeholder="Language" class="form-control"> + </form> + </div> + </li> + <li class="divider"></li> + <li> + <a href="#file-info-<?=$id; ?>" role="button" data-toggle="modal">Info</a> + </li> + <?php if (isset($user_logged_in) && $user_logged_in) { ?> + <li class="divider"></li> + <li><a href="<?php echo site_url('file/index?repaste='.$id); ?>" role="button">Repaste</a></li> + <?php } ?> + </ul> + <div class="btn-group navbar-right" style="margin: 8px;"> + <a id="linewrap-<?=$id; ?>" class="btn btn-default" rel="tooltip" title="Toggle wrapping of long lines">Linewrap</a> + <a href="<?php echo site_url($id."/plain") ?>" class="btn btn-default" rel="tooltip" title="View as plain text">Plain</a> + <a href="<?php echo site_url($id) ?>" class="btn btn-default" rel="tooltip" title="View as raw file (org. mime type)">Raw</a> + <?php if ($current_highlight === 'rmd') { ?> + <a href="<?php echo site_url($id)."/" ?>" class="btn btn-default" rel="tooltip" title="Render as Code">Code</a> + <?php } else { ?> + <a href="<?php echo site_url($id."/rmd") ?>" class="btn btn-default" rel="tooltip" title="Render as Markdown">Markdown</a> + <?php } ?> + </div> + </div> <!-- .navbar --> + <div id="file-info-<?=$id; ?>" class="modal fade" role="dialog" aria-labelledby="file-info-<?=$id; ?>" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h3 class="modal-title">Paste Information</h3> + </div> + <div class="modal-body"> + <table class="table"> + <tr> + <td style="border:0;">Filename:</td> + <td style="border:0;"><?php echo htmlspecialchars($filedata["filename"]) ?></td> + </tr> + <tr> + <td>Size:</td> + <td><?php echo format_bytes($filedata["filesize"]) ?></td> + </tr> + <tr> + <td>Mimetype:</td> + <td><?php echo $filedata["mimetype"] ?></td> + </tr> + <tr> + <td>Uploaded:</td> + <td><?php echo date("r", $filedata["date"]) ?></td> + </tr> + <tr> + <td>Removal:</td> + <td><?php echo $timeout ?></td> + </tr> + </table> + </div> + <div class="modal-footer"> + <?php echo form_open("file/do_delete/", array("style" => "display: inline")); ?> + <input type="hidden" name="ids[<?php echo $id; ?>]" value="<?php echo $id; ?>"> + <button class="btn btn-danger pull-left" aria-hidden="true">Delete</button> + </form> + <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> + </div> + </div> + </div> + </div> <!-- .modal --> + </div> diff --git a/application/views/file/multipaste_info.php b/application/views/file/multipaste_info.php new file mode 100644 index 000000000..5baf732a2 --- /dev/null +++ b/application/views/file/multipaste_info.php @@ -0,0 +1,26 @@ +<div class="center simple-container"> + <div class="table-responive"> + <table class="table" style="margin: auto"> + <tr> + <td class="title">ID</td> + <td class="text"><a href="<?=site_url($id); ?>/"><?=$id; ?></a></td> + </tr> + <tr> + <td class="title">Number of files</td> + <td class="text"><?=$file_count; ?></td> + </tr> + <tr> + <td class="title">Date of upload</td> + <td class="text"><?=date("r", $upload_date); ?></td> + </tr> + <tr> + <td class="title">Date of removal</td> + <td class="text"><?=$timeout_string; ?></td> + </tr> + <tr> + <td class="title">Total size (including duplicates)</td> + <td class="text"><?=format_bytes($size); ?></td> + </tr> + </table> + </div> +</div> diff --git a/application/views/file/nav_history.php b/application/views/file/nav_history.php new file mode 100644 index 000000000..bbb695fd6 --- /dev/null +++ b/application/views/file/nav_history.php @@ -0,0 +1,18 @@ +<ul class="nav nav-tabs nav-history"> +<?php +$nav = array( + "List" => "file/upload_history", + "Thumbnails" => "file/upload_history_thumbnails", +); + +$CI =& get_instance(); + +foreach ($nav as $key => $item) { + ?> + <li <?php echo $CI->uri->uri_string() == $item ? 'class="active"' : ''; ?>> + <a href="<?php echo site_url($item); ?>"><?php echo $key; ?></a> + </li> + <?php +} +?> +</ul> diff --git a/application/views/file/non_existent.php b/application/views/file/non_existent.php new file mode 100644 index 000000000..13d8c6950 --- /dev/null +++ b/application/views/file/non_existent.php @@ -0,0 +1,3 @@ +<div class="center"> + <p>I'm sorry, but the requested file doesn't exist.</p> +</div> diff --git a/application/views/file/show_url.php b/application/views/file/show_url.php new file mode 100644 index 000000000..a3d965717 --- /dev/null +++ b/application/views/file/show_url.php @@ -0,0 +1,8 @@ +<div class="center"> + <p>You can get your file(s) here:</p> + <p> + <?php foreach ($urls as $key => $url) { ?> + <a href="<?php echo $url; ?>"><?php echo $url; ?></a><br /> + <?php } ?> + </p> +</div> diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php new file mode 100644 index 000000000..5051f689b --- /dev/null +++ b/application/views/file/upload_form.php @@ -0,0 +1,110 @@ +<?php if (isset($user_logged_in) && $user_logged_in) { ?> +<div class="row"> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-upload-form"> + <?php echo form_open_multipart('file/do_paste'); ?> + <div class="panel panel-default"> + <div class="panel-heading"> + <h3 class="panel-title">Text paste</h3> + </div> + <div class="panel-body"> + <textarea name="content" class="form-control text-upload"><?php + if (isset($textarea_content)) { + echo $textarea_content; + } + ?></textarea><br> + <button type="submit" class="btn btn-primary">Paste it!</button> + </div> + </form> + </div> + </div> +</div> +<div class="row"> + <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"> + <?php echo form_open_multipart('file/do_upload'); ?> + <div class="panel panel-default"> + <div class="panel-heading"> + <h3 class="panel-title">File upload</h3> + </div> + <div class="panel-body"> + <div> + <input class="file-upload" type="file" name="file[]" multiple="multiple"><br> + </div> + <label><input type="checkbox" name="multipaste" value="1"> Create multipaste</label><br> + <button type="submit" id="upload_button" class="btn btn-primary">Upload it!</button> + </div> + </div> + </form> + </div> + <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"> + <div class="panel panel-info"> + <div class="panel-heading"> + <h3 class="panel-title">Notice!</h3> + </div> + <div class="panel-body"> + <p> + Uploads/pastes are <?php if ($upload_max_age > 0) { + echo "deleted after ".$upload_max_age." days"; + if ($small_upload_size > 0) { + echo " unless they are smaller than ".format_bytes($small_upload_size); + } + } else { + echo "stored forever"; + } ?>. Maximum upload size is <?php echo format_bytes($max_upload_size); ?>. + You can upload a maximum of <?php echo ini_get("max_file_uploads"); ?> files at once. + </p> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> + /* <![CDATA[ */ + var max_upload_size = "<?php echo $max_upload_size; ?>"; + var max_files_per_upload = "<?php echo ini_get("max_file_uploads"); ?>"; + /* ]]> */ +</script> + +<?php } else { ?> + <?php echo form_open('user/login', array('class' => 'form-inline')); ?> + <input type="text" name="username" placeholder="Username" autofocus class="form-control inline-input"/> + <input type="password" name="password" placeholder="Password" class="form-control inline-input"/> + <input type="submit" class="btn btn-primary" value="Login" name="process" /> + <?php if(auth_driver_function_implemented("can_reset_password")) { ?> + <p class="help-block"><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p> + <?php } ?> + </form> +<?php } ?> +<div class="row"> + <div class="col-lg-6"> + <div class="page-header"><h1>Features</h1></div> + <p>For shell uploading/pasting and download information for the client go to <a href="<?php echo site_url("file/client"); ?>"><?php echo site_url("file/client"); ?></a></p> + <p>You can use the <?php echo anchor("file/upload_history", "history"); ?> to find old uploads.</p> + <h3>How to link your pastes:</h3> + <dl class="dl-horizontal"> + <dt>/<ID>/</dt><dd>automatically highlight the paste</dd> + <dt>/<ID></dt><dd>set the detected MIME type and let the browser do the rest</dd> + <dt>/<ID>/plain</dt><dd>force the MIME type to be text/plain</dd> + <dt>/<ID>/<file extension></dt><dd>override auto detection and use the supplied file extension or language name for highlighting</dd> + <dt>/<ID>/qr</dt><dd>display a qr code containing a link to <span class="example">/<ID>/</span></dd> + <dt>/<ID>/rmd</dt><dd>convert markdown to HTML</dd> + <dt>/<ID>/ascii</dt><dd>convert text with ANSI (shell) escape codes to HTML</dd> + <dt>/<ID>/info</dt><dd>display some information about the ID</dd> + </dl> + <p>If your upload is not detected as text, only <b>/<ID>/qr</b>, <b>/<ID>/plain</b> and <b>/<ID>/info</b> will work as above and all others will simply return the file with the detected MIME type.</p> + <h3>How to link your multipastes:</h3> + <p>Multipaste IDs begin with <code>m-</code> and only support the following features.</p> + <dl class="dl-horizontal"> + <dt>/<ID>/</dt><dd>automatically display everything in a sensible way</dd> + <dt>/<ID>/qr</dt><dd>display a qr code containing a link to <span class="example">/<ID>/</span></dd> + <dt>/<ID>/info</dt><dd>display some information about the multipaste</dd> + </dl> + </div> + <div class="col-lg-6"> + <div class="page-header"><h1>Information</h1></div> + <p>This website's primary goal is aiding developers, power users, students and alike in solving problems, debugging software, sharing their configuration, etc. It is not intended to distribute confidential or harmful information, scripts or software.</p> + <?php if(auth_driver_function_implemented("can_register_new_users")) { ?> + <p>If you want an account, ask someone who is already using this service to <a href="<?php echo site_url("user/invite"); ?>">invite</a> you.</p> + <p>Invitations are used to control abuse and encourage users to "be nice". They are not intended as a means of exclusivity. In case of abuse reports, involved accounts may be banned and the user who invited them may also be banned. The invitation tree will be followed upwards if necessary.</p> + <?php } ?> + </div> +</div> diff --git a/application/views/file/upload_history.php b/application/views/file/upload_history.php new file mode 100644 index 000000000..10afc53e9 --- /dev/null +++ b/application/views/file/upload_history.php @@ -0,0 +1,34 @@ +<?php register_js_include("/data/js/jquery.tablesorter.min.js"); ?> +<?php register_js_include("/data/js/jquery.metadata.js"); ?> +<?php include 'nav_history.php'; ?> +<?php echo form_open("file/do_delete") ?> + <div class="table-responsive"> + <table id="upload_history" class="table table-striped tablesorter {sortlist: [[4,1]]}"> + <thead> + <tr> + <th class="{sorter: false}"><input type="checkbox" name="all-ids" id="history-all"></th> + <th>ID</th> + <th>Filename</th> + <th>Mimetype + <th>Date</th> + <th>Size</th> + </tr> + </thead> + <tbody> + <?php foreach($items as $key => $item): ?> + <tr> + <td><input type="checkbox" name="ids[<?php echo $item["id"] ?>]" value="<?php echo $item["id"] ?>" class="delete-history"></td> + <td><a href="<?php echo site_url("/".$item["id"]) ?>/"><?php echo $item["id"] ?></a></td> + <td class="wrap"><?php echo htmlspecialchars($item["filename"]); ?></td> + <td><?php echo $item["mimetype"] ?></td> + <td class="nowrap" data-sort-value="<?=$item["date"]; ?>"><?php echo date("r", $item["date"]); ?></td> + <td><?php echo $item["filesize"] ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + </div> + <input class="btn btn-danger" type="submit" value="Delete checked" name="process"> +</form> + +<p>Total sum of your distinct uploads: <?php echo $total_size; ?>.</p> diff --git a/application/views/file/upload_history_thumbnails.php b/application/views/file/upload_history_thumbnails.php new file mode 100644 index 000000000..a061d9676 --- /dev/null +++ b/application/views/file/upload_history_thumbnails.php @@ -0,0 +1,21 @@ +<div class="pull-right"> + <?php echo form_open("file/do_delete/", array("id" => "delete_form", "style" => "display: inline")); ?> + <button class="btn btn-danger" id="delete_button" style="display: none">Delete selected</button> + </form> + <button class="btn btn-default" id="toggle_delete_mode" style="display: inline">Delete mode</button> +</div> + +<?php include 'nav_history.php'; ?> +<?php include 'fragments/thumbnail.php'; ?> + +<div class="row-fluid"> + <div class="span12 alert alert-block alert-info"> + <h4 class="alert-heading">Notice!</h4> + <p> + Currently only jpeg, png and gif images are displayed here. If you are + looking for something else, please switch to the + <a href="<?php echo site_url("file/upload_history"); ?>">list view</a> + which contains your complete history. + </p> + </div> +</div> diff --git a/application/views/file_plaintext/client.php b/application/views/file_plaintext/client.php new file mode 100644 index 000000000..0ab556df2 --- /dev/null +++ b/application/views/file_plaintext/client.php @@ -0,0 +1,12 @@ +Shell (binary safe): + curl -n -F "file=@/home/user/foo" <?php echo site_url("file/do_upload")."\n"; ?> + cat file | curl -n -F "file=@-;filename=stdin" <?php echo site_url("file/do_upload")."\n"; ?> + +Client: +Development (git): http://git.server-speed.net/users/flo/fb +Latest release: <?php echo $client_link."\n"; ?> +GPG sigs, older versions: <?php echo $client_link_dir."\n"; ?> + +To authenticate add the following to your ~/.netrc: + machine paste.xinu.at login my_username password my_secret_password + diff --git a/application/views/file_plaintext/deleted.php b/application/views/file_plaintext/deleted.php new file mode 100644 index 000000000..347766092 --- /dev/null +++ b/application/views/file_plaintext/deleted.php @@ -0,0 +1,8 @@ +<?php if (!empty($errors)) { + echo implode("\n", $errors); +} ?> +<?php if (!empty($msgs)) { + echo implode("\n", $msgs); +} ?> + +<?php echo $deleted_count; ?> of <?php echo $total_count; ?> deleted. diff --git a/application/views/file_plaintext/footer.php b/application/views/file_plaintext/footer.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/application/views/file_plaintext/footer.php diff --git a/application/views/file_plaintext/header.php b/application/views/file_plaintext/header.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/application/views/file_plaintext/header.php diff --git a/application/views/file_plaintext/html_footer.php b/application/views/file_plaintext/html_footer.php new file mode 100644 index 000000000..d46a93ce4 --- /dev/null +++ b/application/views/file_plaintext/html_footer.php @@ -0,0 +1 @@ +<?php include "application/views/file/html_footer.php"; ?> diff --git a/application/views/file_plaintext/html_header.php b/application/views/file_plaintext/html_header.php new file mode 100644 index 000000000..5cc4c40a7 --- /dev/null +++ b/application/views/file_plaintext/html_header.php @@ -0,0 +1 @@ +<?php include "application/views/file/html_header.php"; ?> diff --git a/application/views/file_plaintext/html_paste_footer.php b/application/views/file_plaintext/html_paste_footer.php new file mode 100644 index 000000000..f3cf21e3a --- /dev/null +++ b/application/views/file_plaintext/html_paste_footer.php @@ -0,0 +1 @@ +<?php include "application/views/file/html_paste_footer.php"; ?> diff --git a/application/views/file_plaintext/html_paste_header.php b/application/views/file_plaintext/html_paste_header.php new file mode 100644 index 000000000..2a5db977e --- /dev/null +++ b/application/views/file_plaintext/html_paste_header.php @@ -0,0 +1 @@ +<?php include "application/views/file/html_paste_header.php"; ?> diff --git a/application/views/file_plaintext/non_existent.php b/application/views/file_plaintext/non_existent.php new file mode 100644 index 000000000..7da92e954 --- /dev/null +++ b/application/views/file_plaintext/non_existent.php @@ -0,0 +1 @@ +I'm sorry, but the requested file doesn't exist. diff --git a/application/views/file_plaintext/show_url.php b/application/views/file_plaintext/show_url.php new file mode 100644 index 000000000..64050ddcd --- /dev/null +++ b/application/views/file_plaintext/show_url.php @@ -0,0 +1,3 @@ +<?php +echo implode(" ", $urls)."\n"; + diff --git a/application/views/file_plaintext/upload_form.php b/application/views/file_plaintext/upload_form.php new file mode 100644 index 000000000..a74e5d434 --- /dev/null +++ b/application/views/file_plaintext/upload_form.php @@ -0,0 +1,19 @@ +Uploads/pastes are deleted after <?php echo $upload_max_age; ?> days<?php if($small_upload_size > 0): ?> unless they are smaller than <?php echo format_bytes($small_upload_size); ?><?php endif; ?>. +Maximum upload size is <?php echo format_bytes($max_upload_size); ?>. +You can upload a maximum of <?php echo ini_get("max_file_uploads"); ?> files at once. + +How to link your uploads: + - "/<ID>/" automatically highlight the uploads + - "/<ID>" set the detected MIME type and let the browser do the rest + - "/<ID>/plain" force the MIME type to be text/plain + - "/<ID>/<file extension>" override auto detection and use the supplied + file extension or language name for highlighting + - "/<ID>/qr" display a qr code containing a link to /<ID>/ + - "/<ID>/rmd" convert markdown to HTML + - "/<ID>/ascii" convert text with ANSI (shell) escape codes to HTML + - "/<ID>/info" display some information about the ID + +If your upload is not detected as text, only "/<ID>/qr", "/<ID>/plain" +and "/<ID>/info" will work as above and all others will simply return +the file with the detected MIME type. + diff --git a/application/views/file_plaintext/upload_history.php b/application/views/file_plaintext/upload_history.php new file mode 100644 index 000000000..53801494f --- /dev/null +++ b/application/views/file_plaintext/upload_history.php @@ -0,0 +1,23 @@ +<?php +$dateformat = "r"; +$lengths["date"] = max($lengths["date"], strlen(date($dateformat, time()))); +echo + mb_str_pad($fields["id"], $lengths["id"])." | " + .mb_str_pad($fields["filename"], $lengths["filename"])." | " + .mb_str_pad($fields["mimetype"], $lengths["mimetype"])." | " + .mb_str_pad($fields["date"], $lengths["date"])." | " + .mb_str_pad($fields["hash"], $lengths["hash"])." | " + .mb_str_pad($fields["filesize"], $lengths["filesize"])."\n"; + +foreach($items as $key => $item) { + echo + mb_str_pad($item["id"], $lengths["id"])." | " + .mb_str_pad($item["filename"], $lengths["filename"])." | " + .mb_str_pad($item["mimetype"], $lengths["mimetype"])." | " + .date($dateformat, $item["date"])." | " + .mb_str_pad($item["hash"], $lengths["hash"])." | " + .$item["filesize"]."\n"; +} +?> + +Total sum of your distinct uploads: <?php echo $total_size; ?>. diff --git a/application/views/footer.php b/application/views/footer.php new file mode 100644 index 000000000..ae8d2e575 --- /dev/null +++ b/application/views/footer.php @@ -0,0 +1,33 @@ +<?php +if (is_cli_client() && !isset($force_full_html)) { + return; +} +?> + </div><!-- .container --> +<div id="push"></div> +</div> <!-- #wrap --> +<footer class="footer" id="footer"> + <div class="container muted credits"> + <p>Site code licensed under <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank">AGPL v3</a>.</p> + <p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> + <ul class="footer-links"> + <li><a href="http://git.server-speed.net/users/flo/filebin/">Source</a></li> + <li class="muted">·</li> + <li><a href="<?php echo site_url("file/contact"); ?>">Contact</a></li> + </ul> + </div> +</footer> + +<?php +$CI = &get_instance(); +if ($CI->config->item("environment") == "development" && property_exists($CI, "email")) { + echo $CI->email->print_debugger(); +} +?> +<?php echo include_js("/data/js/jquery-2.0.3.min.js"); ?> +<?php echo include_js("/data/js/jquery-ui-1.10.3.custom.min.js"); ?> +<?php echo include_js("/data/js/bootstrap.min.js"); ?> +<?php echo include_js("/data/js/script.js"); ?> +<?php echo include_registered_js(); ?> +</body> +</html> diff --git a/application/views/header.php b/application/views/header.php new file mode 100644 index 000000000..8f246aeb8 --- /dev/null +++ b/application/views/header.php @@ -0,0 +1,105 @@ +<?php +if (is_cli_client() && !isset($force_full_html)) { + return; +} +?><!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <title><?php echo isset($title) ? $title : 'FileBin'; ?></title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="robots" content="noindex,nofollow" /> + <meta name="description" content=""> + <meta name="author" content=""> + + <link href="<?php echo link_with_mtime("/data/css/ui-lightness/jquery-ui-1.10.3.custom.min.css"); ?>" rel="stylesheet"> + <link href="<?php echo link_with_mtime("/data/css/bootstrap.min.css"); ?>" rel="stylesheet"> + <link href="<?php echo link_with_mtime("/data/css/style.css"); ?>" rel="stylesheet"> + <?php + if (file_exists(FCPATH."data/local/style.css")) { + echo '<link href="'.link_with_mtime("/data/local/style.css").'" rel="stylesheet">'; + } + + if (file_exists(FCPATH."data/local/favicon.png")) { + echo '<link href="'.link_with_mtime("/data/local/favicon.png").'" rel="shortcut icon">'; + } + ?> +</head> + +<body> +<div id="wrap"> +<?php if (file_exists(FCPATH."data/local/header.inc.php")) { + include FCPATH."data/local/header.inc.php"; +}?> + <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="<?php echo site_url(); ?>"><?php + if (file_exists(FCPATH."data/local/logo.svg")) { + echo '<img class="brand-icon" src="'.link_with_mtime("/data/local/logo.svg").'" style="height: 20px"> FileBin'; + } else { + echo "FileBin"; + } + ?> + </a> + </div> + <div class="collapse navbar-collapse navbar-ex1-collapse"> + <?php if(!isset($GLOBALS["is_error_page"])) { ?> + <ul class="nav navbar-nav navbar-right"> + <?php if (isset($user_logged_in) && $user_logged_in) { ?> + <li><a class="navbar-link" href="<?php echo site_url("/user/logout"); ?>">Logout</a></li> + <?php } else { ?> + <li class="dropdown"> + <a class="dropdown-toggle" href="#" data-toggle="dropdown">Login <b class="caret"></b></a> + <div class="dropdown-menu" style="padding: 5px;"> + <?php if(auth_driver_function_implemented("can_reset_password")) { ?> + <p><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p> + <?php } ?> + <?php echo form_open("user/login", array("class" => "form-signin")); ?> + <input type="text" name="username" placeholder="Username" class="form-control"> + <input type="password" name="password" placeholder="Password" class="form-control"> + <button type="submit" name="process" class="btn btn-default btn-block">Login</button> + </form> + </div> + </li> + <?php } ?> + </ul> + <?php }; ?> + <ul class="nav navbar-nav"> + <?php if (isset($user_logged_in) && $user_logged_in) { ?> + <li><a href="<?php echo site_url("file/index") ?>"><span class="glyphicon glyphicon-pencil"></span> New</a></li> + <li><a href="<?php echo site_url("file/upload_history") ?>"><span class="glyphicon glyphicon-book"></span> History</a></li> + <li class="dropdown"> + <a href="<?php echo site_url("user/index"); ?>" class="dropdown-toggle" data-toggle="dropdown"> + <span class="glyphicon glyphicon-user"></span> Account <b class="caret"></b> + </a> + <ul class="dropdown-menu"> + <?php include "user/nav.php"; ?> + </ul> + </li> + <?php } ?> + </ul> + </div> + </div> + </nav> + <div id="navbar-height"></div> + + <div class="container"> + <?php + if (isset($alerts)) { + foreach ($alerts as $alert) { ?> + <div class="alert alert-dismissable alert-<?php echo $alert["type"]; ?>" style="text-align: center"> + <button type="button" class="close" data-dismiss="alert">×</button> + <?php echo $alert["message"]; ?> + </div> + <?php + } + } + ?> diff --git a/application/views/user/apikeys.php b/application/views/user/apikeys.php new file mode 100644 index 000000000..2b6934c6d --- /dev/null +++ b/application/views/user/apikeys.php @@ -0,0 +1,60 @@ +<h2>API keys</h2> +<div class="table-responsive"> + <table class="table table-striped"> + <thead> + <tr> + <th>#</th> + <th>Key</th> + <th style="width: 30%;">Comment</th> + <th>Created on</th> + <th>Access</th> + <th></th> + </tr> + </thead> + <tbody> + <?php $i = 1; ?> + <?php foreach($query as $key => $item): ?> + <tr> + <td><?php echo $i++; ?></td> + <td><?php echo $item["key"]; ?></td> + <td><?php echo htmlentities($item["comment"]); ?></td> + <td><?php echo date("Y/m/d H:i", $item["created"]); ?></td> + <td> + <?php if ($item["access_level"] == "full"): ?> + <span class="glyphicon glyphicon-warning-sign"></span> + <?php endif; ?> + <?php echo $item["access_level"]; ?> + </td> + <td> + <?php echo form_open("user/delete_apikey", array("style" => "margin-bottom: 0")); ?> + <?php echo form_hidden("key", $item["key"]); ?> + <button class="btn btn-danger btn-xs" type="submit">Delete</input> + </form> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> +</div> + +<h3>Access levels:</h3> + +<dl class="dl-horizontal"> + <dt>basic</dt> + <dd>Allows uploading files.</dd> + <dt>apikey</dt> + <dd>Allows removing existing files and viewing the history. Includes <code>basic</code>.</dd> + <dt>full</dt> + <dd>Allows everything, including, but not limited to, creating and removing api keys, changing profile settings and creating invitation keys. Includes <code>apikey</code>.</dd> + +<p> + <?php echo form_open('user/create_apikey', array("class" => "form-inline")); ?> + <input type="text" name="comment" placeholder="Comment" class="form-control" style="width: 200px;"/> + <select name="access_level" class="form-control" style="width: 100px;"> + <option>basic</option> + <option selected="selected">apikey</option> + <option>full</option> + </select> + <input class="btn btn-primary" type="submit" value="Create a new key" name="process" /> +</form> +</p> diff --git a/application/views/user/hash_password.php b/application/views/user/hash_password.php new file mode 100644 index 000000000..98bef9df5 --- /dev/null +++ b/application/views/user/hash_password.php @@ -0,0 +1,38 @@ +<?php +if (!empty($error)) { + echo "<p class='alert alert-danger'>"; + echo implode("<br />\n", $error); + echo "</p>"; +} + +if ($hash) { + echo "<p>Result (this hash uses a random salt, so it will be different each time you submit this form):<br />$hash</p>\n"; +} +?> +<?php echo form_open('user/hash_password'); ?> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> + <button type="submit" class="btn btn-primary" name="process">Hash it</button> + </div> + </div> +</form> + diff --git a/application/views/user/index.php b/application/views/user/index.php new file mode 100644 index 000000000..9e6f48116 --- /dev/null +++ b/application/views/user/index.php @@ -0,0 +1,3 @@ +<ul class="nav"> +<?php include "nav.php"; ?> +</ul> diff --git a/application/views/user/invite.php b/application/views/user/invite.php new file mode 100644 index 000000000..d3e2fb7a6 --- /dev/null +++ b/application/views/user/invite.php @@ -0,0 +1,39 @@ +<div class="alert alert-warning"> + <p> + <b>Watch out!</b> + </p> + <p> + You are free to invite anyone you want to, but please keep in + mind that if this person violates the rules and is banned, your + account will also be disabled. + </p> +</div> + +<h2>Unused invitation keys</h2> +<div class="table-responsive"> + <table class="table table-striped"> + <thead> + <tr> + <th>#</th> + <th style="width: 70%;">Key</th> + <th>Created on</th> + </tr> + </thead> + <tbody> + <?php $i = 1; ?> + <?php foreach($query as $key => $item): ?> + <tr> + <td><?php echo $i++; ?></td> + <td><?php echo anchor("user/register/".$item["key"], $item["key"]) ?></td> + <td><?php echo date("Y/m/d H:i", $item["date"]) ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> +</div> + +<p> + <?php echo form_open('user/create_invitation_key'); ?> + <input class="btn btn-primary btn-large" type="submit" value="Create a new key" name="process" /> + </form> +</p> diff --git a/application/views/user/login.php b/application/views/user/login.php new file mode 100644 index 000000000..3e30d53bd --- /dev/null +++ b/application/views/user/login.php @@ -0,0 +1,26 @@ +<?php +if (isset($login_error)) { ?> + <div class="alert alert-danger">The entered credentials are invalid.</div> +<?php } ?> + +<?php echo form_open('user/login', array("class" => "form-horizontal login-page")); ?> + <div class="form-group"> + <label class="control-label" for="inputUsername">Username</label> + <div class="controls"> + <input type="text" id="inputUsername" name="username" placeholder="Username" class="form-control"> + </div> + </div> + + <div class="form-group"> + <label class="control-label" for="inputPassword">Password</label> + <div class="controls"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> + </div> + </div> + + <div class="form-group"> + <div class="controls"> + <button type="submit" class="btn btn-primary" name="process">Login</button> + </div> + </div> +</form> diff --git a/application/views/user/nav.php b/application/views/user/nav.php new file mode 100644 index 000000000..49c7aa988 --- /dev/null +++ b/application/views/user/nav.php @@ -0,0 +1,11 @@ +<?php if(auth_driver_function_implemented("can_register_new_users")) { ?> +<li><a href="<?php echo site_url("user/invite") ?>"><span class="glyphicon glyphicon-plus"></span> Invite</a></li> +<?php } ?> + +<li><a href="<?php echo site_url("user/profile") ?>"><span class="glyphicon glyphicon-user"></span> Profile</a></li> +<li><a href="<?php echo site_url("user/apikeys") ?>"><span class="glyphicon glyphicon-tags"></span> API keys</a></li> + +<?php if(auth_driver_function_implemented("can_reset_password")) { ?> +<li><a href="<?php echo site_url("user/reset_password") ?>"><span class="glyphicon glyphicon-lock"></span> Change password</a></li> +<?php } ?> + diff --git a/application/views/user/profile.php b/application/views/user/profile.php new file mode 100644 index 000000000..74d786d3f --- /dev/null +++ b/application/views/user/profile.php @@ -0,0 +1,40 @@ +<?php echo form_open("user/profile"); ?> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" disabled="disabled" value="<?php echo $profile_data["username"]; ?>" class="form-control"> + </div> + </div> +</div> + +<?php if($profile_data["email"] !== null) { ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputEmail">Email</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputEmail" name="email" placeholder="Email" disabled="disabled" value="<?php echo $profile_data["email"]; ?>" class="form-control"> + </div> + </div> +</div> +<?php } ?> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUploadIDLimits">Upload ID length limits</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUploadIDLimits" name="upload_id_limits" placeholder="number-number" value="<?php echo $profile_data["upload_id_limits"]; ?>" class="form-control"> + <span class="help-block">Values have to be between 3 and 64 inclusive. Please remember that longer IDs don't protect your pastes from being found if you post the link somewhere a search enginge can see it.</span> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> + <button type="submit" class="btn btn-primary" name="process">Save changes</button> + </div> + </div> +</div> +</form> diff --git a/application/views/user/register.php b/application/views/user/register.php new file mode 100644 index 000000000..af4558ff9 --- /dev/null +++ b/application/views/user/register.php @@ -0,0 +1,51 @@ +<?php if (!empty($error)) { + echo "<p class='alert alert-danger'>"; + echo implode("<br />\n", $error); + echo "</p>"; +} ?> +<?php echo form_open('user/register/'.$key); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo $values["username"]; ?>" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputEmail">Email</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputEmail" name="email" placeholder="Email" value="<?php echo $values["email"]; ?>" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> + <button type="submit" class="btn btn-primary" name="process">Register</button> + </div> + </div> +</div> +</form> + diff --git a/application/views/user/registered.php b/application/views/user/registered.php new file mode 100644 index 000000000..f13006aae --- /dev/null +++ b/application/views/user/registered.php @@ -0,0 +1,3 @@ +<div class="center"> + <p>Your account has been created, you may log in now.</p> +</div> diff --git a/application/views/user/reset_password_form.php b/application/views/user/reset_password_form.php new file mode 100644 index 000000000..9c8253189 --- /dev/null +++ b/application/views/user/reset_password_form.php @@ -0,0 +1,33 @@ +<?php if (!empty($error)) { + echo "<p class='alert alert-danger'>"; + echo implode("<br />\n", $error); + echo "</p>"; +} ?> +<?php echo form_open('user/reset_password/'.$key); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> + <button type="submit" class="btn btn-primary" name="process">Change password</button> + </div> + </div> +</div> +</form> + diff --git a/application/views/user/reset_password_link_sent.php b/application/views/user/reset_password_link_sent.php new file mode 100644 index 000000000..a5b249f89 --- /dev/null +++ b/application/views/user/reset_password_link_sent.php @@ -0,0 +1,3 @@ +<p> + A mail containing your password reset link has been sent to your email address at <?php echo htmlentities($email_domain); ?>. +</p> diff --git a/application/views/user/reset_password_success.php b/application/views/user/reset_password_success.php new file mode 100644 index 000000000..bc7448833 --- /dev/null +++ b/application/views/user/reset_password_success.php @@ -0,0 +1,3 @@ +<div class="center"> + <p>Your password has been changed successfully.</p> +</div> diff --git a/application/views/user/reset_password_username_form.php b/application/views/user/reset_password_username_form.php new file mode 100644 index 000000000..713cd4919 --- /dev/null +++ b/application/views/user/reset_password_username_form.php @@ -0,0 +1,19 @@ +<?php echo form_open('user/reset_password'); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo isset($username) ? $username : ""; ?>" class="form-control"> + </div> + </div> +</div> + +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> + <button type="submit" class="btn btn-primary" name="process">Send mail</button> + </div> + </div> +</div> +</form> + diff --git a/application/views/welcome_message.php b/application/views/welcome_message.php deleted file mode 100644 index 0bf5a8d2e..000000000 --- a/application/views/welcome_message.php +++ /dev/null @@ -1,88 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <title>Welcome to CodeIgniter</title> - - <style type="text/css"> - - ::selection{ background-color: #E13300; color: white; } - ::moz-selection{ background-color: #E13300; color: white; } - ::webkit-selection{ background-color: #E13300; color: white; } - - body { - background-color: #fff; - margin: 40px; - font: 13px/20px normal Helvetica, Arial, sans-serif; - color: #4F5155; - } - - a { - color: #003399; - background-color: transparent; - font-weight: normal; - } - - h1 { - color: #444; - background-color: transparent; - border-bottom: 1px solid #D0D0D0; - font-size: 19px; - font-weight: normal; - margin: 0 0 14px 0; - padding: 14px 15px 10px 15px; - } - - code { - font-family: Consolas, Monaco, Courier New, Courier, monospace; - font-size: 12px; - background-color: #f9f9f9; - border: 1px solid #D0D0D0; - color: #002166; - display: block; - margin: 14px 0 14px 0; - padding: 12px 10px 12px 10px; - } - - #body{ - margin: 0 15px 0 15px; - } - - p.footer{ - text-align: right; - font-size: 11px; - border-top: 1px solid #D0D0D0; - line-height: 32px; - padding: 0 10px 0 10px; - margin: 20px 0 0 0; - } - - #container{ - margin: 10px; - border: 1px solid #D0D0D0; - -webkit-box-shadow: 0 0 8px #D0D0D0; - } - </style> -</head> -<body> - -<div id="container"> - <h1>Welcome to CodeIgniter!</h1> - - <div id="body"> - <p>The page you are looking at is being generated dynamically by CodeIgniter.</p> - - <p>If you would like to edit this page you'll find it located at:</p> - <code>application/views/welcome_message.php</code> - - <p>The corresponding controller for this page is found at:</p> - <code>application/controllers/welcome.php</code> - - <p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p> - </div> - - <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/crontab b/crontab new file mode 100644 index 000000000..311912df5 --- /dev/null +++ b/crontab @@ -0,0 +1,2 @@ +28 1 * * * php ~/index.php file cron +28 2 * * * php ~/index.php user cron
\ No newline at end of file diff --git a/data/.htaccess b/data/.htaccess new file mode 100644 index 000000000..bba3837a4 --- /dev/null +++ b/data/.htaccess @@ -0,0 +1,12 @@ +<IfModule mod_expires.c> + ExpiresActive on + ExpiresByType text/css "access plus 1 year" + ExpiresByType application/javascript "access plus 1 year" +</IfModule> + +<IfModule mod_headers.c> + Header append Cache-Control "public" +</IfModule> + +FileEtag none + diff --git a/data/css/bootstrap-theme.min.css b/data/css/bootstrap-theme.min.css new file mode 100644 index 000000000..cad36b4e6 --- /dev/null +++ b/data/css/bootstrap-theme.min.css @@ -0,0 +1 @@ +.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,0%,#e6e6e6,100%);background-image:-moz-linear-gradient(top,#fff 0,#e6e6e6 100%);background-image:linear-gradient(to bottom,#fff 0,#e6e6e6 100%);background-repeat:repeat-x;border-color:#e0e0e0;border-color:#ccc;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0)}.btn-default:active,.btn-default.active{background-color:#e6e6e6;border-color:#e0e0e0}.btn-primary{background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#3071a9));background-image:-webkit-linear-gradient(top,#428bca,0%,#3071a9,100%);background-image:-moz-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;border-color:#2d6ca2;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff3071a9',GradientType=0)}.btn-primary:active,.btn-primary.active{background-color:#3071a9;border-color:#2d6ca2}.btn-success{background-image:-webkit-gradient(linear,left 0,left 100%,from(#5cb85c),to(#449d44));background-image:-webkit-linear-gradient(top,#5cb85c,0%,#449d44,100%);background-image:-moz-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;border-color:#419641;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c',endColorstr='#ff449d44',GradientType=0)}.btn-success:active,.btn-success.active{background-color:#449d44;border-color:#419641}.btn-warning{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f0ad4e),to(#ec971f));background-image:-webkit-linear-gradient(top,#f0ad4e,0%,#ec971f,100%);background-image:-moz-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;border-color:#eb9316;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e',endColorstr='#ffec971f',GradientType=0)}.btn-warning:active,.btn-warning.active{background-color:#ec971f;border-color:#eb9316}.btn-danger{background-image:-webkit-gradient(linear,left 0,left 100%,from(#d9534f),to(#c9302c));background-image:-webkit-linear-gradient(top,#d9534f,0%,#c9302c,100%);background-image:-moz-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;border-color:#c12e2a;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f',endColorstr='#ffc9302c',GradientType=0)}.btn-danger:active,.btn-danger.active{background-color:#c9302c;border-color:#c12e2a}.btn-info{background-image:-webkit-gradient(linear,left 0,left 100%,from(#5bc0de),to(#31b0d5));background-image:-webkit-linear-gradient(top,#5bc0de,0%,#31b0d5,100%);background-image:-moz-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;border-color:#2aabd2;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff31b0d5',GradientType=0)}.btn-info:active,.btn-info.active{background-color:#31b0d5;border-color:#2aabd2}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#357ebd;background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#357ebd));background-image:-webkit-linear-gradient(top,#428bca,0%,#357ebd,100%);background-image:-moz-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff357ebd',GradientType=0)}.navbar{background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#f8f8f8));background-image:-webkit-linear-gradient(top,#fff,0%,#f8f8f8,100%);background-image:-moz-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff8f8f8',GradientType=0);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075)}.navbar .navbar-nav>.active>a{background-color:#f8f8f8}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,0.25)}.navbar-inverse{background-image:-webkit-gradient(linear,left 0,left 100%,from(#3c3c3c),to(#222));background-image:-webkit-linear-gradient(top,#3c3c3c,0%,#222,100%);background-image:-moz-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c',endColorstr='#ff222222',GradientType=0)}.navbar-inverse .navbar-nav>.active>a{background-color:#222}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05)}.alert-success{background-image:-webkit-gradient(linear,left 0,left 100%,from(#dff0d8),to(#c8e5bc));background-image:-webkit-linear-gradient(top,#dff0d8,0%,#c8e5bc,100%);background-image:-moz-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;border-color:#b2dba1;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8',endColorstr='#ffc8e5bc',GradientType=0)}.alert-info{background-image:-webkit-gradient(linear,left 0,left 100%,from(#d9edf7),to(#b9def0));background-image:-webkit-linear-gradient(top,#d9edf7,0%,#b9def0,100%);background-image:-moz-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;border-color:#9acfea;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7',endColorstr='#ffb9def0',GradientType=0)}.alert-warning{background-image:-webkit-gradient(linear,left 0,left 100%,from(#fcf8e3),to(#f8efc0));background-image:-webkit-linear-gradient(top,#fcf8e3,0%,#f8efc0,100%);background-image:-moz-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;border-color:#f5e79e;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3',endColorstr='#fff8efc0',GradientType=0)}.alert-danger{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f2dede),to(#e7c3c3));background-image:-webkit-linear-gradient(top,#f2dede,0%,#e7c3c3,100%);background-image:-moz-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;border-color:#dca7a7;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede',endColorstr='#ffe7c3c3',GradientType=0)}.progress{background-image:-webkit-gradient(linear,left 0,left 100%,from(#ebebeb),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#ebebeb,0%,#f5f5f5,100%);background-image:-moz-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb',endColorstr='#fff5f5f5',GradientType=0)}.progress-bar{background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#3071a9));background-image:-webkit-linear-gradient(top,#428bca,0%,#3071a9,100%);background-image:-moz-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff3071a9',GradientType=0)}.progress-bar-success{background-image:-webkit-gradient(linear,left 0,left 100%,from(#5cb85c),to(#449d44));background-image:-webkit-linear-gradient(top,#5cb85c,0%,#449d44,100%);background-image:-moz-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c',endColorstr='#ff449d44',GradientType=0)}.progress-bar-info{background-image:-webkit-gradient(linear,left 0,left 100%,from(#5bc0de),to(#31b0d5));background-image:-webkit-linear-gradient(top,#5bc0de,0%,#31b0d5,100%);background-image:-moz-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff31b0d5',GradientType=0)}.progress-bar-warning{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f0ad4e),to(#ec971f));background-image:-webkit-linear-gradient(top,#f0ad4e,0%,#ec971f,100%);background-image:-moz-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e',endColorstr='#ffec971f',GradientType=0)}.progress-bar-danger{background-image:-webkit-gradient(linear,left 0,left 100%,from(#d9534f),to(#c9302c));background-image:-webkit-linear-gradient(top,#d9534f,0%,#c9302c,100%);background-image:-moz-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f',endColorstr='#ffc9302c',GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#3278b3));background-image:-webkit-linear-gradient(top,#428bca,0%,#3278b3,100%);background-image:-moz-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;border-color:#3278b3;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff3278b3',GradientType=0)}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.panel-default>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f5f5f5),to(#e8e8e8));background-image:-webkit-linear-gradient(top,#f5f5f5,0%,#e8e8e8,100%);background-image:-moz-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#ffe8e8e8',GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#357ebd));background-image:-webkit-linear-gradient(top,#428bca,0%,#357ebd,100%);background-image:-moz-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff357ebd',GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#dff0d8),to(#d0e9c6));background-image:-webkit-linear-gradient(top,#dff0d8,0%,#d0e9c6,100%);background-image:-moz-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8',endColorstr='#ffd0e9c6',GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#d9edf7),to(#c4e3f3));background-image:-webkit-linear-gradient(top,#d9edf7,0%,#c4e3f3,100%);background-image:-moz-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7',endColorstr='#ffc4e3f3',GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#fcf8e3),to(#faf2cc));background-image:-webkit-linear-gradient(top,#fcf8e3,0%,#faf2cc,100%);background-image:-moz-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3',endColorstr='#fffaf2cc',GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-gradient(linear,left 0,left 100%,from(#f2dede),to(#ebcccc));background-image:-webkit-linear-gradient(top,#f2dede,0%,#ebcccc,100%);background-image:-moz-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede',endColorstr='#ffebcccc',GradientType=0)}.well{background-image:-webkit-gradient(linear,left 0,left 100%,from(#e8e8e8),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#e8e8e8,0%,#f5f5f5,100%);background-image:-moz-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;border-color:#dcdcdc;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8',endColorstr='#fff5f5f5',GradientType=0);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1)}
\ No newline at end of file diff --git a/data/css/bootstrap.min.css b/data/css/bootstrap.min.css new file mode 100644 index 000000000..a553c4f5e --- /dev/null +++ b/data/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v3.0.0 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.099999999999998px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h4,h5,h6{margin-top:10px;margin-bottom:10px}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}h1 small,.h1 small{font-size:24px}h2 small,.h2 small{font-size:18px}h3 small,.h3 small,h4 small,.h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small{display:block;line-height:1.428571429;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:1.428571429}code,pre{font-family:Monaco,Menlo,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.row{margin-right:-15px;margin-left:-15px}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11{float:left}.col-xs-1{width:8.333333333333332%}.col-xs-2{width:16.666666666666664%}.col-xs-3{width:25%}.col-xs-4{width:33.33333333333333%}.col-xs-5{width:41.66666666666667%}.col-xs-6{width:50%}.col-xs-7{width:58.333333333333336%}.col-xs-8{width:66.66666666666666%}.col-xs-9{width:75%}.col-xs-10{width:83.33333333333334%}.col-xs-11{width:91.66666666666666%}.col-xs-12{width:100%}@media(min-width:768px){.container{max-width:750px}.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11{float:left}.col-sm-1{width:8.333333333333332%}.col-sm-2{width:16.666666666666664%}.col-sm-3{width:25%}.col-sm-4{width:33.33333333333333%}.col-sm-5{width:41.66666666666667%}.col-sm-6{width:50%}.col-sm-7{width:58.333333333333336%}.col-sm-8{width:66.66666666666666%}.col-sm-9{width:75%}.col-sm-10{width:83.33333333333334%}.col-sm-11{width:91.66666666666666%}.col-sm-12{width:100%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-11{left:91.66666666666666%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-11{margin-left:91.66666666666666%}}@media(min-width:992px){.container{max-width:970px}.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11{float:left}.col-md-1{width:8.333333333333332%}.col-md-2{width:16.666666666666664%}.col-md-3{width:25%}.col-md-4{width:33.33333333333333%}.col-md-5{width:41.66666666666667%}.col-md-6{width:50%}.col-md-7{width:58.333333333333336%}.col-md-8{width:66.66666666666666%}.col-md-9{width:75%}.col-md-10{width:83.33333333333334%}.col-md-11{width:91.66666666666666%}.col-md-12{width:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.333333333333332%}.col-md-push-2{left:16.666666666666664%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333333333333%}.col-md-push-5{left:41.66666666666667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.333333333333336%}.col-md-push-8{left:66.66666666666666%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333333333334%}.col-md-push-11{left:91.66666666666666%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-11{right:91.66666666666666%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-11{margin-left:91.66666666666666%}}@media(min-width:1200px){.container{max-width:1170px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11{float:left}.col-lg-1{width:8.333333333333332%}.col-lg-2{width:16.666666666666664%}.col-lg-3{width:25%}.col-lg-4{width:33.33333333333333%}.col-lg-5{width:41.66666666666667%}.col-lg-6{width:50%}.col-lg-7{width:58.333333333333336%}.col-lg-8{width:66.66666666666666%}.col-lg-9{width:75%}.col-lg-10{width:83.33333333333334%}.col-lg-11{width:91.66666666666666%}.col-lg-12{width:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-11{left:91.66666666666666%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-11{margin-left:91.66666666666666%}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table thead>tr>th,.table tbody>tr>th,.table tfoot>tr>th,.table thead>tr>td,.table tbody>tr>td,.table tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed thead>tr>th,.table-condensed tbody>tr>th,.table-condensed tfoot>tr>th,.table-condensed thead>tr>td,.table-condensed tbody>tr>td,.table-condensed tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8;border-color:#d6e9c6}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td{background-color:#d0e9c6;border-color:#c9e2b3}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede;border-color:#eed3d7}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td{background-color:#ebcccc;border-color:#e6c1c7}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3;border-color:#fbeed5}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td{background-color:#faf2cc;border-color:#f8e5be}@media(max-width:768px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0;background-color:#fff}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>thead>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>thead>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm{height:auto}.input-lg{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:45px;line-height:45px}textarea.input-lg{height:auto}.has-warning .help-block,.has-warning .control-label{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.has-error .help-block,.has-error .control-label{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.has-success .help-block,.has-success .control-label{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;background-color:#dff0d8;border-color:#468847}.form-control-static{padding-top:7px;margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media(min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline .radio,.form-inline .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}@media(min-width:768px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-link{font-weight:normal;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;line-height:1}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-print:before{content:"\e045"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-briefcase:before{content:"\1f4bc"}.glyphicon-calendar:before{content:"\1f4c5"}.glyphicon-pushpin:before{content:"\1f4cc"}.glyphicon-paperclip:before{content:"\1f4ce"}.glyphicon-camera:before{content:"\1f4f7"}.glyphicon-lock:before{content:"\1f512"}.glyphicon-bell:before{content:"\1f514"}.glyphicon-bookmark:before{content:"\1f516"}.glyphicon-fire:before{content:"\1f525"}.glyphicon-wrench:before{content:"\1f527"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid #000;border-right:4px solid transparent;border-bottom:0 dotted;border-left:4px solid transparent;content:""}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#fff;text-decoration:none;background-color:#428bca}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0 dotted;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-default .caret{border-top-color:#333}.btn-primary .caret,.btn-success .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret{border-top-color:#fff}.dropup .btn-default .caret{border-bottom-color:#333}.dropup .btn-primary .caret,.dropup .btn-success .caret,.dropup .btn-warning .caret,.dropup .btn-danger .caret,.dropup .btn-info .caret{border-bottom-color:#fff}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{padding:5px 10px;padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.btn-group-justified .btn{display:table-cell;float:none;width:1%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group.col{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:45px;line-height:45px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center}@media(min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}}.nav-tabs.nav-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs.nav-justified>.active>a{border-bottom-color:#fff}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:5px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center}@media(min-width:768px){.nav-justified>li{display:table-cell;width:1%}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs-justified>.active>a{border-bottom-color:#fff}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.nav .caret{border-top-color:#428bca;border-bottom-color:#428bca}.nav a:hover .caret{border-top-color:#2a6496;border-bottom-color:#2a6496}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;z-index:1000;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}@media(min-width:768px){.navbar{border-radius:4px}}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}@media(min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media(min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-collapse .navbar-nav.navbar-left:first-child{margin-left:-15px}.navbar-collapse .navbar-nav.navbar-right:last-child{margin-right:-15px}.navbar-collapse .navbar-text:last-child{margin-right:0}}.container>.navbar-header,.container>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media(min-width:768px){.container>.navbar-header,.container>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{border-width:0 0 1px}@media(min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;border-width:0 0 1px}@media(min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;z-index:1030}.navbar-fixed-bottom{bottom:0;margin-bottom:0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media(min-width:768px){.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media(min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media(max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media(min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}@media(min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}@media(min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}}@media(max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media(min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-text{float:left;margin-top:15px;margin-bottom:15px}@media(min-width:768px){.navbar-text{margin-right:15px;margin-left:15px}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e6e6e6}.navbar-default .navbar-nav>.dropdown>a:hover .caret,.navbar-default .navbar-nav>.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.open>a .caret,.navbar-default .navbar-nav>.open>a:hover .caret,.navbar-default .navbar-nav>.open>a:focus .caret{border-top-color:#555;border-bottom-color:#555}.navbar-default .navbar-nav>.dropdown>a .caret{border-top-color:#777;border-bottom-color:#777}@media(max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-nav>.dropdown>a .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .navbar-nav>.open>a .caret,.navbar-inverse .navbar-nav>.open>a:hover .caret,.navbar-inverse .navbar-nav>.open>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}@media(max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background-color:#eee}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#999;border-radius:10px}.badge:empty{display:none}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.btn .badge{position:relative;top:-1px}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.thumbnail{display:inline-block;display:block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img{display:block;height:auto;max-width:100%}a.thumbnail:hover,a.thumbnail:focus{border-color:#428bca}.thumbnail>img{margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.alert-warning hr{border-top-color:#f8e5be}.alert-warning .alert-link{color:#a47e3c}.alert-danger{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table{margin-bottom:0}.panel>.panel-body+.table{border-top:1px solid #ddd}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-warning{border-color:#fbeed5}.panel-warning>.panel-heading{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#fbeed5}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#fbeed5}.panel-danger{border-color:#eed3d7}.panel-danger>.panel-heading{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#eed3d7}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#eed3d7}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}body.modal-open,.modal-open .navbar-fixed-top,.modal-open .navbar-fixed-bottom{margin-right:15px}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{z-index:1050;width:auto;padding:10px;margin-right:auto;margin-left:auto}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{right:auto;left:50%;width:600px;padding-top:30px;padding-bottom:30px}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.5)),to(rgba(0,0,0,0.0001)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.0001)),to(rgba(0,0,0,0.5)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;left:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media screen and (max-width:400px){@-ms-viewport{width:320px}}.hidden{display:none!important;visibility:hidden!important}.visible-xs{display:none!important}tr.visible-xs{display:none!important}th.visible-xs,td.visible-xs{display:none!important}@media(max-width:767px){.visible-xs{display:block!important}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}tr.visible-xs.visible-sm{display:table-row!important}th.visible-xs.visible-sm,td.visible-xs.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-xs.visible-md{display:block!important}tr.visible-xs.visible-md{display:table-row!important}th.visible-xs.visible-md,td.visible-xs.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-xs.visible-lg{display:block!important}tr.visible-xs.visible-lg{display:table-row!important}th.visible-xs.visible-lg,td.visible-xs.visible-lg{display:table-cell!important}}.visible-sm{display:none!important}tr.visible-sm{display:none!important}th.visible-sm,td.visible-sm{display:none!important}@media(max-width:767px){.visible-sm.visible-xs{display:block!important}tr.visible-sm.visible-xs{display:table-row!important}th.visible-sm.visible-xs,td.visible-sm.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-sm{display:block!important}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-sm.visible-md{display:block!important}tr.visible-sm.visible-md{display:table-row!important}th.visible-sm.visible-md,td.visible-sm.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-sm.visible-lg{display:block!important}tr.visible-sm.visible-lg{display:table-row!important}th.visible-sm.visible-lg,td.visible-sm.visible-lg{display:table-cell!important}}.visible-md{display:none!important}tr.visible-md{display:none!important}th.visible-md,td.visible-md{display:none!important}@media(max-width:767px){.visible-md.visible-xs{display:block!important}tr.visible-md.visible-xs{display:table-row!important}th.visible-md.visible-xs,td.visible-md.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-md.visible-sm{display:block!important}tr.visible-md.visible-sm{display:table-row!important}th.visible-md.visible-sm,td.visible-md.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-md{display:block!important}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-md.visible-lg{display:block!important}tr.visible-md.visible-lg{display:table-row!important}th.visible-md.visible-lg,td.visible-md.visible-lg{display:table-cell!important}}.visible-lg{display:none!important}tr.visible-lg{display:none!important}th.visible-lg,td.visible-lg{display:none!important}@media(max-width:767px){.visible-lg.visible-xs{display:block!important}tr.visible-lg.visible-xs{display:table-row!important}th.visible-lg.visible-xs,td.visible-lg.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}tr.visible-lg.visible-sm{display:table-row!important}th.visible-lg.visible-sm,td.visible-lg.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-lg.visible-md{display:block!important}tr.visible-lg.visible-md{display:table-row!important}th.visible-lg.visible-md,td.visible-lg.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-lg{display:block!important}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}tr.hidden-xs{display:table-row!important}th.hidden-xs,td.hidden-xs{display:table-cell!important}@media(max-width:767px){.hidden-xs{display:none!important}tr.hidden-xs{display:none!important}th.hidden-xs,td.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-xs.hidden-sm{display:none!important}tr.hidden-xs.hidden-sm{display:none!important}th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-xs.hidden-md{display:none!important}tr.hidden-xs.hidden-md{display:none!important}th.hidden-xs.hidden-md,td.hidden-xs.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-xs.hidden-lg{display:none!important}tr.hidden-xs.hidden-lg{display:none!important}th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}@media(max-width:767px){.hidden-sm.hidden-xs{display:none!important}tr.hidden-sm.hidden-xs{display:none!important}th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}tr.hidden-sm{display:none!important}th.hidden-sm,td.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-sm.hidden-md{display:none!important}tr.hidden-sm.hidden-md{display:none!important}th.hidden-sm.hidden-md,td.hidden-sm.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-sm.hidden-lg{display:none!important}tr.hidden-sm.hidden-lg{display:none!important}th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}@media(max-width:767px){.hidden-md.hidden-xs{display:none!important}tr.hidden-md.hidden-xs{display:none!important}th.hidden-md.hidden-xs,td.hidden-md.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-md.hidden-sm{display:none!important}tr.hidden-md.hidden-sm{display:none!important}th.hidden-md.hidden-sm,td.hidden-md.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}tr.hidden-md{display:none!important}th.hidden-md,td.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-md.hidden-lg{display:none!important}tr.hidden-md.hidden-lg{display:none!important}th.hidden-md.hidden-lg,td.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(max-width:767px){.hidden-lg.hidden-xs{display:none!important}tr.hidden-lg.hidden-xs{display:none!important}th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-lg.hidden-sm{display:none!important}tr.hidden-lg.hidden-sm{display:none!important}th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-lg.hidden-md{display:none!important}tr.hidden-lg.hidden-md{display:none!important}th.hidden-lg.hidden-md,td.hidden-lg.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-lg{display:none!important}tr.hidden-lg{display:none!important}th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print{display:none!important}tr.visible-print{display:none!important}th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print{display:none!important}tr.hidden-print{display:none!important}th.hidden-print,td.hidden-print{display:none!important}}
\ No newline at end of file diff --git a/data/css/style.css b/data/css/style.css new file mode 100644 index 000000000..18a8e8bb1 --- /dev/null +++ b/data/css/style.css @@ -0,0 +1,987 @@ +.form-signin input[type="text"] { + margin-bottom: -1px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.form-signin input[type="password"] { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.form-signin a, +.form-signin a:visited, +.form-signin a:active { + color: inherit !important; +} + +.brand-icon { + vertical-align: bottom; +} + +.login-page { + max-width: 300px; +} + +.divider { + height:50px; + margin:0 9px; + border-left:1px solid #e1e1e1; +} +@media (max-width: 768px) { + .dont-float { + float: left; + margin-top: 0; + margin-bottom: 0; + } + .dont-float > li { + float: left; + } + .dont-float > li > a { + padding-top: 15px; + padding-bottom: 15px; + } + .dont-float:first-child { + margin-left: 0px; + } + .dont-float.navbar-right:last-child { + margin-right: -15px; + } +} + +.nav-history { + margin-bottom: 1em; +} + +.navbar-paste { + margin-bottom: 0; +} + +.inline-input { + width: 200px; +} + +.file-upload { + width: 100%; +} + +.navbar-nav > li > .dropdown-menu { + margin-top: 2px; +} + +.anchor { + visibility: hidden; + padding-top: 20px; + margin-top: -20px; +} + +@media (max-width: 767px) { + .navbar-fixed-top { + position: relative; + } +} + +@media (min-width: 768px) { + .anchor { + visibility: hidden; + padding-top: 70px; + margin-top: -70px; + } + + #navbar-height { + height: 70px; + } +} + +textarea.text-upload { + height: 200px; +} + +@media (min-height: 700px) { + textarea.text-upload { + height: 300px; + } +} + +@media (min-height: 800px) { + textarea.text-upload { + height: 400px; + } +} + +.error h1 { + font-size: 19px; +} + +.nowrap { + white-space: nowrap; +} + +.wrap { + word-break: break-word; + word-wrap: normal; +} + +.alert-wide { + text-align: center; + border-radius: 0; +} + +code, pre, textarea { + font-family: "Dejavu sans mono", Monaco, monospace; +} + +.content { + width: 100%; + background: #fff; +} + +/* Sticky footer styles + * Source: http://twitter.github.io/bootstrap/examples/sticky-footer.html + -------------------------------------------------- */ +.footer { + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + /*padding: 30px 0;*/ + /*margin-top: 70px;*/ + text-align: center; +} + + +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ +} + +/* Wrapper for page content to push down footer */ +#wrap { + min-height: 100%; + height: auto !important; + height: 100%; + /* Negative indent footer by it's height */ + margin: 0 auto -83px; +} + +/* Set the fixed height of the footer here */ +#footer { + height: 83px; + font-size: 12px; + padding: 15px 0; +} + +#footer, +#footer li { + line-height: 12px; +} + +/* Set to footer height + 70px "padding" */ +#push { + height: 153px; +} + +#footer p, +.footer-links { + margin: 4px 0; +} +.footer-links li { + display: inline; + padding: 0 2px; +} +.footer-links li:first-child { + padding-left: 0; +} + +.container-wide { + padding: 0; + max-width: 100%; + margin-left: 20px; + margin-right: 20px; + margin-bottom: 20px; +} + +.simple-container { + margin-left: 20px; + margin-right: 20px; + margin-bottom: 20px; +} + +.paste-container { + padding: 3px; + background: #eee; +} + +.code pre { + counter-reset: line-numbering; +} + +.code {display: table; margin: 0;} +.code .table-row {display: table-row;} +.code .table-cell {display: table-cell;} + +.code pre a.linenumber { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.code pre a.linenumber::before { + content: counter(line-numbering); + counter-increment: line-numbering; +} + +.code pre a.linenumber { + padding: 0 6px 0 16px; + text-align: right; + background: #ececec; + border-right: 1px solid #ddd; + text-align: right; + margin-left: -2px; + color: #aaa; + word-break: normal; +} + +.code pre :last-child a { + padding-bottom: 10px; +} + +.code pre :first-child a { + padding-top: 10px; +} + +.code pre .table-row .line { + padding-left: 10px; + width: 100% +} + +.content .highlight > pre { + background-color: transparent; + border: 0; + border-radius: 0; + margin: 0; + padding: 0; + font-size: 12px; + line-height: 1.4; + white-space: pre-wrap; + word-break: break-word; + word-wrap: normal; +} +.code { + width: 100%; + padding-top: 0; +} +.code .highlight { + position: relative; + padding-left: 0; +} +.code .highlight pre { + position: relative; +} +.highlight_line { + background: #ffffcc; +} + +.ui-autocomplete { + z-index: 1500; +} + +.popover { + word-break: break-word; + word-wrap: normal; + max-width: 400px; +} + +.upload_thumbnails { + margin: 0 auto; +} + +.upload_thumbnails img.thumb, +.upload_thumbnails a { + width: 150px; + height: 150px; +} + +.upload_thumbnails a { + margin: 1px; + display: inline-block; +} + +.upload_thumbnails .marked { + background: red; +} + +.upload_thumbnails .marked img { + opacity: 0.4; +} + + +/* highlighting theme */ +.hll { background-color: #ffffcc } +.c { color: #999988; font-style: italic } /* Comment */ +.err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.k { color: #000000; font-weight: bold } /* Keyword */ +.o { color: #000000; font-weight: bold } /* Operator */ +.cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */ +.c1 { color: #999988; font-style: italic } /* Comment.Single */ +.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.ge { color: #000000; font-style: italic } /* Generic.Emph */ +.gr { color: #aa0000 } /* Generic.Error */ +.gh { color: #999999 } /* Generic.Heading */ +.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.go { color: #888888 } /* Generic.Output */ +.gp { color: #555555 } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #aaaaaa } /* Generic.Subheading */ +.gt { color: #aa0000 } /* Generic.Traceback */ +.kc { color: #000000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ +.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.m { color: #009999 } /* Literal.Number */ +.s { color: #d01040 } /* Literal.String */ +.na { color: #008080 } /* Name.Attribute */ +.nb { color: #0086B3 } /* Name.Builtin */ +.nc { color: #445588; font-weight: bold } /* Name.Class */ +.no { color: #008080 } /* Name.Constant */ +.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ +.ni { color: #800080 } /* Name.Entity */ +.ne { color: #990000; font-weight: bold } /* Name.Exception */ +.nf { color: #990000; font-weight: bold } /* Name.Function */ +.nl { color: #990000; font-weight: bold } /* Name.Label */ +.nn { color: #555555 } /* Name.Namespace */ +.nt { color: #000080 } /* Name.Tag */ +.nv { color: #008080 } /* Name.Variable */ +.ow { color: #000000; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mf { color: #009999 } /* Literal.Number.Float */ +.mh { color: #009999 } /* Literal.Number.Hex */ +.mi { color: #009999 } /* Literal.Number.Integer */ +.mo { color: #009999 } /* Literal.Number.Oct */ +.sb { color: #d01040 } /* Literal.String.Backtick */ +.sc { color: #d01040 } /* Literal.String.Char */ +.sd { color: #d01040 } /* Literal.String.Doc */ +.s2 { color: #d01040 } /* Literal.String.Double */ +.se { color: #d01040 } /* Literal.String.Escape */ +.sh { color: #d01040 } /* Literal.String.Heredoc */ +.si { color: #d01040 } /* Literal.String.Interpol */ +.sx { color: #d01040 } /* Literal.String.Other */ +.sr { color: #009926 } /* Literal.String.Regex */ +.s1 { color: #d01040 } /* Literal.String.Single */ +.ss { color: #990073 } /* Literal.String.Symbol */ +.bp { color: #999999 } /* Name.Builtin.Pseudo */ +.vc { color: #008080 } /* Name.Variable.Class */ +.vg { color: #008080 } /* Name.Variable.Global */ +.vi { color: #008080 } /* Name.Variable.Instance */ +.il { color: #009999 } /* Literal.Number.Integer.Long */ + +/* based on https://bitbucket.org/kevinburke/markdowncss/overview */ +.markdownrender { + padding: 0 12px; +} +.markdownrender h1, .markdownrender h2, .markdownrender h3, .markdownrender h4 { + color: #111111; + font-weight: 400; +} +.markdownrender h1, .markdownrender h2, .markdownrender h3, .markdownrender h4, .markdownrender p { + margin-bottom: 24px; + padding: 0; +} +.markdownrender h1 { + font-size: 2.5em; +} +.markdownrender h2 { + font-size: 2em; + margin: 24px 0 6px; +} +.markdownrender h3 { + font-size: 1.7em; +} +.markdownrender h4 { + font-size: 1.5em; +} +.markdownrender h5 { + font-size: 1.3em; +} +.markdownrender li { + line-height: 1.5em; +} +.markdownrender li ul, .markdownrender li ul { + margin-left: 24px; +} +.markdownrender p, .markdownrender ul, .markdownrender ol { + font-size: 0.9em; + line-height: 1.5em; + max-width: 740px; +} +.markdownrender pre { + padding: 0px 24px; + max-width: 800px; + white-space: pre-wrap; +} +.markdownrender code { + font-family: Consolas, Monaco, Andale Mono, monospace; + line-height: 1.2em; + font-size: 0.85em; +} +.markdownrender aside { + display: block; + float: right; + width: 390px; +} +.markdownrender blockquote { + border-left: 0.5em solid #d6d6d6; + padding: 0 1em; + margin-left:0; + max-width: 676px; + background: #f6f6f6; +} +.markdownrender blockquote cite { + font-size:0.85em; + line-height:1.3em; + color:#bfbfbf; +} +.markdownrender blockquote p { + color: #666; + max-width: 660px; +} +.markdownrender hr { + width: 740px; + text-align: left; + margin: 0 auto 0 0; + color: #999; +} + +/* tables */ +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + background-color: #e6EEEE; + padding-right: 20px; +} +table.tablesorter thead tr .header { + background-image: url(../img/bg.gif); + background-repeat: no-repeat; + background-position: center right; + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + vertical-align: top; +} +table.tablesorter thead tr .headerSortUp { + background-image: url(../img/asc.gif); +} +table.tablesorter thead tr .headerSortDown { + background-image: url(../img/desc.gif); +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { + background-color: #8dbdd8; +} + +/* ansi2html */ +.ansi1 { font-weight: bold; } +.ansi3 { font-weight: italic; } +.ansi4 { text-decoration: underline; } +.ansi9 { text-decoration: line-through; } +.ansi30 { color: #000316; } +.ansi31 { color: #aa0000; } +.ansi32 { color: #00aa00; } +.ansi33 { color: #aa5500; } +.ansi34 { color: #0000aa; } +.ansi35 { color: #E850A8; } +.ansi36 { color: #00aaaa; } +.ansi37 { color: #F5F1DE; } +.ansi40 { background-color: #000316; } +.ansi41 { background-color: #aa0000; } +.ansi42 { background-color: #00aa00; } +.ansi43 { background-color: #aa5500; } +.ansi44 { background-color: #0000aa; } +.ansi45 { background-color: #E850A8; } +.ansi46 { background-color: #00aaaa; } +.ansi47 { background-color: #F5F1DE; } +.ansi38-16 { color: #000000; } +.ansi48-16 { background: #000000; } +.ansi38-17 { color: #00002a; } +.ansi48-17 { background: #00002a; } +.ansi38-18 { color: #000054; } +.ansi48-18 { background: #000054; } +.ansi38-19 { color: #00007e; } +.ansi48-19 { background: #00007e; } +.ansi38-20 { color: #0000a8; } +.ansi48-20 { background: #0000a8; } +.ansi38-21 { color: #0000d2; } +.ansi48-21 { background: #0000d2; } +.ansi38-52 { color: #2a0000; } +.ansi48-52 { background: #2a0000; } +.ansi38-53 { color: #2a002a; } +.ansi48-53 { background: #2a002a; } +.ansi38-54 { color: #2a0054; } +.ansi48-54 { background: #2a0054; } +.ansi38-55 { color: #2a007e; } +.ansi48-55 { background: #2a007e; } +.ansi38-56 { color: #2a00a8; } +.ansi48-56 { background: #2a00a8; } +.ansi38-57 { color: #2a00d2; } +.ansi48-57 { background: #2a00d2; } +.ansi38-88 { color: #540000; } +.ansi48-88 { background: #540000; } +.ansi38-89 { color: #54002a; } +.ansi48-89 { background: #54002a; } +.ansi38-90 { color: #540054; } +.ansi48-90 { background: #540054; } +.ansi38-91 { color: #54007e; } +.ansi48-91 { background: #54007e; } +.ansi38-92 { color: #5400a8; } +.ansi48-92 { background: #5400a8; } +.ansi38-93 { color: #5400d2; } +.ansi48-93 { background: #5400d2; } +.ansi38-124 { color: #7e0000; } +.ansi48-124 { background: #7e0000; } +.ansi38-125 { color: #7e002a; } +.ansi48-125 { background: #7e002a; } +.ansi38-126 { color: #7e0054; } +.ansi48-126 { background: #7e0054; } +.ansi38-127 { color: #7e007e; } +.ansi48-127 { background: #7e007e; } +.ansi38-128 { color: #7e00a8; } +.ansi48-128 { background: #7e00a8; } +.ansi38-129 { color: #7e00d2; } +.ansi48-129 { background: #7e00d2; } +.ansi38-160 { color: #a80000; } +.ansi48-160 { background: #a80000; } +.ansi38-161 { color: #a8002a; } +.ansi48-161 { background: #a8002a; } +.ansi38-162 { color: #a80054; } +.ansi48-162 { background: #a80054; } +.ansi38-163 { color: #a8007e; } +.ansi48-163 { background: #a8007e; } +.ansi38-164 { color: #a800a8; } +.ansi48-164 { background: #a800a8; } +.ansi38-165 { color: #a800d2; } +.ansi48-165 { background: #a800d2; } +.ansi38-196 { color: #d20000; } +.ansi48-196 { background: #d20000; } +.ansi38-197 { color: #d2002a; } +.ansi48-197 { background: #d2002a; } +.ansi38-198 { color: #d20054; } +.ansi48-198 { background: #d20054; } +.ansi38-199 { color: #d2007e; } +.ansi48-199 { background: #d2007e; } +.ansi38-200 { color: #d200a8; } +.ansi48-200 { background: #d200a8; } +.ansi38-201 { color: #d200d2; } +.ansi48-201 { background: #d200d2; } +.ansi38-22 { color: #002a00; } +.ansi48-22 { background: #002a00; } +.ansi38-23 { color: #002a2a; } +.ansi48-23 { background: #002a2a; } +.ansi38-24 { color: #002a54; } +.ansi48-24 { background: #002a54; } +.ansi38-25 { color: #002a7e; } +.ansi48-25 { background: #002a7e; } +.ansi38-26 { color: #002aa8; } +.ansi48-26 { background: #002aa8; } +.ansi38-27 { color: #002ad2; } +.ansi48-27 { background: #002ad2; } +.ansi38-58 { color: #2a2a00; } +.ansi48-58 { background: #2a2a00; } +.ansi38-59 { color: #2a2a2a; } +.ansi48-59 { background: #2a2a2a; } +.ansi38-60 { color: #2a2a54; } +.ansi48-60 { background: #2a2a54; } +.ansi38-61 { color: #2a2a7e; } +.ansi48-61 { background: #2a2a7e; } +.ansi38-62 { color: #2a2aa8; } +.ansi48-62 { background: #2a2aa8; } +.ansi38-63 { color: #2a2ad2; } +.ansi48-63 { background: #2a2ad2; } +.ansi38-94 { color: #542a00; } +.ansi48-94 { background: #542a00; } +.ansi38-95 { color: #542a2a; } +.ansi48-95 { background: #542a2a; } +.ansi38-96 { color: #542a54; } +.ansi48-96 { background: #542a54; } +.ansi38-97 { color: #542a7e; } +.ansi48-97 { background: #542a7e; } +.ansi38-98 { color: #542aa8; } +.ansi48-98 { background: #542aa8; } +.ansi38-99 { color: #542ad2; } +.ansi48-99 { background: #542ad2; } +.ansi38-130 { color: #7e2a00; } +.ansi48-130 { background: #7e2a00; } +.ansi38-131 { color: #7e2a2a; } +.ansi48-131 { background: #7e2a2a; } +.ansi38-132 { color: #7e2a54; } +.ansi48-132 { background: #7e2a54; } +.ansi38-133 { color: #7e2a7e; } +.ansi48-133 { background: #7e2a7e; } +.ansi38-134 { color: #7e2aa8; } +.ansi48-134 { background: #7e2aa8; } +.ansi38-135 { color: #7e2ad2; } +.ansi48-135 { background: #7e2ad2; } +.ansi38-166 { color: #a82a00; } +.ansi48-166 { background: #a82a00; } +.ansi38-167 { color: #a82a2a; } +.ansi48-167 { background: #a82a2a; } +.ansi38-168 { color: #a82a54; } +.ansi48-168 { background: #a82a54; } +.ansi38-169 { color: #a82a7e; } +.ansi48-169 { background: #a82a7e; } +.ansi38-170 { color: #a82aa8; } +.ansi48-170 { background: #a82aa8; } +.ansi38-171 { color: #a82ad2; } +.ansi48-171 { background: #a82ad2; } +.ansi38-202 { color: #d22a00; } +.ansi48-202 { background: #d22a00; } +.ansi38-203 { color: #d22a2a; } +.ansi48-203 { background: #d22a2a; } +.ansi38-204 { color: #d22a54; } +.ansi48-204 { background: #d22a54; } +.ansi38-205 { color: #d22a7e; } +.ansi48-205 { background: #d22a7e; } +.ansi38-206 { color: #d22aa8; } +.ansi48-206 { background: #d22aa8; } +.ansi38-207 { color: #d22ad2; } +.ansi48-207 { background: #d22ad2; } +.ansi38-28 { color: #005400; } +.ansi48-28 { background: #005400; } +.ansi38-29 { color: #00542a; } +.ansi48-29 { background: #00542a; } +.ansi38-30 { color: #005454; } +.ansi48-30 { background: #005454; } +.ansi38-31 { color: #00547e; } +.ansi48-31 { background: #00547e; } +.ansi38-32 { color: #0054a8; } +.ansi48-32 { background: #0054a8; } +.ansi38-33 { color: #0054d2; } +.ansi48-33 { background: #0054d2; } +.ansi38-64 { color: #2a5400; } +.ansi48-64 { background: #2a5400; } +.ansi38-65 { color: #2a542a; } +.ansi48-65 { background: #2a542a; } +.ansi38-66 { color: #2a5454; } +.ansi48-66 { background: #2a5454; } +.ansi38-67 { color: #2a547e; } +.ansi48-67 { background: #2a547e; } +.ansi38-68 { color: #2a54a8; } +.ansi48-68 { background: #2a54a8; } +.ansi38-69 { color: #2a54d2; } +.ansi48-69 { background: #2a54d2; } +.ansi38-100 { color: #545400; } +.ansi48-100 { background: #545400; } +.ansi38-101 { color: #54542a; } +.ansi48-101 { background: #54542a; } +.ansi38-102 { color: #545454; } +.ansi48-102 { background: #545454; } +.ansi38-103 { color: #54547e; } +.ansi48-103 { background: #54547e; } +.ansi38-104 { color: #5454a8; } +.ansi48-104 { background: #5454a8; } +.ansi38-105 { color: #5454d2; } +.ansi48-105 { background: #5454d2; } +.ansi38-136 { color: #7e5400; } +.ansi48-136 { background: #7e5400; } +.ansi38-137 { color: #7e542a; } +.ansi48-137 { background: #7e542a; } +.ansi38-138 { color: #7e5454; } +.ansi48-138 { background: #7e5454; } +.ansi38-139 { color: #7e547e; } +.ansi48-139 { background: #7e547e; } +.ansi38-140 { color: #7e54a8; } +.ansi48-140 { background: #7e54a8; } +.ansi38-141 { color: #7e54d2; } +.ansi48-141 { background: #7e54d2; } +.ansi38-172 { color: #a85400; } +.ansi48-172 { background: #a85400; } +.ansi38-173 { color: #a8542a; } +.ansi48-173 { background: #a8542a; } +.ansi38-174 { color: #a85454; } +.ansi48-174 { background: #a85454; } +.ansi38-175 { color: #a8547e; } +.ansi48-175 { background: #a8547e; } +.ansi38-176 { color: #a854a8; } +.ansi48-176 { background: #a854a8; } +.ansi38-177 { color: #a854d2; } +.ansi48-177 { background: #a854d2; } +.ansi38-208 { color: #d25400; } +.ansi48-208 { background: #d25400; } +.ansi38-209 { color: #d2542a; } +.ansi48-209 { background: #d2542a; } +.ansi38-210 { color: #d25454; } +.ansi48-210 { background: #d25454; } +.ansi38-211 { color: #d2547e; } +.ansi48-211 { background: #d2547e; } +.ansi38-212 { color: #d254a8; } +.ansi48-212 { background: #d254a8; } +.ansi38-213 { color: #d254d2; } +.ansi48-213 { background: #d254d2; } +.ansi38-34 { color: #007e00; } +.ansi48-34 { background: #007e00; } +.ansi38-35 { color: #007e2a; } +.ansi48-35 { background: #007e2a; } +.ansi38-36 { color: #007e54; } +.ansi48-36 { background: #007e54; } +.ansi38-37 { color: #007e7e; } +.ansi48-37 { background: #007e7e; } +.ansi38-38 { color: #007ea8; } +.ansi48-38 { background: #007ea8; } +.ansi38-39 { color: #007ed2; } +.ansi48-39 { background: #007ed2; } +.ansi38-70 { color: #2a7e00; } +.ansi48-70 { background: #2a7e00; } +.ansi38-71 { color: #2a7e2a; } +.ansi48-71 { background: #2a7e2a; } +.ansi38-72 { color: #2a7e54; } +.ansi48-72 { background: #2a7e54; } +.ansi38-73 { color: #2a7e7e; } +.ansi48-73 { background: #2a7e7e; } +.ansi38-74 { color: #2a7ea8; } +.ansi48-74 { background: #2a7ea8; } +.ansi38-75 { color: #2a7ed2; } +.ansi48-75 { background: #2a7ed2; } +.ansi38-106 { color: #547e00; } +.ansi48-106 { background: #547e00; } +.ansi38-107 { color: #547e2a; } +.ansi48-107 { background: #547e2a; } +.ansi38-108 { color: #547e54; } +.ansi48-108 { background: #547e54; } +.ansi38-109 { color: #547e7e; } +.ansi48-109 { background: #547e7e; } +.ansi38-110 { color: #547ea8; } +.ansi48-110 { background: #547ea8; } +.ansi38-111 { color: #547ed2; } +.ansi48-111 { background: #547ed2; } +.ansi38-142 { color: #7e7e00; } +.ansi48-142 { background: #7e7e00; } +.ansi38-143 { color: #7e7e2a; } +.ansi48-143 { background: #7e7e2a; } +.ansi38-144 { color: #7e7e54; } +.ansi48-144 { background: #7e7e54; } +.ansi38-145 { color: #7e7e7e; } +.ansi48-145 { background: #7e7e7e; } +.ansi38-146 { color: #7e7ea8; } +.ansi48-146 { background: #7e7ea8; } +.ansi38-147 { color: #7e7ed2; } +.ansi48-147 { background: #7e7ed2; } +.ansi38-178 { color: #a87e00; } +.ansi48-178 { background: #a87e00; } +.ansi38-179 { color: #a87e2a; } +.ansi48-179 { background: #a87e2a; } +.ansi38-180 { color: #a87e54; } +.ansi48-180 { background: #a87e54; } +.ansi38-181 { color: #a87e7e; } +.ansi48-181 { background: #a87e7e; } +.ansi38-182 { color: #a87ea8; } +.ansi48-182 { background: #a87ea8; } +.ansi38-183 { color: #a87ed2; } +.ansi48-183 { background: #a87ed2; } +.ansi38-214 { color: #d27e00; } +.ansi48-214 { background: #d27e00; } +.ansi38-215 { color: #d27e2a; } +.ansi48-215 { background: #d27e2a; } +.ansi38-216 { color: #d27e54; } +.ansi48-216 { background: #d27e54; } +.ansi38-217 { color: #d27e7e; } +.ansi48-217 { background: #d27e7e; } +.ansi38-218 { color: #d27ea8; } +.ansi48-218 { background: #d27ea8; } +.ansi38-219 { color: #d27ed2; } +.ansi48-219 { background: #d27ed2; } +.ansi38-40 { color: #00a800; } +.ansi48-40 { background: #00a800; } +.ansi38-41 { color: #00a82a; } +.ansi48-41 { background: #00a82a; } +.ansi38-42 { color: #00a854; } +.ansi48-42 { background: #00a854; } +.ansi38-43 { color: #00a87e; } +.ansi48-43 { background: #00a87e; } +.ansi38-44 { color: #00a8a8; } +.ansi48-44 { background: #00a8a8; } +.ansi38-45 { color: #00a8d2; } +.ansi48-45 { background: #00a8d2; } +.ansi38-76 { color: #2aa800; } +.ansi48-76 { background: #2aa800; } +.ansi38-77 { color: #2aa82a; } +.ansi48-77 { background: #2aa82a; } +.ansi38-78 { color: #2aa854; } +.ansi48-78 { background: #2aa854; } +.ansi38-79 { color: #2aa87e; } +.ansi48-79 { background: #2aa87e; } +.ansi38-80 { color: #2aa8a8; } +.ansi48-80 { background: #2aa8a8; } +.ansi38-81 { color: #2aa8d2; } +.ansi48-81 { background: #2aa8d2; } +.ansi38-112 { color: #54a800; } +.ansi48-112 { background: #54a800; } +.ansi38-113 { color: #54a82a; } +.ansi48-113 { background: #54a82a; } +.ansi38-114 { color: #54a854; } +.ansi48-114 { background: #54a854; } +.ansi38-115 { color: #54a87e; } +.ansi48-115 { background: #54a87e; } +.ansi38-116 { color: #54a8a8; } +.ansi48-116 { background: #54a8a8; } +.ansi38-117 { color: #54a8d2; } +.ansi48-117 { background: #54a8d2; } +.ansi38-148 { color: #7ea800; } +.ansi48-148 { background: #7ea800; } +.ansi38-149 { color: #7ea82a; } +.ansi48-149 { background: #7ea82a; } +.ansi38-150 { color: #7ea854; } +.ansi48-150 { background: #7ea854; } +.ansi38-151 { color: #7ea87e; } +.ansi48-151 { background: #7ea87e; } +.ansi38-152 { color: #7ea8a8; } +.ansi48-152 { background: #7ea8a8; } +.ansi38-153 { color: #7ea8d2; } +.ansi48-153 { background: #7ea8d2; } +.ansi38-184 { color: #a8a800; } +.ansi48-184 { background: #a8a800; } +.ansi38-185 { color: #a8a82a; } +.ansi48-185 { background: #a8a82a; } +.ansi38-186 { color: #a8a854; } +.ansi48-186 { background: #a8a854; } +.ansi38-187 { color: #a8a87e; } +.ansi48-187 { background: #a8a87e; } +.ansi38-188 { color: #a8a8a8; } +.ansi48-188 { background: #a8a8a8; } +.ansi38-189 { color: #a8a8d2; } +.ansi48-189 { background: #a8a8d2; } +.ansi38-220 { color: #d2a800; } +.ansi48-220 { background: #d2a800; } +.ansi38-221 { color: #d2a82a; } +.ansi48-221 { background: #d2a82a; } +.ansi38-222 { color: #d2a854; } +.ansi48-222 { background: #d2a854; } +.ansi38-223 { color: #d2a87e; } +.ansi48-223 { background: #d2a87e; } +.ansi38-224 { color: #d2a8a8; } +.ansi48-224 { background: #d2a8a8; } +.ansi38-225 { color: #d2a8d2; } +.ansi48-225 { background: #d2a8d2; } +.ansi38-46 { color: #00d200; } +.ansi48-46 { background: #00d200; } +.ansi38-47 { color: #00d22a; } +.ansi48-47 { background: #00d22a; } +.ansi38-48 { color: #00d254; } +.ansi48-48 { background: #00d254; } +.ansi38-49 { color: #00d27e; } +.ansi48-49 { background: #00d27e; } +.ansi38-50 { color: #00d2a8; } +.ansi48-50 { background: #00d2a8; } +.ansi38-51 { color: #00d2d2; } +.ansi48-51 { background: #00d2d2; } +.ansi38-82 { color: #2ad200; } +.ansi48-82 { background: #2ad200; } +.ansi38-83 { color: #2ad22a; } +.ansi48-83 { background: #2ad22a; } +.ansi38-84 { color: #2ad254; } +.ansi48-84 { background: #2ad254; } +.ansi38-85 { color: #2ad27e; } +.ansi48-85 { background: #2ad27e; } +.ansi38-86 { color: #2ad2a8; } +.ansi48-86 { background: #2ad2a8; } +.ansi38-87 { color: #2ad2d2; } +.ansi48-87 { background: #2ad2d2; } +.ansi38-118 { color: #54d200; } +.ansi48-118 { background: #54d200; } +.ansi38-119 { color: #54d22a; } +.ansi48-119 { background: #54d22a; } +.ansi38-120 { color: #54d254; } +.ansi48-120 { background: #54d254; } +.ansi38-121 { color: #54d27e; } +.ansi48-121 { background: #54d27e; } +.ansi38-122 { color: #54d2a8; } +.ansi48-122 { background: #54d2a8; } +.ansi38-123 { color: #54d2d2; } +.ansi48-123 { background: #54d2d2; } +.ansi38-154 { color: #7ed200; } +.ansi48-154 { background: #7ed200; } +.ansi38-155 { color: #7ed22a; } +.ansi48-155 { background: #7ed22a; } +.ansi38-156 { color: #7ed254; } +.ansi48-156 { background: #7ed254; } +.ansi38-157 { color: #7ed27e; } +.ansi48-157 { background: #7ed27e; } +.ansi38-158 { color: #7ed2a8; } +.ansi48-158 { background: #7ed2a8; } +.ansi38-159 { color: #7ed2d2; } +.ansi48-159 { background: #7ed2d2; } +.ansi38-190 { color: #a8d200; } +.ansi48-190 { background: #a8d200; } +.ansi38-191 { color: #a8d22a; } +.ansi48-191 { background: #a8d22a; } +.ansi38-192 { color: #a8d254; } +.ansi48-192 { background: #a8d254; } +.ansi38-193 { color: #a8d27e; } +.ansi48-193 { background: #a8d27e; } +.ansi38-194 { color: #a8d2a8; } +.ansi48-194 { background: #a8d2a8; } +.ansi38-195 { color: #a8d2d2; } +.ansi48-195 { background: #a8d2d2; } +.ansi38-226 { color: #d2d200; } +.ansi48-226 { background: #d2d200; } +.ansi38-227 { color: #d2d22a; } +.ansi48-227 { background: #d2d22a; } +.ansi38-228 { color: #d2d254; } +.ansi48-228 { background: #d2d254; } +.ansi38-229 { color: #d2d27e; } +.ansi48-229 { background: #d2d27e; } +.ansi38-230 { color: #d2d2a8; } +.ansi48-230 { background: #d2d2a8; } +.ansi38-231 { color: #d2d2d2; } +.ansi48-231 { background: #d2d2d2; } +.ansi38-232 { color: #080808; } +.ansi48-232 { background: #080808; } +.ansi38-233 { color: #121212; } +.ansi48-233 { background: #121212; } +.ansi38-234 { color: #1c1c1c; } +.ansi48-234 { background: #1c1c1c; } +.ansi38-235 { color: #262626; } +.ansi48-235 { background: #262626; } +.ansi38-236 { color: #303030; } +.ansi48-236 { background: #303030; } +.ansi38-237 { color: #3a3a3a; } +.ansi48-237 { background: #3a3a3a; } +.ansi38-238 { color: #444444; } +.ansi48-238 { background: #444444; } +.ansi38-239 { color: #4e4e4e; } +.ansi48-239 { background: #4e4e4e; } +.ansi38-240 { color: #585858; } +.ansi48-240 { background: #585858; } +.ansi38-241 { color: #626262; } +.ansi48-241 { background: #626262; } +.ansi38-242 { color: #6c6c6c; } +.ansi48-242 { background: #6c6c6c; } +.ansi38-243 { color: #767676; } +.ansi48-243 { background: #767676; } +.ansi38-244 { color: #808080; } +.ansi48-244 { background: #808080; } +.ansi38-245 { color: #8a8a8a; } +.ansi48-245 { background: #8a8a8a; } +.ansi38-246 { color: #949494; } +.ansi48-246 { background: #949494; } +.ansi38-247 { color: #9e9e9e; } +.ansi48-247 { background: #9e9e9e; } +.ansi38-248 { color: #a8a8a8; } +.ansi48-248 { background: #a8a8a8; } +.ansi38-249 { color: #b2b2b2; } +.ansi48-249 { background: #b2b2b2; } +.ansi38-250 { color: #bcbcbc; } +.ansi48-250 { background: #bcbcbc; } +.ansi38-251 { color: #c6c6c6; } +.ansi48-251 { background: #c6c6c6; } +.ansi38-252 { color: #d0d0d0; } +.ansi48-252 { background: #d0d0d0; } +.ansi38-253 { color: #dadada; } +.ansi48-253 { background: #dadada; } +.ansi38-254 { color: #e4e4e4; } +.ansi48-254 { background: #e4e4e4; } +.ansi38-255 { color: #eeeeee; } +.ansi48-255 { background: #eeeeee; } diff --git a/data/css/ui-lightness/images/animated-overlay.gif b/data/css/ui-lightness/images/animated-overlay.gif Binary files differnew file mode 100644 index 000000000..d441f75eb --- /dev/null +++ b/data/css/ui-lightness/images/animated-overlay.gif diff --git a/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png Binary files differnew file mode 100644 index 000000000..22f3ede5e --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png Binary files differnew file mode 100644 index 000000000..008180e52 --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png Binary files differnew file mode 100644 index 000000000..a68551d2a --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png diff --git a/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png Binary files differnew file mode 100644 index 000000000..9945f71c5 --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png Binary files differnew file mode 100644 index 000000000..24b041634 --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png Binary files differnew file mode 100644 index 000000000..f82be3bf9 --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png Binary files differnew file mode 100644 index 000000000..4a28a9d69 --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png Binary files differnew file mode 100644 index 000000000..37a43a13d --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png Binary files differnew file mode 100644 index 000000000..f2e2a2d3d --- /dev/null +++ b/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/data/css/ui-lightness/images/ui-icons_222222_256x240.png b/data/css/ui-lightness/images/ui-icons_222222_256x240.png Binary files differnew file mode 100644 index 000000000..c1cb1170c --- /dev/null +++ b/data/css/ui-lightness/images/ui-icons_222222_256x240.png diff --git a/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png Binary files differnew file mode 100644 index 000000000..3a0140cff --- /dev/null +++ b/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png diff --git a/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png Binary files differnew file mode 100644 index 000000000..036ee072d --- /dev/null +++ b/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png diff --git a/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png Binary files differnew file mode 100644 index 000000000..8b6c05868 --- /dev/null +++ b/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png diff --git a/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png Binary files differnew file mode 100644 index 000000000..4f624bb2b --- /dev/null +++ b/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png diff --git a/data/css/ui-lightness/jquery-ui-1.10.3.custom.min.css b/data/css/ui-lightness/jquery-ui-1.10.3.custom.min.css new file mode 100644 index 000000000..3904c144d --- /dev/null +++ b/data/css/ui-lightness/jquery-ui-1.10.3.custom.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.10.3 - 2013-06-08 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.autocomplete.css, jquery.ui.menu.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_ef8c08_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_ef8c08_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_ef8c08_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_228ef1_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffd27a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px}
\ No newline at end of file diff --git a/data/fonts/glyphicons-halflings-regular.eot b/data/fonts/glyphicons-halflings-regular.eot Binary files differnew file mode 100644 index 000000000..87eaa4342 --- /dev/null +++ b/data/fonts/glyphicons-halflings-regular.eot diff --git a/data/fonts/glyphicons-halflings-regular.svg b/data/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 000000000..5fee06854 --- /dev/null +++ b/data/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,228 @@ +<?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></metadata> +<defs> +<font id="glyphicons_halflingsregular" horiz-adv-x="1200" > +<font-face units-per-em="1200" ascent="960" descent="-240" /> +<missing-glyph horiz-adv-x="500" /> +<glyph /> +<glyph /> +<glyph unicode=" " /> +<glyph unicode="*" d="M1100 500h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200z" /> +<glyph unicode="+" d="M1100 400h-400v-400h-300v400h-400v300h400v400h300v-400h400v-300z" /> +<glyph unicode=" " /> +<glyph unicode=" " horiz-adv-x="652" /> +<glyph unicode=" " horiz-adv-x="1304" /> +<glyph unicode=" " horiz-adv-x="652" /> +<glyph unicode=" " horiz-adv-x="1304" /> +<glyph unicode=" " horiz-adv-x="434" /> +<glyph unicode=" " horiz-adv-x="326" /> +<glyph unicode=" " horiz-adv-x="217" /> +<glyph unicode=" " horiz-adv-x="217" /> +<glyph unicode=" " horiz-adv-x="163" /> +<glyph unicode=" " horiz-adv-x="260" /> +<glyph unicode=" " horiz-adv-x="72" /> +<glyph unicode=" " horiz-adv-x="260" /> +<glyph unicode=" " horiz-adv-x="326" /> +<glyph unicode="€" d="M800 500h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257 q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406z" /> +<glyph unicode="−" d="M1100 700h-900v-300h900v300z" /> +<glyph unicode="☁" d="M178 300h750q120 0 205 86t85 208q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5q0 -80 56.5 -137t135.5 -57z" /> +<glyph unicode="✉" d="M1200 1100h-1200l600 -603zM300 600l-300 -300v600zM1200 900v-600l-300 300zM800 500l400 -400h-1200l400 400l200 -200z" /> +<glyph unicode="✏" d="M1101 889l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13l-94 -97zM401 189l614 614l-214 214l-614 -614zM-13 -13l333 112l-223 223z" /> +<glyph unicode="" horiz-adv-x="500" d="M0 0z" /> +<glyph unicode="" d="M700 100h300v-100h-800v100h300v550l-500 550h1200l-500 -550v-550z" /> +<glyph unicode="" d="M1000 934v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q17 -55 85.5 -75.5t147.5 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7q-79 -25 -122.5 -82t-25.5 -112t86 -75.5t147 5.5 q65 21 109 69t44 90v606z" /> +<glyph unicode="" d="M913 432l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342t142 342t342 142t342 -142t142 -342q0 -142 -78 -261zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" /> +<glyph unicode="" d="M649 949q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5t-94 124.5t-33.5 117.5q0 64 28 123t73 100.5t104.5 64t119 20.5 t120 -38.5t104.5 -104.5z" /> +<glyph unicode="" d="M791 522l145 -449l-384 275l-382 -275l146 447l-388 280h479l146 400h2l146 -400h472zM168 71l2 1z" /> +<glyph unicode="" d="M791 522l145 -449l-384 275l-382 -275l146 447l-388 280h479l146 400h2l146 -400h472zM747 331l-74 229l193 140h-235l-77 211l-78 -211h-239l196 -142l-73 -226l192 140zM168 71l2 1z" /> +<glyph unicode="" d="M1200 143v-143h-1200v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100z" /> +<glyph unicode="" d="M1200 1100v-1100h-1200v1100h1200zM200 1000h-100v-100h100v100zM900 1000h-600v-400h600v400zM1100 1000h-100v-100h100v100zM200 800h-100v-100h100v100zM1100 800h-100v-100h100v100zM200 600h-100v-100h100v100zM1100 600h-100v-100h100v100zM900 500h-600v-400h600 v400zM200 400h-100v-100h100v100zM1100 400h-100v-100h100v100zM200 200h-100v-100h100v100zM1100 200h-100v-100h100v100z" /> +<glyph unicode="" d="M500 1050v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5zM1100 1050v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h400 q21 0 35.5 -14.5t14.5 -35.5zM500 450v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5zM1100 450v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5z" /> +<glyph unicode="" d="M300 1050v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM700 1050v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5zM1100 1050v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM300 650v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM700 650v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM1100 650v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM300 250v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM700 250v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM1100 250v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5 t14.5 -35.5z" /> +<glyph unicode="" d="M300 1050v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM1200 1050v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h700 q21 0 35.5 -14.5t14.5 -35.5zM300 450v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-200q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5zM1200 650v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5zM300 250v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5zM1200 250v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5z" /> +<glyph unicode="" d="M448 34l818 820l-212 212l-607 -607l-206 207l-212 -212z" /> +<glyph unicode="" d="M882 106l-282 282l-282 -282l-212 212l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282z" /> +<glyph unicode="" d="M913 432l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342t142 342t342 142t342 -142t142 -342q0 -142 -78 -261zM507 363q137 0 233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5t-234 -97t-97 -233 t97 -233t234 -97zM600 800h100v-200h-100v-100h-200v100h-100v200h100v100h200v-100z" /> +<glyph unicode="" d="M913 432l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 299q-120 -77 -261 -77q-200 0 -342 142t-142 342t142 342t342 142t342 -142t142 -342q0 -141 -78 -262zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 801v-200h400v200h-400z" /> +<glyph unicode="" d="M700 750v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5zM800 975v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123 t-123 184t-45.5 224.5q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155z" /> +<glyph unicode="" d="M1200 1h-200v1200h200v-1200zM900 1h-200v800h200v-800zM600 1h-200v500h200v-500zM300 301h-200v-300h200v300z" /> +<glyph unicode="" d="M488 183l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5 q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39zM600 815q89 0 152 -63 t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152q0 88 63 151t152 63z" /> +<glyph unicode="" d="M900 1100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100zM800 1100v100h-300v-100h300zM200 900h900v-800q0 -41 -29.5 -71 t-70.5 -30h-700q-41 0 -70.5 30t-29.5 71v800zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" /> +<glyph unicode="" d="M1301 601h-200v-600h-300v400h-300v-400h-300v600h-200l656 644z" /> +<glyph unicode="" d="M600 700h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18v1150q0 11 7 18t18 7h475v-500zM1000 800h-300v300z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM600 600h200 v-100h-300v400h100v-300z" /> +<glyph unicode="" d="M721 400h-242l-40 -400h-539l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538zM712 500l-27 300h-170l-27 -300h224z" /> +<glyph unicode="" d="M1100 400v-400h-1100v400h490l-290 300h200v500h300v-500h200l-290 -300h490zM988 300h-175v-100h175v100z" /> +<glyph unicode="" d="M600 1199q122 0 233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233t47.5 233t127.5 191t191 127.5t233 47.5zM600 1012q-170 0 -291 -121t-121 -291t121 -291t291 -121t291 121 t121 291t-121 291t-291 121zM700 600h150l-250 -300l-250 300h150v300h200v-300z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM850 600h-150 v-300h-200v300h-150l250 300z" /> +<glyph unicode="" d="M0 500l200 700h800q199 -700 200 -700v-475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18v475zM903 1000h-606l-97 -500h200l50 -200h300l50 200h200z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5zM797 598 l-297 -201v401z" /> +<glyph unicode="" d="M1177 600h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123t-123 -184t-45.5 -224.5t45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123 t123 184t45.5 224.5z" /> +<glyph unicode="" d="M700 800l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400zM500 400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122l-145 -145v400h400z" /> +<glyph unicode="" d="M100 1200v-1200h1100v1200h-1100zM1100 100h-900v900h900v-900zM400 800h-100v100h100v-100zM1000 800h-500v100h500v-100zM400 600h-100v100h100v-100zM1000 600h-500v100h500v-100zM400 400h-100v100h100v-100zM1000 400h-500v100h500v-100zM400 200h-100v100h100v-100 zM1000 300h-500v-100h500v100z" /> +<glyph unicode="" d="M200 0h-100v1100h100v-1100zM1100 600v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5z" /> +<glyph unicode="" d="M1200 275v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5t-49.5 -227v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50 q11 0 18 7t7 18zM400 480v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14zM1000 480v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14z" /> +<glyph unicode="" d="M0 800v-400h300l300 -200v800l-300 -200h-300zM971 600l141 -141l-71 -71l-141 141l-141 -141l-71 71l141 141l-141 141l71 71l141 -141l141 141l71 -71z" /> +<glyph unicode="" d="M0 800v-400h300l300 -200v800l-300 -200h-300zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" /> +<glyph unicode="" d="M974 186l6 8q142 178 142 405q0 230 -144 408l-6 8l-83 -64l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8zM300 801l300 200v-800l-300 200h-300v400h300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257z" /> +<glyph unicode="" d="M100 700h400v100h100v100h-100v300h-500v-600h100v100zM1200 700v500h-600v-200h100v-300h200v-300h300v200h-200v100h200zM100 1100h300v-300h-300v300zM800 800v300h300v-300h-300zM200 900h100v100h-100v-100zM900 1000h100v-100h-100v100zM300 600h-100v-100h-200 v-500h500v500h-200v100zM900 200v-100h-200v100h-100v100h100v200h-200v100h300v-300h200v-100h-100zM400 400v-300h-300v300h300zM300 200h-100v100h100v-100zM1100 300h100v-100h-100v100zM600 100h100v-100h-100v100zM1200 100v-100h-300v100h300z" /> +<glyph unicode="" d="M100 1200h-100v-1000h100v1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 1200v-1000h-200v1000h200zM400 100v-100h-300v100h300zM500 91h100v-91h-100v91zM700 91h100v-91h-100v91zM1100 91v-91h-200v91h200z " /> +<glyph unicode="" d="M1200 500l-500 -500l-699 700v475q0 10 7.5 17.5t17.5 7.5h474zM320 882q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71t29 -71q30 -30 71.5 -30t71.5 30z" /> +<glyph unicode="" d="M1201 500l-500 -500l-699 700v475q0 11 7 18t18 7h474zM1501 500l-500 -500l-50 50l450 450l-700 700h100zM320 882q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71t30 -71q29 -30 71 -30t71 30z" /> +<glyph unicode="" d="M1200 1200v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900v1025l175 175h925z" /> +<glyph unicode="" d="M947 829l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18l-94 -346l40 -124h592zM1200 800v-700h-200v200h-800v-200h-200v700h200l100 -200h600l100 200h200zM881 176l38 -152q2 -10 -3.5 -17t-15.5 -7h-600q-10 0 -15.5 7t-3.5 17l38 152q2 10 11.5 17t19.5 7 h500q10 0 19.5 -7t11.5 -17z" /> +<glyph unicode="" d="M1200 0v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417zM416 521l178 457l46 -140l116 -317 h-340z" /> +<glyph unicode="" d="M100 1199h471q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111t-162 -38.5h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21 t-29 14t-49 14.5v70zM400 1079v-379h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400z" /> +<glyph unicode="" d="M877 1200l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425z" /> +<glyph unicode="" d="M1150 1200h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49v300h150h700zM100 1000v-800h75l-125 -167l-125 167h75v800h-75l125 167 l125 -167h-75z" /> +<glyph unicode="" d="M950 1201h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50v300h150h700zM200 101h800v75l167 -125l-167 -125v75h-800v-75l-167 125l167 125 v-75z" /> +<glyph unicode="" d="M700 950v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35zM1100 650v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h1000 q21 0 35.5 15t14.5 35zM900 350v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35zM1200 50v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35 t35.5 -15h1100q21 0 35.5 15t14.5 35z" /> +<glyph unicode="" d="M1000 950v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35zM1200 650v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h1100 q21 0 35.5 15t14.5 35zM1000 350v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35zM1200 50v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35 t35.5 -15h1100q21 0 35.5 15t14.5 35z" /> +<glyph unicode="" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35zM0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M400 1100h-100v-1100h100v1100zM700 950v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35zM1100 650v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15 h500q20 0 35 15t15 35zM100 425v75h-201v100h201v75l166 -125zM900 350v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35zM1200 50v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5 v-100q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35z" /> +<glyph unicode="" d="M201 950v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35zM801 1100h100v-1100h-100v1100zM601 650v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15 h500q20 0 35 15t15 35zM1101 425v75h200v100h-200v75l-167 -125zM401 350v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35zM701 50v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5 v-100q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35z" /> +<glyph unicode="" d="M900 925v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53zM1200 300l-300 300l300 300v-600z" /> +<glyph unicode="" d="M1200 1056v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31zM1100 1000h-1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500zM476 750q0 -56 -39 -95t-95 -39t-95 39t-39 95t39 95t95 39t95 -39 t39 -95z" /> +<glyph unicode="" d="M600 1213q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262q0 124 60.5 231.5t165 172t226.5 64.5zM599 514q107 0 182.5 75.5t75.5 182.5t-75.5 182 t-182.5 75t-182 -75.5t-75 -181.5q0 -107 75.5 -182.5t181.5 -75.5z" /> +<glyph unicode="" d="M600 1199q122 0 233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233t47.5 233t127.5 191t191 127.5t233 47.5zM600 173v854q-176 0 -301.5 -125t-125.5 -302t125.5 -302t301.5 -125z " /> +<glyph unicode="" d="M554 1295q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 138.5t-64 210.5q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5zM455 296q-7 6 -18 17 t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156q14 -82 59.5 -136t136.5 -80z" /> +<glyph unicode="" d="M1108 902l113 113l-21 85l-92 28l-113 -113zM1100 625v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5 t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125zM436 341l161 50l412 412l-114 113l-405 -405z" /> +<glyph unicode="" d="M1100 453v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5z M813 431l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209z" /> +<glyph unicode="" d="M1100 569v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5v300q0 165 117.5 282.5t282.5 117.5h300q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69z M625 348l566 567l-136 137l-430 -431l-147 147l-136 -136z" /> +<glyph unicode="" d="M900 303v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198l-300 300l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296z" /> +<glyph unicode="" d="M900 0l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100z" /> +<glyph unicode="" d="M1200 0l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100z" /> +<glyph unicode="" d="M1200 0l-500 488v-488l-564 550l564 550v-487l500 487v-1100z" /> +<glyph unicode="" d="M1100 550l-900 550v-1100z" /> +<glyph unicode="" d="M500 150v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5zM900 150v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800q0 -21 14.5 -35.5t35.5 -14.5h200 q21 0 35.5 14.5t14.5 35.5z" /> +<glyph unicode="" d="M1100 150v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35z" /> +<glyph unicode="" d="M500 0v488l-500 -488v1100l500 -487v487l564 -550z" /> +<glyph unicode="" d="M1050 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488l-500 -488v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5z" /> +<glyph unicode="" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5z" /> +<glyph unicode="" d="M650 1064l-550 -564h1100zM1200 350v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" /> +<glyph unicode="" d="M777 7l240 240l-353 353l353 353l-240 240l-592 -594z" /> +<glyph unicode="" d="M513 -46l-241 240l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1z" /> +<glyph unicode="" d="M600 1197q162 0 299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5t80 299.5t217.5 217.5t299.5 80zM500 900v-200h-200v-200h200v-200h200v200h200v200h-200v200h-200z" /> +<glyph unicode="" d="M600 1197q162 0 299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5t80 299.5t217.5 217.5t299.5 80zM300 700v-200h600v200h-600z" /> +<glyph unicode="" d="M600 1197q162 0 299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5t80 299.5t217.5 217.5t299.5 80zM247 741l141 -141l-142 -141l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141 l-141 142z" /> +<glyph unicode="" d="M600 1197q162 0 299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5t80 299.5t217.5 217.5t299.5 80zM546 623l-102 102l-174 -174l276 -277l411 411l-175 174z" /> +<glyph unicode="" d="M600 1197q162 0 299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5t80 299.5t217.5 217.5t299.5 80zM500 500h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3 q-105 0 -172 -56t-67 -183h144q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5zM500 400v-100h200v100h-200z" /> +<glyph unicode="" d="M600 1197q162 0 299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5t80 299.5t217.5 217.5t299.5 80zM500 900v-100h200v100h-200zM400 700v-100h100v-200h-100v-100h400v100h-100v300h-300z" /> +<glyph unicode="" d="M1200 700v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194v200h194q15 60 36 104.5t55.5 86t88 69t126.5 40.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203zM700 500v-206q149 48 201 206h-201v200h200 q-25 74 -76 127.5t-124 76.5v-204h-200v203q-75 -24 -130 -77.5t-79 -125.5h209v-200h-210q24 -73 79.5 -127.5t130.5 -78.5v206h200z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM844 735 l-135 -135l135 -135l-109 -109l-135 135l-135 -135l-109 109l135 135l-135 135l109 109l135 -135l135 135z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM896 654 l-346 -345l-228 228l141 141l87 -87l204 205z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM248 385l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5q0 -115 62 -215zM955 809l-564 -564q97 -59 209 -59q171 0 292.5 121.5 t121.5 292.5q0 112 -59 209z" /> +<glyph unicode="" d="M1200 400h-600v-301l-600 448l600 453v-300h600v-300z" /> +<glyph unicode="" d="M600 400h-600v300h600v300l600 -453l-600 -448v301z" /> +<glyph unicode="" d="M1098 600h-298v-600h-300v600h-296l450 600z" /> +<glyph unicode="" d="M998 600l-449 -600l-445 600h296v600h300v-600h298z" /> +<glyph unicode="" d="M600 199v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453z" /> +<glyph unicode="" d="M1200 1200h-400l129 -129l-294 -294l142 -142l294 294l129 -129v400zM565 423l-294 -294l129 -129h-400v400l129 -129l294 294z" /> +<glyph unicode="" d="M871 730l129 -130h-400v400l129 -129l295 295l142 -141zM200 600h400v-400l-129 130l-295 -295l-142 141l295 295z" /> +<glyph unicode="" d="M600 1177q118 0 224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5t45.5 224.5t123 184t184 123t224.5 45.5zM686 549l58 302q4 20 -8 34.5t-33 14.5h-207q-20 0 -32 -14.5t-8 -34.5 l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5zM700 400h-200v-100h200v100z" /> +<glyph unicode="" d="M1200 900h-111v6t-1 15t-3 18l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6h-111v-100h100v-200h400v300h200v-300h400v200h100v100z M731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269zM481 900h-281q-3 0 14 48t35 96l18 47zM100 0h400v400h-400v-400zM700 400h400v-400h-400v400z" /> +<glyph unicode="" d="M0 121l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55l-201 -202 v143zM692 611q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5t86.5 76.5q55 66 367 234z" /> +<glyph unicode="" d="M1261 600l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30l-26 40l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5 t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30zM600 240q64 0 123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212 q0 85 46 158q-102 -87 -226 -258q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5zM484 762l-107 -106q49 -124 154 -191l105 105q-37 24 -75 72t-57 84z" /> +<glyph unicode="" d="M906 1200l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43l-26 40l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148zM1261 600l-26 -40q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5 t-124 -100t-146.5 -79l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52zM513 264l37 141q-107 18 -178.5 101.5t-71.5 193.5q0 85 46 158q-102 -87 -226 -258q210 -282 393 -336z M484 762l-107 -106q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68z" /> +<glyph unicode="" d="M-47 0h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 33 -48 36t-48 -29l-642 -1066q-21 -32 -7.5 -66t50.5 -34zM700 200v100h-200v-100h-345l445 723l445 -723h-345zM700 700h-200v-100l100 -300l100 300v100z" /> +<glyph unicode="" d="M800 711l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -21 -13 -29t-32 1l-94 78h-222l-94 -78q-19 -9 -32 -1t-13 29v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41q0 20 11 44.5t26 38.5 l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339z" /> +<glyph unicode="" d="M941 800l-600 -600h-341v200h259l600 600h241v198l300 -295l-300 -300v197h-159zM381 678l141 142l-181 180h-341v-200h259zM1100 598l300 -295l-300 -300v197h-241l-181 181l141 142l122 -123h159v198z" /> +<glyph unicode="" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" /> +<glyph unicode="" d="M400 900h-300v300h300v-300zM1100 900h-300v300h300v-300zM1100 800v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5t-58 109.5t-31.5 116t-15 104t-3 83v200h300v-250q0 -113 6 -145 q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300z" /> +<glyph unicode="" d="M902 184l226 227l-578 579l-580 -579l227 -227l352 353z" /> +<glyph unicode="" d="M650 218l578 579l-226 227l-353 -353l-352 353l-227 -227z" /> +<glyph unicode="" d="M1198 400v600h-796l215 -200h381v-400h-198l299 -283l299 283h-200zM-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196z" /> +<glyph unicode="" d="M1050 1200h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35 q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43l-100 475q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5z" /> +<glyph unicode="" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" /> +<glyph unicode="" d="M201 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000zM1501 700l-300 -700h-1200l300 700h1200z" /> +<glyph unicode="" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" /> +<glyph unicode="" d="M900 303v197h-600v-197l-300 297l300 298v-198h600v198l300 -298z" /> +<glyph unicode="" d="M31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM100 300h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM900 200h-100v-100h100v100z M1100 200h-100v-100h100v100z" /> +<glyph unicode="" d="M1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35zM325 800l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35q-56 337 -56 351v250v5 q0 13 0.5 18.5t2.5 13t8 10.5t15 3h200zM-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5z" /> +<glyph unicode="" d="M445 1180l-45 -233l-224 78l78 -225l-233 -44l179 -156l-179 -155l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180z" /> +<glyph unicode="" d="M700 1200h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400q0 -75 100 -75h61q123 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5zM700 925l-50 -225h450 v-125l-250 -375h-214l-136 100h-100v375l150 212l100 213h50v-175zM0 800v-600h200v600h-200z" /> +<glyph unicode="" d="M700 0h-50q-27 0 -51 20t-38 48l-96 198l-145 196q-20 26 -20 63v400q0 75 100 75h61q123 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5zM200 400h-200v600h200 v-600zM700 275l-50 225h450v125l-250 375h-214l-136 -100h-100v-375l150 -212l100 -213h50v175z" /> +<glyph unicode="" d="M364 873l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM408 792v-503 l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83zM208 200h-200v600h200v-600z" /> +<glyph unicode="" d="M475 1104l365 -230q7 -4 16.5 -10.5t26 -26t16.5 -36.5v-526q0 -13 -85.5 -93.5t-93.5 -80.5h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-84 0 -139 39t-55 111t54 110t139 37h302l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6zM370 946 l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100h222q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l106 89v502l-342 237zM1199 201h-200v600h200v-600z" /> +<glyph unicode="" d="M1100 473v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90zM911 400h-503l-236 339 l83 86l183 -146q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6v7.5v7v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294zM1000 200v-200h-600v200h600z" /> +<glyph unicode="" d="M305 1104v200h600v-200h-600zM605 310l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15l-230 -362q-15 -31 7 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85l-1 -302q0 -84 38.5 -138t110.5 -54t111 55t39 139v106z M905 804v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146l-83 86l237 339h503z" /> +<glyph unicode="" d="M603 1195q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5zM598 701h-298v-201h300l-2 -194l402 294l-402 298v-197z" /> +<glyph unicode="" d="M597 1195q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5zM200 600l400 -294v194h302v201h-300v197z" /> +<glyph unicode="" d="M603 1195q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5zM300 600h200v-300h200v300h200l-300 400z" /> +<glyph unicode="" d="M603 1195q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5zM500 900v-300h-200l300 -400l300 400h-200v300h-200z" /> +<glyph unicode="" d="M603 1195q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5zM627 1101q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6 q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55 t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q102 -2 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7 q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5 t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 41 1 44q31 -13 58.5 -14.5t39.5 3.5l11 4q6 36 -17 53.5t-64 28.5t-56 23q-19 -3 -37 0zM613 994q0 -18 8 -42.5t16.5 -44t9.5 -23.5q-9 2 -31 5t-36 5t-32 8t-30 14q3 12 16 30t16 25q10 -10 18.5 -10 t14 6t14.5 14.5t16 12.5z" /> +<glyph unicode="" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " /> +<glyph unicode="" d="M1100 1200v-100h-1000v100h1000zM150 1000h900l-350 -500v-300l-200 -200v500z" /> +<glyph unicode="" d="M329 729l142 142l-200 200l129 129h-400v-400l129 129zM1200 1200v-400l-129 129l-200 -200l-142 142l200 200l-129 129h400zM271 129l129 -129h-400v400l129 -129l200 200l142 -142zM1071 271l129 129v-400h-400l129 129l-200 200l142 142z" /> +<glyph unicode="" d="M596 1192q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM596 1010q-171 0 -292.5 -121.5t-121.5 -292.5q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5zM455 905 q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5t16 38.5t39 16.5zM708 821l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5 q0 32 20.5 56.5t51.5 29.5zM855 709q23 0 38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39q0 22 16 38t39 16zM345 709q23 0 39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39t15.5 38.5t38.5 15.5z" /> +<glyph unicode="" d="M649 54l-16 22q-90 125 -293 323q-71 70 -104.5 105.5t-77 89.5t-61 99t-17.5 91q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-203 -198 -293 -323zM844 524l12 12 q64 62 97.5 97t64.5 79t31 72q0 71 -48 119t-105 48q-74 0 -132 -82l-118 -171l-114 174q-51 79 -123 79q-60 0 -109.5 -49t-49.5 -118q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203z" /> +<glyph unicode="" d="M476 406l19 -17l105 105l-212 212l389 389l247 -247l-95 -96l18 -18q46 -46 77 -99l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159q0 -93 66 -159zM123 193l141 -141q66 -66 159 -66q95 0 159 66 l283 283q66 66 66 159t-66 159l-141 141q-12 12 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159q0 -94 66 -160z" /> +<glyph unicode="" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM900 1000h-600v-700h600v700zM600 46q43 0 73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5t-73.5 -30.5t-30.5 -73.5 t30.5 -73.5t73.5 -30.5z" /> +<glyph unicode="" d="M700 1029v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5h139q5 -77 48.5 -126.5t117.5 -64.5v335l-27 7q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5 t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5zM600 755v274q-61 -8 -97.5 -37.5t-36.5 -102.5q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3zM700 548 v-311q170 18 170 151q0 64 -44 99.5t-126 60.5z" /> +<glyph unicode="" d="M866 300l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5t-30 142.5h-221v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5 t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -11 2.5 -24.5t5.5 -24t9.5 -26.5t10.5 -25t14 -27.5t14 -25.5t15.5 -27t13.5 -24h242v-100h-197q8 -50 -2.5 -115t-31.5 -94 q-41 -59 -99 -113q35 11 84 18t70 7q32 1 102 -16t104 -17q76 0 136 30z" /> +<glyph unicode="" d="M300 0l298 300h-198v900h-200v-900h-198zM900 1200l298 -300h-198v-900h-200v900h-198z" /> +<glyph unicode="" d="M400 300h198l-298 -300l-298 300h198v900h200v-900zM1000 1200v-500h-100v100h-100v-100h-100v500h300zM901 1100h-100v-200h100v200zM700 500h300v-200h-99v-100h-100v100h99v100h-200v100zM800 100h200v-100h-300v200h100v-100z" /> +<glyph unicode="" d="M400 300h198l-298 -300l-298 300h198v900h200v-900zM1000 1200v-200h-99v-100h-100v100h99v100h-200v100h300zM800 800h200v-100h-300v200h100v-100zM700 500h300v-500h-100v100h-100v-100h-100v500zM801 200h100v200h-100v-200z" /> +<glyph unicode="" d="M300 0l298 300h-198v900h-200v-900h-198zM900 1100h-100v100h200v-500h-100v400zM1100 500v-500h-100v100h-200v400h300zM1001 400h-100v-200h100v200z" /> +<glyph unicode="" d="M300 0l298 300h-198v900h-200v-900h-198zM1100 1200v-500h-100v100h-200v400h300zM1001 1100h-100v-200h100v200zM900 400h-100v100h200v-500h-100v400z" /> +<glyph unicode="" d="M300 0l298 300h-198v900h-200v-900h-198zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" /> +<glyph unicode="" d="M300 0l298 300h-198v900h-200v-900h-198zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" /> +<glyph unicode="" d="M400 1100h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5v300q0 165 117.5 282.5t282.5 117.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5 t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5z" /> +<glyph unicode="" d="M700 0h-300q-163 0 -281.5 117.5t-118.5 282.5v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5 t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5zM400 800v-500l333 250z" /> +<glyph unicode="" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM900 300v500q0 41 -29.5 70.5t-70.5 29.5h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5 t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5zM800 700h-500l250 -333z" /> +<glyph unicode="" d="M1100 700v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5zM900 300v500q0 41 -29.5 70.5t-70.5 29.5h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5 t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5zM550 733l-250 -333h500z" /> +<glyph unicode="" d="M500 1100h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200zM700 550l-400 -350v200h-300v300h300v200z" /> +<glyph unicode="" d="M403 2l9 -1q13 0 26 16l538 630q15 19 6 36q-8 18 -32 16h-300q1 4 78 219.5t79 227.5q2 17 -6 27l-8 8h-9q-16 0 -25 -15q-4 -5 -98.5 -111.5t-228 -257t-209.5 -238.5q-17 -19 -7 -40q10 -19 32 -19h302q-155 -438 -160 -458q-5 -21 4 -32z" /> +<glyph unicode="" d="M800 200h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185zM900 200v200h-300v300h300v200l400 -350z" /> +<glyph unicode="" d="M1200 700l-149 149l-342 -353l-213 213l353 342l-149 149h500v-500zM1022 571l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5v-300 q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM600 794 q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" /> +<glyph unicode="" d="M700 800v400h-300v-400h-300l445 -500l450 500h-295zM25 300h1048q11 0 19 -7.5t8 -17.5v-275h-1100v275q0 11 7 18t18 7zM1000 200h-100v-50h100v50z" /> +<glyph unicode="" d="M400 700v-300h300v300h295l-445 500l-450 -500h300zM25 300h1048q11 0 19 -7.5t8 -17.5v-275h-1100v275q0 11 7 18t18 7zM1000 200h-100v-50h100v50z" /> +<glyph unicode="" d="M405 400l596 596l-154 155l-442 -442l-150 151l-155 -155zM25 300h1048q11 0 19 -7.5t8 -17.5v-275h-1100v275q0 11 7 18t18 7zM1000 200h-100v-50h100v50z" /> +<glyph unicode="" d="M409 1103l-97 97l-212 -212l97 -98zM650 861l-149 149l-212 -212l149 -149l-238 -248h700v699zM25 300h1048q11 0 19 -7.5t8 -17.5v-275h-1100v275q0 11 7 18t18 7zM1000 200h-100v-50h100v50z" /> +<glyph unicode="" d="M539 950l-149 -149l212 -212l149 148l248 -237v700h-699zM297 709l-97 -97l212 -212l98 97zM25 300h1048q11 0 19 -7.5t8 -17.5v-275h-1100v275q0 11 7 18t18 7zM1000 200h-100v-50h100v50z" /> +<glyph unicode="" d="M1200 1199v-1079l-475 272l-310 -393v416h-392zM1166 1148l-672 -712v-226z" /> +<glyph unicode="" d="M1100 1000v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1200h-100v-200h100v200z" /> +<glyph unicode="" d="M578 500h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120zM700 1200h-100v-200h100v200zM1300 538l-475 -476l-244 244l123 123l120 -120l353 352z" /> +<glyph unicode="" d="M529 500h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170zM700 1200h-100v-200h100v200zM1167 6l-170 170l-170 -170l-127 127l170 170l-170 170l127 127l170 -170l170 170l127 -128 l-170 -169l170 -170z" /> +<glyph unicode="" d="M700 500h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200zM700 1000h-100v200h100v-200zM1000 600h-200v-300h-200l300 -300l300 300h-200v300z" /> +<glyph unicode="" d="M602 500h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200zM700 1000h-100v200h100v-200zM1000 300h200l-300 300l-300 -300h200v-300h200v300z" /> +<glyph unicode="" d="M1200 900v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h1200zM0 800v-550q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200zM100 500h400v-200h-400v200z" /> +<glyph unicode="" d="M500 1000h400v198l300 -298l-300 -298v198h-400v200zM100 800v200h100v-200h-100zM400 800h-100v200h100v-200zM700 300h-400v-198l-300 298l300 298v-198h400v-200zM800 500h100v-200h-100v200zM1000 500v-200h100v200h-100z" /> +<glyph unicode="" d="M1200 50v1106q0 31 -18 40.5t-44 -7.5l-276 -117q-25 -16 -43.5 -50.5t-18.5 -65.5v-359q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5zM550 1200l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447l-100 203v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300z" /> +<glyph unicode="" d="M1100 106v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394 q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5z" /> +<glyph unicode="" d="M675 1000l-100 100h-375l-100 -100h400l200 -200v-98l295 98h105v200h-425zM500 300v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5zM100 800h300v-200h-300v200zM700 565l400 133 v-163l-400 -133v163zM100 500h300v-200h-300v200zM805 300l295 98v-298h-425l-100 -100h-375l-100 100h400l200 200h105z" /> +<glyph unicode="" d="M179 1169l-162 -162q-1 -11 -0.5 -32.5t16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q16 17 13 40.5t-22 37.5l-192 136q-19 14 -45 12t-42 -19l-119 -118q-143 103 -267 227q-126 126 -227 268l118 118 q17 17 20 41.5t-11 44.5l-139 194q-14 19 -36.5 22t-40.5 -14z" /> +<glyph unicode="" d="M1200 712v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40t-53.5 -36.5t-31 -27.5l-9 -10v-200q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38 t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5zM800 650l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -15 -35.5t-35 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5 t30 -27.5t12 -24l1 -10v-50z" /> +<glyph unicode="" d="M175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250zM1200 100v-100h-1100v100h1100z" /> +<glyph unicode="" d="M600 1100h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300v1000q0 41 29.5 70.5t70.5 29.5zM1000 800h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300v700q0 41 29.5 70.5t70.5 29.5zM400 0v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400h300z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM200 800v-300h200v-100h-200v-100h300v300h-200v100h200v100h-300zM800 800h-200v-500h200v100h100v300h-100 v100zM800 700v-300h-100v300h100z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM400 600h-100v200h-100v-500h100v200h100v-200h100v500h-100v-200zM800 800h-200v-500h200v100h100v300h-100 v100zM800 700v-300h-100v300h100z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM200 800v-500h300v100h-200v300h200v100h-300zM600 800v-500h300v100h-200v300h200v100h-300z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM500 700l-300 -150l300 -150v300zM600 400l300 150l-300 150v-300z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM900 800v-500h-700v500h700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM800 700h-130 q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM200 800v-300h200v-100h-200v-100h300v300h-200v100h200v100h-300zM800 300h100v500h-200v-100h100v-400z M601 300h100v100h-100v-100z" /> +<glyph unicode="" d="M1200 800v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212zM1000 900h-900v-700h900v700zM300 700v100h-100v-500h300v400h-200zM800 300h100v500h-200v-100h100v-400zM401 400h-100v200h100v-200z M601 300h100v100h-100v-100z" /> +<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM1000 900h-900v-700h900v700zM400 700h-200v100h300v-300h-99v-100h-100v100h99v200zM800 700h-100v100h200v-500h-100v400zM201 400h100v-100 h-100v100zM701 300h-100v100h100v-100z" /> +<glyph unicode="" d="M600 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM600 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM800 700h-300 v-200h300v-100h-300l-100 100v200l100 100h300v-100z" /> +<glyph unicode="" d="M596 1196q162 0 299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299t80 299t217 217t299 80zM596 1014q-171 0 -292.5 -121.5t-121.5 -292.5t121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5zM800 700v-100 h-100v100h-200v-100h200v-100h-200v-100h-100v400h300zM800 400h-100v100h100v-100z" /> +<glyph unicode="" d="M800 300h128q120 0 205 86t85 208q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5q0 -80 56.5 -137t135.5 -57h222v300h400v-300zM700 200h200l-300 -300 l-300 300h200v300h200v-300z" /> +<glyph unicode="" d="M600 714l403 -403q94 26 154.5 104t60.5 178q0 121 -85 207.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5q0 -80 56.5 -137t135.5 -57h8zM700 -100h-200v300h-200l300 300 l300 -300h-200v-300z" /> +<glyph unicode="" d="M700 200h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-155l-75 -45h350l-75 45v155z" /> +<glyph unicode="" d="M700 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -12t1 -11q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5 q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350z" /> +<glyph unicode="💼" d="M800 1000h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100zM500 1000h200v100h-200v-100zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" /> +<glyph unicode="📅" d="M1100 900v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150h1100zM0 800v-750q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100zM100 600h100v-100h-100v100zM300 600h100v-100h-100v100z M500 600h100v-100h-100v100zM700 600h100v-100h-100v100zM900 600h100v-100h-100v100zM100 400h100v-100h-100v100zM300 400h100v-100h-100v100zM500 400h100v-100h-100v100zM700 400h100v-100h-100v100zM900 400h100v-100h-100v100zM100 200h100v-100h-100v100zM300 200 h100v-100h-100v100zM500 200h100v-100h-100v100zM700 200h100v-100h-100v100zM900 200h100v-100h-100v100z" /> +<glyph unicode="📌" d="M902 1185l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207l-380 -303l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15z" /> +<glyph unicode="📎" d="M518 119l69 -60l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163t35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84 t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -79.5 -17t-67.5 -51l-388 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348 q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256z" /> +<glyph unicode="📷" d="M1200 200v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5z M1000 700h-100v100h100v-100zM844 500q0 -100 -72 -172t-172 -72t-172 72t-72 172t72 172t172 72t172 -72t72 -172zM706 500q0 44 -31 75t-75 31t-75 -31t-31 -75t31 -75t75 -31t75 31t31 75z" /> +<glyph unicode="🔒" d="M900 800h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" /> +<glyph unicode="🔔" d="M1062 400h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-22 -9 -63 -23t-167.5 -37t-251.5 -23t-245.5 20.5t-178.5 41.5l-58 20q-18 7 -31 27.5t-13 40.5q0 21 13.5 35.5t33.5 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94 q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327zM600 104q-54 0 -103 6q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6z" /> +<glyph unicode="🔖" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" /> +<glyph unicode="🔥" d="M400 755q2 -12 8 -41.5t8 -43t6 -39.5t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85t5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5 q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129 q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5z" /> +<glyph unicode="🔧" d="M948 778l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138z" /> +</font> +</defs></svg>
\ No newline at end of file diff --git a/data/fonts/glyphicons-halflings-regular.ttf b/data/fonts/glyphicons-halflings-regular.ttf Binary files differnew file mode 100644 index 000000000..be784dc1d --- /dev/null +++ b/data/fonts/glyphicons-halflings-regular.ttf diff --git a/data/fonts/glyphicons-halflings-regular.woff b/data/fonts/glyphicons-halflings-regular.woff Binary files differnew file mode 100644 index 000000000..2cc3e4852 --- /dev/null +++ b/data/fonts/glyphicons-halflings-regular.woff diff --git a/data/img/asc.gif b/data/img/asc.gif Binary files differnew file mode 100644 index 000000000..74157867f --- /dev/null +++ b/data/img/asc.gif diff --git a/data/img/bg.gif b/data/img/bg.gif Binary files differnew file mode 100644 index 000000000..fac668fcf --- /dev/null +++ b/data/img/bg.gif diff --git a/data/img/desc.gif b/data/img/desc.gif Binary files differnew file mode 100644 index 000000000..3b30b3c58 --- /dev/null +++ b/data/img/desc.gif diff --git a/data/img/glyphicons-halflings-white.png b/data/img/glyphicons-halflings-white.png Binary files differnew file mode 100644 index 000000000..3bf6484a2 --- /dev/null +++ b/data/img/glyphicons-halflings-white.png diff --git a/data/img/glyphicons-halflings.png b/data/img/glyphicons-halflings.png Binary files differnew file mode 100644 index 000000000..a99699932 --- /dev/null +++ b/data/img/glyphicons-halflings.png diff --git a/data/js/bootstrap.min.js b/data/js/bootstrap.min.js new file mode 100644 index 000000000..1765631f4 --- /dev/null +++ b/data/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/** +* bootstrap.js v3.0.0 by @fat and @mdo +* Copyright 2013 Twitter Inc. +* http://www.apache.org/licenses/LICENSE-2.0 +*/ +if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu]",f.prototype.keydown)}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;if("top"==b&&j!=f&&(c=!0,a.top=a.top+f-j),/bottom|top/.test(b)){var k=0;a.left<0&&(k=-2*a.left,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach()}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery);
\ No newline at end of file diff --git a/data/js/jquery-2.0.3.js b/data/js/jquery-2.0.3.js new file mode 100644 index 000000000..ebc6c187d --- /dev/null +++ b/data/js/jquery-2.0.3.js @@ -0,0 +1,8829 @@ +/*! + * jQuery JavaScript Library v2.0.3 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:30Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // A central reference to the root jQuery(document) + rootjQuery, + + // The deferred used on DOM ready + readyList, + + // Support: IE9 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "2.0.3", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // A simple way to check for HTML strings + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler and self cleanup method + completed = function() { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + jQuery.ready(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + // Support: Safari <= 5.1 (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Support: Firefox <20 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 + try { + if ( obj.constructor && + !core_hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + } catch ( e ) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + + if ( scripts ) { + jQuery( scripts ).remove(); + } + + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: JSON.parse, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE9 + try { + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + globalEval: function( code ) { + var script, + indirect = eval; + + code = jQuery.trim( code ); + + if ( code ) { + // If the code includes a valid, prologue position + // strict mode pragma, execute code by injecting a + // script tag into the document. + if ( code.indexOf("use strict") === 1 ) { + script = document.createElement("script"); + script.text = code; + document.head.appendChild( script ).parentNode.removeChild( script ); + } else { + // Otherwise, avoid the DOM node creation, insertion + // and removal by using an indirect global eval + indirect( code ); + } + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + trim: function( text ) { + return text == null ? "" : core_trim.call( text ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : core_indexOf.call( arr, elem, i ); + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: Date.now, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + } else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.9.4-pre + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-06-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "<div class='a'></div><div class='a i'></div>"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = "<select><option selected=''></option></select>"; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = "<a href='#'></a>"; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = "<input/>"; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + var input = document.createElement("input"), + fragment = document.createDocumentFragment(), + div = document.createElement("div"), + select = document.createElement("select"), + opt = select.appendChild( document.createElement("option") ); + + // Finish early in limited environments + if ( !input.type ) { + return support; + } + + input.type = "checkbox"; + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere) + support.checkOn = input.value !== ""; + + // Must access the parent to make an option select properly + // Support: IE9, IE10 + support.optSelected = opt.selected; + + // Will be defined later + support.reliableMarginRight = true; + support.boxSizingReliable = true; + support.pixelPosition = false; + + // Make sure checked status is properly cloned + // Support: IE9, IE10 + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Check if an input maintains its value after becoming a radio + // Support: IE9, IE10 + input = document.createElement("input"); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment.appendChild( input ); + + // Support: Safari 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: Firefox, Chrome, Safari + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + support.focusinBubbles = "onfocusin" in window; + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, + // Support: Firefox, Android 2.3 (Prefixed box-sizing versions). + divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box", + body = document.getElementsByTagName("body")[ 0 ]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + // Check box-sizing and margin behavior. + body.appendChild( container ).appendChild( div ); + div.innerHTML = ""; + // Support: Firefox, Android 2.3 (Prefixed box-sizing versions). + div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Support: Android 2.3 + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + body.removeChild( container ); + }); + + return support; +})( {} ); + +/* + Implementation Summary + + 1. Enforce API surface and semantic compatibility with 1.9.x branch + 2. Improve the module's maintainability by reducing the storage + paths to a single mechanism. + 3. Use the same single mechanism to support "private" and "user" data. + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + 5. Avoid exposing implementation details on user objects (eg. expando properties) + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 +*/ +var data_user, data_priv, + rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function Data() { + // Support: Android < 4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; + } + }); + + this.expando = jQuery.expando + Math.random(); +} + +Data.uid = 1; + +Data.accepts = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType ? + owner.nodeType === 1 || owner.nodeType === 9 : true; +}; + +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; + } + + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; + + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; + + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); + + // Support: Android < 4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } + } + + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; + } + + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } + } + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ key ]; + }, + access: function( owner, key, value ) { + var stored; + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ((key && typeof key === "string") && value === undefined) ) { + + stored = this.get( owner, key ); + + return stored !== undefined ? + stored : this.get( owner, jQuery.camelCase(key) ); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, name, camel, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + if ( key === undefined ) { + this.cache[ unlock ] = {}; + + } else { + // Support array or space separated string of keys + if ( jQuery.isArray( key ) ) { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = key.concat( key.map( jQuery.camelCase ) ); + } else { + camel = jQuery.camelCase( key ); + // Try the string as a key before any manipulation + if ( key in cache ) { + name = [ key, camel ]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = camel; + name = name in cache ? + [ name ] : ( name.match( core_rnotwhite ) || [] ); + } + } + + i = name.length; + while ( i-- ) { + delete cache[ name[ i ] ]; + } + } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } + } +}; + +// These may be used throughout the jQuery core codebase +data_user = new Data(); +data_priv = new Data(); + + +jQuery.extend({ + acceptData: Data.accepts, + + hasData: function( elem ) { + return data_user.hasData( elem ) || data_priv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return data_user.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + data_user.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. + _data: function( elem, name, data ) { + return data_priv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + data_priv.remove( elem, name ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + elem = this[ 0 ], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = data_user.get( elem ); + + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[ i ].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + data_priv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + data_user.set( this, key ); + }); + } + + return jQuery.access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, camelKey, undefined ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get( this, camelKey ); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set( this, camelKey, value ); + + // *... In the case of properties that might _actually_ + // have dashes, we need to also store a copy of that + // unchanged property. + if ( key.indexOf("-") !== -1 && data !== undefined ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + data_user.remove( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? JSON.parse( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + data_user.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = data_priv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return data_priv.get( elem, key ) || data_priv.access( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + data_priv.remove( elem, [ type + "queue", key ] ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button)$/i; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each(function() { + delete this[ jQuery.propFix[ name ] || name ]; + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + data_priv.set( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // IE6-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + elem[ propName ] = false; + } + + elem.removeAttribute( name ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ? + elem.tabIndex : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + // Temporarily disable this handler to check existence + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + + // Restore handler + jQuery.expr.attrHandle[ name ] = fn; + + return ret; + }; +}); + +// Support: IE9+ +// Selectedness for an option in an optgroup can be inaccurate +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + data_priv.remove( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG <use> instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.disabled !== true || event.type !== "click" ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome < 28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && e.preventDefault ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && e.stopPropagation ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// Create "bubbling" focus and blur events +// Support: Firefox, Chrome, Safari +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter(function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = ( rneedsContext.test( selectors ) || typeof selectors !== "string" ) ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return core_indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return core_indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.unique( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; + }, + + sibling: function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( core_indexOf.call( qualifier, elem ) >= 0 ) !== not; + }); +} +var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + + // Support: IE 9 + option: [ 1, "<select multiple='multiple'>", "</select>" ], + + thead: [ 1, "<table>", "</table>" ], + col: [ 2, "<table><colgroup>", "</colgroup></table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + + _default: [ 0, "", "" ] + }; + +// Support: IE 9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1></$2>" ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); + } + } + } + } + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: QtWebKit + // .get() because core_push.apply(_, arraylike) throws + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Support: IE >= 9 + // Fix Cloning issues + if ( !jQuery.support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var elem, tmp, tag, wrap, contains, j, + i = 0, + l = elems.length, + fragment = context.createDocumentFragment(), + nodes = []; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Fixes #12346 + // Support: Webkit, IE + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; + }, + + cleanData: function( elems ) { + var data, elem, events, type, key, j, + special = jQuery.event.special, + i = 0; + + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( Data.accepts( elem ) ) { + key = elem[ data_priv.expando ]; + + if ( key && (data = data_priv.cache[ key ]) ) { + events = Object.keys( data.events || {} ); + if ( events.length ) { + for ( j = 0; (type = events[j]) !== undefined; j++ ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; + } + } + } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); + +// Support: 1.x compatibility +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute("type"); + } + + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var l = elems.length, + i = 0; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); + } +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + data_user.set( dest, udataCur ); + } +} + + +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + +// Support: IE >= 9 +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} +jQuery.fn.extend({ + wrapAll: function( html ) { + var wrap; + + if ( jQuery.isFunction( html ) ) { + return this.each(function( i ) { + jQuery( this ).wrapAll( html.call(this, i) ); + }); + } + + if ( this[ 0 ] ) { + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function( i ) { + jQuery( this ).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function( i ) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var curCSS, iframe, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +function getStyles( elem ) { + return window.getComputedStyle( elem, null ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = data_priv.get( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = data_priv.access( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css(elem, "display") ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": "cssFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifying setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + style[ name ] = value; + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // Support: IE9 + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // Support: Safari 5.1 + // A tribute to the "awesome hack by Dean Edwards" + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; +}; + + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("<iframe frameborder='0' width='0' height='0'/>") + .css( "cssText", "display:block !important" ) + ).appendTo( doc.documentElement ); + + // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse + doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; + doc.write("<!doctype html><html><body>"); + doc.close(); + + display = actualDisplay( nodeName, doc ); + iframe.detach(); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + } + + return display; +} + +// Called ONLY from within css_defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + display = jQuery.css( elem[0], "display" ); + elem.remove(); + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + // certain elements can have dimension info if we invisibly show them + // however, it must have a current display style that would benefit from this + return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? + jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var styles = extra && getStyles( elem ); + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ) : 0 + ); + } + }; +}); + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + // Support: Android 2.3 + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + if ( computed ) { + // Support: Android 2.3 + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, + curCSS, [ elem, "marginRight" ] ); + } + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + computed = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( computed ) ? + jQuery( elem ).position()[ prop ] + "px" : + computed; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + // Support: Opera <= 12.12 + // Opera reports offsetWidths and offsetHeights less than zero on some elements + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0; + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + }) + .filter(function(){ + var type = this.type; + // Use .is(":disabled") so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !manipulation_rcheckableType.test( type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // Item is non-scalar (array or object), encode its numeric index. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +}); + +jQuery.fn.extend({ + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + } +}); +var + // Document location + ajaxLocParts, + ajaxLocation, + + ajax_nonce = jQuery.now(), + + ajax_rquery = /\?/, + rhash = /#.*$/, + rts = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat("*"); + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + while ( (dataType = dataTypes[i++]) ) { + // Prepend if requested + if ( dataType[0] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + + // Otherwise append + } else { + (structure[ dataType ] = structure[ dataType ] || []).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + }); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // If we have elements to modify, make the request + if ( self.length > 0 ) { + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + self.html( selector ? + + // If a selector was specified, locate the right elements in a dummy div + // Exclude scripts to avoid IE 'Permission Denied' errors + jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + + // Otherwise use the full result + responseText ); + + }).complete( callback && function( jqXHR, status ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + }); + } + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ + jQuery.fn[ type ] = function( fn ){ + return this.on( type, fn ); + }; +}); + +jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: ajaxLocation, + type: "GET", + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + // URL without anti-cache param + cacheURL, + // Response headers + responseHeadersString, + responseHeaders, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks("once memory"), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( (match = rheaders.exec( responseHeadersString )) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + var lname = name.toLowerCase(); + if ( !state ) { + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( state < 2 ) { + for ( code in map ) { + // Lazy-add the new callback in a way that preserves old ones + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } else { + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ).complete = completeDeferred.add; + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ) + .replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger("ajaxStart"); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + cacheURL = s.url; + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add anti-cache in url if needed + if ( s.cache === false ) { + s.url = rts.test( cacheURL ) ? + + // If there is already a '_' parameter, set its value + cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : + + // Otherwise add one to the end + cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; + } + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout(function() { + jqXHR.abort("timeout"); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch ( e ) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader("etag"); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger("ajaxStop"); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + url: url, + type: method, + dataType: type, + data: data, + success: callback + }); + }; +}); + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s[ "throws" ] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /(?:java|ecma)script/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery("<script>").prop({ + async: true, + charset: s.scriptCharset, + src: s.url + }).on( + "load error", + callback = function( evt ) { + script.remove(); + callback = null; + if ( evt ) { + complete( evt.type === "error" ? 404 : 200, evt.type ); + } + } + ); + document.head.appendChild( script[ 0 ] ); + }, + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +}); +var oldCallbacks = [], + rjsonp = /(=)\?(?=&|$)|\?\?/; + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? + "url" : + typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + + // Insert callback into url or form data + if ( jsonProp ) { + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); + } else if ( s.jsonp !== false ) { + s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + overwritten = window[ callbackName ]; + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +jQuery.ajaxSettings.xhr = function() { + try { + return new XMLHttpRequest(); + } catch( e ) {} +}; + +var xhrSupported = jQuery.ajaxSettings.xhr(), + xhrSuccessStatus = { + // file protocol always yields status code 0, assume 200 + 0: 200, + // Support: IE9 + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + // Support: IE9 + // We need to keep track of outbound xhr and abort them manually + // because IE is not smart enough to do it all by itself + xhrId = 0, + xhrCallbacks = {}; + +if ( window.ActiveXObject ) { + jQuery( window ).on( "unload", function() { + for( var key in xhrCallbacks ) { + xhrCallbacks[ key ](); + } + xhrCallbacks = undefined; + }); +} + +jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +jQuery.support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport(function( options ) { + var callback; + // Cross domain only allowed if supported through XMLHttpRequest + if ( jQuery.support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, id, + xhr = options.xhr(); + xhr.open( options.type, options.url, options.async, options.username, options.password ); + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers["X-Requested-With"] ) { + headers["X-Requested-With"] = "XMLHttpRequest"; + } + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + delete xhrCallbacks[ id ]; + callback = xhr.onload = xhr.onerror = null; + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + complete( + // file protocol always yields status 0, assume 404 + xhr.status || 404, + xhr.statusText + ); + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + // Support: IE9 + // #11426: When requesting binary data, IE9 will throw an exception + // on any attempt to access responseText + typeof xhr.responseText === "string" ? { + text: xhr.responseText + } : undefined, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + // Listen to events + xhr.onload = callback(); + xhr.onerror = callback("error"); + // Create the abort callback + callback = xhrCallbacks[( id = xhrId++ )] = callback("abort"); + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( options.hasContent && options.data || null ); + }, + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +}); +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var tween = this.createTween( prop, value ), + target = tween.cur(), + parts = rfxnum.exec( value ), + unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && + rfxnum.exec( jQuery.css( tween.elem, prop ) ), + scale = 1, + maxIterations = 20; + + if ( start && start[ 3 ] !== unit ) { + // Trust units reported by jQuery.css + unit = unit || start[ 3 ]; + + // Make sure we update the tween properties later on + parts = parts || []; + + // Iteratively approximate from a nonzero starting point + start = +target || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + // Update tween properties + if ( parts ) { + start = tween.start = +start || +target || 0; + tween.unit = unit; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[ 1 ] ? + start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : + +parts[ 2 ]; + } + + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }); + return ( fxNow = jQuery.now() ); +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( (tween = collection[ index ].call( animation, prop, value )) ) { + + // we're done with this property + return tween; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + /* jshint validthis: true */ + var prop, value, toggle, tween, hooks, oldfire, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHidden( elem ), + dataShow = data_priv.get( elem, "fxshow" ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE9-10 do not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + style.display = "inline-block"; + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + + + // show/hide pass + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.exec( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + if ( !jQuery.isEmptyObject( orig ) ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = data_priv.access( elem, "fxshow", {} ); + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + + data_priv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( prop in orig ) { + tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE9 +// Panic based approach to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || data_priv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = data_priv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each(function() { + var index, + data = data_priv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // enable finishing flag on private data + data.finish = true; + + // empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // turn off finishing flag + delete data.finish; + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) ) { + jQuery.fx.start(); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.start = function() { + if ( !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, win, + elem = this[ 0 ], + box = { top: 0, left: 0 }, + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== core_strundefined ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + return { + top: box.top + win.pageYOffset - docElem.clientTop, + left: box.left + win.pageXOffset - docElem.clientLeft + }; +}; + +jQuery.offset = { + + setOffset: function( elem, options, i ) { + var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, + position = jQuery.css( elem, "position" ), + curElem = jQuery( elem ), + props = {}; + + // Set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + curOffset = curElem.offset(); + curCSSTop = jQuery.css( elem, "top" ); + curCSSLeft = jQuery.css( elem, "left" ); + calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; + + // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[ 0 ] ) { + return; + } + + var offsetParent, offset, + elem = this[ 0 ], + parentOffset = { top: 0, left: 0 }; + + // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent + if ( jQuery.css( elem, "position" ) === "fixed" ) { + // We assume that getBoundingClientRect is available when computed position is fixed + offset = elem.getBoundingClientRect(); + + } else { + // Get *real* offsetParent + offsetParent = this.offsetParent(); + + // Get correct offsets + offset = this.offset(); + if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { + parentOffset = offsetParent.offset(); + } + + // Add offsetParent borders + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + } + + // Subtract parent offsets and element margins + return { + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || docElem; + + while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { + offsetParent = offsetParent.offsetParent; + } + + return offsetParent || docElem; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = "pageYOffset" === prop; + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? win[ prop ] : elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : window.pageXOffset, + top ? val : window.pageYOffset + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], + // whichever is greatest + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Limit scope pollution from any deprecated API +// (function() { + +// The number of elements contained in the matched element set +jQuery.fn.size = function() { + return this.length; +}; + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// })(); +if ( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose jQuery as module.exports in loaders that implement the Node + // module pattern (including browserify). Do not create the global, since + // the user will be storing it themselves locally, and globals are frowned + // upon in the Node module world. + module.exports = jQuery; +} else { + // Register as a named AMD module, since jQuery can be concatenated with other + // files that may use define, but not via a proper concatenation script that + // understands anonymous AMD modules. A named AMD is safest and most robust + // way to register. Lowercase jquery is used because AMD module names are + // derived from file names, and jQuery is normally delivered in a lowercase + // file name. Do this after creating the global so that if an AMD module wants + // to call noConflict to hide this version of jQuery, it will work. + if ( typeof define === "function" && define.amd ) { + define( "jquery", [], function () { return jQuery; } ); + } +} + +// If there is a window object, that at least has a document property, +// define jQuery and $ identifiers +if ( typeof window === "object" && typeof window.document === "object" ) { + window.jQuery = window.$ = jQuery; +} + +})( window ); diff --git a/data/js/jquery-2.0.3.min.js b/data/js/jquery-2.0.3.min.js new file mode 100644 index 000000000..2be209dd2 --- /dev/null +++ b/data/js/jquery-2.0.3.min.js @@ -0,0 +1,6 @@ +/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery-2.0.3.min.map +*/ +(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) +};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ct={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1></$2>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(xt[0].contentWindow||xt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=Mt(e,t),xt.detach()),Nt[e]=n),n}function Mt(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&bt.test(x.css(e,"display"))?x.swap(e,Et,function(){return Pt(e,t,r)}):Pt(e,t,r):undefined},set:function(e,n,r){var i=r&&qt(e);return Ot(e,n,r?Ft(e,t,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,t){return t?x.swap(e,{display:"inline-block"},vt,[e,"marginRight"]):undefined}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,t){x.cssHooks[t]={get:function(e,n){return n?(n=vt(e,t),Ct.test(n)?x(e).position()[t]+"px":n):undefined}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+jt[r]+t]=o[r]||o[r-2]||o[0];return i}},wt.test(e)||(x.cssHooks[e+t].set=Ot)});var Wt=/%20/g,$t=/\[\]$/,Bt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,zt=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&zt.test(this.nodeName)&&!It.test(e)&&(this.checked||!ot.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(Bt,"\r\n")}}):{name:t.name,value:n.replace(Bt,"\r\n")}}).get()}}),x.param=function(e,t){var n,r=[],i=function(e,t){t=x.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)_t(n,e[n],t,i);return r.join("&").replace(Wt,"+")};function _t(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||$t.test(e)?r(e,i):_t(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)_t(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t) +},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Xt,Ut,Yt=x.now(),Vt=/\?/,Gt=/#.*$/,Jt=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Kt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Zt=/^(?:GET|HEAD)$/,en=/^\/\//,tn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,nn=x.fn.load,rn={},on={},sn="*/".concat("*");try{Ut=i.href}catch(an){Ut=o.createElement("a"),Ut.href="",Ut=Ut.href}Xt=tn.exec(Ut.toLowerCase())||[];function un(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ln(e,t,n,r){var i={},o=e===on;function s(a){var u;return i[a]=!0,x.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):undefined:(t.dataTypes.unshift(l),s(l),!1)}),u}return s(t.dataTypes[0])||!i["*"]&&s("*")}function cn(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,t,n){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),x.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),s.length>0&&x.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)},ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?x(p):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Qt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===Xt[1]&&a[2]===Xt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),ln(rn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Zt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Vt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+sn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(p,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=ln(on,c,t,T)){T.readyState=1,u&&f.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=pn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===c.type?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(p,[m,C,T]):h.rejectWith(p,[T,C,y]),T.statusCode(g),g=undefined,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(p,[T,C]),u&&(f.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function pn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&n()}}}});var hn=[],dn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=hn.pop()||x.expando+"_"+Yt++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=x.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(Vt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||x.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,hn.push(i)),s&&x.isFunction(o)&&o(s[0]),s=o=undefined}),"script"):undefined}),x.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var gn=x.ajaxSettings.xhr(),mn={0:200,1223:204},yn=0,vn={};e.ActiveXObject&&x(e).on("unload",function(){for(var e in vn)vn[e]();vn=undefined}),x.support.cors=!!gn&&"withCredentials"in gn,x.support.ajax=gn=!!gn,x.ajaxTransport(function(e){var t;return x.support.cors||gn&&!e.crossDomain?{send:function(n,r){var i,o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete vn[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status||404,s.statusText):r(mn[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=vn[o=yn++]=t("abort"),s.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:undefined});var xn,bn,wn=/^(?:toggle|show|hide)$/,Tn=RegExp("^(?:([+-])=|)("+b+")([a-z%]*)$","i"),Cn=/queueHooks$/,kn=[An],Nn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Tn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),s=(x.cssNumber[e]||"px"!==o&&+r)&&Tn.exec(x.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,x.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};function En(){return setTimeout(function(){xn=undefined}),xn=x.now()}function Sn(e,t,n){var r,i=(Nn[t]||[]).concat(Nn["*"]),o=0,s=i.length;for(;s>o;o++)if(r=i[o].call(n,t,e))return r}function jn(e,t,n){var r,i,o=0,s=kn.length,a=x.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=xn||En(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;for(;u>s;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),1>o&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:xn||En(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(Dn(c,l.opts.specialEasing);s>o;o++)if(r=kn[o].call(l,e,c,l.opts))return r;return x.map(c,Sn,l),x.isFunction(l.opts.start)&&l.opts.start.call(e,l),x.fx.timer(x.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function Dn(e,t){var n,r,i,o,s;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=x.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(jn,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Nn[n]=Nn[n]||[],Nn[n].unshift(t)},prefilter:function(e,t){t?kn.unshift(e):kn.push(e)}});function An(e,t,n){var r,i,o,s,a,u,l=this,c={},p=e.style,f=e.nodeType&&Lt(e),h=q.get(e,"fxshow");n.queue||(a=x._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,l.always(function(){l.always(function(){a.unqueued--,x.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",l.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],wn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show")){if("show"!==i||!h||h[r]===undefined)continue;f=!0}c[r]=h&&h[r]||x.style(e,r)}if(!x.isEmptyObject(c)){h?"hidden"in h&&(f=h.hidden):h=q.access(e,"fxshow",{}),o&&(h.hidden=!f),f?x(e).show():l.done(function(){x(e).hide()}),l.done(function(){var t;q.remove(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)s=Sn(f?h[r]:0,r,l),r in h||(h[r]=s.start,f&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function Ln(e,t,n,r,i){return new Ln.prototype.init(e,t,n,r,i)}x.Tween=Ln,Ln.prototype={constructor:Ln,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=Ln.propHooks[this.prop];return e&&e.get?e.get(this):Ln.propHooks._default.get(this)},run:function(e){var t,n=Ln.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ln.propHooks._default.set(this),this}},Ln.prototype.init.prototype=Ln.prototype,Ln.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ln.propHooks.scrollTop=Ln.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(qn(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Lt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),s=function(){var t=jn(this,x.extend({},e),o);(i||q.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=x.timers,s=q.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Cn.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,s=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function qn(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=jt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:qn("show"),slideUp:qn("hide"),slideToggle:qn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=Ln.prototype.init,x.fx.tick=function(){var e,t=x.timers,n=0;for(xn=x.now();t.length>n;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||x.fx.stop(),xn=undefined},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){bn||(bn=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(bn),bn=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===undefined?this:this.each(function(t){x.offset.setOffset(this,e,t)});var t,n,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;if(s)return t=s.documentElement,x.contains(t,i)?(typeof i.getBoundingClientRect!==r&&(o=i.getBoundingClientRect()),n=Hn(s),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},x.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,c=x.css(e,"position"),p=x(e),f={};"static"===c&&(e.style.position="relative"),a=p.offset(),o=x.css(e,"top"),u=x.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=p.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),x.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):p.css(f)}},x.fn.extend({position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===x.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(r=e.offset()),r.top+=x.css(e[0],"borderTopWidth",!0),r.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-x.css(n,"marginTop",!0),left:t.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;x.fn[t]=function(i){return x.access(this,function(t,i,o){var s=Hn(t);return o===undefined?s?s[n]:t[i]:(s?s.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o,undefined)},t,i,arguments.length,null)}});function Hn(e){return x.isWindow(e)?e:9===e.nodeType&&e.defaultView}x.each({Height:"height",Width:"width"},function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){x.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return x.access(this,function(t,n,r){var i;return x.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?x.css(t,n,s):x.style(t,n,r,s)},t,o?r:undefined,o,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}),"object"==typeof e&&"object"==typeof e.document&&(e.jQuery=e.$=x)})(window); diff --git a/data/js/jquery-2.0.3.min.map b/data/js/jquery-2.0.3.min.map new file mode 100644 index 000000000..472d71bb0 --- /dev/null +++ b/data/js/jquery-2.0.3.min.map @@ -0,0 +1 @@ +{"version":3,"file":"jquery-2.0.3.min.js","sources":["jquery-2.0.3.js"],"names":["window","undefined","rootjQuery","readyList","core_strundefined","location","document","docElem","documentElement","_jQuery","jQuery","_$","$","class2type","core_deletedIds","core_version","core_concat","concat","core_push","push","core_slice","slice","core_indexOf","indexOf","core_toString","toString","core_hasOwn","hasOwnProperty","core_trim","trim","selector","context","fn","init","core_pnum","source","core_rnotwhite","rquickExpr","rsingleTag","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","completed","removeEventListener","ready","prototype","jquery","constructor","match","elem","this","charAt","length","exec","find","merge","parseHTML","nodeType","ownerDocument","test","isPlainObject","isFunction","attr","getElementById","parentNode","makeArray","toArray","call","get","num","pushStack","elems","ret","prevObject","each","callback","args","promise","done","apply","arguments","first","eq","last","i","len","j","map","end","sort","splice","extend","options","name","src","copy","copyIsArray","clone","target","deep","isArray","expando","Math","random","replace","noConflict","isReady","readyWait","holdReady","hold","wait","resolveWith","trigger","off","obj","type","Array","isWindow","isNumeric","isNaN","parseFloat","isFinite","String","e","isEmptyObject","error","msg","Error","data","keepScripts","parsed","scripts","createElement","buildFragment","remove","childNodes","parseJSON","JSON","parse","parseXML","xml","tmp","DOMParser","parseFromString","getElementsByTagName","noop","globalEval","code","script","indirect","eval","text","head","appendChild","removeChild","camelCase","string","nodeName","toLowerCase","value","isArraylike","arr","results","Object","inArray","second","l","grep","inv","retVal","arg","guid","proxy","access","key","chainable","emptyGet","raw","bulk","now","Date","swap","old","style","Deferred","readyState","setTimeout","addEventListener","split","support","cachedruns","Expr","getText","isXML","compile","outermostContext","sortInput","setDocument","documentIsHTML","rbuggyQSA","rbuggyMatches","matches","contains","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","hasDuplicate","sortOrder","a","b","strundefined","MAX_NEGATIVE","hasOwn","pop","push_native","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","rtrim","RegExp","rcomma","rcombinators","rsibling","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rnative","rinputs","rheader","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","fromCharCode","els","Sizzle","seed","m","groups","nid","newContext","newSelector","id","getElementsByClassName","qsa","tokenize","getAttribute","setAttribute","toSelector","join","querySelectorAll","qsaError","removeAttribute","select","keys","cache","cacheLength","shift","markFunction","assert","div","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","node","doc","parent","defaultView","attachEvent","top","className","createComment","innerHTML","firstChild","getById","getElementsByName","filter","attrId","getAttributeNode","tag","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","dirkey","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","group","contexts","token","div1","defaultValue","unique","isXMLDoc","optionsCache","createOptions","object","flag","Callbacks","memory","fired","firing","firingStart","firingLength","firingIndex","list","stack","once","fire","stopOnFalse","self","disable","add","index","lock","locked","fireWith","func","tuples","state","always","deferred","fail","then","fns","newDefer","tuple","action","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","progressContexts","resolveContexts","fragment","createDocumentFragment","opt","checkOn","optSelected","reliableMarginRight","boxSizingReliable","pixelPosition","noCloneChecked","cloneNode","optDisabled","radioValue","checkClone","focusinBubbles","backgroundClip","clearCloneStyle","container","marginDiv","divReset","body","cssText","zoom","boxSizing","offsetWidth","getComputedStyle","width","marginRight","data_user","data_priv","rbrace","rmultiDash","Data","defineProperty","uid","accepts","owner","descriptor","unlock","defineProperties","set","prop","stored","camel","hasData","discard","acceptData","removeData","_data","_removeData","dataAttr","camelKey","queue","dequeue","startLength","hooks","_queueHooks","next","stop","setter","delay","time","fx","speeds","timeout","clearTimeout","clearQueue","count","defer","nodeHook","boolHook","rclass","rreturn","rfocusable","removeAttr","removeProp","propFix","addClass","classes","clazz","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","valHooks","option","one","max","optionSet","nType","attrHooks","propName","attrNames","for","class","notxml","propHooks","hasAttribute","getter","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","event","global","types","handleObjIn","eventHandle","events","t","handleObj","special","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","bubbleType","ontype","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","props","fixHooks","keyHooks","original","which","charCode","keyCode","mouseHooks","eventDoc","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","originalEvent","fixHook","load","blur","click","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","getPreventDefault","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","orig","related","relatedTarget","attaches","on","origFn","triggerHandler","isSimple","rparentsprev","rneedsContext","guaranteedUnique","children","contents","prev","targets","winnow","is","closest","pos","prevAll","addBack","sibling","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","contentDocument","reverse","truncate","n","qualifier","rxhtmlTag","rtagName","rhtml","rnoInnerhtml","manipulation_rcheckableType","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","append","createTextNode","domManip","manipulationTarget","prepend","insertBefore","before","after","keepData","cleanData","getAll","setGlobalEval","dataAndEvents","deepDataAndEvents","html","replaceWith","detach","allowIntersection","hasScripts","iNoClone","disableScript","restoreScript","_evalUrl","appendTo","prependTo","insertAfter","replaceAll","insert","srcElements","destElements","inPage","fixInput","cloneCopyEvent","selection","wrap","nodes","url","ajax","dataType","async","throws","content","refElements","dest","pdataOld","pdataCur","udataOld","udataCur","wrapAll","firstElementChild","wrapInner","unwrap","curCSS","iframe","rdisplayswap","rmargin","rnumsplit","rnumnonpx","rrelNum","elemdisplay","BODY","cssShow","position","visibility","display","cssNormalTransform","letterSpacing","fontWeight","cssExpand","cssPrefixes","vendorPropName","capName","origName","isHidden","el","css","getStyles","showHide","show","hidden","css_defaultDisplay","styles","hide","toggle","cssHooks","opacity","computed","cssNumber","columnCount","fillOpacity","lineHeight","order","orphans","widows","zIndex","cssProps","float","extra","_computed","minWidth","maxWidth","getPropertyValue","setPositiveNumber","subtract","augmentWidthOrHeight","isBorderBox","getWidthOrHeight","valueIsBorderBox","offsetHeight","actualDisplay","contentWindow","write","close","visible","margin","padding","border","prefix","suffix","expand","expanded","parts","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","serialize","param","serializeArray","traditional","s","encodeURIComponent","ajaxSettings","buildParams","v","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","params","response","responseText","complete","status","active","lastModified","etag","isLocal","processData","contentType","*","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","abort","statusText","finalText","success","method","crossDomain","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","isSuccess","modified","ajaxHandleResponses","ajaxConvert","rejectWith","getJSON","getScript","ct","finalDataType","firstDataType","conv2","current","conv","dataFilter","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhr","XMLHttpRequest","xhrSupported","xhrSuccessStatus",1223,"xhrId","xhrCallbacks","ActiveXObject","cors","open","username","xhrFields","onload","onerror","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","tween","createTween","unit","scale","maxIterations","createFxNow","animation","collection","Animation","properties","stopped","tick","currentTime","startTime","duration","percent","tweens","run","opts","specialEasing","originalProperties","Tween","easing","gotoEnd","propFilter","timer","anim","tweener","prefilter","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","eased","step","cssFn","speed","animate","genFx","fadeTo","to","optall","doAnimation","finish","stopQueue","timers","includeWidth","height","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","p","swing","cos","PI","interval","setInterval","clearInterval","slow","fast","animated","offset","setOffset","win","box","left","getBoundingClientRect","getWindow","pageYOffset","pageXOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","using","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","module","exports","define","amd"],"mappings":";;;CAaA,SAAWA,EAAQC,WAOnB,GAECC,GAGAC,EAIAC,QAA2BH,WAG3BI,EAAWL,EAAOK,SAClBC,EAAWN,EAAOM,SAClBC,EAAUD,EAASE,gBAGnBC,EAAUT,EAAOU,OAGjBC,EAAKX,EAAOY,EAGZC,KAGAC,KAEAC,EAAe,QAGfC,EAAcF,EAAgBG,OAC9BC,EAAYJ,EAAgBK,KAC5BC,EAAaN,EAAgBO,MAC7BC,EAAeR,EAAgBS,QAC/BC,EAAgBX,EAAWY,SAC3BC,EAAcb,EAAWc,eACzBC,EAAYb,EAAac,KAGzBnB,EAAS,SAAUoB,EAAUC,GAE5B,MAAO,IAAIrB,GAAOsB,GAAGC,KAAMH,EAAUC,EAAS7B,IAI/CgC,EAAY,sCAAsCC,OAGlDC,EAAiB,OAKjBC,EAAa,sCAGbC,EAAa,6BAGbC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,eAIfC,EAAY,WACXvC,EAASwC,oBAAqB,mBAAoBD,GAAW,GAC7D7C,EAA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,EAAMorB,QAAS9pB,EAAM,GAAI,QAAUtB,GAAQ,SAAUy/B,EAAcC,GAEpGhlC,EAAOsB,GAAI0jC,GAAa,SAAU7P,EAAQ3rB,GACzC,GAAIgB,GAAY/F,UAAU5B,SAAYkiC,GAAkC,iBAAX5P,IAC5DjB,EAAQ6Q,IAAkB5P,KAAW,GAAQ3rB,KAAU,EAAO,SAAW,SAE1E,OAAOxJ,GAAOsK,OAAQ3H,KAAM,SAAUD,EAAMkE,EAAM4C,GACjD,GAAIuI,EAEJ,OAAK/R,GAAO8G,SAAUpE,GAIdA,EAAK9C,SAASE,gBAAiB,SAAWwF,GAI3B,IAAlB5C,EAAKQ,UACT6O,EAAMrP,EAAK5C,gBAIJiG,KAAKwe,IACX7hB,EAAKwd,KAAM,SAAW5a,GAAQyM,EAAK,SAAWzM,GAC9C5C,EAAKwd,KAAM,SAAW5a,GAAQyM,EAAK,SAAWzM,GAC9CyM,EAAK,SAAWzM,KAIXkE,IAAUjK,UAEhBS,EAAO4yB,IAAKlwB,EAAMkE,EAAMstB,GAGxBl0B,EAAOgL,MAAOtI,EAAMkE,EAAM4C,EAAO0qB,IAChCttB,EAAM4D,EAAY2qB,EAAS51B,UAAWiL,EAAW,WAQvDxK,EAAOsB,GAAG2jC,KAAO,WAChB,MAAOtiC,MAAKE,QAGb7C,EAAOsB,GAAG4jC,QAAUllC,EAAOsB,GAAGyqB,QAGP,gBAAXoZ,SAAuBA,QAAoC,gBAAnBA,QAAOC,QAK1DD,OAAOC,QAAUplC,EASM,kBAAXqlC,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WAAc,MAAOrlC,KAMtB,gBAAXV,IAAkD,gBAApBA,GAAOM,WAChDN,EAAOU,OAASV,EAAOY,EAAIF,KAGxBV"}
\ No newline at end of file diff --git a/data/js/jquery-ui-1.10.3.custom.min.js b/data/js/jquery-ui-1.10.3.custom.min.js new file mode 100644 index 000000000..ad955d90d --- /dev/null +++ b/data/js/jquery-ui-1.10.3.custom.min.js @@ -0,0 +1,6 @@ +/*! jQuery UI - v1.10.3 - 2013-06-08 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);
\ No newline at end of file diff --git a/data/js/jquery.metadata.js b/data/js/jquery.metadata.js new file mode 100644 index 000000000..eb98e80ad --- /dev/null +++ b/data/js/jquery.metadata.js @@ -0,0 +1,120 @@ +/* + * Metadata - jQuery plugin for parsing metadata from elements + * + * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Sets the type of metadata to use. Metadata is encoded in JSON, and each property + * in the JSON will become a property of the element itself. + * + * There are three supported types of metadata storage: + * + * attr: Inside an attribute. The name parameter indicates *which* attribute. + * + * class: Inside the class attribute, wrapped in curly braces: { } + * + * elem: Inside a child element (e.g. a script tag). The + * name parameter indicates *which* element. + * + * The metadata for an element is loaded the first time the element is accessed via jQuery. + * + * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements + * matched by expr, then redefine the metadata type and run another $(expr) for other elements. + * + * @name $.metadata.setType + * + * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p> + * @before $.metadata.setType("class") + * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" + * @desc Reads metadata from the class attribute + * + * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p> + * @before $.metadata.setType("attr", "data") + * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" + * @desc Reads metadata from a "data" attribute + * + * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p> + * @before $.metadata.setType("elem", "script") + * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" + * @desc Reads metadata from a nested script element + * + * @param String type The encoding type + * @param String name The name of the attribute to be used to get metadata (optional) + * @cat Plugins/Metadata + * @descr Sets the type of encoding to be used when loading metadata for the first time + * @type undefined + * @see metadata() + */ + +(function($) { + +$.extend({ + metadata : { + defaults : { + type: 'class', + name: 'metadata', + cre: /({.*})/, + single: 'metadata' + }, + setType: function( type, name ){ + this.defaults.type = type; + this.defaults.name = name; + }, + get: function( elem, opts ){ + var settings = $.extend({},this.defaults,opts); + // check for empty string in single property + if ( !settings.single.length ) settings.single = 'metadata'; + + var data = $.data(elem, settings.single); + // returned cached data if it already exists + if ( data ) return data; + + data = "{}"; + + if ( settings.type == "class" ) { + var m = settings.cre.exec( elem.className ); + if ( m ) + data = m[1]; + } else if ( settings.type == "elem" ) { + if( !elem.getElementsByTagName ) + return undefined; + var e = elem.getElementsByTagName(settings.name); + if ( e.length ) + data = $.trim(e[0].innerHTML); + } else if ( elem.getAttribute != undefined ) { + var attr = elem.getAttribute( settings.name ); + if ( attr ) + data = attr; + } + + if ( data.indexOf( '{' ) <0 ) + data = "{" + data + "}"; + + data = eval("(" + data + ")"); + + $.data( elem, settings.single, data ); + return data; + } + } +}); + +/** + * Returns the metadata object for the first member of the jQuery object. + * + * @name metadata + * @descr Returns element's metadata object + * @param Object opts An object contianing settings to override the defaults + * @type jQuery + * @cat Plugins/Metadata + */ +$.fn.metadata = function( opts ){ + return $.metadata.get( this[0], opts ); +}; + +})(jQuery);
\ No newline at end of file diff --git a/data/js/jquery.tablesorter.min.js b/data/js/jquery.tablesorter.min.js new file mode 100644 index 000000000..b8605df1e --- /dev/null +++ b/data/js/jquery.tablesorter.min.js @@ -0,0 +1,4 @@ + +(function($){$.extend({tablesorter:new +function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1 +var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
\ No newline at end of file diff --git a/data/js/script.js b/data/js/script.js new file mode 100644 index 000000000..77336a88e --- /dev/null +++ b/data/js/script.js @@ -0,0 +1,240 @@ +function fixedEncodeURIComponent (str) { + return encodeURIComponent(str).replace(/[!'()]/g, escape).replace(/\*/g, "%2A"); +} + +(function($) { + $(function() { + + $(window).bind('hashchange', function(e) { + var hash = window.location.hash; + + $('.highlight_line').removeClass("highlight_line"); + + if (hash.match(/^#n(?:-.+-)?\d+$/) === null) { + return; + } + + var line = $(hash).parent().parent(); + line.addClass("highlight_line"); + }); + + $(window).trigger('hashchange'); + + var lexer_source = []; + for (var key in window.lexers) { + lexer_source.push({ label: window.lexers[key], value: key }); + } + + $('[id^=language-]').autocomplete({ + source: lexer_source, + select: function(event, ui) { + event.preventDefault(); + window.location = $(event.target).data("base-url") + '/' + fixedEncodeURIComponent(ui.item.value); + } + }); + + $(document).on("keyup", "[id^=language-]", function(event) { + if (event.keyCode == 13) { + event.preventDefault(); + window.location = $(event.target).data("base-url") + '/' + fixedEncodeURIComponent($(this).val()); + } + }); + + $('[id^=language-toggle-]').click(function(event) { + setTimeout(function() { + $(event.target).parent().find('[id^=language-]').focus(); + }, 0); + }); + + $('[rel="tooltip"]').tooltip({ + placement: 'bottom', + container: 'body', + }); + + $('#history-all').bind('change', function() { + $('.delete-history').prop('checked', $(this).is(':checked')); + }); + + window.lines_wrapped = true; + $('[id^=linewrap-]').click(function() { + if (window.lines_wrapped == true) { + $(".highlight > pre").css("white-space", "pre"); + } else { + $(".highlight > pre").css("white-space", "pre-wrap"); + } + window.lines_wrapped = !window.lines_wrapped; + }); + + $('.upload_thumbnails a').popover({ + trigger: "hover", + placement: "bottom", + html: true, + }); + + $('#toggle_delete_mode').on("click", function() { + switch (window.page_mode) { + case "delete": + window.page_mode = "normal"; + $('#delete_button').hide(); + $("#delete_form input[id^='delete_']").remove(); + $(".upload_thumbnails .marked").removeClass("marked"); + break; + default: + window.page_mode = "delete"; + $('#delete_button').show(); + break; + } + }); + + $('.upload_thumbnails a').on("click", function(event) { + if (window.page_mode == "delete") { + event.preventDefault(); + var data_id = $(event.target).parent().attr("data-id"); + + if ($('#delete_'+data_id).length == 0) { + $('<input>').attr({ + type: "hidden", + name: "ids["+data_id+"]", + value: data_id, + id: "delete_"+data_id, + }).appendTo('#delete_form'); + $(event.target).parent().addClass("marked"); + } else { + $('#delete_'+data_id).remove(); + $(event.target).parent().removeClass("marked"); + } + } + }); + + function handle_resize() { + $('.upload_thumbnails').each(function() { + var div = $(this); + + need_multiple_lines = div.parent().width() < (div.find('a').outerWidth(true) * div.find('a').size()); + + div.css('margin-left', need_multiple_lines ? "auto" : "0"); + div.width(div.parent().width() - (div.parent().width() % div.find('a').outerWidth(true))); + }); + } + + $(window).resize(function() { + handle_resize(); + }); + handle_resize(); + + // check file size before uploading if browser support html5 + if (window.File && window.FileList) { + function checkFileUpload(evt) { + var sum = 0; + var filenum = 0; + var files = []; + + $('.file-upload').each(function() { + for (var i = 0; i < this.files.length; i++) { + var file = this.files[i]; + files.push(file); + } + }); + + for (var i = 0; i < files.length; i++) { + var f = files[i]; + sum += f.size; + filenum++; + } + + if (filenum > max_files_per_upload) { + document.getElementById('upload_button').innerHTML = "Too many files"; + document.getElementById('upload_button').disabled = true; + } else if (sum > max_upload_size) { + document.getElementById('upload_button').innerHTML = "File(s) too big"; + document.getElementById('upload_button').disabled = true; + } else { + document.getElementById('upload_button').innerHTML = "Upload it!"; + document.getElementById('upload_button').disabled = false; + } + } + + $(document).on('change', '.file-upload', checkFileUpload); + } + + $(document).on("change", '.file-upload', function() { + var need_new = true; + + $('.file-upload').each(function() { + if ($(this).prop("files").length == 0) { + need_new = false; + return; + } + }); + + if (need_new) { + $(this).parent().append('<input class="file-upload" type="file" name="file[]" multiple="multiple"><br>'); + } + + }); + + if (typeof $.tablesorter !== 'undefined') { + // source: https://projects.archlinux.org/archweb.git/tree/sitestatic/archweb.js + $.tablesorter.addParser({ + id: 'filesize', + re: /^(\d+(?:\.\d+)?)(bytes?|[KMGTPEZY]i?B|B)$/, + is: function(s) { + return this.re.test(s); + }, + format: function(s) { + var matches = this.re.exec(s); + if (!matches) { + return 0; + } + var size = parseFloat(matches[1]), + suffix = matches[2]; + + switch(suffix) { + /* intentional fall-through at each level */ + case 'YB': + case 'YiB': + size *= 1024; + case 'ZB': + case 'ZiB': + size *= 1024; + case 'EB': + case 'EiB': + size *= 1024; + case 'PB': + case 'PiB': + size *= 1024; + case 'TB': + case 'TiB': + size *= 1024; + case 'GB': + case 'GiB': + size *= 1024; + case 'MB': + case 'MiB': + size *= 1024; + case 'KB': + case 'KiB': + size *= 1024; + } + return size; + }, + type: 'numeric' + }); + + $(".tablesorter").tablesorter({ + textExtraction: function(node) { + var attr = $(node).attr('data-sort-value'); + if (typeof attr !== 'undefined' && attr !== false) { + var intAttr = parseInt(attr); + if (!isNaN(intAttr)) { + return intAttr; + } + return attr; + } + return $(node).text(); + } + }); + } + + }); +})(jQuery); diff --git a/data/local/.gitignore b/data/local/.gitignore new file mode 100644 index 000000000..7a78bea14 --- /dev/null +++ b/data/local/.gitignore @@ -0,0 +1,3 @@ +contact-info.php +favicon.png +logo.svg diff --git a/data/local/examples/.gitignore b/data/local/examples/.gitignore new file mode 100644 index 000000000..1aaf04e37 --- /dev/null +++ b/data/local/examples/.gitignore @@ -0,0 +1,3 @@ +!*.php +!*.svg +!*.png diff --git a/data/local/examples/contact-info.php b/data/local/examples/contact-info.php new file mode 100644 index 000000000..dfac270b3 --- /dev/null +++ b/data/local/examples/contact-info.php @@ -0,0 +1,4 @@ +<address> + <strong>John Doe</strong><br> + <a href="mailto:#">john.doe@example.com</a> +</address> diff --git a/data/local/examples/favicon.png b/data/local/examples/favicon.png new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/data/local/examples/favicon.png diff --git a/data/local/examples/header.inc.php b/data/local/examples/header.inc.php new file mode 100644 index 000000000..d61d30af7 --- /dev/null +++ b/data/local/examples/header.inc.php @@ -0,0 +1,4 @@ +<!-- +This header will be included (kind of) right after the <body> tag. +Use it to prepend your own site's navigation if needed. +--> diff --git a/data/local/examples/logo.svg b/data/local/examples/logo.svg new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/data/local/examples/logo.svg diff --git a/data/local/examples/style.css b/data/local/examples/style.css new file mode 100644 index 000000000..846bd0118 --- /dev/null +++ b/data/local/examples/style.css @@ -0,0 +1,4 @@ +/* + * This style will be included after all other style sheets. + * Use it to override any CSS rule to suite your needs + */ diff --git a/data/uploads/.htaccess b/data/uploads/.htaccess new file mode 100644 index 000000000..8d2f25636 --- /dev/null +++ b/data/uploads/.htaccess @@ -0,0 +1 @@ +deny from all diff --git a/extras/munin/filebin_stats b/extras/munin/filebin_stats new file mode 100644 index 000000000..f7e3bbeac --- /dev/null +++ b/extras/munin/filebin_stats @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Put something along those lines into your munin-node config +# +# [filebin_stats] +# env.mysqlopts --defaults-file=/var/lib/munin/.my.cnf +# env.database filebin + +case $1 in + config) + cat <<'EOM' +graph_title FileBin +graph_args --base 1024 --logarithmic --units=si +graph_vlabel Space +used.label Storage used +dedup.label Storage saved by deduplication +EOM + exit 0;; +esac + +echo -n "used.value " +mysql $mysqlopts -sr $database <<<"select coalesce(sum(filesize), 0) as 'Used storage' from (select filesize from files group by hash) a;" || echo "a" + +echo -n "dedup.value " +mysql $mysqlopts -sr $database <<<"select coalesce(sum((c - 1) * sub.filesize), 0) 'Space saved by deduplication' from (select hash, filesize, count(*) c from files group by hash having c > 1 order by c) sub;" || echo "a" diff --git a/htaccess.txt b/htaccess.txt new file mode 100644 index 000000000..5385c71b8 --- /dev/null +++ b/htaccess.txt @@ -0,0 +1,7 @@ +<IfModule mod_rewrite.c> + RewriteEngine on + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ /index.php/?$1 [L] +</IfModule> @@ -28,7 +28,7 @@ * By default development will show errors but testing and live will hide them. */ -if (defined('ENVIRONMENT')) +if (false && defined('ENVIRONMENT')) { switch (ENVIRONMENT) { @@ -191,6 +191,10 @@ if (defined('ENVIRONMENT')) define('APPPATH', BASEPATH.$application_folder.'/'); } + if (getenv("HOME") == "") { + putenv('HOME='.FCPATH); + } + /* * -------------------------------------------------------------------- * LOAD THE BOOTSTRAP FILE @@ -202,4 +206,4 @@ if (defined('ENVIRONMENT')) require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ -/* Location: ./index.php */
\ No newline at end of file +/* Location: ./index.php */ diff --git a/install.php b/install.php new file mode 100644 index 000000000..0c4f427c1 --- /dev/null +++ b/install.php @@ -0,0 +1,83 @@ +<?php + +if (version_compare(PHP_VERSION, '5.3.0') < 0) { + echo "Just a heads up: Filebin has not been tested with php older than 5.3. You might run into problems."; +} + +$errors = ""; + +define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); +define('FCPATH', str_replace(SELF, "", __FILE__)); +if (getenv("HOME") == "") { + putenv('HOME='.FCPATH); +} + +if (file_exists(FCPATH."is_installed")) { + exit("already installed\n"); +} + +$old_path = getenv("PATH"); +putenv("PATH=$old_path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"); + +// test exec() +exec("echo -n works") == "works" || $errors .= "exec() failed\n"; + +// test passthru() +ob_start(); +passthru("echo -n works"); +$buf = ob_get_contents(); +ob_end_clean(); +$buf == "works" || $errors .= "passthru() failed\n"; + +// test perl deps +$perldeps = array( + "Text::Markdown" +); +foreach ($perldeps as $dep) { + ob_start(); + passthru("perl 2>&1 -M'$dep' -e1"); + $buf = ob_get_contents(); + ob_end_clean(); + if ($buf != "") { + $errors .= " - failed to find perl module: $dep.\n"; + $errors .= $buf; + } +} + +// test pygmentize +ob_start(); +passthru("pygmentize -V 2>&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing pygmentize: Return code was \"$buf\".\n"; +} + +// test ansi2html +ob_start(); +passthru("ansi2html -h 2>&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing ansi2html: Return code was \"$buf\".\n"; +} + +// test qrencode +ob_start(); +passthru("qrencode -V 2>&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing qrencode: Return code was \"$buf\".\n"; +} + + +if ($errors != "") { + echo nl2br("Errors occured:\n"); + echo nl2br($errors); +} else { +// TODO: Make this an actual installer + file_put_contents(FCPATH."is_installed", "true"); + echo nl2br("Tests completed.\n" + ."The following steps remain:\n" + ." - copy the files from ./application/config/example/ to ./application/config/ and edit them to suit your setup\n" + ." - the database will be set up automatically\n" + ); +} diff --git a/robots.txt b/robots.txt new file mode 100644 index 000000000..c6742d8a8 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * +Disallow: / diff --git a/scripts/Markdown.pl b/scripts/Markdown.pl new file mode 100755 index 000000000..169b15fed --- /dev/null +++ b/scripts/Markdown.pl @@ -0,0 +1,147 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Text::Markdown qw(markdown); + +=head1 NAME + +Markdown.pl - Convert Markdown syntax to (X)HTML + +=head1 DESCRIPTION + +This program is distributed as part of Perl's Text::Markdown module, +illustrating sample usage. + +Markdown can be invoked on any file containing Markdown-syntax, and +will produce the corresponding (X)HTML on STDOUT: + + $ cat file.txt + This is a *test*. + + Absolutely _nothing_ to see here. _Just a **test**_! + + * test + * Yup, test. + $ Markdown.pl file.txt + <p>This is a <em>test</em>.</p> + + <p>Absolutely <em>nothing</em> to see here. <em>Just a <strong>test</strong></em>!</p> + + <ul> + <li>test</li> + <li>Yup, test.</li> + </ul> + +If no file is specified, it will expect its input from STDIN: + + $ echo "A **simple** test" | markdown + <p>A <strong>simple</strong> test</p> + +=head1 OPTIONS + +=over + +=item version + +Shows the full information for this version + +=item shortversion + +Shows only the version number + +=item html4tags + +Produce HTML 4-style tags instead of XHTML - XHTML requires elements +that do not wrap a block (i.e. the C<hr> tag) to state they will not +be closed, by closing with C</E<gt>>. HTML 4-style will plainly output +the tag as it comes: + + $ echo '---' | markdown + <hr /> + $ echo '---' | markdown --html4tags + <hr> + +=item help + +Shows this documentation + +=back + +=head1 AUTHOR + +Copyright 2004 John Gruber + +Copyright 2008 Tomas Doran + +The manpage was written by Gunnar Wolf <gwolf@debian.org> for its use +in Debian systems, but can be freely used elsewhere. + +For full licensing information, please refer to +L<Text::Markdown.pm>'s full documentation. + +=head1 SEE ALSO + +L<Text::Markdown>, L<http://daringfireball.net/projects/markdown/> + +=cut + +#### Check for command-line switches: ################# +my %cli_opts; +use Getopt::Long; +Getopt::Long::Configure('pass_through'); +GetOptions(\%cli_opts, + 'version', + 'shortversion', + 'html4tags', + 'help', +); +if ($cli_opts{'version'}) { # Version info + print "\nThis is Markdown, version $Text::Markdown::VERSION.\n"; + print "Copyright 2004 John Gruber\n"; + print "Copyright 2008 Tomas Doran\n"; + print "Parts contributed by several other people."; + print "http://daringfireball.net/projects/markdown/\n\n"; + exit 0; +} +if ($cli_opts{'shortversion'}) { # Just the version number string. + print $Text::Markdown::VERSION; + exit 0; +} +if ($cli_opts{'help'}) { + for my $dir (split m/:/, $ENV{PATH}) { + my $cmd = "$dir/perldoc"; + exec($cmd, $0) if (-f $cmd and -x $cmd); + } + die "perldoc could not be found in your path - Cannot show help, sorry\n"; +} +my $m; +if ($cli_opts{'html4tags'}) { # Use HTML tag style instead of XHTML + $m = Text::Markdown->new(empty_element_suffix => '>'); +} +else { + $m = Text::Markdown->new; +} + +sub main { + my (@fns) = @_; + + my $f; + if (scalar @fns) { + foreach my $fn (@fns) { + die("Cannot find file $fn") unless (-r $fn); + + my $fh; + open($fh, '<', $fn) or die; + $f = join('', <$fh>); + close($fh) or die; + } + } + else { # STDIN + local $/; # Slurp the whole file + $f = <>; + } + + return $m->markdown($f); +} + +print main(@ARGV) unless caller(); diff --git a/scripts/get_lexer_list.py b/scripts/get_lexer_list.py new file mode 100755 index 000000000..31e8e3650 --- /dev/null +++ b/scripts/get_lexer_list.py @@ -0,0 +1,7 @@ +#!/usr/bin/python + +import pygments.lexers + +for fullname, names, exts, _ in pygments.lexers.get_all_lexers(): + for name in names: + print(("%s|%s") % (name, fullname)) diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index a5c3e999b..a5c3e999b 100755..100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 34078174a..34078174a 100755..100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php diff --git a/system/core/Common.php b/system/core/Common.php index 713b21d85..4bf8a9ef5 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -1,5 +1,10 @@ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** + * MODIFIED + * config_item(): option to override returned values + */ + +/** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer @@ -254,7 +259,8 @@ if ( ! function_exists('get_config')) } } - return $_config[0] =& $config; + $_config[0] =& $config; + return $_config[0]; } } @@ -268,7 +274,7 @@ if ( ! function_exists('get_config')) */ if ( ! function_exists('config_item')) { - function config_item($item) + function config_item($item, $value = null) { static $_config_item = array(); @@ -283,6 +289,10 @@ if ( ! function_exists('config_item')) $_config_item[$item] = $config[$item]; } + if ($value !== null) { + $_config_item[$item] = $value; + } + return $_config_item[$item]; } } diff --git a/system/core/Config.php b/system/core/Config.php index 46ed9365c..46ed9365c 100755..100644 --- a/system/core/Config.php +++ b/system/core/Config.php diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 451209689..451209689 100755..100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php diff --git a/system/core/Hooks.php b/system/core/Hooks.php index ee5c23076..ee5c23076 100755..100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php diff --git a/system/core/Input.php b/system/core/Input.php index 88afa8c7e..88afa8c7e 100755..100644 --- a/system/core/Input.php +++ b/system/core/Input.php diff --git a/system/core/Lang.php b/system/core/Lang.php index ef5d1080c..ef5d1080c 100755..100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php diff --git a/system/core/Model.php b/system/core/Model.php index 1f142509e..1f142509e 100755..100644 --- a/system/core/Model.php +++ b/system/core/Model.php diff --git a/system/core/Output.php b/system/core/Output.php index 7959befb7..7959befb7 100755..100644 --- a/system/core/Output.php +++ b/system/core/Output.php diff --git a/system/core/Router.php b/system/core/Router.php index b48a34562..b48a34562 100755..100644 --- a/system/core/Router.php +++ b/system/core/Router.php diff --git a/system/core/Security.php b/system/core/Security.php index efa2df922..efa2df922 100755..100644 --- a/system/core/Security.php +++ b/system/core/Security.php diff --git a/system/core/URI.php b/system/core/URI.php index a2f3b23b4..3dacd6743 100755..100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -1,5 +1,10 @@ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** + * MODIFIED: + * _detect_uri(): ltrim instead of trim at the end to preserve tailing slashes + */ + +/** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer @@ -219,7 +224,7 @@ class CI_URI { $uri = parse_url($uri, PHP_URL_PATH); // Do some final cleaning of the URI and return it - return str_replace(array('//', '../'), '/', trim($uri, '/')); + return str_replace(array('//', '../'), '/', ltrim($uri, '/')); } // -------------------------------------------------------------------- @@ -651,4 +656,4 @@ class CI_URI { // END URI Class /* End of file URI.php */ -/* Location: ./system/core/URI.php */
\ No newline at end of file +/* Location: ./system/core/URI.php */ diff --git a/system/database/DB.php b/system/database/DB.php index d74738a03..d74738a03 100755..100644 --- a/system/database/DB.php +++ b/system/database/DB.php diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 85faa555d..811df97fb 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -255,7 +255,7 @@ class CI_DB_active_record extends CI_DB_driver { */ public function from($from) { - foreach ((array) $from as $val) + foreach ((array)$from as $val) { if (strpos($val, ',') !== FALSE) { @@ -1647,7 +1647,7 @@ class CI_DB_active_record extends CI_DB_driver { if (strpos($table, " ") !== FALSE) { // if the alias is written with the AS keyword, remove it - $table = preg_replace('/\s+AS\s+/i', ' ', $table); + $table = preg_replace('/ AS /i', ' ', $table); // Grab the alias $table = trim(strrchr($table, " ")); diff --git a/user_guide/changelog.html b/user_guide/changelog.html deleted file mode 100644 index ee5021dc9..000000000 --- a/user_guide/changelog.html +++ /dev/null @@ -1,1545 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<style type='text/css' media='all'>@import url('userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='userguide.css' /> - -<script type="text/javascript" src="./nav/nav.js"></script> -<script type="text/javascript" src="./nav/prototype.lite.js"></script> -<script type="text/javascript" src="./nav/moo.fx.js"></script> -<script type="text/javascript" src="./nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Change Log : CodeIgniter User Guide</title> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('./');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="./images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="./toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="index.html">User Guide Home</a> › -Change Log -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Change Log</h1> - -<h2>Version 2.2.0</h2> -<p>Release Date: June 5, 2014</p> - -<ul> - <li>General Changes - <ul> - <li><b>Security:</b> The <samp>xor_encode()</samp> method in the Encrypt Class has been removed. The Encrypt Class now requires the Mcrypt extension to be installed.</li> - <li><b>Security:</b> The <a href="libraries/sessions.html">Session Library</a> now uses HMAC authentication instead of a simple MD5 checksum.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.2.0:</h3> -<ul> - <li>Fixed an edge case (#2583) in the <a href="libraries/email.html">Email Library</a> where <a href="http://www.hardened-php.net/suhosin/">Suhosin</a> blocked messages sent via <samp>mail()</samp> due to trailing newspaces in headers.</li> - <li>Fixed a bug (#696) - make <samp>oci_execute()</samp> calls inside <samp>num_rows()</samp> non-committing, since they are only there to reset which row is next in line for oci_fetch calls and thus don't need to be committed.</li> - <li>Fixed a bug (#2689) - <a href="database/forge.html">Database Forge Class</a> methods <samp>create_table()</samp>, <samp>drop_table()</samp> and <samp>rename_table()</samp> produced broken SQL for tge 'sqlsrv' driver.</li> - <li>Fixed a bug (#2427) - PDO <a href="database/index.html">Database driver</a> didn't properly check for query failures.</li> - <li>Fixed a bug in the <a href="libraries/sessions.html">Session Library</a> where authentication was not performed for encrypted cookies.</li> -</ul> - -<h2>Version 2.1.4</h2> -<p>Release Date: July 8, 2013</p> - -<ul> - <li>General Changes - <ul> - <li>Improved security in <kbd>xss_clean()</kbd>.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.1.4:</h3> -<ul> - <li>Fixed a bug (#1936) - <a href="libraries/migration.html">Migrations Library</a> method <samp>latest()</samp> had a typo when retrieving language values.</li> - <li>Fixed a bug (#2021) - <a href="libraries/migration.html">Migrations Library</a> configuration file was mistakenly using Windows style line feeds.</li> - <li>Fixed a bug (#1273) - <a href="database/active_record.html">Active Record</a> method <samp>set_update_batch()</samp> was using the incorrect variables and would cause an error.</li> - <li>Fixed a bug (#2337) - <a href="libraries/email.html">Email Library</a> method <samp>print_debugger()</samp> was not using <samp>htmlspecialchars()</samp> when being shown in the browser.</li> -</ul> - - -<h2>Version 2.1.3</h2> -<p>Release Date: October 8, 2012</p> - -<h3>Bug fixes for 2.1.3:</h3> -<ul> - <li>Fixed a bug (#1543) - <a href="libraries/caching.html#file">File-based Caching</a> method <samp>get_metadata()</samp> used a non-existent array key to look for the TTL value.</li> - <li>Fixed a bug (#1314) - <a href="libraries/session.html">Session Library</a> method <samp>sess_destroy()</samp> didn't destroy the userdata array.</li> - <li>Fixed a bug where the <a href="libraries/profiler.html">Profiler Library</a> issued an E_WARNING error if <a href="libraries/session.html">Session</a> userdata contains objects.</li> - <li>Fixed a bug (#1699) - <a href="libraries/migration.html">Migration Library</a> ignored the <samp>$config['migration_path']</samp> setting.</li> - <li>Fixed a bug (#227) - <a href="libraries/input.html">Input Library</a> allowed unconditional spoofing of HTTP clients' IP addresses through the HTTP_CLIENT_IP header.</li> - <li>Fixed a bug (#907) - <a href="libraries/input.html">Input Library</a> ignored HTTP_X_CLUSTER_CLIENT_IP and HTTP_X_CLIENT_IP headers when checking for proxies.</li> - <li>Fixed a bug (#940) - <samp>csrf_verify()</samp> used to set the CSRF cookie while processing a POST request with no actual POST data, which resulted in validating a request that should be considered invalid.</li> - <li>Fixed a bug in the <a href="libraries/security.html">Security Library</a> where a CSRF cookie was created even if <samp>$config['csrf_protection']</samp> is set tot FALSE.</li> - <li>Fixed a bug (#1715) - <a href="libraries/input.html">Input Library</a> triggered <samp>csrf_verify()</samp> on CLI requests.</li> -</ul> - -<h2>Version 2.1.2</h2> -<p>Release Date: June 29, 2012</p> - -<ul> - <li>General Changes - <ul> - <li>Improved security in <kbd>xss_clean()</kbd>.</li> - </ul> - </li> -</ul> - -<h2>Version 2.1.1</h2> -<p>Release Date: June 12, 2012</p> - -<ul> - <li>General Changes - <ul> - <li>Fixed support for docx, xlsx files in mimes.php.</li> - </ul> - </li> - <li>Libraries - <ul> - <li>Further improved MIME type detection in the <a href="libraries/file_uploading.html">File Uploading Library</a>.</li> - <li>Added support for IPv6 to the <a href="libraries/input.html">Input Library</a>.</li> - <li>Added support for the IP format parameter to the <a href="libraries/form_validation.html">Form Validation Library</a>.</li> - </ul> - </li> - <li>Helpers - <ul> - <li><samp>url_title()</samp> performance and output improved. You can now use any string as the word delimiter. Backwards compatible with 'dash' or 'underscore' as words delimiters.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.1.1</h3> -<ul> - <li>Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.</li> - <li>Fixed a bug - form_open() compared $action against site_url() instead of base_url()</li> - <li>Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE.</li> - <li>Fixed a bug (#538) - Windows paths were ignored when using the <a href="libraries/image_lib.html">Image Manipulation Class</a> to create a new file.</li> - <li>Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found.</li> - <li>Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk.</li> - <li>Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite.</li> - <li>Fixed a bug - CI_DB_pdo_result::num_rows() was not returning properly value with SELECT queries, cause it was relying on PDOStatement::rowCount().</li> - <li>Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height.</li> -</ul> - - -<h2>Version 2.1.0</h2> -<p>Release Date: November 14, 2011</p> - -<ul> - <li>General Changes - <ul> - <li>Fixed a potential parameter injection flaw in the <a href="libraries/security.html">Security Library</a> and strengthened the XSS filter for HTML5 vulnerabilites.</li> - <li>Callback validation rules can now accept parameters like any other validation rule.</li> - <li>Added html_escape() to the <a href="general/common_functions.html">Common functions</a> to escape HTML output for preventing XSS easliy.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added <samp>increment_string()</samp> to <a href="helpers/string_helper.html">String Helper</a> to turn "foo" into "foo-1" or "foo-1" into "foo-2".</li> - <li>Altered form helper - made action on form_open_multipart helper function call optional. Fixes (#65)</li> - <li><samp>url_title()</samp> will now trim extra dashes from beginning and end.</li> - <li>Improved speed of <a href="helpers/string_helper.html">String Helper</a>'s <b>random_string()</b> method</li> - </ul> - </li> - <li>Database - <ul> - <li>Added a <a href="http://www.cubrid.org/" target="_blank">CUBRID</a> driver to the <a href="libraries/database.html">Database driver</a>. Thanks to the CUBRID team for supplying this patch.</li> - <li>Added a <a href="http://www.php.net/manual/en/intro.pdo.php" target="_blank">PDO</a> driver to the <a href="libraries/database.html">Database driver</a>.</li> - <li>Typecast limit and offset in the <a href="database/queries.html">Database driver</a> to integers to avoid possible injection.</li> - <li>Added additional option 'none' for the optional third argument for <kbd>$this->db->like()</kbd> in the <a href="database/active_record.html">Database driver</a>. - </li> - <li>Added <kbd>$this->db->insert_batch()</kbd> support to the OCI8 (Oracle) driver.</li> - </ul> - </li> - <li>Libraries - <ul> - <li>Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart library</a> to return the Row ID if a single item was inserted successfully.</li> - <li>Added support to set an optional parameter in your callback rules of validation using the <a href="libraries/form_validation.html">Form Validation library</a>.</li> - <li>Added a <a href="libraries/migration.html">Migration library</a> to assist with applying incremental updates to your database schema.</li> - <li>Driver children can be located in any package path.</li> - <li>Added <samp>is_unique</samp> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li> - <li>Added <kbd>$config['use_page_numbers']</kbd> to the <a href="libraries/pagination.html">Pagination library</a>, which enables real page numbers in the URI.</li> - <li>Added TLS and SSL Encryption for SMTP.</li> - </ul> - </li> - <li>Core - <ul> - <li>Changed private functions in <a href="libraries/cart.html">URI library</a> to protected so <kdb>MY_URI</kdb> can override them.</li> - <li>Removed <samp>CI_CORE</samp> boolean constant from CodeIgniter.php (there are no longer different Reactor and Core versions).</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.1.0</h3> -<ul> - <li>Fixed #378 Robots identified as regular browsers by the <a href="libraries/user_agent.html">User Agent class</a>.</li> - <li>If a config class was loaded first then a library with the same name is loaded, the config would be ignored.</li> - <li>Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.</li> - <li>Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.</li> - <li>Fixed a bug (#200) where MySQL queries would be malformed after calling <kbd>$this->db->count_all()</kbd> then <kdb>$this->db->get()</kdb></li> - <li>Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled</li> - <li>Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.</li> - <li>Fixed a bug (#150) - <samp>field_data()</samp> now correctly returns column length.</li> - <li>Fixed a bug (#8) - <samp>load_class()</samp> now looks for core classes in <samp>APPPATH</samp> first, allowing them to be replaced.</li> - <li>Fixed a bug (#24) - ODBC database driver called incorrect parent in __construct().</li> - <li>Fixed a bug (#85) - OCI8 (Oracle) database <kbd>escape_str()</kbd> function did not escape correct.</li> - <li>Fixed a bug (#344) - Using schema found in <a href="libraries/sessions.html">Saving Session Data to a Database</a>, system would throw error "user_data does not have a default value" when deleting then creating a session.</li> - <li>Fixed a bug (#112) - OCI8 (Oracle) driver didn't pass the configured database character set when connecting.</li> - <li>Fixed a bug (#182) - OCI8 (Oracle) driver used to re-execute the statement whenever num_rows() is called.</li> - <li>Fixed a bug (#82) - WHERE clause field names in the DB <kbd>update_string()</kbd> method were not escaped, resulting in failed queries in some cases.</li> - <li>Fixed a bug (#89) - Fix a variable type mismatch in DB <kbd>display_error()</kbd> where an array is expected, but a string could be set instead.</li> - <li>Fixed a bug (#467) - Suppress warnings generated from <kbd>get_magic_quotes_gpc()</kbd> (deprecated in PHP 5.4)</li> - <li>Fixed a bug (#484) - First time <kbd>_csrf_set_hash()</kbd> is called, hash is never set to the cookie (in Security.php).</li> - <li>Fixed a bug (#60) - Added <kbd>_file_mime_type()</kbd> method to the <a href="libraries/file_uploading.html">File Uploading Library</a> in order to fix a possible MIME-type injection (also fixes bug #394).</li> - <li>Fixed a bug (#537) - Support for all wav type in browser.</li> - <li>Fixed a bug (#576) - Using <kbd>ini_get()</kbd> function to detect if apc is enabled or not.</li> - <li>Fixed invalid date time format in <a href="helpers/date_helper.html">Date helper</a> and <a href="libraries/xmlrpc.html">XMLRPC library</a>.</li> -</ul> - -<h2>Version 2.0.3</h2> -<p>Release Date: August 20, 2011</p> - -<ul> - <li>Security - <ul> - <li>An improvement was made to the MySQL and MySQLi drivers to prevent exposing a potential vector for SQL injection on sites using multi-byte character sets in the database client connection. <p>An incompatibility in PHP versions < 5.2.3 and MySQL < 5.0.7 with <em>mysql_set_charset()</em> creates a situation where using multi-byte character sets on these environments may potentially expose a SQL injection attack vector. Latin-1, UTF-8, and other "low ASCII" character sets are unaffected on all environments.</p> <p class="critical">If you are running or considering running a multi-byte character set for your database connection, please pay close attention to the server environment you are deploying on to ensure you are not vulnerable.</p></li> - </ul> - </li> - <li>General Changes - <ul> - <li>Fixed a bug where there was a misspelling within a code comment in the index.php file.</li> - <li>Added Session Class userdata to the output profiler. Additionally, added a show/hide toggle on HTTP Headers, Session Data and Config Variables.</li> - <li>Removed internal usage of the <samp>EXT</samp> constant.</li> - <li>Visual updates to the welcome_message view file and default error templates. Thanks to <a href="https://bitbucket.org/danijelb">danijelb</a> for the pull request.</li> - <li>Added "application/x-csv" to mimes.php.</li> - <li>Fixed a bug where <a href="libraries/email.html">Email library</a> attachments with a "." in the name would using invalid MIME-types.</li> - <li>Callback validation rules can now accept parameters like any other validation rule.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added an optional third parameter to <samp>heading()</samp> which allows adding html attributes to the rendered heading tag.</li> - <li><kbd>form_open()</kbd> now only adds a hidden (Cross-site Reference Forgery) protection field when the form's action is internal and is set to the post method. (Reactor #165)</li> - <li>Re-worked <samp>plural()</samp> and <samp>singular()</samp> functions in the <a href="helpers/inflector_helper.html">Inflector helper</a> to support considerably more words.</li> - </ul> - </li> - <li>Libraries - <ul> - <li>Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.</li> - <li>Added <kbd>is_unique</kbd> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li> - <li>Added <kbd>$this->db->set_dbprefix()</kbd> to the <a href="database/queries.html">Database Driver</a>.</li> - <li>Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart Library</a> to return the Row ID if a single item was inserted successfully.</li> - <li>Added <kbd>$this->load->get_var()</kbd> to the <a href="libraries/loader.html">Loader library</a> to retrieve global vars set with <kbd>$this->load->view()</kbd> and <kbd>$this->load->vars()</kbd>.</li> - <li>Changed <kbd>$this->db->having()</kbd> to insert quotes using escape() rather than escape_str().</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.0.3</h3> -<ul> - <li>Added ENVIRONMENT to reserved constants. (Reactor #196)</li> - <li>Changed server check to ensure SCRIPT_NAME is defined. (Reactor #57)</li> - <li>Removed <samp>APPPATH.'third_party'</samp> from the packages autoloader to negate needless file stats if no packages exist or if the developer does not load any other packages by default.</li> - <li>Fixed a bug (Reactor #231) where Sessions Library database table example SQL did not contain an index on last_activity. See <a href="installation/upgrade_203.html">Upgrade Notes</a>.</li> - <li>Fixed a bug (Reactor #229) where the Sessions Library example SQL in the documentation contained incorrect SQL.</li> - <li>Fixed a bug (Core #340) where when passing in the second parameter to $this->db->select(), column names in subsequent queries would not be properly escaped.</li> - <li>Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag.</li> - <li>Fixed a bug where the method <kbd>$this->cart->total_items()</kbd> from <a href="libraries/cart.html">Cart Library</a> now returns the sum of the quantity of all items in the cart instead of your total count.</li> - <li>Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.</li> - <li>Fixed a bug where using <kbd>$this->db->select_max()</kdb>, <kbd>$this->db->select_min()</kdb>, etc could throw notices. Thanks to w43l for the patch.</li> - <li>Replace checks for STDIN with php_sapi_name() == 'cli' which on the whole is more reliable. This should get parameters in crontab working.</li> -</ul> - -<h2>Version 2.0.2</h2> -<p>Release Date: April 7, 2011<br /> -Hg Tag: v2.0.2</p> - -<ul> - <li>General changes - <ul> - <li>The <a href="./libraries/security.html">Security library</a> was moved to the core and is now loaded automatically. Please remove your loading calls.</li> - <li>The CI_SHA class is now deprecated. All supported versions of PHP provide a <kbd>sha1()</kbd> function.</li> - <li><kbd>constants.php</kbd> will now be loaded from the environment folder if available.</li> - <li>Added language key error logging</li> - <li>Made Environment Support optional. Comment out or delete the constant to stop environment checks.</li> - <li>Added Environment Support for Hooks.</li> - <li>Added CI_ Prefix to the <a href="libraries/caching.html">Cache driver</a>.</li> - <li>Added <a href="./general/cli.html">CLI usage</a> documentation.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Removed the previously deprecated <kbd>dohash()</kbd> from the <a href="./helpers/security_helper.html">Security helper</a>; use <kbd>do_hash()</kbd> instead.</li> - <li>Changed the 'plural' function so that it doesn't ruin the captalization of your string. It also take into consideration acronyms which are all caps.</li> - </ul> - </li> - <li>Database - <ul> - <li><kbd>$this->db->count_all_results()</kbd> will now return an integer instead of a string.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.0.2</h3> -<ul> - <li>Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.</li> - <li>Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.</li> - <li>Fixed various bugs with User Guide.</li> - <li>Added is_cli_request() method to documentation for <a href="libraries/input.html">Input class</a>.</li> - <li>Added form_validation_lang entries for <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd>.</li> - <li><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/153/escape-str-bug-in-mssql-driver">Fixed issue #153</a> Escape Str Bug in MSSQL driver.</li> - <li><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/172/bug-in-chrome-and-form_open-in-201">Fixed issue #172</a> Google Chrome 11 posts incorrectly when action is empty.</li> - -</ul> - -<h2>Version 2.0.1</h2> -<p>Release Date: March 15, 2011<br /> -Hg Tag: v2.0.1</p> - -<ul> - <li>General changes - <ul> - <li>Added <kbd>$config['cookie_secure']</kbd> to the config file to allow requiring a secure (HTTPS) in order to set cookies.</li> - <li>Added the constant <kbd>CI_CORE</kbd> to help differentiate between Core: TRUE and Reactor: FALSE.</li> - <li>Added an <kbd>ENVIRONMENT</kbd> constant in index.php, which affects PHP error reporting settings, and optionally, - which configuration files are loaded (see below). Read more on the <a href="general/environments.html">Handling Environments</a> page.</li> - <li>Added support for <a href="libraries/config.html#environments">environment-specific</a> configuration files.</li> - </ul> - </li> - <li>Libraries - <ul> - <li>Added <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd> rules to the <a href="libraries/form_validation.html">Form validation Class</a>.</li> - <li><a href="libraries/input.html">Input Class</a> methods <kbd>post()</kbd> and <kbd>get()</kbd> will now return a full array if the first argument is not provided.</li> - <li>Secure cookies can now be made with the <kbd>set_cookie()</kbd> helper and <a href="libraries/input.html">Input Class</a> method.</li> - <li>Added <kbd>set_content_type()</kbd> to <a href="libraries/output.html">Output Class</a> to set the output <kbd>Content-Type</kbd> HTTP header based on a MIME Type or a config/mimes.php array key.</li> - <li><a href="libraries/output.html">Output Class</a> will now support method chaining.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Changed the logic for <kbd>form_open()</kbd> in <a href="helpers/form_helper.html">Form helper</a>. If no value is passed it will submit to the current URL.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.0.1</h3> -<ul> - <li>CLI requests can now be run from any folder, not just when CD'ed next to index.php.</li> - <li>Fixed issue #41: Added audio/mp3 mime type to mp3.</li> - <li>Fixed a bug (Core #329) where the file caching driver referenced the incorrect cache directory.</li> - <li>Fixed a bug (Reactor #69) where the SHA1 library was named incorrectly.</li> -</ul> - -<h2>Version 2.0.0</h2> -<p>Release Date: January 28, 2011<br /> -Hg Tag: v2.0.0</p> - -<ul> - <li>General changes - <ul> - <li>PHP 4 support is removed. CodeIgniter now requires PHP 5.1.6.</li> - <li>Scaffolding, having been deprecated for a number of versions, has been removed.</li> - <li>Plugins have been removed, in favor of Helpers. The CAPTCHA plugin has been converted to a Helper and <a href="./helpers/captcha_helper.html">documented</a>. The JavaScript calendar plugin was removed due to the ready availability of great JavaScript calendars, particularly with jQuery.</li> - <li>Added new special Library type: <a href="./general/drivers.html">Drivers</a>.</li> - <li>Added full query-string support. See the config file for details.</li> - <li>Moved the application folder outside of the system folder.</li> - <li>Moved system/cache and system/logs directories to the application directory.</li> - <li>Added routing overrides to the main index.php file, enabling the normal routing to be overridden on a per "index" file basis.</li> - <li>Added the ability to set config values (or override config values) directly from data set in the main index.php file. This allows a single application to be used with multiple front controllers, each having its own config values.</li> - <li>Added <kbd>$config['directory_trigger']</kbd> to the config file so that a controller sub-directory can be specified when running _GET strings instead of URI segments.</li> - <li>Added ability to set "Package" paths - specific paths where the Loader and Config classes should try to look first for a requested file. This allows distribution of sub-applications with their own libraries, models, config files, etc. in a single "package" directory. See the <a href="libraries/loader.html">Loader class</a> documentation for more details.</li> - <li>In-development code is now hosted at <a href="http://bitbucket.org/ellislab/codeigniter-reactor/">BitBucket</a>.</li> - <li>Removed the deprecated Validation Class.</li> - <li>Added CI_ Prefix to all core classes.</li> - <li>Package paths can now be set in application/config/autoload.php.</li> - <li><a href="libraries/file_uploading.html">Upload library</a> file_name can now be set without an extension, the extension will be taken from the uploaded file instead of the given name.</li> - <li>In <a href="database/forge.html">Database Forge</a> the name can be omitted from $this->dbforge->modify_column()'s 2nd param if you aren't changing the name.</li> - <li><kbd>$config['base_url']</kbd> is now empty by default and will guess what it should be.</li> - <li>Enabled full Command Line Interface compatibility with <kbd>config['uri_protocol'] = 'CLI';</kbd>.</li> - </ul> - <li>Libraries - <ul> - <li>Added a <a href="libraries/caching.html">Cache driver</a> with APC, memcached, and file-based support.</li> - <li>Added <var>$prefix</var>, <var>$suffix</var> and <var>$first_url</var> properties to <a href="./libraries/pagination.html">Pagination library</a>.</li> - <li>Added the ability to suppress first, previous, next, last, and page links by setting their values to FALSE in the <a href="./libraries/pagination.html">Pagination library</a>.</li> - <li>Added <a href="./libraries/security.html">Security library</a>, which now contains the <dfn>xss_clean</dfn> function, <dfn>filename_security</dfn> function and other security related functions.</li> - <li>Added CSRF (Cross-site Reference Forgery) protection to the <a href="./libraries/security.html">Security library</a>.</li> - <li>Added <var>$parse_exec_vars</var> property to Output library.</li> - <li>Added ability to enable / disable individual sections of the <a href="general/profiling.html">Profiler</a></li> - <li>Added a wildcard option <kbd>$config['allowed_types'] = '*'</kbd> to the <a href="./libraries/file_uploading.html">File Uploading Class</a>.</li> - <li>Added an 'object' config variable to the XML-RPC Server library so that one can specify the object to look for requested methods, instead of assuming it is in the $CI superobject.</li> - <li>Added "is_object" into the list of unit tests capable of being run.</li> - <li>Table library will generate an empty cell with a blank string, or NULL value.</li> - <li>Added ability to set tag attributes for individual cells in the Table library</li> - <li>Added a <kbd>parse_string()</kbd> method to the <a href="libraries/parser.html">Parser Class</a>.</li> - <li>Added HTTP headers and Config information to the <a href="general/profiling.html">Profiler</a> output.</li> - <li>Added Chrome and Flock to the list of detectable browsers by <kbd>browser()</kbd> in the <a href="libraries/user_agent.html">User Agent Class</a>.</li> - <li>The <a href="libraries/unit_testing.html">Unit Test Class</a> now has an optional "notes" field available to it, and allows for discrete display of test result items using <kbd>$this->unit->set_test_items()</kbd>.</li> - <li>Added a <kbd>$xss_clean</kbd> class variable to the XMLRPC library, enabling control over the use of the Security library's <kbd>xss_clean()</kbd> method.</li> - <li>Added a <kbd>download()</kbd> method to the <a href="libraries/ftp.html">FTP library</a></li> - <li>Changed <kbd>do_xss_clean()</kbd> to return FALSE if the uploaded file fails XSS checks.</li> - <li>Added stripslashes() and trim()ing of double quotes from $_FILES type value to standardize input in Upload library.</li> - <li>Added a second parameter (boolean) to <kbd>$this->zip->read_dir('/path/to/directory', FALSE)</kbd> to remove the preceding trail of empty folders when creating a Zip archive. This example would contain a zip with "directory" and all of its contents.</li> - <li>Added ability in the Image Library to handle PNG transparency for resize operations when using the GD lib.</li> - <li>Modified the Session class to prevent use if no encryption key is set in the config file.</li> - <li>Added a new config item to the Session class <kbd>sess_expire_on_close</kbd> to allow sessions to auto-expire when the browser window is closed.</li> - <li>Improved performance of the Encryption library on servers where Mcrypt is available.</li> - <li>Changed the default encryption mode in the Encryption library to CBC.</li> - <li>Added an <kbd>encode_from_legacy()</kbd> method to provide a way to transition encrypted data from CodeIgniter 1.x to CodeIgniter 2.x. - Please see the <a href="./installation/upgrade_200.html">upgrade instructions</a> for details.</li> - <li>Altered Form_Validation library to allow for method chaining on <kbd>set_rules()</kbd>, <kbd>set_message()</kbd> and <kbd>set_error_delimiters()</kbd> functions.</li> - <li>Altered Email Library to allow for method chaining.</li> - <li>Added <kbd>request_headers()</kbd>, <kbd>get_request_header()</kbd> and <kbd>is_ajax_request()</kbd> to the input class.</li> - <li>Altered <a href="libraries/user_agent.html">User agent library</a> so that <kbd>is_browser()</kbd>, <kbd>is_mobile()</kbd> and <kbd>is_robot()</kbd> can optionally check for a specific browser or mobile device.</li> - <li>Altered <a href="libraries/input.html">Input library</a> so that <kbd>post()</kbd> and <kbd>get()</kbd> will return all POST and GET items (respectively) if there are no parameters passed in.</li> - </ul> - </li> - <li>Database - <ul> - <li><a href="./database/configuration.html">database configuration</a>.</li> - <li>Added <kbd>autoinit</kbd> value to <a href="./database/configuration.html">database configuration</a>.</li> - <li>Added <kbd>stricton</kbd> value to <a href="./database/configuration.html">database configuration</a>.</li> - <li>Added <kbd>database_exists()</kbd> to the <a href="database/utilities.html">Database Utilities Class</a>.</li> - <li>Semantic change to db->version() function to allow a list of exceptions for databases with functions to return version string instead of specially formed SQL queries. Currently this list only includes Oracle and SQLite.</li> - <li>Fixed a bug where driver specific table identifier protection could lead to malformed queries in the <kbd>field_data()</kbd> functions.</li> - <li>Fixed a bug where an undefined class variable was referenced in database drivers.</li> - <li>Modified the database errors to show the filename and line number of the problematic query.</li> - <li>Removed the following deprecated functions: orwhere, orlike, groupby, orhaving, orderby, getwhere.</li> - <li>Removed deprecated _drop_database() and _create_database() functions from the db utility drivers.</li> - <li>Improved dbforge create_table() function for the Postgres driver.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added <kbd>convert_accented_characters()</kbd> function to <a href="./helpers/text_helper.html">text helper</a>.</li> - <li>Added accept-charset to the list of inserted attributes of <kbd>form_open()</kbd> in the <a href="helpers/form_helper.html">Form Helper</a>.</li> - <li>Deprecated the <kbd>dohash()</kbd> function in favour of <kbd>do_hash()</kbd> for naming consistency.</li> - <li>Non-backwards compatible change made to <kbd>get_dir_file_info()</kbd> in the <a href="helpers/file_helper.html">File Helper</a>. No longer recurses - by default so as to encourage responsible use (this function can cause server performance issues when used without caution).</li> - <li>Modified the second parameter of <kbd>directory_map()</kbd> in the <a href="helpers/directory_helper.html">Directory Helper</a> to accept an integer to specify recursion depth.</li> - <li>Modified <kbd>delete_files()</kbd> in the <a href="helpers/file_helper.html">File Helper</a> to return FALSE on failure.</li> - <li>Added an optional second parameter to <kbd>byte_format()</kbd> in the <a href="helpers/number_helper.html">Number Helper</a> to allow for decimal precision.</li> - <li>Added alpha, and sha1 string types to <kbd>random_string()</kbd> in the <a href="helpers/string_helper.html">String Helper</a>.</li> - <li>Modified <kbd>prep_url()</kbd> so as to not prepend http:// if the supplied string already has a scheme.</li> - <li>Modified <kbd>get_file_info</kbd> in the file helper, changing filectime() to filemtime() for dates.</li> - <li>Modified <kbd>smiley_js()</kbd> to add optional third parameter to return only the javascript with no script tags.</li> - <li>The <kbd>img()</kbd> function of the <a href="./helpers/html_helper.html">HTML helper</a> will now generate an empty string as an alt attribute if one is not provided.</li> - <li>If CSRF is enabled in the application config file, <kbd>form_open()</kbd> will automatically insert it as a hidden field.</li> - <li>Added <kbd>sanitize_filename()</kbd> into the <a href="./helpers/security_helper.html">Security helper</a>.</li> - <li>Added <kbd>ellipsize()</kbd> to the <a href="./helpers/text_helper.html">Text Helper</a></li> - <li>Added <kbd>elements()</kbd> to the <a href="./helpers/array_helper.html">Array Helper</a></li> - </ul> - </li> - <li>Other Changes - <ul> - <li>Added an optional second parameter to <kbd>show_404()</kbd> to disable logging.</li> - <li>Updated loader to automatically apply the sub-class prefix as an option when loading classes. Class names can be prefixed with the standard "CI_" or the same prefix as the subclass prefix, or no prefix at all.</li> - <li>Increased randomness with <kbd>is_really_writable()</kbd> to avoid file collisions when hundreds or thousands of requests occur at once.</li> - <li>Switched some DIR_WRITE_MODE constant uses to FILE_WRITE_MODE where files and not directories are being operated on.</li> - <li><kbd>get_mime_by_extension()</kbd> is now case insensitive.</li> - <li>Added "default" to the list <a href="general/reserved_names.html">Reserved Names</a>.</li> - <li>Added 'application/x-msdownload' for .exe files and ''application/x-gzip-compressed' for .tgz files to config/mimes.php.</li> - <li>Updated the output library to no longer compress output or send content-length headers if the server runs with zlib.output_compression enabled.</li> - <li>Eliminated a call to is_really_writable() on each request unless it is really needed (Output caching)</li> - <li>Documented <kbd>append_output()</kbd> in the <a href="libraries/output.html">Output Class</a>.</li> - <li>Documented a second argument in the <kbd>decode()</kbd> function for the <a href="libraries/encryption.html">Encryption Class</a>.</li> - <li>Documented db->close().</li> - <li>Updated the router to support a default route with any number of segments.</li> - <li>Moved _remove_invisible_characters() function from the <a href="libraries/security.html">Security Library</a> to <a href="general/common_functions.html">common functions.</a></li> - <li>Added audio/mpeg3 as a valid mime type for MP3.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 2.0.0</h3> -<ul> - <li>Fixed a bug where you could not change the User-Agent when sending email.</li> - <li>Fixed a bug where the Output class would send incorrect cached output for controllers implementing their own <dfn>_output()</dfn> method.</li> - <li>Fixed a bug where a failed query would not have a saved query execution time causing errors in the Profiler</li> - <li>Fixed a bug that was writing log entries when multiple identical helpers and plugins were loaded.</li> - <li>Fixed assorted user guide typos or examples (#10693, #8951, #7825, #8660, #7883, #6771, #10656).</li> - <li>Fixed a language key in the profiler: "profiler_no_memory_usage" to "profiler_no_memory".</li> - <li>Fixed an error in the Zip library that didn't allow downloading on PHP 4 servers.</li> - <li>Fixed a bug in the Form Validation library where fields passed as rule parameters were not being translated (#9132)</li> - <li>Modified inflector helper to properly pluralize words that end in 'ch' or 'sh'</li> - <li>Fixed a bug in xss_clean() that was not allowing hyphens in query strings of submitted URLs.</li> - <li>Fixed bugs in get_dir_file_info() and get_file_info() in the File Helper with recursion, and file paths on Windows.</li> - <li>Fixed a bug where Active Record override parameter would not let you disable Active Record if it was enabled in your database config file.</li> - <li>Fixed a bug in reduce_double_slashes() in the String Helper to properly remove duplicate leading slashes (#7585)</li> - <li>Fixed a bug in values_parsing() of the XML-RPC library which prevented NULL variables typed as 'string' from being handled properly.</li> - <li>Fixed a bug were form_open_multipart() didn't accept string attribute arguments (#10930).</li> - <li>Fixed a bug (#10470) where <kdb>get_mime_by_extension()</kbd> was case sensitive.</li> - <li>Fixed a bug where some error messages for the SQLite and Oracle drivers would not display.</li> - <li>Fixed a bug where files created with the Zip Library would result in file creation dates of 1980.</li> - <li>Fixed a bug in the Session library that would result in PHP error when attempting to store values with objects.</li> - <li>Fixed a bug where extending the Controller class would result in a fatal PHP error.</li> - <li>Fixed a PHP Strict Standards Error in the index.php file.</li> - <li>Fixed a bug where getimagesize() was being needlessly checked on non-image files in is_allowed_type().</li> - <li>Fixed a bug in the Encryption library where an empty key was not triggering an error.</li> - <li>Fixed a bug in the Email library where CC and BCC recipients were not reset when using the clear() method (#109).</li> - <li>Fixed a bug in the URL Helper where prep_url() could cause a PHP error on PHP versions < 5.1.2.</li> - <li>Added a log message in core/output if the cache directory config value was not found.</li> - <li>Fixed a bug where multiple libraries could not be loaded by passing an array to load->library()</li> - <li>Fixed a bug in the html helper where too much white space was rendered between the src and alt tags in the img() function.</li> - <li>Fixed a bug in the profilers _compile_queries() function.</li> - <li>Fixed a bug in the date helper where the DATE_ISO8601 variable was returning an incorrectly formatted date string.</li> -</ul> - -<h2>Version 1.7.2</h2> -<p>Release Date: September 11, 2009<br /> -Hg Tag: v1.7.2</p> - -<ul> - <li>Libraries - <ul> - <li>Added a new <a href="libraries/cart.html">Cart Class</a>.</li> - <li>Added the ability to pass $config['file_name'] for the <a href="libraries/file_uploading.html">File Uploading Class</a> and rename the uploaded file.</li> - <li>Changed order of listed user-agents so Safari would more accurately report itself. (#6844)</li> - </ul> - </li> - <li>Database - <ul> - <li>Switched from using gettype() in escape() to is_* methods, since future PHP versions might change its output.</li> - <li>Updated all database drivers to handle arrays in escape_str()</li> - <li>Added escape_like_str() method for escaping strings to be used in LIKE conditions</li> - <li>Updated Active Record to utilize the new LIKE escaping mechanism.</li> - <li>Added reconnect() method to DB drivers to try to keep alive / reestablish a connection after a long idle.</li> - <li>Modified MSSQL driver to use mssql_get_last_message() for error messages.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added <kbd>form_multiselect()</kbd> to the <a href="helpers/form_helper.html">Form helper</a>.</li> - <li>Modified <kbd>form_hidden()</kbd> in the <a href="helpers/form_helper.html">Form helper</a> to accept multi-dimensional arrays.</li> - <li>Modified <kbd>form_prep()</kbd> in the <a href="helpers/form_helper.html">Form helper</a> to keep track of prepped fields to avoid multiple prep/mutation from subsequent calls which can occur when using Form Validation - and form helper functions to output form fields.</li> - <li>Modified <kbd>directory_map()</kbd> in the <a href="helpers/directory_helper.html">Directory helper</a> to allow the inclusion of hidden files, and to return FALSE on failure to read directory.</li> - <li>Modified the <a href="helpers/smiley_helper.html">Smiley helper</a> to work with multiple fields and insert the smiley at the last known cursor position.</li> - </ul> - </li> - <li>General - <ul> - <li>Compatible with PHP 5.3.0</li> - <li>Modified <a href="general/errors.html">show_error()</a> to allow sending of HTTP server response codes.</li> - <li>Modified <a href="general/errors.html">show_404()</a> to send 404 status code, removing non-CGI compatible header() statement from error_404.php template.</li> - <li>Added set_status_header() to the <a href="general/common_functions.html">Common functions<a> to allow use when the Output class is unavailable.</li> - <li>Added is_php() to <a href="general/common_functions.html">Common functions</a> to facilitate PHP version comparisons.</p> - <li>Added 2 CodeIgniter "cheatsheets" (thanks to DesignFellow.com for this contribution).</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 1.7.2</h3> -<ul> - <li>Fixed assorted user guide typos or examples (#6743, #7214, #7516, #7287, #7852, #8224, #8324, #8349).</li> - <li>Fixed a bug in the Form Validation library where multiple callbacks weren't working (#6110)</li> - <li>doctype helper default value was missing a "1".</li> - <li>Fixed a bug in the language class when outputting an error for an unfound file.</li> - <li>Fixed a bug in the Calendar library where the shortname was output for "May".</li> - <li>Fixed a bug with ORIG_PATH_INFO that was allowing URIs of just a slash through.</li> - <li>Fixed a fatal error in the Oracle and ODBC drivers (#6752)</li> - <li>Fixed a bug where xml_from_result() was checking for a nonexistent method.</li> - <li>Fixed a bug where Database Forge's add_column and modify_column were not looping through when sent multiple fields.</li> - <li>Fixed a bug where the File Helper was using '/' instead of the DIRECTORY_SEPARATOR constant.</li> - <li>Fixed a bug to prevent PHP errors when attempting to use sendmail on servers that have manually disabled the PHP popen() function.</li> - <li>Fixed a bug that would cause PHP errors in XML-RPC data if the PHP data type did not match the specified XML-RPC type.</li> - <li>Fixed a bug in the XML-RPC class with parsing dateTime.iso8601 data types.</li> - <li>Fixed a case sensitive string replacement in xss_clean()</li> - <li>Fixed a bug in form_textarea() where form data was not prepped correctly.</li> - <li>Fixed a bug in form_prep() causing it to not preserve entities in the user's original input when called back into a form element</li> - <li>Fixed a bug in _protect_identifiers() where the swap prefix ($swap_pre) was not being observed.</li> - <li>Fixed a bug where the 400 status header sent with the 'disallowed URI characters' was not compatible with CGI environments.</li> - <li>Fixed a bug in the typography class where heading tags could have paragraph tags inserted when using auto_typography().</li> -</ul> - -<h2>Version 1.7.1</h2> -<p>Release Date: February 10, 2009<br /> -Hg Tag: 1.7.1</p> - -<ul> - <li>Libraries - <ul> - <li>Fixed an arbitrary script execution security flaw (#6068) in the Form Validation library (thanks to hkk)</li> - <li>Changed default current page indicator in the Pagination library to use <strong> instead of <b></li> - <li>A "HTTP/1.1 400 Bad Request" header is now sent when disallowed characters are encountered.</li> - <li>Added <big>, <small>, <q>, and <tt> to the Typography parser's inline elements.</li> - <li>Added more accurate error reporting for the Email library when using sendmail.</li> - <li>Removed a strict type check from the <kbd>rotate()</kbd> function of the <a href="libraries/image_lib.html">Image Manipulation Class</a>.</li> - <li>Added enhanced error checking in file saving in the Image library when using the GD lib.</li> - <li>Added an additional newline between multipart email headers and the MIME message text for better compatibility with a variety of MUAs.</li> - <li>Made modest improvements to efficiency and accuracy of explode_name() in the Image lib.</li> - </ul> - </li> - <li>Database - <ul> - <li>Added where_in to the list of expected arguments received by <kbd>delete()</kbd>.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added the ability to have optgroups in <kbd>form_dropdown()</kbd> within the <a href="helpers/form_helper.html">form helper</a>.</li> - <li>Added a doctype() function to the <a href="helpers/html_helper.html">HTML helper</a>.</li> - <li>Added ability to force lowercase for <kbd>url_title()</kbd> in the <a href="helpers/url_helper.html">URL helper</a>.</li> - <li>Changed the default "type" of <kbd>form_button()</kbd> to "button" from "submit" in the <a href="helpers/form_helper.html">form helper</a>.</li> - <li>Changed redirect() in the URL helper to allow redirections to URLs outside of the CI site.</li> - <li>Updated get_cookie() to try to fetch the cookie using the global cookie prefix if the requested cookie name doesn't exist.</li> - </ul> - </li> - <li>Other Changes - <ul> - <li>Improved security in <kbd>xss_clean()</kbd> to help prevent attacks targeting Internet Explorer.</li> - <li>Added 'application/msexcel' to config/mimes.php for .xls files.</li> - <li>Added 'proxy_ips' config item to whitelist reverse proxy servers from which to trust the HTTP_X_FORWARDED_FOR header to - to determine the visitor's IP address.</li> - <li>Improved accuracy of Upload::is_allowed_filetype() for images (#6715)</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 1.7.1</h3> -<ul> - <li>Database - <ul> - <li>Fixed a bug when doing 'random' on order_by() (#5706).</li> - <li>Fixed a bug where adding a primary key through Forge could fail (#5731).</li> - <li>Fixed a bug when using DB cache on multiple databases (#5737).</li> - <li>Fixed a bug where TRUNCATE was not considered a "write" query (#6619).</li> - <li>Fixed a bug where csv_from_result() was checking for a nonexistent method.</li> - <li>Fixed a bug _protect_identifiers() where it was improperly removing all pipe symbols from items</li> - </ul> - </li> - <li>Fixed assorted user guide typos or examples (#5998, #6093, #6259, #6339, #6432, #6521).</li> - <li>Fixed a bug in the MySQLi driver when no port is specified</li> - <li>Fixed a bug (#5702), in which the field label was not being fetched properly, when "matching" one field to another.</li> - <li>Fixed a bug in which identifers were not being escaped properly when reserved characters were used.</li> - <li>Fixed a bug with the regular expression used to protect submitted paragraph tags in auto typography.</li> - <li>Fixed a bug where double dashes within tag attributes were being converted to em dash entities.</li> - <li>Fixed a bug where double spaces within tag attributes were being converted to non-breaking space entities.</li> - <li>Fixed some accuracy issues with curly quotes in Typography::format_characters()</li> - <li>Changed a few docblock comments to reflect actual return values.</li> - <li>Fixed a bug with high ascii characters in subject and from email headers.</li> - <li>Fixed a bug in xss_clean() where whitespace following a validated character entity would not be preserved.</li> - <li>Fixed a bug where HTML comments and <pre> tags were being parsed in Typography::auto_typography().</li> - <li>Fixed a bug with non-breaking space cleanup in Typography::auto_typography().</li> - <li>Fixed a bug in database escaping where a compound statement (ie: SUM()) wasn't handled correctly with database prefixes.</li> - <li>Fixed a bug when an opening quote is preceded by a paragraph tag and immediately followed by another tag.</li> - <li>Fixed a bug in the Text Helper affecting some locales where word_censor() would not work on words beginning or ending with an accented character.</li> - <li>Fixed a bug in the Text Helper character limiter where the provided limit intersects the last word of the string.</li> - <li>Fixed a bug (#6342) with plural() in the Inflection helper with words ending in "y".</li> - <li>Fixed bug (#6517) where Routed URI segments returned by URI::rsegment() method were incorrect for the default controller.</li> - <li>Fixed a bug (#6706) in the Security Helper where xss_clean() was using a deprecated second argument.</li> - <li>Fixed a bug in the URL helper url_title() function where trailing periods were allowed at the end of a URL.</li> - <li>Fixed a bug (#6669) in the Email class when CRLF's are used for the newline character with headers when used with the "mail" protocol.</li> - <li>Fixed a bug (#6500) where URI::A_filter_uri() was exit()ing an error instead of using show_error().</li> - <li>Fixed a bug (#6592) in the File Helper where get_dir_file_info() where recursion was not occurring properly.</li> - <li>Tweaked Typography::auto_typography() for some edge-cases.</li> -</ul> - - -<h2>Version 1.7</h2> -<p>Release Date: October 23, 2008<br /> -Hg Tag: 1.7.0</p> - -<ul> - <li>Libraries - <ul> - <li>Added a new <a href="libraries/form_validation.html">Form Validation Class</a>. It simplifies setting rules and field names, supports arrays as field names, allows groups of validation rules to be saved in a config file, and adds some helper functions for use in view files. <strong>Please note that the old Validation class is now deprecated</strong>. We will leave it in the library folder for some time so that existing applications that use it will not break, but you are encouraged to migrate to the new version.</li> - <li>Updated the <a href="libraries/sessions.html">Sessions class</a> so that any custom data being saved gets stored to a database rather than the session cookie (assuming you are using a database to store session data), permitting much more data to be saved.</li> - <li>Added the ability to store libraries in subdirectories within either the main "libraries" or the local application "libraries" folder. Please see the <a href="libraries/loader.html">Loader class</a> for more info.</li> - <li>Added the ability to assign library objects to your own variable names when you use <kbd>$this->load->library()</kbd>. Please see the <a href="libraries/loader.html">Loader class</a> for more info.</li> - <li>Added controller class/method info to <a href="general/profiling.html">Profiler class</a> and support for multiple database connections.</li> - <li>Improved the "auto typography" feature and moved it out of the helper into its own <a href="libraries/typography.html">Typography Class</a>.</li> - <li>Improved performance and accuracy of <kbd>xss_clean()</kbd>, including reduction of false positives on image/file tests.</li> - <li>Improved <a href="./libraries/parser.html">Parser class</a> to allow multiple calls to the parse() function. The output of each is appended in the output.</li> - <li>Added <dfn>max_filename</dfn> option to set a file name length limit in the <a href="libraries/file_uploading.html">File Upload Class</a>.</li> - <li>Added <dfn>set_status_header()</dfn> function to <a href="libraries/output.html">Output class</a>.</li> - <li>Modified <a href="libraries/pagination.html">Pagination</a> class to only output the "First" link when the link for page one would not be shown.</li> - <li>Added support for mb_strlen in the <a href="libraries/form_validation.html">Form Validation</a> class so that multi-byte languages will calculate string lengths properly.</li> - </ul> - </li> - <li>Database - <ul> - <li>Improved Active Record class to allow full path column and table names: hostname.database.table.column. Also improved the alias handling.</li> - <li>Improved how table and column names are escaped and prefixed. It now honors full path names when adding prefixes and escaping.</li> - <li>Added Active Record caching feature to "update" and "delete" functions.</li> - <li>Added removal of non-printing control characters in <kbd>escape_str()</kbd> of DB drivers that do not have native PHP escaping mechanisms (mssql, oci8, odbc), to avoid potential SQL errors, and possible sources of SQL injection.</li> - <li>Added port support to MySQL, MySQLi, and MS SQL database drivers.</li> - <li>Added driver name variable in each DB driver, based on bug report #4436.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added several new "setting" functions to the <a href="helpers/form_helper.html">Form helper</a> that allow POST data to be retrieved and set into forms. These are intended to be used on their own, or with the new <a href="libraries/form_validation.html">Form Validation Class</a>.</li> - <li>Added <kbd>current_url()</kbd> and uri_segments() to <a href="helpers/url_helper.html">URL helper</a>.</li> - <li>Altered <kbd>auto_link()</kbd> in the <a href="helpers/url_helper.html">URL helper</a> so that email addresses with "+" included will be linked.</li> - <li>Added <kbd>meta()</kbd> function to <a href="helpers/html_helper.html">HTML helper</a>.</li> - <li>Improved accuracy of calculations in <a href="helpers/number_helper.html">Number helper</a>.</li> - <li>Removed added newlines ("\n") from most form and html helper functions.</li> - <li>Tightened up validation in the <a href="helpers/date_helper.html">Date helper</a> function <kbd>human_to_unix()</kbd>, and eliminated the POSIX regex.</li> - <li>Updated <a href="helpers/date_helper.html">Date helper</a> to match the world's current time zones and offsets.</li> - <li>Modified url_title() in the <a href="helpers/url_helper.html">URL helper</a> to remove characters and digits that are part of - character entities, to allow dashes, underscores, and periods regardless of the $separator, and to allow uppercase characters.</li> - <li>Added support for arbitrary attributes in anchor_popup() of the <a href="helpers/url_helper.html">URL helper</a>.</li> - </ul> - </li> - <li>Other Changes - <ul> - <li>Added <a href="./general/styleguide.html">PHP Style Guide</a> to docs.</li> - <li>Added sanitization in <kbd>xss_clean()</kbd> for a deprecated HTML tag that could be abused in user input in Internet Explorer.</li> - <li>Added a few openxml document mime types, and an additional mobile agent to mimes.php and user_agents.php respectively.</li> - <li>Added a file lock check during caching, before trying to write to the file.</li> - <li>Modified Cookie key cleaning to unset a few troublesome key names that can be present in certain environments, preventing CI from halting execution.</li> - <li>Changed the output of the profiler to use style attribute rather than clear, and added the id "codeigniter_profiler" to the container div.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for 1.7.0</h3> -<ul> - <li>Fixed bug in <kbd>xss_clean()</kbd> that could remove some desirable tag attributes.</li> - <li>Fixed assorted user guide typos or examples (#4807, #4812, #4840, #4862, #4864, #4899, #4930, #5006, #5071, #5158, #5229, #5254, #5351).</li> - <li>Fixed an edit from 1.6.3 that made the $robots array in user_agents.php go poof.</li> - <li>Fixed a bug in the <a href="libraries/email.html">Email library</a> with quoted-printable encoding improperly encoding space and tab characters.</li> - <li>Modified XSS sanitization to no longer add semicolons after &[single letter], such as in M&M's, B&B, etc.</li> - <li>Modified XSS sanitization to no longer strip XHTML image tags of closing slashes.</li> - <li>Fixed a bug in the Session class when database sessions are used where upon session update all userdata would be errantly written to the session cookie.</li> - <li>Fixed a bug (#4536) in backups with the MySQL driver where some legacy code was causing certain characters to be double escaped.</li> - <li>Fixed a routing bug (#4661) that occurred when the default route pointed to a subfolder.</li> - <li>Fixed the spelling of "Dhaka" in the <kbd>timezone_menu()</kbd> function of the <a href="helpers/date_helper.html">Date helper.</a></li> - <li>Fixed the spelling of "raspberry" in config/smileys.php.</li> - <li>Fixed incorrect parenthesis in <kbd>form_open()</kbd> function (#5135).</li> - <li>Fixed a bug that was ignoring case when comparing controller methods (#4560).</li> - <li>Fixed a bug (#4615) that was not setting SMTP authorization settings when using the initialize function.</li> - <li>Fixed a bug in <kbd>highlight_code()</kbd> in the <a href="helpers/text_helper.html">Text helper</a> that would leave a stray </span> in certain cases.</li> - <li>Fixed Oracle bug (#3306) that was preventing multiple queries in one action.</li> - <li>Fixed ODBC bug that was ignoring connection params due to its use of a constructor.</li> - <li>Fixed a DB driver bug with num_rows() that would cause an error with the Oracle driver.</li> - <li>Fixed MS SQL bug (#4915). Added brackets around database name in MS SQL driver when selecting the database, in the event that reserved characters are used in the name.</li> - <li>Fixed a DB caching bug (4718) in which the path was incorrect when no URI segments were present.</li> - <li>Fixed Image_lib class bug #4562. A path was not defined for NetPBM.</li> - <li>Fixed Image_lib class bug #4532. When cropping an image with identical height/width settings on output, a copy is made.</li> - <li>Fixed DB_driver bug (4900), in which a database error was not being logged correctly.</li> - <li>Fixed DB backup bug in which field names were not being escaped.</li> - <li>Fixed a DB Active Record caching bug in which multiple calls to cached data were not being honored.</li> - <li>Fixed a bug in the Session class that was disallowing slashes in the serialized array.</li> - <li>Fixed a Form Validation bug in which the "isset" error message was being trigged by the "required" rule.</li> - <li>Fixed a spelling error in a Loader error message.</li> - <li>Fixed a bug (5050) with IP validation with empty segments.</li> - <li>Fixed a bug in which the parser was being greedy if multiple identical sets of tags were encountered.</li> -</ul> - -<h2>Version 1.6.3</h2> -<p>Release Date: June 26, 2008<br /> -Hg Tag: v1.6.3</p> - -<p>Version 1.6.3 is a security and maintenance release and is recommended for all users.</p> -<ul> - <li>Database - <ul> - <li>Modified MySQL/MySQLi Forge class to give explicit names to keys</li> - <li>Added ability to set multiple column non-primary keys to the <a href="database/forge.html">Forge class</a></li> - <li>Added ability to set additional database config values in <a href="database/connecting.html">DSN connections</a> via the query string.</li> - </ul> - </li> - <li>Libraries - <ul> - <li>Set the mime type check in the <a href="libraries/file_uploading.html">Upload class</a> to reference the global mimes variable.</li> - <li>Added support for query strings to the <a href="libraries/pagination.html">Pagination class</a>, automatically detected or explicitly declared.</li> - <li>Added <kbd>get_post()</kbd> to the <a href="libraries/input.html">Input class</a>.</li> - <li>Documented <kbd>get()</kbd> in the <a href="libraries/input.html">Input class</a>.</li> - <li>Added the ability to automatically output language items as form labels in the <a href="libraries/language.html">Language class</a>.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added a <a href="helpers/language_helper.html">Language helper</a>.</li> - <li>Added a <a href="helpers/number_helper.html">Number helper</a>.</li> - <li><a href="helpers/form_helper.html">Form helper</a> refactored to allow <kbd>form_open()</kbd> and <kbd>form_fieldset()</kbd> to accept arrays or strings as arguments.</li> - </ul> - </li> - <li>Other changes - <ul> - <li>Improved security in <kbd>xss_clean()</kbd>.</li> - <li>Removed an unused Router reference in <kbd>_display_cache()</kbd>.</li> - <li>Added ability to <a href="libraries/input.html">use xss_clean() to test images</a> for XSS, useful for upload security.</li> - <li>Considerably expanded list of mobile user-agents in config/user_agents.php.</li> - <li>Charset information in the userguide has been moved above title for internationalization purposes (#4614).</li> - <li>Added "Using Associative Arrays In a Request Parameter" example to the <a href="libraries/xmlrpc.html">XMLRPC userguide page</a>.</li> - <li>Removed maxlength and size as automatically added attributes of form_input() in the <a href="helpers/form_helper.html">form helper</a>.</li> - <li>Documented the language file use of <kbd>byte_format()</kbd> in the <a href="helpers/number_helper.html">number helper</a>.</li> - </ul> - </li> -</ul> - - -<h3>Bug fixes for 1.6.3</h3> - -<ul> - <li>Added a language key for valid_emails in validation_lang.php.</li> - <li>Amended fixes for bug (#3419) with parsing DSN database connections.</li> - <li>Moved the <kbd>_has_operators()</kbd> function (#4535) into DB_driver from DB_active_rec.</li> - <li>Fixed a syntax error in upload_lang.php.</li> - <li>Fixed a bug (#4542) with a regular expression in the Image library.</li> - <li>Fixed a bug (#4561) where <kbd>orhaving()</kbd> wasn't properly passing values.</li> - <li>Removed some unused variables from the code (#4563).</li> - <li>Fixed a bug where <kbd>having()</kbd> was not adding an = into the statement (#4568).</li> - <li>Fixed assorted user guide typos or examples (#4574, #4706).</li> - <li>Added quoted-printable headers to Email class when the multi-part override is used.</li> - <li>Fixed a double opening <p> tag in the index pages of each system directory.</li> -</ul> - -<h2>Version 1.6.2</h2> -<p>Release Date: May 13, 2008<br /> -Hg Tag: 1.6.2</p> -<ul> - <li>Active Record - <ul> - <li>Added the ability to prevent escaping in <kbd>having()</kbd> clauses.</li> - <li>Added <kbd>rename_table()</kbd> into <a href="./database/forge.html">DBForge</a>.</li> - <li>Fixed a bug that wasn't allowing escaping to be turned off if the value of a query was NULL.</li> - <li>DB Forge is now assigned to any models that exist after loading (#3457).</li> - </ul> - </li> - <li>Database - <ul> - <li>Added <a href="./database/transactions.html">Strict Mode</a> to database transactions.</li> - <li>Escape behaviour in where() clauses has changed; values in those with the "FALSE" argument are no longer escaped (ie: quoted).</li> - </ul> - </li> - <li>Config - <ul> - <li>Added 'application/vnd.ms-powerpoint' to list of mime types.</li> - <li>Added 'audio/mpg' to list of mime types.</li> - <li>Added new user-modifiable file constants.php containing file mode and fopen constants.</li> - <li>Added the ability to set CRLF settings via config in the <a href="libraries/email.html">Email</a> class.</li> - </ul> - </li> - <li>Libraries - <ul> - <li>Added increased security for filename handling in the Upload library.</li> - <li>Added increased security for sessions for client-side data tampering.</li> - <li>The MySQLi forge class is now in sync with MySQL forge. </li> - <li>Added the ability to set CRLF settings via config in the <a href="libraries/email.html">Email</a> class.</li> - <li><a href="libraries/unit_testing.html">Unit Testing</a> results are now colour coded, and a change was made to the default template of results.</li> - <li>Added a valid_emails rule to the Validation class.</li> - <li>The <a href="libraries/zip.html">Zip class</a> now exits within <kbd>download()</kbd>.</li> - <li>The <a href="libraries/zip.html">Zip class</a> has undergone a substantial re-write for speed and clarity (thanks stanleyxu for the hard work and code contribution in bug report #3425!)</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Added a <a href="helpers/compatibility_helper.html">Compatibility Helper</a> for using some common PHP 5 functions safely in applications that might run on PHP 4 servers (thanks Seppo for the hard work and code contribution!)</li> - <li>Added <kbd>form_button()</kbd> in the <a href="helpers/form_helper.html">Form helper</a>.</li> - <li>Changed the <kbd>radio()</kbd> and <kbd>checkbox()</kbd> functions to default to not checked by default.</li> - <li>Added the ability to include an optional HTTP Response Code in the <kbd>redirect()</kbd> function of the <a href="helpers/url_helper.html">URL Helper</a>.</li> - <li>Modified <kbd>img()</kbd> in the <a href="helpers/html_helper.html">HTML Helper</a> to remove an unneeded space (#4208).</li> - <li>Modified <kbd>anchor()</kbd> in the <a href="helpers/url_helper.html">URL helper</a> to no longer add a default title= attribute (#4209).</li> - <li>The <a href="helpers/download_helper.html">Download helper</a> now exits within <kbd>force_download()</kbd>.</li> - <li>Added <kbd>get_dir_file_info()</kbd>, <kbd>get_file_info()</kbd>, and <kbd>get_mime_by_extension()</kbd> to the <a href="helpers/file_helper.html">File Helper</a>.</li> - <li>Added <kbd>symbolic_permissions()</kbd> and <kbd>octal_permissions()</kbd> to the <a href='helpers/file_helper.html'>File helper</a>.</li> - </ul> - </li> - <li>Plugins - <ul> - <li>Modified captcha generation to first look for the function imagecreatetruecolor, and fallback to imagecreate if it isn't available (#4226).</li> - </ul> - </li> - <li>Other - Changes - <ul> - <li>Added ability for <a href="libraries/input.html">xss_clean()</a> to accept arrays.</li> - <li>Removed closing PHP tags from all PHP files to avoid accidental output and potential 'cannot modify headers' errors.</li> - <li>Removed "scripts" from the auto-load search path. Scripts were deprecated - in Version 1.4.1 (September 21, 2006). If you still need to use them for legacy reasons, they must now be manually loaded in each Controller.</li> - <li>Added a <a href="general/reserved_names.html">Reserved Names</a> page to the userguide, and migrated reserved controller names into it.</li> - <li>Added a <a href="general/common_functions.html">Common Functions</a> page to the userguide for globally available functions.</li> - <li>Improved security and performance of xss_clean().</li> - </ul> - </li> - </ul> - -<h3>Bugfixes for 1.6.2</h3> -<ul> - <li>Fixed a bug where SET queries were not being handled as "write" queries.</li> - <li>Fixed a bug (#3191) with ORIG_PATH_INFO URI parsing.</li> - <li>Fixed a bug in DB Forge, when inserting an id field (#3456).</li> - <li>Fixed a bug in the table library that could cause identically constructed rows to be dropped (#3459).</li> - <li>Fixed DB Driver and MySQLi result driver checking for resources instead of objects (#3461).</li> - <li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li> - <li>Fixed a bug in AR compiling, where select statements with arguments got incorrectly escaped (#3478).</li> - <li>Fixed an incorrect documentation of $this->load->language (#3520).</li> - <li>Fixed bugs (#3523, #4350) in get_filenames() with recursion and problems with Windows when $include_path is used.</li> - <li>Fixed a bug (#4153) in the XML-RPC class preventing dateTime.iso8601 from being used.</li> - <li>Fixed an AR bug with or_where_not_in() (#4171).</li> - <li>Fixed a bug with <a href="libraries/input.html">xss_clean()</a> that would add semicolons to GET URI variable strings.</li> - <li>Fixed a bug (#4206) in the Directory Helper where the directory resource was not being closed, and minor improvements.</li> - <li>Fixed a bug in the FTP library where delete_dir() was not working recursively (#4215).</li> - <li>Fixed a Validation bug when set_rules() is used with a non-array field name and rule (#4220).</li> - <li>Fixed a bug (#4223) where DB caching would not work for returned DB objects or multiple DB connections.</li> - <li>Fixed a bug in the Upload library that might output the same error twice (#4390).</li> - <li>Fixed an AR bug when joining with a table alias and table prefix (#4400).</li> - <li>Fixed a bug in the DB class testing the $params argument.</li> - <li>Fixed a bug in the Table library where the integer 0 in cell data would be displayed as a blank cell.</li> - <li>Fixed a bug in <kbd>link_tag()</kbd> of the <a href="helpers/url_helper.html">URL helper</a> where a key was passed instead of a value.</li> - <li>Fixed a bug in DB_result::row() that prevented it from returning individual fields with MySQL NULL values.</li> - <li>Fixed a bug where SMTP emails were not having dot transformation performed on lines that begin with a dot.</li> - <li>Fixed a bug in display_error() in the DB driver that was instantiating new Language and Exception objects, and not using the error heading.</li> - <li>Fixed a bug (#4413) where a URI containing slashes only e.g. 'http://example.com/index.php?//' would result in PHP errors</li> - <li>Fixed an array to string conversion error in the Validation library (#4425)</li> - <li>Fixed bug (#4451, #4299, #4339) where failed transactions will not rollback when debug mode is enabled.</li> - <li>Fixed a bug (#4506) with overlay_watermark() in the Image library preventing support for PNG-24s with alpha transparency</li> - <li>Fixed assorted user guide typos (#3453, #4364, #4379, #4399, #4408, #4412, #4448, #4488).</li> - </ul> - -<h2>Version 1.6.1</h2> -<p>Release Date: February 12, 2008<br /> -Hg Tag: 1.6.1</p> -<ul> - <li>Active Record - <ul> - <li>Added <a href="./database/active_record.html#caching">Active Record Caching</a>.</li> - <li>Made Active Record fully database-prefix aware.</li> - </ul> - </li> - <li>Database drivers - <ul> - <li>Added support for setting client character set and collation for MySQLi.</li> - </ul> - </li> - <li>Core Changes - <ul> - <li>Modified <kbd>xss_clean()</kbd> to be more intelligent with its handling of URL encoded strings.</li> - <li>Added $_SERVER, $_FILES, $_ENV, and $_SESSION to sanitization of globals.</li> - <li>Added a <a href="./helpers/path_helper.html">Path Helper</a>.</li> - <li>Simplified <kbd>_reindex_segments()</kbd> in the URI class.</li> - <li>Escaped the '-' in the default 'permitted_uri_chars' config item, to prevent errors if developers just try to add additional characters to the end of the default expression.</li> - <li>Modified method calling to controllers to show a 404 when a private or protected method is accessed via a URL.</li> - <li>Modified framework initiated 404s to log the controller and method for invalid requests.</li> - </ul> - </li> - <li>Helpers - <ul> - <li>Modified <kbd>get_filenames()</kbd> in the File Helper to return FALSE if the $source_dir is not readable.</li> - </ul> - </li> -</ul> - - -<h3>Bugfixes for 1.6.1</h3> -<ul> - <li>Deprecated is_numeric as a validation rule. Use of numeric and integer are preferred.</li> - <li>Fixed bug (#3379) in DBForge with SQLite for table creation.</li> - <li>Made Active Record fully database prefix aware (#3384).</li> - <li>Fixed a bug where DBForge was outputting invalid SQL in Postgres by adding brackets around the tables in FROM.</li> - <li>Changed the behaviour of Active Record's update() to make the WHERE clause optional (#3395).</li> - <li>Fixed a bug (#3396) where certain POST variables would cause a PHP warning.</li> - <li>Fixed a bug in query binding (#3402).</li> - <li>Changed order of SQL keywords in the Profiler $highlight array so OR would not be highlighted before ORDER BY.</li> - <li>Fixed a bug (#3404) where the MySQLi driver was testing if $this->conn_id was a resource instead of an object.</li> - <li>Fixed a bug (#3419) connecting to a database via a DSN string.</li> - <li>Fixed a bug (#3445) where the routed segment array was not re-indexed to begin with 1 when the default controller is used.</li> - <li>Fixed assorted user guide typos.</li> -</ul> - - - -<h2>Version 1.6.0</h2> -<p>Release Date: January 30, 2008 </p> -<ul> - <li>DBForge - <ul> - <li>Added <a href="./database/forge.html">DBForge</a> to the database tools.</li> - <li>Moved <kbd>create_database()</kbd> and <kbd>drop_database()</kbd> into <a href="./database/forge.html">DBForge</a>.</li> - <li>Added <kbd>add_field()</kbd>, <kbd>add_key()</kbd>, <kbd>create_table()</kbd>, <kbd>drop_table()</kbd>, <kbd>add_column()</kbd>, <kbd>drop_column()</kbd>, <kbd>modify_column()</kbd> into <a href="./database/forge.html">DBForge</a>.</li> - </ul> - </li> - - <li>Active Record - <ul> - <li>Added <kbd>protect_identifiers()</kbd> in <a href="./database/active_record.html">Active Record</a>.</li> - <li>All AR queries are backticked if appropriate to the database.</li> - <li>Added <kbd>where_in()</kbd>, <kbd>or_where_in()</kbd>, <kbd>where_not_in()</kbd>, <kbd>or_where_not_in()</kbd>, <kbd>not_like()</kbd> and <kbd>or_not_like()</kbd> to <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added support for <kbd>limit()</kbd> into <kbd>update()</kbd> and <kbd>delete()</kbd> statements in <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added <kbd>empty_table()</kbd> and <kbd>truncate_table()</kbd> to <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added the ability to pass an array of tables to the <kbd>delete()</kbd> statement in <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added <kbd>count_all_results()</kbd> function to <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added <kbd>select_max()</kbd>, <kbd>select_min()</kbd>, <kbd>select_avg()</kbd> and <kbd>select_sum()</kbd> to <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added the ability to use aliases with joins in <a href="./database/active_record.html">Active Record</a>.</li> - <li>Added a third parameter to Active Record's <kbd>like()</kbd> clause to control where the wildcard goes. </li> - <li>Added a third parameter to <kbd>set()</kbd> in <a href="./database/active_record.html">Active Record</a> that withholds escaping data.</li> - <li>Changed the behaviour of variables submitted to the where() clause with no values to auto set "IS NULL"</li> - </ul> - </li> - - <li>Other Database Related - <ul> - <li>MySQL driver now requires MySQL 4.1+</li> - <li>Added $this->DB->save_queries variable to DB driver, enabling queries to get saved or not. Previously they were always saved.</li> - <li>Added $this->db->dbprefix() to manually add database prefixes.</li> - <li>Added 'random' as an <kbd>order_by()</kbd> option , and removed "rand()" as a listed option as it was MySQL only.</li> - <li>Added a check for NULL fields in the MySQL database backup utility.</li> - <li>Added "constrain_by_prefix" parameter to db->list_table() function. If set to TRUE it will limit the result to only table names with the current prefix.</li> - <li>Deprecated from Active Record; <kbd>getwhere()</kbd> for <kbd>get_where()</kbd>; <kbd>groupby()</kbd> for <kbd>group_by()</kbd>; <kbd>havingor()</kbd> for <kbd>having_or()</kbd>; <kbd>orderby()</kbd> for <kbd>order_by</kbd>; <kbd>orwhere()</kbd> for <kbd>or_where()</kbd>; and <kbd>orlike()</kbd> for <kbd>or_like()</kbd>.</li> - <li>Modified <kbd>csv_from_result()</kbd> to output CSV data more in the spirit of basic rules of RFC 4180.</li> - <li>Added 'char_set' and 'dbcollat' database configuration settings, to explicitly set the client communication properly.</li> - <li>Removed 'active_r' configuration setting and replaced with a global $active_record setting, which is more - in harmony with the global nature of the behavior (#1834).</li> - </ul> - </li> - - <li>Core changes - <ul> - <li>Added ability to load multiple views, whose content will be appended to the output in the order loaded.</li> - <li>Added the ability to <a href="./general/autoloader.html">auto-load</a> <a href="./general/models.html">Models</a>.</li> - <li>Reorganized the URI and Routes classes for better clarity.</li> - <li>Added Compat.php to allow function overrides for older versions of PHP or PHP environments missing certain extensions / libraries</li> - <li>Added memory usage, GET, URI string data, and individual query execution time to Profiler output.</li> - <li>Deprecated Scaffolding.</li> - <li>Added is_really_writable() to Common.php to provide a cross-platform reliable method of testing file/folder writability.</li> - </ul> - </li> - - <li>Libraries - <ul> - <li>Changed the load protocol of Models to allow for extension.</li> - <li>Strengthened the Encryption library to help protect against man in the middle attacks when MCRYPT_MODE_CBC mode is used.</li> - <li>Added Flashdata variables, session_id regeneration and configurable session update times to the <a href="./libraries/sessions.html">Session class.</a></li> - <li>Removed 'last_visit' from the Session class.</li> - <li>Added a language entry for valid_ip validation error.</li> - <li>Modified prep_for_form() in the Validation class to accept arrays, adding support for POST array validation (via callbacks only)</li> - <li>Added an "integer" rule into the Validation library.</li> - <li>Added valid_base64() to the Validation library.</li> - <li>Documented clear() in the <a href="../libraries/image_lib.html">Image Processing</a> library.</li> - <li>Changed the behaviour of custom callbacks so that they no longer trigger the "required" rule. </li> - <li>Modified Upload class $_FILES error messages to be more precise.</li> - <li>Moved the safe mode and auth checks for the Email library into the constructor. </li> - <li>Modified variable names in _ci_load() method of Loader class to avoid conflicts with view variables.</li> - <li>Added a few additional mime type variations for CSV.</li> - <li>Enabled the 'system' methods for the XML-RPC Server library, except for 'system.multicall' which is still disabled.</li> - </ul> - </li> - - <li>Helpers & Plugins - <ul> - <li>Added link_tag() to the <a href="./helpers/html_helper.html">HTML helper.</a></li> - <li>Added img() to the <a href="./helpers/html_helper.html">HTML helper.</a></li> - <li>Added ability to <a href="./general/helpers.html">"extend" Helpers</a>.</li> - <li>Added an <a href="./helpers/email_helper.html">email helper</a> into core helpers.</li> - <li>Added <kbd>strip_quotes()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li> - <li>Added <kbd>reduce_multiples()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li> - <li>Added <kbd>quotes_to_entities()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li> - <li>Added <kbd>form_fieldset()</kbd>, <kbd>form_fieldset_close()</kbd>, <kbd>form_label()</kbd>, and <kbd>form_reset()</kbd> function to <a href="./helpers/form_helper.html">form helper</a>.</li> - <li>Added support for external urls in <kbd>form_open()</kbd>.</li> - <li>Removed support for db_backup in MySQLi due to incompatible functions.</li> - <li>Javascript Calendar plugin now uses the months and days from the calendar language file, instead of hard-coded values, internationalizing it.</li> - </ul> - </li> - - - <li>Documentation Changes - <ul> - <li>Added <a href="./doc_style/index.html">Writing Documentation</a> section for the community to use in writing their own documentation.</li> - <li>Added titles to all user manual pages.</li> - <li>Added attributes into <html> of userguide for valid html.</li> - <li>Added <a href="http://codeigniter.com/user_guide/libraries/zip.html">Zip Encoding Class</a> to the table of contents of the userguide.</li> - <li>Moved part of the userguide menu javascript to an external file.</li> - <li>Documented <kbd>distinct()</kbd> in <a href="./database/active_record.html">Active Record</a>. </li> - <li>Documented the <kbd>timezones()</kbd> function in the <a href="./helpers/date_helper.html">Date Helper</a>.</li> - <li>Documented unset_userdata in the <a href="./libraries/sessions.html">Session class</a>.</li> - <li>Documented 2 config options to the <a href="./database/configuration.html">Database configuration</a> page.</li> - </ul> - </li> -</ul> - -<h3>Bug fixes for Version 1.6.0</h3> - -<ul> - <li>Fixed a bug (#1813) preventing using $CI->db in the same application with returned database objects.</li> - <li>Fixed a bug (#1842) where the $this->uri->rsegments array would not include the 'index' method if routed to the controller without an implicit method.</li> - <li>Fixed a bug (#1872) where word_limiter() was not retaining whitespace.</li> - <li>Fixed a bug (#1890) in csv_from_result() where content that included the delimiter would break the file.</li> - <li>Fixed a bug (#2542)in the clean_email() method of the Email class to allow for non-numeric / non-sequential array keys.</li> - <li>Fixed a bug (#2545) in <kbd>_html_entity_decode_callback()</kbd> when 'global_xss_filtering' is enabled.</li> - <li>Fixed a bug (#2668) in the <a href="./libraries/parser.html">parser class</a> where numeric data was ignored.</li> - <li>Fixed a bug (#2679) where the "previous" pagination link would get drawn on the first page.</li> - <li>Fixed a bug (#2702) in _object_to_array that broke some types of inserts and updates.</li> - <li>Fixed a bug (#2732) in the SQLite driver for PHP 4.</li> - <li>Fixed a bug (#2754) in Pagination to scan for non-positive num_links.</li> - <li>Fixed a bug (#2762) in the <a href="./libraries/sessions.html">Session library</a> where user agent matching would fail on user agents ending with a space. </li> - <li>Fixed a bug (#2784) $field_names[] vs $Ffield_names[] in postgres and sqlite drivers.</li> - <li>Fixed a bug (#2810) in the typography helper causing extraneous paragraph tags when string contains tags.</li> - <li>Fixed a bug (#2849) where arguments passed to a subfolder controller method would be incorrectly shifted, dropping the 3rd segment value.</li> - <li>Fixed a bug (#2858) which referenced a wrong variable in the Image class.</li> - <li>Fixed a bug (#2875)when loading plugin files as _plugin. and not _pi.</li> - <li>Fixed a bug (#2912) in <kbd>get_filenames()</kbd> in the <a href="./helpers/file_helper.html">File Helper </a>where the array wasn't cleared after each call.</li> - <li>Fixed a bug (#2974) in <kbd>highlight_phrase()</kbd> that caused an error with slashes.</li> - <li>Fixed a bug (#3003) in the Encryption Library to support modes other than MCRYPT_MODE_ECB</li> - <li>Fixed a bug (#3015) in the <a href="./libraries/user_agent.html">User Agent library</a> where more then 2 languages where not reported with languages().</li> - <li>Fixed a bug (#3017) in the <a href="./libraries/email.html">Email</a> library where some timezones were calculated incorrectly. </li> - <li>Fixed a bug (#3024) in which master_dim wasn't getting reset by clear() in the Image library.</li> - <li>Fixed a bug (#3156) in Text Helper highlight_code() causing PHP tags to be handled incorrectly.</li> - <li>Fixed a bug (#3166) that prevented num_rows from working in Oracle.</li> - <li>Fixed a bug (#3175) preventing certain libraries from working properly when autoloaded in PHP 4.</li> - <li>Fixed a bug (#3267) in the Typography Helper where unordered list was listed "un.</li> - <li>Fixed a bug (#3268) where the Router could leave '/' as the path.</li> - <li>Fixed a bug (#3279) where the Email class was sending the wrong Content-Transfer-Encoding for some character sets.</li> - <li>Fixed a bug (#3284) where the rsegment array would not be set properly if the requested URI contained more segments than the routed URI.</li> - <li>Removed extraneous load of $CFG in _display_cache() of the Output class (#3285).</li> - <li>Removed an extraneous call to loading models (#3286).</li> - <li>Fixed a bug (#3310) with sanitization of globals in the Input class that could unset CI's global variables.</li> - <li>Fixed a bug (#3314) which would cause the top level path to be deleted in delete_files() of the File helper.</li> - <li>Fixed a bug (#3328) where the smiley helper might return an undefined variable.</li> - <li>Fixed a bug (#3330) in the FTP class where a comparison wasn't getting made.</li> - <li>Removed an unused parameter from Profiler (#3332).</li> - <li>Fixed a bug in database driver where num_rows property wasn't getting updated.</li> - <li>Fixed a bug in the <a href="./libraries/file_uploading.html">upload library</a> when allowed_files wasn't defined.</li> - <li>Fixed a bug in <kbd>word_wrap()</kbd> of the Text Helper that incorrectly referenced an object. </li> - <li>Fixed a bug in Validation where <kbd>valid_ip()</kbd> wasn't called properly.</li> - <li>Fixed a bug in Validation where individual error messages for checkboxes wasn't supported.</li> - <li>Fixed a bug in captcha calling an invalid PHP function.</li> - <li>Fixed a bug in the cookie helper "set_cookie" function. It was not honoring the config settings.</li> - <li>Fixed a bug that was making validation callbacks required even when not set as such.</li> - <li>Fixed a bug in the XML-RPC library so if a type is specified, a more intelligent decision is made as to the default type.</li> - <li>Fixed an example of comma-separated emails in the email library documentation.</li> - <li>Fixed an example in the Calendar library for Showing Next/Previous Month Links.</li> - <li>Fixed a typo in the database language file.</li> - <li>Fixed a typo in the image language file "suppor" to "support".</li> - <li>Fixed an example for XML RPC.</li> - <li>Fixed an example of <kbd>accept_charset()</kbd> in the <a href="./libraries/user_agent.html">User Agent Library</a>.</li> - <li>Fixed a typo in the docblock comments that had CodeIgniter spelled CodeIgnitor.</li> - <li>Fixed a typo in the <a href="./helpers/string_helper.html">String Helper</a> (uniquid changed to uniqid).</li> - <li>Fixed typos in the email Language class (email_attachment_unredable, email_filed_smtp_login), and FTP Class (ftp_unable_to_remame).</li> - <li>Added a stripslashes() into the Upload Library.</li> - <li>Fixed a series of grammatical and spelling errors in the language files.</li> - <li>Fixed assorted user guide typos.</li> -</ul> -<h2>Version 1.5.4</h2> -<p>Release Date: July 12, 2007 </p> -<ul> - <li>Added <a href="./libraries/language.html">custom Language files</a> to the <a href="./general/autoloader.html">autoload</a> options. </li> - <li>Added stripslashes() to the _clean_input_data() function in the <a href="./libraries/input.html">Input class</a> when magic quotes is on so that data will always be un-slashed within the framework.</li> - <li>Added array to string into the <a href="general/profiling.html">profiler</a>.</li> - <li>Added some additional mime types in application/config/mimes.php.</li> - <li>Added filename_security() method to <a href="./libraries/input.html">Input library</a>.</li> - <li>Added some additional arguments to the <a href="./helpers/inflector_helper.html">Inflection helper</a> singular() to compensate for words ending in "s". Also added a force parameter to pluralize().</li> - <li>Added $config['charset'] to the config file. Default value is 'UTF-8', used in some string handling functions.</li> - <li>Fixed MSSQL insert_id().</li> - <li>Fixed a logic error in the DB trans_status() function. It was incorrectly returning TRUE on failure and FALSE on success.</li> - <li>Fixed a bug that was allowing multiple load attempts on extended classes.</li> - <li>Fixed a bug in the bootstrap file that was incorrectly attempting to discern the full server path even when it was explicity set by the user.</li> - <li>Fixed a bug in the escape_str() function in the MySQL driver.</li> - <li>Fixed a typo in the <a href="./libraries/calendar.html">Calendar library </a> </li> - <li>Fixed a typo in rpcs.php library</li> - <li>Fixed a bug in the <a href="./libraries/zip.html">Zip library</a>, providing PC Zip file compatibility with Mac OS X</li> - <li>Fixed a bug in router that was ignoring the scaffolding route for optimization </li> - <li>Fixed an IP validation bug.</li> - <li>Fixed a bug in display of POST keys in the <a href="./general/profiling.html">Profiler</a> output</li> - <li>Fixed a bug in display of queries with characters that would be interpreted as HTML in the <a href="./general/profiling.html">Profiler</a> output</li> - <li>Fixed a bug in display of Email class print debugger with characters that would be interpreted as HTML in the debugging output</li> - <li>Fixed a bug in the Content-Transfer-Encoding of HTML emails with the quoted-printable MIME type</li> - <li>Fixed a bug where one could unset certain PHP superglobals by setting them via GET or POST data</li> - <li>Fixed an undefined function error in the insert_id() function of the PostgreSQL driver</li> - <li>Fixed various doc typos. </li> - <li>Documented two functions from the <a href="./helpers/string_helper.html">String helper </a> that were missing from the user guide: trim_slashes() and reduce_double_slashes().</li> - <li>Docs now validate to XHTML 1 transitional</li> - <li>Updated the XSS Filtering to take into account the IE expression() ability and improved certain deletions to prevent possible exploits</li> - <li>Modified the Router so that when Query Strings are Enabled, the controller trigger and function trigger values are sanitized for filename include security.</li> - <li>Modified the is_image() method in the Upload library to take into account Windows IE 6/7 eccentricities when dealing with MIMEs</li> - <li>Modified XSS Cleaning routine to be more performance friendly and compatible with PHP 5.2's new PCRE backtrack and recursion limits.</li> - <li>Modified the <a href="./helpers/url_helper.html">URL Helper</a> to type cast the $title as a string in case a numeric value is supplied</li> - <li>Modified Form Helper form_dropdown() to type cast the keys and values of the options array as strings, allowing numeric values to be properly set as 'selected'</li> - <li>Deprecated the use if <kbd>is_numeric()</kbd> in various places since it allows periods. Due to compatibility problems with <kbd>ctype_digit()</kbd>, making it unreliable in some installations, the following regular expression was used instead: <kbd>preg_match("/[^0-9]/", $n)</kbd></li> - <li>Deprecated: APPVER has been deprecated and replaced with CI_VERSION for clarity. </li> -</ul> -<h2>Version 1.5.3</h2> -<p>Release Date: April 15, 2007 </p> -<ul> - <li>Added array to string into the profiler </li> - <li>Code Igniter references updated to CodeIgniter </li> - <li>pMachine references updated to EllisLab </li> - <li>Fixed a bug in the repeater function of <a href="./helpers/string_helper.html">string helper</a>. </li> - <li>Fixed a bug in ODBC driver </li> - <li>Fixed a bug in result_array() that was returning an empty array when no result is produced.</li> - <li>Fixed a bug in the redirect function of the <a href="./helpers/url_helper.html">url helper</a>. </li> - <li>Fixed an undefined variable in Loader </li> - <li>Fixed a version bug in the Postgres driver </li> - <li>Fixed a bug in the textarea function of the form helper for use with strings</li> - <li>Fixed doc typos. </li> -</ul> -<h2>Version 1.5.2</h2> -<p>Release Date: February 13, 2007 </p> -<ul> - <li>Added <a href="./installation/downloads.html#svn">subversion information</a> to the <a href="./installation/downloads.html">downloads</a> page. </li> - <li>Added support for captions in the <a href="./libraries/table.html">Table Library</a> </li> - <li>Fixed a bug in the <a href="./helpers/download_helper.html">download_helper</a> that was causing Internet Explorer to load rather than download </li> - <li>Fixed a bug in the Active Record Join function that was not taking table prefixes into consideration.</li> - <li>Removed unescaped variables in error messages of Input and Router classes</li> - <li>Fixed a bug in the Loader that was causing errors on Libraries loaded twice. A debug message is now silently made in the log. </li> - <li>Fixed a bug in the <a href="./helpers/form_helper.html">form helper</a> that gave textarea a value attribute </li> - <li>Fixed a bug in the <a href="./libraries/image_lib.php">Image Library</a> that was ignoring resizing the same size image </li> - <li>Fixed some doc typos.</li> -</ul> - - -<h2>Version 1.5.1</h2> -<p>Release Date: November 23, 2006</p> -<ul> - <li>Added support for submitting arrays of libraries in the $this->load->library function.</li> - <li>Added support for naming custom library files in lower or uppercase.</li> - <li>Fixed a bug related to output buffering.</li> - <li>Fixed a bug in the active record class that was not resetting query data after a completed query.</li> - <li>Fixed a bug that was suppressing errors in controllers.</li> - <li>Fixed a problem that can cause a loop to occur when the config file is missing.</li> - <li>Fixed a bug that occurred when multiple models were loaded with the third parameter set to TRUE.</li> - <li>Fixed an oversight that was not unsetting globals properly in the input sanitize function.</li> - <li>Fixed some bugs in the Oracle DB driver.</li> - <li>Fixed an incorrectly named variable in the MySQLi result driver.</li> - <li>Fixed some doc typos.</li> -</ul> -<h2>Version 1.5.0.1</h2> -<p>Release Date: October 31, 2006</p> -<ul> -<li>Fixed a problem in which duplicate attempts to load helpers and classes were not being stopped.</li> -<li>Fixed a bug in the word_wrap() helper function.</li> -<li>Fixed an invalid color Hex number in the Profiler class.</li> -<li>Fixed a corrupted image in the user guide.</li> -</ul> - - - -<h2>Version 1.5.0</h2> -<p>Release Date: October 30, 2006</p> - -<ul> -<li>Added <a href="./database/utilities.html">DB utility class</a>, permitting DB backups, CVS or XML files from DB results, and various other functions.</li> -<li>Added <a href="./database/caching.html">Database Caching Class</a>.</li> -<li>Added <a href="./database/transactions.html">transaction support</a> to the database classes.</li> -<li>Added <a href="./general/profiling.html">Profiler Class</a> which generates a report of Benchmark execution times, queries, and POST data at the bottom of your pages.</li> -<li>Added <a href="./libraries/user_agent.html">User Agent Library</a> which allows browsers, robots, and mobile devises to be identified.</li> -<li>Added <a href="./libraries/table.html">HTML Table Class</a> , enabling tables to be generated from arrays or database results.</li> -<li>Added <a href="./libraries/zip.html">Zip Encoding Library</a>.</li> -<li>Added <a href="./libraries/ftp.html">FTP Library</a>.</li> -<li>Added the ability to <a href="./general/creating_libraries.html">extend libraries</a> and <a href="./general/core_classes.html">extend core classes</a>, in addition to being able to replace them.</li> -<li>Added support for storing <a href="./general/models.html">models within sub-folders</a>.</li> -<li>Added <a href="./helpers/download_helper.html">Download Helper</a>.</li> -<li>Added <a href="./database/queries.html">simple_query()</a> function to the database classes</li> -<li>Added <a href="./helpers/date_helper.html">standard_date()</a> function to the Date Helper.</li> -<li>Added <a href="./database/results.html">$query->free_result()</a> to database class.</li> -<li>Added <a href="./database/fields.html">$query->list_fields()</a> function to database class</li> -<li>Added <a href="./database/helpers.html">$this->db->platform()</a> function</li> -<li>Added new <a href="./helpers/file_helper.html">File Helper</a>: get_filenames()</li> -<li>Added new helper: <a href="./helpers/smiley_helper.html">Smiley Helper</a></li> -<li>Added support for <ul> and <ol> lists in the <a href="./helpers/html_helper.html">HTML Helper</a></li> -<li>Added the ability to rewrite <a href="./general/alternative_php.html">short tags</a> on-the-fly, converting them to standard PHP statements, for those servers that do not support short tags. This allows the cleaner syntax to be used regardless of whether it's supported by the server.</li> -<li>Added the ability to <a href="./general/managing_apps.html">rename or relocate the "application" folder</a>.</li> -<li>Added more thorough initialization in the upload class so that all class variables are reset.</li> -<li>Added "is_numeric" to validation, which uses the native PHP is_numeric function.</li> -<li>Improved the URI handler to make it more reliable when the $config['uri_protocol'] item is set to AUTO.</li> -<li>Moved most of the functions in the Controller class into the Loader class, allowing fewer reserved function names for controllers when running under PHP 5.</li> -<li>Updated the DB Result class to return an empty array when $query->result() doesn't produce a result.</li> -<li>Updated the <dfn>input->cookie()</dfn> and <dfn>input->post()</dfn> functions in <a href="./libraries/input.html">Input Class</a> to permit arrays contained cookies that are arrays to be run through the XSS filter.</li> -<li>Documented three functions from the <a href="./libraries/validation.html">Validation class</a> that were missing from the user guide: set_select(), set_radio(), and set_checkbox().</li> -<li>Fixed a bug in the Email class related to SMTP Helo data.</li> -<li>Fixed a bug in the word wrapping helper and function in the email class.</li> -<li>Fixed a bug in the validation class.</li> -<li>Fixed a bug in the typography helper that was incorrectly wrapping block level elements in paragraph tags.</li> -<li>Fixed a problem in the form_prep() function that was double encoding entities.</li> -<li>Fixed a bug that affects some versions of PHP when output buffering is nested.</li> -<li>Fixed a bug that caused CI to stop working when the PHP magic __get() or __set() functions were used within models or controllers.</li> -<li>Fixed a pagination bug that was permitting negative values in the URL.</li> -<li>Fixed an oversight in which the Loader class was not allowed to be extended.</li> -<li>Changed <dfn>_get_config()</dfn> to <dfn>get_config()</dfn> since the function is not a private one.</li> -<li><strong>Deprecated "init" folder</strong>. Initialization happens automatically now. <a href="./general/creating_libraries.html">Please see documentation</a>.</li> -<li><strong>Deprecated</strong> $this->db->field_names() USE $this->db->list_fields()</li> -<li><strong>Deprecated</strong> the <dfn>$config['log_errors']</dfn> item from the config.php file. Instead, <dfn>$config['log_threshold']</dfn> can be set to "0" to turn it off.</li> -</ul> - - - - -<h2>Version 1.4.1</h2> -<p>Release Date: September 21, 2006</p> - -<ul> -<li>Added a new feature that passes URI segments directly to your function calls as parameters. See the <a href="./general/controllers.html">Controllers</a> page for more info.</li> -<li>Added support for a function named <dfn>_output()</dfn>, which when used in your controllers will received the final rendered output from the output class. More info in the <a href="controllers.html">Controllers</a> page.</li> -<li>Added several new functions in the <a href="./libraries/uri.html">URI Class</a> to let you retrieve and manipulate URI segments that have been re-routed using the <a href="routing.html">URI Routing</a> feature. Previously, the URI class did not permit you to access any re-routed URI segments, but now it does.</li> -<li>Added <a href="./libraries/output.html">$this->output->set_header()</a> function, which allows you to set server headers.</li> -<li>Updated plugins, helpers, and language classes to allow your <dfn>application</dfn> folder to contain its own plugins, helpers, and language folders. Previously they were always treated as global for your entire installation. If your application folder contains any of these resources they will be used <em>instead</em> the global ones.</li> -<li>Added <a href="./helpers/inflector_helper.html">Inflector helper</a>.</li> -<li>Added <dfn>element()</dfn> function in the <a href="./helpers/array_helper.html">array helper</a>.</li> -<li>Added <dfn>RAND()</dfn> to active record <dfn>orderby()</dfn> function.</li> -<li>Added <dfn>delete_cookie()</dfn> and <dfn>get_cookie()</dfn> to <a href="./helpers/cookie_helper.html">Cookie helper</a>, even though the input class has a cookie fetching function.</li> -<li>Added Oracle database driver (still undergoing testing so it might have some bugs).</li> -<li>Added the ability to combine pseudo-variables and php variables in the template parser class.</li> -<li>Added output compression option to the config file.</li> -<li>Removed the is_numeric test from the db->escape() function.</li> -<li>Fixed a MySQLi bug that was causing error messages not to contain proper error data.</li> -<li>Fixed a bug in the email class which was causing it to ignore explicitly set alternative headers.</li> -<li>Fixed a bug that was causing a PHP error when the Exceptions class was called within the get_config() function since it was causing problems.</li> -<li>Fixed an oversight in the cookie helper in which the config file cookie settings were not being honored.</li> -<li>Fixed an oversight in the upload class. An item mentioned in the 1.4 changelog was missing.</li> -<li>Added some code to allow email attachments to be reset when sending batches of email.</li> -<li>Deprecated the <dfn>application/scripts</dfn> folder. It will continue to work for legacy users, but it is recommended that you create your own -<a href="./general/libraries.html">libraries</a> or <a href="./general/models.html">models</a> instead. It was originally added before CI had user libraries or models, but it's not needed anymore.</li> -<li>Deprecated the <dfn>$autoload['core']</dfn> item from the <kbd>autoload.php</kbd> file. Instead, please now use: <kbd>$autoload['libraries']</kbd></li> -<li>Deprecated the following database functions: $this->db->smart_escape_str() and $this->db->fields().</li> -</ul> - - - -<h2>Version 1.4.0</h2> -<p>Release Date: September 17, 2006</p> - -<ul> -<li>Added <a href="./general/hooks.html">Hooks</a> feature, enabling you to tap into and modify the inner workings of the framework without hacking the core files.</li> -<li>Added the ability to organize controller files <a href="./general/controllers.html">into sub-folders</a>. Kudos to Marco for <a href="http://codeigniter.com/forums/viewthread/627/">suggesting</a> this (and the next two) feature.</li> -<li>Added regular expressions support for <a href="./general/routing.html">routing rules</a>.</li> -<li>Added the ability to <a href="./general/controllers.html">remap function calls</a> within your controllers.</li> -<li>Added the ability to <a href="./general/core_classes.html">replace core system classes</a> with your own classes.</li> -<li>Added support for % character in URL.</li> -<li>Added the ability to supply full URLs using the <a href="./helpers/url_helper.html">anchor()</a> helper function.</li> -<li>Added mode parameter to <a href="./helpers/file_helper.html">file_write()</a> helper.</li> -<li>Added support for changing the port number in the <a href="./database/configuration.html">Postgres driver</a>.</li> -<li>Moved the list of "allowed URI characters" out of the Router class and into the config file.</li> -<li>Moved the MIME type array out of the Upload class and into its own file in the applications/config/ folder.</li> -<li>Updated the Upload class to allow the upload field name to be set when calling <a href="./libraries/file_uploading.html">do_upload()</a>.</li> -<li>Updated the <a href="./libraries/config.html">Config Library</a> to be able to load config files silently, and to be able to assign config files to their own index (to avoid collisions if you use multiple config files).</li> -<li>Updated the URI Protocol code to allow more options so that URLs will work more reliably in different environments.</li> -<li>Updated the <dfn>form_open()</dfn> helper to allow the GET method to be used.</li> -<li>Updated the MySQLi <dfn>execute()</dfn> function with some code to help prevent lost connection errors.</li> -<li>Updated the SQLite Driver to check for object support before attempting to return results as objects. If unsupported it returns an array.</li> -<li>Updated the Models loader function to allow multiple loads of the same model.</li> -<li>Updated the MS SQL driver so that single quotes are escaped.</li> -<li>Updated the Postgres and ODBC drivers for better compatibility.</li> -<li>Removed a strtolower() call that was changing URL segments to lower case.</li> -<li>Removed some references that were interfering with PHP 4.4.1 compatibility.</li> -<li>Removed backticks from Postgres class since these are not needed.</li> -<li>Renamed <dfn>display()</dfn> to <dfn>_display()</dfn> in the Output class to make it clear that it's a private function.</li> -<li>Deprecated the hash() function due to a naming conflict with a native PHP function with the same name. Please use <kbd>dohash()</kbd> instead.</li> -<li>Fixed an bug that was preventing the input class from unsetting GET variables.</li> -<li>Fixed a router bug that was making it too greedy when matching end segments.</li> -<li>Fixed a bug that was preventing multiple discrete database calls.</li> -<li>Fixed a bug in which loading a language file was producing a "file contains no data" message.</li> -<li>Fixed a session bug caused by the XSS Filtering feature inadvertently changing the case of certain words.</li> -<li>Fixed some missing prefixes when using the database prefix feature.</li> -<li>Fixed a typo in the Calendar class (cal_november).</li> -<li>Fixed a bug in the <dfn>form_checkbox()</dfn> helper.</li> -<li>Fixed a bug that was allowing the second segment of the URI to be identical to the class name.</li> -<li>Fixed an evaluation bug in the database initialization function.</li> -<li>Fixed a minor bug in one of the error messages in the language class.</li> -<li>Fixed a bug in the date helper <dfn>timespan</dfn> function.</li> -<li>Fixed an undefined variable in the DB Driver class.</li> -<li>Fixed a bug in which dollar signs used as binding replacement values in the DB class would be treated as RegEx back-references.</li> -<li>Fixed a bug in the <dfn>set_hash()</dfn> function which was preventing MD5 from being used.</li> -<li>Fixed a couple bugs in the Unit Testing class.</li> -<li>Fixed an incorrectly named variable in the Validation class.</li> -<li>Fixed an incorrectly named variable in the URI class.</li> -<li>Fixed a bug in the config class that was preventing the base URL from being called properly.</li> -<li>Fixed a bug in the validation class that was not permitting callbacks if the form field was empty.</li> -<li>Fixed a problem that was preventing scaffolding from working properly with MySQLi.</li> -<li>Fixed some MS SQL bugs.</li> -<li>Fixed some doc typos.</li> -</ul> - - - -<h2>Version 1.3.3</h2> -<p>Release Date: June 1, 2006</p> - -<ul> - -<li>Models do <strong>not</strong> connect automatically to the database as of this version. <a href="./general/models.html">More info here</a>.</li> -<li>Updated the Sessions class to utilize the active record class when running session related queries. Previously the queries assumed MySQL syntax.</li> -<li>Updated alternator() function to re-initialize when called with no arguments, allowing multiple calls.</li> -<li>Fixed a bug in the active record "having" function.</li> -<li>Fixed a problem in the validation class which was making checkboxes be ignored when required.</li> -<li>Fixed a bug in the word_limiter() helper function. It was cutting off the fist word.</li> -<li>Fixed a bug in the xss_clean function due to a PHP bug that affects some versions of html_entity_decode.</li> -<li>Fixed a validation bug that was preventing rules from being set twice in one controller.</li> -<li>Fixed a calendar bug that was not letting it use dynamically loaded languages.</li> -<li>Fixed a bug in the active record class when using WHERE clauses with LIKE</li> -<li>Fixed a bug in the hash() security helper.</li> -<li>Fixed some typos.</li> -</ul> - - - - -<h2>Version 1.3.2</h2> -<p>Release Date: April 17, 2006</p> - -<ul> -<li>Changed the behavior of the validation class such that if a "required" rule is NOT explicitly stated for a field then all other tests get ignored.</li> -<li>Fixed a bug in the Controller class that was causing it to look in the local "init" folder instead of the main system one.</li> -<li>Fixed a bug in the init_pagination file. The $config item was not being set correctly.</li> -<li>Fixed a bug in the auto typography helper that was causing inconsistent behavior.</li> -<li>Fixed a couple bugs in the Model class.</li> -<li>Fixed some documentation typos and errata.</li> -</ul> - - - -<h2>Version 1.3.1</h2> -<p>Release Date: April 11, 2006</p> - -<ul> -<li>Added a <a href="./libraries/unit_testing.html">Unit Testing Library</a>.</li> -<li>Added the ability to pass objects to the <strong>insert()</strong> and <strong>update()</strong> database functions. -This feature enables you to (among other things) use your <a href="./general/models.html">Model class</a> variables to run queries with. See the Models page for details.</li> -<li>Added the ability to pass objects to the <a href="./general/views.html">view loading function</a>: $this->load->view('my_view', <var>$object</var>);</li> -<li>Added <kbd>getwhere</kbd> function to <a href="./database/active_record.html">Active Record class</a>.</li> -<li>Added <kbd>count_all</kbd> function to <a href="./database/active_record.html">Active Record class</a>.</li> -<li>Added language file for scaffolding and fixed a scaffolding bug that occurs when there are no rows in the specified table.</li> -<li>Added <a href="./database/queries.html">$this->db->last_query()</a>, which allows you to view your last query that was run.</li> -<li>Added a new mime type to the upload class for better compatibility.</li> -<li>Changed how cache files are read to prevent PHP errors if the cache file contains an XML tag, which PHP wants to interpret as a short tag.</li> -<li>Fixed a bug in a couple of the active record functions (where and orderby).</li> -<li>Fixed a bug in the image library when realpath() returns false.</li> -<li>Fixed a bug in the Models that was preventing libraries from being used within them.</li> -<li>Fixed a bug in the "exact_length" function of the validation class.</li> -<li>Fixed some typos in the user guide</li> -</ul> - - -<h2>Version 1.3</h2> -<p>Release Date: April 3, 2006</p> - -<ul> -<li>Added support for <a href="models.html">Models</a>.</li> -<li>Redesigned the database libraries to support additional RDBMs (Postgres, MySQLi, etc.).</li> -<li>Redesigned the <a href="./database/active_record.html">Active Record class</a> to enable more varied types of queries with simpler syntax, and advanced features like JOINs.</li> -<li>Added a feature to the database class that lets you run <a href="./database/call_function.html">custom function calls</a>.</li> -<li>Added support for <a href="controllers.html">private functions</a> in your controllers. Any controller function name that starts with an underscore will not be served by a URI request.</li> -<li>Added the ability to pass your own initialization parameters to your <a href="creating_libraries.html">custom core libraries</a> when using $this->load->library()</li> -<li>Added support for running standard <a href="urls.html">query string URLs</a>. These can be optionally enabled in your config file.</li> -<li>Added the ability to <a href="urls.html">specify a "suffix"</a>, which will be appended to your URLs. For example, you could add .html to your URLs, making them appear static. This feature is enabled in your config file.</li> -<li>Added a new error template for use with native PHP errors.</li> -<li>Added "alternator" function in the <a href="./helpers/string_helper.html">string helpers</a>.</li> -<li>Removed slashing from the input class. After much debate we decided to kill this feature.</li> -<li>Change the commenting style in the scripts to the PEAR standard so that IDEs and tools like phpDocumenter can harvest the comments.</li> -<li>Added better class and function name-spacing to avoid collisions with user developed classes. All CodeIgniter classes are now prefixed with <dfn>CI_</dfn> and -all controller methods are prefixed with <dfn>_ci</dfn> to avoid controller collisions. A list of reserved function names can be <a href="controllers.html">found here</a>.</li> -<li>Redesigned how the "CI" super object is referenced, depending on whether PHP 4 or 5 is being run, since PHP 5 allows a more graceful way to manage objects that utilizes a bit less resources.</li> -<li>Deprecated: <var>$this->db->use_table()</var> has been deprecated. Please read the <a href="./database/active_record.html">Active Record</a> page for information.</li> -<li>Deprecated: <var>$this->db->smart_escape_str()</var> has been deprecated. Please use this instead: <var>$this->db->escape()</var></li> -<li>Fixed a bug in the exception handler which was preventing some PHP errors from showing up.</li> -<li>Fixed a typo in the URI class. $this->total_segment() should be plural: $this->total_segments()</li> -<li>Fixed some typos in the default calendar template</li> -<li>Fixed some typos in the user guide</li> -</ul> - - - - - - - - -<h2>Version 1.2</h2> -<p>Release Date: March 21, 2006</p> - -<ul> -<li>Redesigned some internal aspects of the framework to resolve scoping problems that surfaced during the beta tests. The problem was most notable when instantiating classes in your constructors, particularly if those classes in turn did work in their constructors.</li> -<li>Added a global function named <a href="ancillary_classes.html">get_instance()</a> allowing the main CodeIgniter object to be accessible throughout your own classes.</li> -<li>Added new <a href="./helpers/file_helper.html">File Helper</a>: delete_files()</li> -<li>Added new <a href="./helpers/url_helper.html">URL Helpers</a>: base_url(), index_page()</li> -<li>Added the ability to create your own <a href="creating_libraries.html">core libraries</a> and store them in your local application directory.</li> -<li>Added an <kbd>overwrite</kbd> option to the <a href="./libraries/file_uploading.html">Upload class</a>, enabling files to be overwritten rather than having the file name appended.</li> -<li>Added Javascript Calendar plugin.</li> -<li>Added search feature to user guide. Note: This is done using Google, which at the time of this writing has not crawled all the pages of the docs.</li> -<li>Updated the parser class so that it allows tag pars within other tag pairs.</li> -<li>Fixed a bug in the DB "where" function.</li> -<li>Fixed a bug that was preventing custom config files to be auto-loaded.</li> -<li>Fixed a bug in the mysql class bind feature that prevented question marks in the replacement data.</li> -<li>Fixed some bugs in the xss_clean function</li> -</ul> - - - - - -<h2>Version Beta 1.1</h2> -<p>Release Date: March 10, 2006</p> - -<ul> -<li>Added a <a href="./libraries/calendar.html">Calendaring class</a>.</li> -<li>Added support for running <a href="managing_apps.html">multiple applications</a> that share a common CodeIgniter backend.</li> -<li>Moved the "uri protocol" variable from the index.php file into the config.php file</li> -<li>Fixed a problem that was preventing certain function calls from working within constructors.</li> -<li>Fixed a problem that was preventing the $this->load->library function from working in constructors.</li> -<li>Fixed a bug that occurred when the session class was loaded using the auto-load routine.</li> -<li>Fixed a bug that can happen with PHP versions that do not support the E_STRICT constant</li> -<li>Fixed a data type error in the form_radio function (form helper)</li> -<li>Fixed a bug that was preventing the xss_clean function from being called from the validation class.</li> -<li>Fixed the cookie related config names, which were incorrectly specified as $conf rather than $config</li> -<li>Fixed a pagination problem in the scaffolding.</li> -<li>Fixed a bug in the mysql class "where" function.</li> -<li>Fixed a regex problem in some code that trimmed duplicate slashes.</li> -<li>Fixed a bug in the br() function in the HTML helper</li> -<li>Fixed a syntax mistake in the form_dropdown function in the Form Helper.</li> -<li>Removed the "style" attributes form the form helpers.</li> -<li>Updated the documentation. Added "next/previous" links to each page and fixed various typos.</li> -</ul> - -<h2>Version Beta 1.0 </h2> -<p>Release Date: February 28, 2006</p> -<p>First publicly released version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="license.html">License Agreement</a> - · -<a href="#top">Top of Page</a> · -<a href="index.html">User Guide Home</a> · -Next Topic: <a href="./general/credits.html">Credits</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html> diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html deleted file mode 100644 index 264992a3f..000000000 --- a/user_guide/database/active_record.html +++ /dev/null @@ -1,824 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Active Record : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Active Record -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - -<!-- START CONTENT --> -<div id="content"> - -<h1>Active Record Class</h1> - -<p>CodeIgniter uses a modified version of the Active Record Database Pattern. -This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting. -In some cases only one or two lines of code are necessary to perform a database action. -CodeIgniter does not require that each database table be its own class file. It instead provides a more simplified interface.</p> - -<p>Beyond simplicity, a major benefit to using the Active Record features is that it allows you to create database independent applications, since the query syntax -is generated by each database adapter. It also allows for safer queries, since the values are escaped automatically by the system.</p> - -<p class="important"><strong>Note:</strong> If you intend to write your own queries you can disable this class in your database config file, allowing the core database library and adapter to utilize fewer resources.<br /></p> - -<ul> -<li><a href="#select">Selecting Data</a></li> -<li><a href="#insert">Inserting Data</a></li> -<li><a href="#update">Updating Data</a></li> -<li><a href="#delete">Deleting Data</a></li> -<li><a href="#chaining">Method Chaining</a></li> -<li><a href="#caching">Active Record Caching</a></li> -</ul> - -<h1><a name="select"> </a>Selecting Data</h1> - -<p>The following functions allow you to build SQL <strong>SELECT</strong> statements.</p> - -<p><strong>Note: If you are using PHP 5 you can use method chaining for more compact syntax. This is described at the end of the page.</strong></p> - - -<h2>$this->db->get();</h2> - -<p>Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table:</p> - -<code>$query = $this->db->get('mytable');<br /> -<br /> -// Produces: SELECT * FROM mytable</code> - -<p>The second and third parameters enable you to set a limit and offset clause:</p> - -<code>$query = $this->db->get('mytable', 10, 20);<br /> -<br /> -// Produces: SELECT * FROM mytable LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)</code> - -<p>You'll notice that the above function is assigned to a variable named <kbd>$query</kbd>, which can be used to show the results:</p> - -<code>$query = $this->db->get('mytable');<br /> -<br /> -foreach ($query->result() as $row)<br /> -{<br /> - echo $row->title;<br /> -}</code> - -<p>Please visit the <a href="results.html">result functions</a> page for a full discussion regarding result generation.</p> - - -<h2>$this->db->get_where();</h2> - -<p>Identical to the above function except that it permits you to add a "where" clause in the second parameter, -instead of using the db->where() function:</p> - -<code>$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);</code> - -<p>Please read the about the where function below for more information.</p> -<p class="important">Note: get_where() was formerly known as getwhere(), which has been removed</p> - -<h2>$this->db->select();</h2> -<p>Permits you to write the SELECT portion of your query:</p> -<p><code> -$this->db->select('title, content, date');<br /> -<br /> -$query = $this->db->get('mytable');<br /> -<br /> -// Produces: SELECT title, content, date FROM mytable</code></p> -<p class="important"><strong>Note:</strong> If you are selecting all (*) from a table you do not need to use this function. When omitted, CodeIgniter assumes you wish to SELECT *</p> - -<p>$this->db->select() accepts an optional second parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks. This is useful if you need a compound select statement.</p> -<p><code>$this->db->select('(SELECT SUM(payments.amount) FROM payments WHERE payments.invoice_id=4') AS amount_paid', FALSE); <br /> -$query = $this->db->get('mytable');<br /> -</code></p> -<h2>$this->db->select_max();</h2> -<p>Writes a "SELECT MAX(field)" portion for your query. You can optionally include a second parameter to rename the resulting field.</p> -<p><code> -$this->db->select_max('age');<br /> -$query = $this->db->get('members');<br /> - -// Produces: SELECT MAX(age) as age FROM members<br /> -<br /> -$this->db->select_max('age', 'member_age');<br /> -$query = $this->db->get('members');<br /> -// Produces: SELECT MAX(age) as member_age FROM members</code></p> - -<h2>$this->db->select_min();</h2> -<p>Writes a "SELECT MIN(field)" portion for your query. As with <dfn>select_max()</dfn>, You can optionally include a second parameter to rename the resulting field.</p> -<p><code> -$this->db->select_min('age');<br /> -$query = $this->db->get('members');<br /> -// Produces: SELECT MIN(age) as age FROM members</code></p> - -<h2>$this->db->select_avg();</h2> -<p>Writes a "SELECT AVG(field)" portion for your query. As with <dfn>select_max()</dfn>, You can optionally include a second parameter to rename the resulting field.</p> -<p><code> -$this->db->select_avg('age');<br /> -$query = $this->db->get('members');<br /> -// Produces: SELECT AVG(age) as age FROM members</code></p> - -<h2>$this->db->select_sum();</h2> -<p>Writes a "SELECT SUM(field)" portion for your query. As with <dfn>select_max()</dfn>, You can optionally include a second parameter to rename the resulting field.</p> -<p><code> -$this->db->select_sum('age');<br /> -$query = $this->db->get('members');<br /> -// Produces: SELECT SUM(age) as age FROM members</code></p> - -<h2>$this->db->from();</h2> - -<p>Permits you to write the FROM portion of your query:</p> - -<code> -$this->db->select('title, content, date');<br /> -$this->db->from('mytable');<br /> -<br /> -$query = $this->db->get();<br /> -<br /> -// Produces: SELECT title, content, date FROM mytable</code> - -<p class="important">Note: As shown earlier, the FROM portion of your query can be specified in the <dfn>$this->db->get()</dfn> function, so use whichever method -you prefer.</p> - -<h2>$this->db->join();</h2> - -<p>Permits you to write the JOIN portion of your query:</p> - -<code> -$this->db->select('*');<br /> -$this->db->from('blogs');<br /> -$this->db->join('comments', 'comments.id = blogs.id');<br /> -<br /> -$query = $this->db->get();<br /> -<br /> -// Produces: <br /> -// SELECT * FROM blogs<br /> -// JOIN comments ON comments.id = blogs.id<br /> -</code> - -<p>Multiple function calls can be made if you need several joins in one query.</p> - -<p>If you need a specific type of JOIN you can specify it via the third parameter of the function. -Options are: left, right, outer, inner, left outer, and right outer.</p> - -<code> -$this->db->join('comments', 'comments.id = blogs.id', <strong>'left'</strong>);<br /> -<br /> -// Produces: LEFT JOIN comments ON comments.id = blogs.id</code> - - - - - -<h2>$this->db->where();</h2> -<p>This function enables you to set <strong>WHERE</strong> clauses using one of four methods:</p> - -<p class="important"><strong>Note:</strong> All values passed to this function are escaped automatically, producing safer queries.</p> - -<ol> - <li><strong>Simple key/value method:</strong> - - <code>$this->db->where('name', $name); - <br /><br />// Produces: WHERE name = 'Joe' </code> - - <p>Notice that the equal sign is added for you.</p> - - <p>If you use multiple function calls they will be chained together with <var>AND</var> between them:</p> - - <code>$this->db->where('name', $name);<br /> - $this->db->where('title', $title);<br /> - $this->db->where('status', $status); - <br /><br />// WHERE name = 'Joe' AND title = 'boss' AND status = 'active' </code> </li> - - <li><strong>Custom key/value method:</strong> - - <p>You can include an operator in the first parameter in order to control the comparison:</p> - - <code>$this->db->where('name !=', $name);<br /> - $this->db->where('id <', $id); - <br /><br />// Produces: WHERE name != 'Joe' AND id < 45 </code> </li> - <li><strong>Associative array method:</strong> - - - <code> - $array = array('name' => $name, 'title' => $title, 'status' => $status);<br /><br /> - - $this->db->where($array); - <br /><br />// Produces: WHERE name = 'Joe' AND title = 'boss' AND status = 'active' </code> - - <p>You can include your own operators using this method as well:</p> - - <code> - $array = array('name !=' => $name, 'id <' => $id, 'date >' => $date);<br /><br /> - - $this->db->where($array);</code> </li> - <li><strong>Custom string:</strong> - - <p>You can write your own clauses manually:</p> - - <code> - $where = "name='Joe' AND status='boss' OR status='active'";<br /><br /> - $this->db->where($where);</code></li> - </ol> - - -<p>$this->db->where() accepts an optional third parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks.</p> -<p><code> $this->db->where('MATCH (field) AGAINST ("value")', NULL, FALSE);<br /> -</code></p> -<h2>$this->db->or_where();</h2> -<p>This function is identical to the one above, except that multiple instances are joined by OR:</p> - -<code> -$this->db->where('name !=', $name);<br /> -$this->db->or_where('id >', $id); -<br /> -<br />// Produces: WHERE name != 'Joe' OR id > 50</code> - -<p class="important">Note: or_where() was formerly known as orwhere(), which has been removed.</p> - - -<h2>$this->db->where_in();</h2> -<p>Generates a WHERE field IN ('item', 'item') SQL query joined with AND if appropriate</p> -<p><code> - $names = array('Frank', 'Todd', 'James');<br /> - $this->db->where_in('username', $names);<br /> - // Produces: WHERE username IN ('Frank', 'Todd', 'James')</code></p> - -<h2>$this->db->or_where_in();</h2> -<p>Generates a WHERE field IN ('item', 'item') SQL query joined with OR if appropriate</p> -<p><code> - $names = array('Frank', 'Todd', 'James');<br /> - $this->db->or_where_in('username', $names);<br /> - // Produces: OR username IN ('Frank', 'Todd', 'James')</code></p> - -<h2>$this->db->where_not_in();</h2> -<p>Generates a WHERE field NOT IN ('item', 'item') SQL query joined with AND if appropriate</p> -<p><code> - $names = array('Frank', 'Todd', 'James');<br /> - $this->db->where_not_in('username', $names);<br /> - // Produces: WHERE username NOT IN ('Frank', 'Todd', 'James')</code></p> - -<h2>$this->db->or_where_not_in();</h2> -<p>Generates a WHERE field NOT IN ('item', 'item') SQL query joined with OR if appropriate</p> -<p><code> - $names = array('Frank', 'Todd', 'James');<br /> - $this->db->or_where_not_in('username', $names);<br /> - // Produces: OR username NOT IN ('Frank', 'Todd', 'James')</code></p> - -<h2>$this->db->like();</h2> -<p>This function enables you to generate <strong>LIKE</strong> clauses, useful for doing searches.</p> - -<p class="important"><strong>Note:</strong> All values passed to this function are escaped automatically.</p> - - -<ol> - <li><strong>Simple key/value method:</strong> - - <code>$this->db->like('title', 'match'); - <br /><br />// Produces: WHERE title LIKE '%match%' </code> - - <p>If you use multiple function calls they will be chained together with <var>AND</var> between them:</p> - - <code>$this->db->like('title', 'match');<br /> - $this->db->like('body', 'match'); - <br /><br /> - // WHERE title LIKE '%match%' AND body LIKE '%match%</code> - If you want to control where the wildcard (%) is placed, you can use an optional third argument. Your options are 'before', 'after' and 'both' (which is the default). - <code>$this->db->like('title', 'match', 'before'); - <br /> - // Produces: WHERE title LIKE '%match' <br /> - <br /> - $this->db->like('title', 'match', 'after'); <br /> -// Produces: WHERE title LIKE 'match%' <br /> -<br /> - $this->db->like('title', 'match', 'both'); <br /> -// Produces: WHERE title LIKE '%match%' </code> </li> - -If you do not want to use the wildcard (%) you can pass to the optional third argument the option 'none'. - -<code> - $this->db->like('title', 'match', 'none'); <br /> -// Produces: WHERE title LIKE 'match' -</code> - - <li><strong>Associative array method:</strong> - - <code> - $array = array('title' => $match, 'page1' => $match, 'page2' => $match);<br /><br /> - - $this->db->like($array); - <br /><br />// WHERE title LIKE '%match%' AND page1 LIKE '%match%' AND page2 LIKE '%match%'</code></li> - </ol> - - -<h2>$this->db->or_like();</h2> -<p>This function is identical to the one above, except that multiple instances are joined by OR:</p> - -<code> -$this->db->like('title', 'match');<br /> -$this->db->or_like('body', $match); -<br /> -<br />// WHERE title LIKE '%match%' OR body LIKE '%match%'</code> - - - - -<p class="important">Note: or_like() was formerly known as orlike(), which has been removed.</p> -<h2>$this->db->not_like();</h2> -<p>This function is identical to <strong>like()</strong>, except that it generates NOT LIKE statements:</p> -<code> $this->db->not_like('title', 'match');<br /> -<br /> -// WHERE title NOT LIKE '%match%</code> -<h2>$this->db->or_not_like();</h2> -<p>This function is identical to <strong>not_like()</strong>, except that multiple instances are joined by OR:</p> -<code> $this->db->like('title', 'match');<br /> -$this->db->or_not_like('body', 'match'); <br /> -<br /> -// WHERE title LIKE '%match% OR body NOT LIKE '%match%'</code> -<h2>$this->db->group_by();</h2> -<p>Permits you to write the GROUP BY portion of your query:</p> - -<code>$this->db->group_by("title"); -<br /><br />// Produces: GROUP BY title -</code> - -<p>You can also pass an array of multiple values as well:</p> - -<code>$this->db->group_by(array("title", "date")); -<br /> -<br />// Produces: GROUP BY title, date</code> - -<p class="important">Note: group_by() was formerly known as groupby(), which has been removed. </p> - -<h2> $this->db->distinct();<br /> -</h2> -<p>Adds the "DISTINCT" keyword to a query</p> -<p><code>$this->db->distinct();<br /> - $this->db->get('table');<br /> - <br /> - // Produces: SELECT DISTINCT * FROM table</code></p> -<h2>$this->db->having();</h2> -<p>Permits you to write the HAVING portion of your query. There are 2 possible syntaxes, 1 argument or 2:</p> - -<code>$this->db->having('user_id = 45'); -<br /> -// Produces: HAVING user_id = 45<br /> -<br /> -$this->db->having('user_id', 45); <br /> -// Produces: HAVING user_id = 45<br /> -<br /> -</code> - -<p>You can also pass an array of multiple values as well:</p> - - -<p><code>$this->db->having(array('title =' => 'My Title', 'id <' => $id)); <br /> - <br /> - // Produces: HAVING title = 'My Title', id < 45</code></p> -<p>If you are using a database that CodeIgniter escapes queries for, you can prevent escaping content by passing an optional third argument, and setting it to FALSE.</p> -<p><code>$this->db->having('user_id', 45); <br /> -// Produces: HAVING `user_id` = 45 in some databases such as MySQL - <br /> - $this->db->having('user_id', 45, FALSE); <br /> -// Produces: HAVING user_id = 45</code></p> -<h2>$this->db->or_having();</h2> -<p>Identical to having(), only separates multiple clauses with "OR".</p> -<h2>$this->db->order_by();</h2> -<p>Lets you set an ORDER BY clause. The first parameter contains the name of the column you would like to order by. -The second parameter lets you set the direction of the result. Options are <kbd>asc</kbd> or <kbd>desc</kbd>, or <kbd>random</kbd>. </p> - -<code>$this->db->order_by("title", "desc"); -<br /> -<br />// Produces: ORDER BY title DESC -</code> - -<p>You can also pass your own string in the first parameter:</p> - -<code>$this->db->order_by('title desc, name asc'); -<br /> -<br />// Produces: ORDER BY title DESC, name ASC -</code> - -<p>Or multiple function calls can be made if you need multiple fields.</p> - -<p><code>$this->db->order_by("title", "desc");<br /> - $this->db->order_by("name", "asc"); <br /> - <br /> - // Produces: ORDER BY title DESC, name ASC - </code></p> -<p class="important">Note: order_by() was formerly known as orderby(), which has been removed.</p> -<p class="important">Note: random ordering is not currently supported in Oracle or MSSQL drivers. These will default to 'ASC'.</p> -<h2>$this->db->limit();</h2> -<p>Lets you limit the number of rows you would like returned by the query:</p> - -<code> -$this->db->limit(10);<br /> -<br /> -// Produces: LIMIT 10</code> - - -<p>The second parameter lets you set a result offset.</p> - -<code> -$this->db->limit(10, 20);<br /> -<br /> -// Produces: LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)</code> - - -<h2>$this->db->count_all_results();</h2> - -<p>Permits you to determine the number of rows in a particular Active Record query. Queries will accept Active Record restrictors such as where(), or_where(), like(), or_like(), etc. Example:</p> -<code>echo $this->db->count_all_results('<var>my_table</var>');<br /> - -// Produces an integer, like 25<br /> -<br /> -$this->db->like('title', 'match');<br /> -$this->db->from('<var>my_table</var>');<br /> -echo $this->db->count_all_results();<br /> -// Produces an integer, like 17 </code> - -<h2>$this->db->count_all();</h2> - -<p>Permits you to determine the number of rows in a particular table. Submit the table name in the first parameter. Example:</p> - -<code>echo $this->db->count_all('<var>my_table</var>');<br /> -<br /> -// Produces an integer, like 25</code> - - - -<a name="insert"> </a> -<h1>Inserting Data</h1> - -<h2>$this->db->insert();</h2> -<p>Generates an insert string based on the data you supply, and runs the query. You can either pass an -<strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> - -<code> -$data = array(<br /> - 'title' => 'My title' ,<br /> - 'name' => 'My Name' ,<br /> - 'date' => 'My date'<br /> -);<br /> -<br /> -$this->db->insert('mytable', $data); -<br /><br /> -// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')</code> - -<p>The first parameter will contain the table name, the second is an associative array of values.</p> - -<p>Here is an example using an object:</p> - -<code> -/*<br /> - class Myclass {<br /> - var $title = 'My Title';<br /> - var $content = 'My Content';<br /> - var $date = 'My Date';<br /> - }<br /> -*/<br /> -<br /> -$object = new Myclass;<br /> -<br /> -$this->db->insert('mytable', $object); -<br /><br /> -// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')</code> - -<p>The first parameter will contain the table name, the second is an object.</p> - -<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> - -<h2>$this->db->insert_batch();</h2> -<p>Generates an insert string based on the data you supply, and runs the query. You can either pass an -<strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> - -<code> -$data = array(<br/> - array(<br /> - 'title' => 'My title' ,<br /> - 'name' => 'My Name' ,<br /> - 'date' => 'My date'<br /> - ),<br /> - array(<br /> - 'title' => 'Another title' ,<br /> - 'name' => 'Another Name' ,<br /> - 'date' => 'Another date'<br /> - )<br/> -);<br /> -<br /> -$this->db->insert_batch('mytable', $data); -<br /><br /> -// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')</code> - -<p>The first parameter will contain the table name, the second is an associative array of values.</p> - -<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> - - - -<h2>$this->db->set();</h2> -<p>This function enables you to set values for <dfn>inserts</dfn> or <dfn>updates</dfn>.</p> - -<p><strong>It can be used instead of passing a data array directly to the insert or update functions:</strong> </p> - -<code>$this->db->set('name', $name); -<br /> -$this->db->insert('mytable'); -<br /><br /> -// Produces: INSERT INTO mytable (name) VALUES ('{$name}')</code> - -<p>If you use multiple function called they will be assembled properly based on whether you are doing an insert or an update:</p> - -<code>$this->db->set('name', $name);<br /> -$this->db->set('title', $title);<br /> -$this->db->set('status', $status);<br /> -$this->db->insert('mytable'); </code> -<p><strong>set()</strong> will also accept an optional third parameter ($escape), that will prevent data from being escaped if set to FALSE. To illustrate the difference, here is set() used both with and without the escape parameter.</p> -<p><code>$this->db->set('field', 'field+1', FALSE);<br /> - $this->db->insert('mytable'); <br /> - // gives INSERT INTO mytable (field) VALUES (field+1)<br /> - <br /> - $this->db->set('field', 'field+1');<br /> - $this->db->insert('mytable'); <br /> - // gives INSERT INTO mytable (field) VALUES ('field+1')</code></p> -<p>You can also pass an associative array to this function:</p> -<code> -$array = array('name' => $name, 'title' => $title, 'status' => $status);<br /><br /> - -$this->db->set($array);<br /> -$this->db->insert('mytable'); -</code> - -<p>Or an object:</p> - - -<code> -/*<br /> - class Myclass {<br /> - var $title = 'My Title';<br /> - var $content = 'My Content';<br /> - var $date = 'My Date';<br /> - }<br /> -*/<br /> -<br /> -$object = new Myclass;<br /> -<br /> -$this->db->set($object);<br /> -$this->db->insert('mytable'); -</code> - - - -<a name="update"> </a> -<h1>Updating Data</h1> - -<h2>$this->db->update();</h2> -<p>Generates an update string and runs the query based on the data you supply. You can pass an -<strong>array</strong> or an <strong>object</strong> to the function. Here is an example using -an array:</p> - -<code> -$data = array(<br /> - 'title' => $title,<br /> - 'name' => $name,<br /> - 'date' => $date<br /> - );<br /> -<br /> -$this->db->where('id', $id);<br /> -$this->db->update('mytable', $data); -<br /><br /> -// Produces:<br /> -// UPDATE mytable <br /> -// SET title = '{$title}', name = '{$name}', date = '{$date}'<br /> -// WHERE id = $id</code> - -<p>Or you can supply an object:</p> - -<code> -/*<br /> - class Myclass {<br /> - var $title = 'My Title';<br /> - var $content = 'My Content';<br /> - var $date = 'My Date';<br /> - }<br /> -*/<br /> -<br /> -$object = new Myclass;<br /> -<br /> -$this->db->where('id', $id);<br /> -$this->db->update('mytable', $object); -<br /> -<br /> -// Produces:<br /> -// UPDATE mytable <br /> -// SET title = '{$title}', name = '{$name}', date = '{$date}'<br /> -// WHERE id = $id</code> - - - -<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> - -<p>You'll notice the use of the <dfn>$this->db->where()</dfn> function, enabling you to set the WHERE clause. -You can optionally pass this information directly into the update function as a string:</p> - -<code>$this->db->update('mytable', $data, "id = 4");</code> - -<p>Or as an array:</p> - -<code>$this->db->update('mytable', $data, array('id' => $id));</code> - -<p>You may also use the <dfn>$this->db->set()</dfn> function described above when performing updates.</p> - -<h2>$this->db->update_batch();</h2> -<p>Generates an update string based on the data you supply, and runs the query. You can either pass an -<strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> - -<code> -$data = array(<br/> - array(<br /> - 'title' => 'My title' ,<br /> - 'name' => 'My Name 2' ,<br /> - 'date' => 'My date 2'<br /> - ),<br /> - array(<br /> - 'title' => 'Another title' ,<br /> - 'name' => 'Another Name 2' ,<br /> - 'date' => 'Another date 2'<br /> - )<br/> -);<br /> -<br /> -$this->db->update_batch('mytable', $data, 'title'); -<br /><br /> -// Produces: <br /> -// UPDATE `mytable` SET `name` = CASE<br /> -// WHEN `title` = 'My title' THEN 'My Name 2'<br /> -// WHEN `title` = 'Another title' THEN 'Another Name 2'<br /> -// ELSE `name` END,<br /> -// `date` = CASE <br /> -// WHEN `title` = 'My title' THEN 'My date 2'<br /> -// WHEN `title` = 'Another title' THEN 'Another date 2'<br /> -// ELSE `date` END<br /> -// WHERE `title` IN ('My title','Another title')</code> - -<p>The first parameter will contain the table name, the second is an associative array of values, the third parameter is the where key.</p> - -<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> - - -<a name="delete"> </a> -<h1>Deleting Data</h1> - - - -<h2>$this->db->delete();</h2> -<p>Generates a delete SQL string and runs the query.</p> - -<code> -$this->db->delete('mytable', array('id' => $id)); -<br /><br /> -// Produces:<br /> -// DELETE FROM mytable <br /> -// WHERE id = $id</code> - -<p>The first parameter is the table name, the second is the where clause. You can also use the <dfn>where()</dfn> or <dfn>or_where()</dfn> functions instead of passing -the data to the second parameter of the function:</p> - -<p><code> $this->db->where('id', $id);<br /> - $this->db->delete('mytable'); <br /> - <br /> - // Produces:<br /> - // DELETE FROM mytable <br /> - // WHERE id = $id</code></p> -<p>An array of table names can be passed into delete() if you would like to delete data from more than 1 table.</p> -<p><code>$tables = array('table1', 'table2', 'table3');<br /> -$this->db->where('id', '5');<br /> -$this->db->delete($tables);</code></p> -<p>If you want to delete all data from a table, you can use the <dfn>truncate()</dfn> function, or <dfn>empty_table()</dfn>.</p> -<h2>$this->db->empty_table();</h2> -<p>Generates a delete SQL string and runs the query.<code> $this->db->empty_table('mytable'); <br /> - <br /> -// Produces<br /> -// DELETE FROM mytable</code></p> -<h2>$this->db->truncate();</h2> -<p>Generates a truncate SQL string and runs the query.</p> -<code> $this->db->from('mytable'); <br /> -$this->db->truncate(); <br /> -// or <br /> -$this->db->truncate('mytable'); <br /> -<br /> -// Produce:<br /> -// TRUNCATE mytable <br /> -</code> -<p class="important"><strong>Note:</strong> If the TRUNCATE command isn't available, truncate() will execute as "DELETE FROM table".</p> - -<h1><a name="chaining"> </a>Method Chaining</h1> - -<p>Method chaining allows you to simplify your syntax by connecting multiple functions. Consider this example:</p> - -<code> -<dfn>$this->db</dfn><kbd>-></kbd><var>select</var>('title')<kbd>-></kbd><var>from</var>('mytable')<kbd>-></kbd><var>where</var>('id', $id)<kbd>-></kbd><var>limit</var>(10, 20);<br /> -<br /> -$query = $this->db->get();</code> - -<p class="important"><strong>Note:</strong> Method chaining only works with PHP 5.</p> - -<p> </p> - -<h1><a name="caching"> </a>Active Record Caching</h1> - -<p>While not "true" caching, Active Record enables you to save (or "cache") certain parts of your queries for reuse at a later point in your script's execution. Normally, when an Active Record call is completed, all stored information is reset for the next call. With caching, you can prevent this reset, and reuse information easily.</p> - -<p>Cached calls are cumulative. If you make 2 cached select() calls, and then 2 uncached select() calls, this will result in 4 select() calls. There are three Caching functions available:</p> - -<h2>$this->db->start_cache()</h2> - -<p>This function must be called to begin caching. All Active Record queries of the correct type (see below for supported queries) are stored for later use.</p> - -<h2>$this->db->stop_cache()</h2> - -<p>This function can be called to stop caching.</p> - -<h2>$this->db->flush_cache()</h2> - -<p>This function deletes all items from the Active Record cache.</p> - -<p>Here's a usage example:</p> - -<p><code>$this->db->start_cache();<br /> -$this->db->select('field1');<br /> -$this->db->stop_cache();<br /><br /> -$this->db->get('tablename');<br /> -<br /> -//Generates: SELECT `field1` FROM (`tablename`)<br /> -<br /> -$this->db->select('field2');<br /> -$this->db->get('tablename');<br /> -<br /> -//Generates: SELECT `field1`, `field2` FROM (`tablename`)<br /> -<br /> -$this->db->flush_cache();<br /> -<br /> -$this->db->select('field2');<br /> -$this->db->get('tablename');<br /> -<br /> -//Generates: SELECT `field2` FROM (`tablename`)</code></p> - -<p class="important"> <strong>Note:</strong> The following statements can be cached: select, from, join, where, like, group_by, having, order_by, set</p> -<p> </p> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="helpers.html">Query Helper Functions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="transactions.html">Transactions</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html deleted file mode 100644 index d88e5c951..000000000 --- a/user_guide/database/caching.html +++ /dev/null @@ -1,220 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Database Caching Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Database Caching Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Database Caching Class</h1> - -<p>The Database Caching Class permits you to cache your queries as text files for reduced database load.</p> - -<p class="important"><strong>Important:</strong> This class is initialized automatically by the database driver -when caching is enabled. Do NOT load this class manually.<br /><br /> - -<strong>Also note:</strong> Not all query result functions are available when you use caching. Please read this page carefully.</p> - -<h2>Enabling Caching</h2> - -<p>Caching is enabled in three steps:</p> - -<ul> -<li>Create a writable directory on your server where the cache files can be stored.</li> -<li>Set the path to your cache folder in your <dfn>application/config/database.php</dfn> file.</li> -<li>Enable the caching feature, either globally by setting the preference in your <dfn>application/config/database.php</dfn> file, or manually as described below.</li> -</ul> - -<p>Once enabled, caching will happen automatically whenever a page is loaded that contains database queries.</p> - - -<h2>How Does Caching Work?</h2> - -<p>CodeIgniter's query caching system happens dynamically when your pages are viewed. -When caching is enabled, the first time a web page is loaded, the query result object will -be serialized and stored in a text file on your server. The next time the page is loaded the cache file will be used instead of -accessing your database. Your database usage can effectively be reduced to zero for any pages that have been cached.</p> - -<p>Only <dfn>read-type</dfn> (SELECT) queries can be cached, since these are the only type of queries that produce a result. -<dfn>Write-type</dfn> (INSERT, UPDATE, etc.) queries, since they don't generate a result, will not be cached by the system.</p> - -<p>Cache files DO NOT expire. Any queries that have been cached will remain cached until you delete them. The caching system -permits you clear caches associated with individual pages, or you can delete the entire collection of cache files. -Typically you'll want to use the housekeeping functions described below to delete cache files after certain -events take place, like when you've added new information to your database.</p> - -<h2>Will Caching Improve Your Site's Performance?</h2> - -<p>Getting a performance gain as a result of caching depends on many factors. -If you have a highly optimized database under very little load, you probably won't see a performance boost. -If your database is under heavy use you probably will see an improved response, assuming your file-system is not -overly taxed. Remember that caching simply changes how your information is retrieved, shifting it from being a database -operation to a file-system one.</p> - -<p>In some clustered server environments, for example, caching may be detrimental since file-system operations are so intense. -On single servers in shared environments, caching will probably be beneficial. Unfortunately there is no -single answer to the question of whether you should cache your database. It really depends on your situation.</p> - -<h2>How are Cache Files Stored?</h2> - -<p>CodeIgniter places the result of EACH query into its own cache file. Sets of cache files are further organized into -sub-folders corresponding to your controller functions. To be precise, the sub-folders are named identically to the -first two segments of your URI (the controller class name and function name).</p> - -<p>For example, let's say you have a controller called <dfn>blog</dfn> with a function called <dfn>comments</dfn> that -contains three queries. The caching system will create a cache folder -called <kbd>blog+comments</kbd>, into which it will write three cache files.</p> - -<p>If you use dynamic queries that change based on information in your URI (when using pagination, for example), each instance of -the query will produce its own cache file. It's possible, therefore, to end up with many times more cache files than you have -queries.</p> - - -<h2>Managing your Cache Files</h2> - -<p>Since cache files do not expire, you'll need to build deletion routines into your application. For example, let's say you have a blog -that allows user commenting. Whenever a new comment is submitted you'll want to delete the cache files associated with the -controller function that serves up your comments. You'll find two delete functions described below that help you -clear data.</p> - - -<h2>Not All Database Functions Work with Caching</h2> - -<p>Lastly, we need to point out that the result object that is cached is a simplified version of the full result object. For that reason, -some of the query result functions are not available for use.</p> - -<p>The following functions <kbd>ARE NOT</kbd> available when using a cached result object:</p> - -<ul> -<li>num_fields()</li> -<li>field_names()</li> -<li>field_data()</li> -<li>free_result()</li> -</ul> - -<p>Also, the two database resources (result_id and conn_id) are not available when caching, since result resources only -pertain to run-time operations.</p> - - -<br /> - -<h1>Function Reference</h1> - - - -<h2>$this->db->cache_on() / $this->db->cache_off()</h2> - -<p>Manually enables/disables caching. This can be useful if you want to -keep certain queries from being cached. Example:</p> - -<code> -// Turn caching on<br /> -$this->db->cache_on();<br /> -$query = $this->db->query("SELECT * FROM mytable");<br /> -<br /> -// Turn caching off for this one query<br /> -$this->db->cache_off();<br /> -$query = $this->db->query("SELECT * FROM members WHERE member_id = '$current_user'");<br /> -<br /> -// Turn caching back on<br /> -$this->db->cache_on();<br /> -$query = $this->db->query("SELECT * FROM another_table"); -</code> - - -<h2>$this->db->cache_delete()</h2> - -<p>Deletes the cache files associated with a particular page. This is useful if you need to clear caching after you update your database.</p> - -<p>The caching system saves your cache files to folders that correspond to the URI of the page you are viewing. For example, if you are viewing -a page at <dfn>example.com/index.php/blog/comments</dfn>, the caching system will put all cache files associated with it in a folder -called <dfn>blog+comments</dfn>. To delete those particular cache files you will use:</p> - -<code>$this->db->cache_delete('blog', 'comments');</code> - -<p>If you do not use any parameters the current URI will be used when determining what should be cleared.</p> - - -<h2>$this->db->cache_delete_all()</h2> - -<p>Clears all existing cache files. Example:</p> - -<code>$this->db->cache_delete_all();</code> - - - - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="call_function.html">Custom Function Calls</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="forge.html">Database manipulation with Database Forge</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/call_function.html b/user_guide/database/call_function.html deleted file mode 100644 index a56116924..000000000 --- a/user_guide/database/call_function.html +++ /dev/null @@ -1,118 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Custom Function Calls : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Custom Function Calls -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Custom Function Calls</h1> - -<h2>$this->db->call_function();</h2> - -<p>This function enables you to call PHP database functions that are not natively included in CodeIgniter, in a platform independent manner. -For example, lets say you want to call the <dfn>mysql_get_client_info()</dfn> function, which is <strong>not</strong> natively supported -by CodeIgniter. You could do so like this: -</p> - -<code>$this->db->call_function('<var>get_client_info</var>');</code> - -<p>You must supply the name of the function, <strong>without</strong> the <var>mysql_</var> prefix, in the first parameter. The prefix is added -automatically based on which database driver is currently being used. This permits you to run the same function on different database platforms. -Obviously not all function calls are identical between platforms, so there are limits to how useful this function can be in terms of portability.</p> - -<p>Any parameters needed by the function you are calling will be added to the second parameter.</p> - -<code>$this->db->call_function('<var>some_function</var>', $param1, $param2, etc..);</code> - - -<p>Often, you will either need to supply a database connection ID or a database result ID. The connection ID can be accessed using:</p> - -<code>$this->db->conn_id;</code> - -<p>The result ID can be accessed from within your result object, like this:</p> - -<code>$query = $this->db->query("SOME QUERY");<br /> -<br /> -<var>$query->result_id;</var></code> - - - - - - - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="fields.html">Field MetaData</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="caching.html">Query Caching</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html deleted file mode 100644 index 1e0b0e2f6..000000000 --- a/user_guide/database/configuration.html +++ /dev/null @@ -1,164 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Database Configuration : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Configuration -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Database Configuration</h1> - -<p>CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.). -The config file is located at <samp>application/config/database.php</samp>. You can also set database connection values for specific <a href="../libraries/config.html">environments</a> by placing <strong>database.php</strong> it the respective environment config folder.</p> - -<p>The config settings are stored in a multi-dimensional array with this prototype:</p> - -<code>$db['default']['hostname'] = "localhost";<br /> -$db['default']['username'] = "root";<br /> -$db['default']['password'] = "";<br /> -$db['default']['database'] = "database_name";<br /> -$db['default']['dbdriver'] = "mysql";<br /> -$db['default']['dbprefix'] = "";<br /> -$db['default']['pconnect'] = TRUE;<br /> -$db['default']['db_debug'] = FALSE;<br /> -$db['default']['cache_on'] = FALSE;<br /> -$db['default']['cachedir'] = "";<br /> -$db['default']['char_set'] = "utf8";<br /> -$db['default']['dbcollat'] = "utf8_general_ci";<br /> -$db['default']['swap_pre'] = "";<br /> -$db['default']['autoinit'] = TRUE;<br /> -$db['default']['stricton'] = FALSE;</code> - -<p>The reason we use a multi-dimensional array rather than a more simple one is to permit you to optionally store -multiple sets of connection values. If, for example, you run multiple environments (development, production, test, etc.) -under a single installation, you can set up a connection group for each, then switch between groups as needed. -For example, to set up a "test" environment you would do this:</p> - -<code>$db['test']['hostname'] = "localhost";<br /> -$db['test']['username'] = "root";<br /> -$db['test']['password'] = "";<br /> -$db['test']['database'] = "database_name";<br /> -$db['test']['dbdriver'] = "mysql";<br /> -$db['test']['dbprefix'] = "";<br /> -$db['test']['pconnect'] = TRUE;<br /> -$db['test']['db_debug'] = FALSE;<br /> -$db['test']['cache_on'] = FALSE;<br /> -$db['test']['cachedir'] = "";<br /> -$db['test']['char_set'] = "utf8";<br /> -$db['test']['dbcollat'] = "utf8_general_ci";<br /> -$db['test']['swap_pre'] = "";<br /> -$db['test']['autoinit'] = TRUE;<br /> -$db['test']['stricton'] = FALSE;</code> - - -<p>Then, to globally tell the system to use that group you would set this variable located in the config file:</p> - -<code>$active_group = "test";</code> - -<p>Note: The name "test" is arbitrary. It can be anything you want. By default we've used the word "default" -for the primary connection, but it too can be renamed to something more relevant to your project.</p> - -<h3>Active Record</h3> - -<p>The <a href="active_record.html">Active Record Class</a> is globally enabled or disabled by setting the $active_record variable in the database configuration file to TRUE/FALSE (boolean). If you are not using the active record class, setting it to FALSE will utilize fewer resources when the database classes are initialized.</p> - -<code>$active_record = TRUE;</code> - -<p class="important"><strong>Note:</strong> that some CodeIgniter classes such as Sessions require Active Records be enabled to access certain functionality.</p> - -<h3>Explanation of Values:</h3> - -<ul> -<li><strong>hostname</strong> - The hostname of your database server. Often this is "localhost".</li> -<li><strong>username</strong> - The username used to connect to the database.</li> -<li><strong>password</strong> - The password used to connect to the database.</li> -<li><strong>database</strong> - The name of the database you want to connect to.</li> -<li><strong>dbdriver</strong> - The database type. ie: mysql, postgres, odbc, etc. Must be specified in lower case.</li> -<li><strong>dbprefix</strong> - An optional table prefix which will added to the table name when running <a href="active_record.html">Active Record</a> queries. This permits multiple CodeIgniter installations to share one database.</li> -<li><strong>pconnect</strong> - TRUE/FALSE (boolean) - Whether to use a persistent connection.</li> -<li><strong>db_debug</strong> - TRUE/FALSE (boolean) - Whether database errors should be displayed.</li> -<li><strong>cache_on</strong> - TRUE/FALSE (boolean) - Whether database query caching is enabled, see also <a href="caching.html">Database Caching Class</a>.</li> -<li><strong>cachedir</strong> - The absolute server path to your database query cache directory.</li> -<li><strong>char_set</strong> - The character set used in communicating with the database.</li> -<li><strong>dbcollat</strong> - The character collation used in communicating with the database. <p class="important"><strong>Note:</strong> For MySQL and MySQLi databases, this setting is only used as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 (and in table creation queries made with DB Forge). There is an incompatibility in PHP with mysql_real_escape_string() which can make your site vulnerable to SQL injection if you are using a multi-byte character set and are running versions lower than these. Sites using Latin-1 or UTF-8 database character set and collation are unaffected.</p></li> -<li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li> -<li><strong>autoinit</strong> - Whether or not to automatically connect to the database when the library loads. If set to false, the connection will take place prior to executing the first query.</li> -<li><strong>stricton</strong> - TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application.</li> -<li><strong>port</strong> - The database port number. To use this value you have to add a line to the database config array.<code>$db['default']['port'] = 5432;</code> -</ul> - -<p class="important"><strong>Note:</strong> Depending on what database platform you are using (MySQL, Postgres, etc.) -not all values will be needed. For example, when using SQLite you will not need to supply a username or password, and -the database name will be the path to your database file. The information above assumes you are using MySQL.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="examples.html">Quick Start: Usage Examples</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="connecting.html">Connecting to your Database</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html deleted file mode 100644 index 779774fdf..000000000 --- a/user_guide/database/connecting.html +++ /dev/null @@ -1,188 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Connecting to your Database : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Connecting -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Connecting to your Database</h1> - -<p>There are two ways to connect to a database:</p> - -<h2>Automatically Connecting</h2> - -<p>The "auto connect" feature will load and instantiate the database class with every page load. -To enable "auto connecting", add the word <var>database</var> to the library array, as indicated in the following file:</p> - -<p><kbd>application/config/autoload.php</kbd></p> - -<h2>Manually Connecting</h2> - -<p>If only some of your pages require database connectivity you can manually connect to your database by adding this -line of code in any function where it is needed, or in your class constructor to make the database -available globally in that class.</p> - -<code>$this->load->database();</code> - -<p class="important">If the above function does <strong>not</strong> contain any information in the first parameter it will connect -to the group specified in your database config file. For most people, this is the preferred method of use.</p> - -<h3>Available Parameters</h3> - -<ol> - <li>The database connection values, passed either as an array or a DSN string.</li> - <li>TRUE/FALSE (boolean). Whether to return the connection ID (see Connecting to Multiple Databases below).</li> - <li>TRUE/FALSE (boolean). Whether to enable the Active Record class. Set to TRUE by default.</li> -</ol> - - -<h3>Manually Connecting to a Database</h3> - -<p>The first parameter of this function can <strong>optionally</strong> be used to specify a particular database group -from your config file, or you can even submit connection values for a database that is not specified in your config file. -Examples:</p> - -<p>To choose a specific group from your config file you can do this:</p> - -<code>$this->load->database('<samp>group_name</samp>');</code> - -<p>Where <samp>group_name</samp> is the name of the connection group from your config file.</p> - - -<p>To connect manually to a desired database you can pass an array of values:</p> - -<code>$config['hostname'] = "localhost";<br /> -$config['username'] = "myusername";<br /> -$config['password'] = "mypassword";<br /> -$config['database'] = "mydatabase";<br /> -$config['dbdriver'] = "mysql";<br /> -$config['dbprefix'] = "";<br /> -$config['pconnect'] = FALSE;<br /> -$config['db_debug'] = TRUE;<br /> -$config['cache_on'] = FALSE;<br /> -$config['cachedir'] = "";<br /> -$config['char_set'] = "utf8";<br /> -$config['dbcollat'] = "utf8_general_ci";<br /> -<br /> -$this->load->database(<samp>$config</samp>);</code> - -<p>For information on each of these values please see the <a href="configuration.html">configuration page</a>.</p> - -<p>Or you can submit your database values as a Data Source Name. DSNs must have this prototype:</p> - -<code>$dsn = 'dbdriver://username:password@hostname/database';<br /> -<br /> -$this->load->database(<samp>$dsn</samp>);</code> - -<p>To override default config values when connecting with a DSN string, add the config variables as a query string.</p> - -<code>$dsn = 'dbdriver://username:password@hostname/database?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir=/path/to/cache';<br /> -<br /> -$this->load->database(<samp>$dsn</samp>);</code> - -<h2>Connecting to Multiple Databases</h2> - -<p>If you need to connect to more than one database simultaneously you can do so as follows:</p> - - -<code>$DB1 = $this->load->database('group_one', TRUE);<br /> -$DB2 = $this->load->database('group_two', TRUE); -</code> - -<p>Note: Change the words "group_one" and "group_two" to the specific group names you are connecting to (or -you can pass the connection values as indicated above).</p> - -<p>By setting the second parameter to TRUE (boolean) the function will return the database object.</p> - -<div class="important"> -<p>When you connect this way, you will use your object name to issue commands rather than the syntax used throughout this guide. In other words, rather than issuing commands with:</p> - -<p>$this->db->query();<br />$this->db->result();<br /> etc...</p> - -<p>You will instead use:</p> - -<p>$DB1->query();<br />$DB1->result();<br /> etc...</p> - -</div> - -<h2>Reconnecting / Keeping the Connection Alive</h2> - -<p>If the database server's idle timeout is exceeded while you're doing some heavy PHP lifting (processing an image, for instance), you should consider pinging the server by using the <dfn>reconnect()</dfn> method before sending further queries, which can gracefully keep the connection alive or re-establish it.</p> - -<code>$this->db->reconnect();</code> - -<h2>Manually closing the Connection</h2> - -<p>While CodeIgniter intelligently takes care of closing your database connections, you can explicitly close the connection.</p> - -<code>$this->db->close();</code> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="configuration.html">Database Configuration</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="queries.html">Queries</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/examples.html b/user_guide/database/examples.html deleted file mode 100644 index a9eb5b5d3..000000000 --- a/user_guide/database/examples.html +++ /dev/null @@ -1,217 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Database Quick Start : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Database Example Code -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Database Quick Start: Example Code</h1> - -<p>The following page contains example code showing how the database class is used. For complete details please -read the individual pages describing each function.</p> - - -<h2>Initializing the Database Class</h2> - -<p>The following code loads and initializes the database class based on your <a href="configuration.html">configuration</a> settings:</p> - -<code>$this->load->database();</code> - -<p>Once loaded the class is ready to be used as described below.</p> - -<p>Note: If all your pages require database access you can connect automatically. See the <a href="connecting.html">connecting</a> page for details.</p> - - -<h2>Standard Query With Multiple Results (Object Version)</h2> - -<code>$query = $this->db->query('SELECT name, title, email FROM my_table');<br /> -<br /> -foreach ($query->result() as $row)<br /> -{<br /> - echo $row->title;<br /> - echo $row->name;<br /> - echo $row->email;<br /> -}<br /> -<br /> -echo 'Total Results: ' . $query->num_rows(); -</code> - -<p>The above <dfn>result()</dfn> function returns an array of <strong>objects</strong>. Example: $row->title</p> - - -<h2>Standard Query With Multiple Results (Array Version)</h2> - -<code>$query = $this->db->query('SELECT name, title, email FROM my_table');<br /> -<br /> -foreach ($query->result_array() as $row)<br /> -{<br /> - echo $row['title'];<br /> - echo $row['name'];<br /> - echo $row['email'];<br /> -}</code> - -<p>The above <dfn>result_array()</dfn> function returns an array of standard array indexes. Example: $row['title']</p> - - -<h2>Testing for Results</h2> - -<p>If you run queries that might <strong>not</strong> produce a result, you are encouraged to test for a result first -using the <dfn>num_rows()</dfn> function:</p> - -<code> -$query = $this->db->query("YOUR QUERY");<br /> -<br /> -if ($query->num_rows() > 0)<br /> -{<br /> - foreach ($query->result() as $row)<br /> - {<br /> - echo $row->title;<br /> - echo $row->name;<br /> - echo $row->body;<br /> - }<br /> -} -</code> - - - - -<h2>Standard Query With Single Result</h2> - -<code>$query = $this->db->query('SELECT name FROM my_table LIMIT 1');<br /> -<br /> -$row = $query->row();<br /> -echo $row->name;<br /> -</code> - -<p>The above <dfn>row()</dfn> function returns an <strong>object</strong>. Example: $row->name</p> - - -<h2>Standard Query With Single Result (Array version)</h2> - -<code>$query = $this->db->query('SELECT name FROM my_table LIMIT 1');<br /> -<br /> -$row = $query->row_array();<br /> -echo $row['name'];<br /> -</code> - -<p>The above <dfn>row_array()</dfn> function returns an <strong>array</strong>. Example: $row['name']</p> - - -<h2>Standard Insert</h2> - -<code> -$sql = "INSERT INTO mytable (title, name) <br /> - VALUES (".$this->db->escape($title).", ".$this->db->escape($name).")";<br /> -<br /> -$this->db->query($sql);<br /> -<br /> -echo $this->db->affected_rows(); -</code> - - - - -<h2>Active Record Query</h2> - -<p>The <a href="active_record.html">Active Record Pattern</a> gives you a simplified means of retrieving data:</p> - -<code> -$query = $this->db->get('table_name');<br /> -<br /> -foreach ($query->result() as $row)<br /> -{<br /> - echo $row->title;<br /> -}</code> - -<p>The above <dfn>get()</dfn> function retrieves all the results from the supplied table. -The <a href="active_record.html">Active Record</a> class contains a full compliment of functions -for working with data.</p> - - -<h2>Active Record Insert</h2> - -<code> -$data = array(<br /> - 'title' => $title,<br /> - 'name' => $name,<br /> - 'date' => $date<br /> - );<br /> -<br /> -$this->db->insert('mytable', $data); -<br /><br /> -// Produces: INSERT INTO mytable (title, name, date) VALUES ('{$title}', '{$name}', '{$date}')</code> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Database Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="configuration.html">Database Configuration</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html deleted file mode 100644 index de373beca..000000000 --- a/user_guide/database/fields.html +++ /dev/null @@ -1,163 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Field Data : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Field Names -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Field Data</h1> - - -<h2>$this->db->list_fields()</h2> -<p>Returns an array containing the field names. This query can be called two ways:</p> - - -<p>1. You can supply the table name and call it from the <dfn>$this->db-></dfn> object:</p> - -<code> -$fields = $this->db->list_fields('table_name');<br /><br /> - -foreach ($fields as $field)<br /> -{<br /> - echo $field;<br /> -} -</code> - -<p>2. You can gather the field names associated with any query you run by calling the function -from your query result object:</p> - -<code> -$query = $this->db->query('SELECT * FROM some_table'); -<br /><br /> - -foreach ($query->list_fields() as $field)<br /> -{<br /> - echo $field;<br /> -} -</code> - - -<h2>$this->db->field_exists()</h2> - -<p>Sometimes it's helpful to know whether a particular field exists before performing an action. -Returns a boolean TRUE/FALSE. Usage example:</p> - -<code> -if ($this->db->field_exists('field_name', 'table_name'))<br /> -{<br /> - // some code...<br /> -} -</code> - -<p>Note: Replace <em>field_name</em> with the name of the column you are looking for, and replace -<em>table_name</em> with the name of the table you are looking for.</p> - - -<h2>$this->db->field_data()</h2> -<p>Returns an array of objects containing field information.</p> -<p>Sometimes it's helpful to gather the field names or other metadata, like the column type, max length, etc.</p> - - -<p class="important">Note: Not all databases provide meta-data.</p> - -<p>Usage example:</p> - -<code> -$fields = $this->db->field_data('table_name');<br /><br /> - -foreach ($fields as $field)<br /> -{<br /> - echo $field->name;<br /> - echo $field->type;<br /> - echo $field->max_length;<br /> - echo $field->primary_key;<br /> -} -</code> - -<p>If you have run a query already you can use the result object instead of supplying the table name:</p> - -<code> -$query = $this->db->query("YOUR QUERY");<br /> -$fields = $query->field_data(); -</code> - - -<p>The following data is available from this function if supported by your database:</p> - -<ul> -<li>name - column name</li> -<li>max_length - maximum length of the column</li> -<li>primary_key - 1 if the column is a primary key</li> -<li>type - the type of the column</li> -</ul> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="table_data.html"> Table Data</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="call_function.html">Custom Function Calls</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html deleted file mode 100644 index ef6f92df5..000000000 --- a/user_guide/database/forge.html +++ /dev/null @@ -1,234 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Database Forge Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Database Forge Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Database Forge Class</h1> - -<p>The Database Forge Class contains functions that help you manage your database.</p> - -<h3>Table of Contents</h3> - -<ul> -<li><a href="#init">Initializing the Forge Class</a></li> -<li><a href="#create">Creating a Database</a></li> -<li><a href="#drop">Dropping a Database</a></li> -<li><a href="#add_field">Adding Fields</a></li> -<li><a href="#add_key">Adding Keys</a></li> -<li><a href="#create_table">Creating a Table</a></li> -<li><a href="#drop_table">Dropping a Table</a></li> -<li><a href="#rename_table">Renaming a Table</a></li> -<li><a href="#modifying_tables">Modifying a Table</a></li> -</ul> - - -<h2><a name="init"></a>Initializing the Forge Class</h2> - -<p class="important"><strong>Important:</strong> In order to initialize the Forge class, your database driver must -already be running, since the forge class relies on it.</p> - -<p>Load the Forge Class as follows:</p> - -<code>$this->load->dbforge()</code> - -<p>Once initialized you will access the functions using the <dfn>$this->dbforge</dfn> object:</p> - -<code>$this->dbforge->some_function()</code> -<h2><a name="create"></a>$this->dbforge->create_database('db_name')</h2> - -<p>Permits you to create the database specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p> - -<code>if ($this->dbforge->create_database('my_db'))<br /> -{<br /> - echo 'Database created!';<br /> -}</code> - - - - -<h2><a name="drop"></a>$this->dbforge->drop_database('db_name')</h2> - -<p>Permits you to drop the database specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p> - -<code>if ($this->dbforge->drop_database('my_db'))<br /> -{<br /> - echo 'Database deleted!';<br /> -}</code> - - -<h1>Creating and Dropping Tables</h1> -<p>There are several things you may wish to do when creating tables. Add fields, add keys to the table, alter columns. CodeIgniter provides a mechanism for this.</p> -<h2><a name="add_field" id="add_field"></a>Adding fields</h2> -<p>Fields are created via an associative array. Within the array you must include a 'type' key that relates to the datatype of the field. For example, INT, VARCHAR, TEXT, etc. Many datatypes (for example VARCHAR) also require a 'constraint' key.</p> -<p><code>$fields = array(<br /> - 'users' => array(<br /> - 'type' => 'VARCHAR',<br /> - 'constraint' => '100',<br /> - ),<br /> - );<br /> - <br /> -// will translate to "users VARCHAR(100)" when the field is added.</code></p> -<p>Additionally, the following key/values can be used:</p> -<ul> - <li>unsigned/true : to generate "UNSIGNED" in the field definition.</li> - <li>default/value : to generate a default value in the field definition.</li> - <li>null/true : to generate "NULL" in the field definition. Without this, the field will default to "NOT NULL".</li> - <li>auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer.</li> - </ul> -<p><code>$fields = array(<br /> - 'blog_id' => array(<br /> - 'type' => 'INT',<br /> - 'constraint' => 5, <br /> - 'unsigned' => TRUE,<br /> - 'auto_increment' => TRUE<br /> - ),<br /> - 'blog_title' => array(<br /> - 'type' => 'VARCHAR',<br /> - 'constraint' => '100',<br /> - ),<br /> - 'blog_author' => array(<br /> - 'type' =>'VARCHAR',<br /> - 'constraint' => '100',<br /> - 'default' => 'King of Town',<br /> - ),<br /> - 'blog_description' => array(<br /> - 'type' => 'TEXT',<br /> - 'null' => TRUE,<br /> - ),<br /> - );<br /> -</code></p> -<p>After the fields have been defined, they can be added using <dfn>$this->dbforge->add_field($fields);</dfn> followed by a call to the <dfn>create_table()</dfn> function.</p> -<h3>$this->dbforge->add_field()</h3> -<p>The add fields function will accept the above array.</p> -<h3>Passing strings as fields</h3> -<p>If you know exactly how you want a field to be created, you can pass the string into the field definitions with add_field()</p> -<p><code>$this->dbforge->add_field("label varchar(100) NOT NULL DEFAULT 'default label'");</code></p> -<p class="important">Note: Multiple calls to <dfn>add_field()</dfn> are cumulative.</p> -<h3>Creating an id field</h3> -<p>There is a special exception for creating id fields. A field with type id will automatically be assinged as an INT(9) auto_incrementing Primary Key.</p> -<p><code>$this->dbforge->add_field('id');<br /> - // gives id INT(9) NOT NULL AUTO_INCREMENT</code></p> -<h2><a name="add_key" id="add_key"></a>Adding Keys</h2> -<p>Generally speaking, you'll want your table to have Keys. This is accomplished with <dfn>$this->dbforge->add_key('field')</dfn>. An optional second parameter set to TRUE will make it a primary key. Note that <dfn>add_key()</dfn> must be followed by a call to <dfn>create_table()</dfn>.</p> -<p>Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.</p> -<p><code>$this->dbforge->add_key('blog_id', TRUE);<br /> - // gives PRIMARY KEY `blog_id` (`blog_id`)<br /> - <br /> - $this->dbforge->add_key('blog_id', TRUE);<br /> - $this->dbforge->add_key('site_id', TRUE);<br /> - // gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`)<br /> - <br /> - $this->dbforge->add_key('blog_name');<br /> - // gives KEY `blog_name` (`blog_name`)<br /> - <br /> - $this->dbforge->add_key(array('blog_name', 'blog_label'));<br /> - // gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`)</code></p> -<h2><a name="create_table" id="create_table"></a>Creating a table</h2> -<p>After fields and keys have been declared, you can create a new table with</p> -<p><code>$this->dbforge->create_table('table_name');<br /> -// gives CREATE TABLE table_name</code></p> -<p>An optional second parameter set to TRUE adds an "IF NOT EXISTS" clause into the definition</p> -<p><code>$this->dbforge->create_table('table_name', TRUE);<br /> -// gives CREATE TABLE IF NOT EXISTS table_name</code></p> -<h2><a name="drop_table" id="drop_table"></a>Dropping a table</h2> -<p>Executes a DROP TABLE sql</p> -<p><code>$this->dbforge->drop_table('table_name');<br /> - // gives DROP TABLE IF EXISTS table_name</code></p> -<h2><a name="rename_table" id="rename_table"></a>Renaming a table</h2> -<p>Executes a TABLE rename</p> -<p><code>$this->dbforge->rename_table('old_table_name', 'new_table_name');<br /> - // gives ALTER TABLE old_table_name RENAME TO new_table_name</code></p> -<h1><a name="modifying_tables" id="modifying_tables"></a>Modifying Tables</h1> -<h2>$this->dbforge->add_column()</h2> -<p>The add_column() function is used to modify an existing table. It accepts the same field array as above, and can be used for an unlimited number of additional fields.</p> -<p><code>$fields = array(<br /> - 'preferences' => array('type' => 'TEXT')<br /> -);<br /> -$this->dbforge->add_column('table_name', $fields);<br /> -<br /> -// gives ALTER TABLE table_name ADD preferences TEXT</code></p> -<h2>$this->dbforge->drop_column()</h2> -<p>Used to remove a column from a table. </p> -<p><code>$this->dbforge->drop_column('table_name', 'column_to_drop');</code></p> -<h2>$this->dbforge->modify_column()</h2> -<p>The usage of this function is identical to add_column(), except it alters an existing column rather than adding a new one. In order to change the name you can add a "name" key into the field defining array.</p> -<p><code>$fields = array(<br /> - 'old_name' => array(<br /> - 'name' => 'new_name',<br /> - 'type' => 'TEXT',<br /> - ),<br /> -);<br /> -$this->dbforge->modify_column('table_name', $fields);<br /> - <br /> - // gives ALTER TABLE table_name CHANGE old_name new_name TEXT </code></p> -<p> </p> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="caching.html">DB Caching Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="utilities.html">Database Utilities Class</a><a href="../libraries/email.html"></a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html deleted file mode 100644 index c0bf08f20..000000000 --- a/user_guide/database/helpers.html +++ /dev/null @@ -1,151 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Query Helper Functions : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Query Helpers -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Query Helper Functions</h1> - - -<h2>$this->db->insert_id()</h2> -<p>The insert ID number when performing database inserts.</p> - -<h2>$this->db->affected_rows()</h2> -<p>Displays the number of affected rows, when doing "write" type queries (insert, update, etc.).</p> -<p>Note: In MySQL "DELETE FROM TABLE" returns 0 affected rows. The database class has a small hack that allows it to return the -correct number of affected rows. By default this hack is enabled but it can be turned off in the database driver file.</p> - - -<h2>$this->db->count_all();</h2> -<p>Permits you to determine the number of rows in a particular table. Submit the table name in the first parameter. Example:</p> -<code>echo $this->db->count_all('<var>my_table</var>');<br /> -<br /> -// Produces an integer, like 25 -</code> - - -<h2>$this->db->platform()</h2> -<p>Outputs the database platform you are running (MySQL, MS SQL, Postgres, etc...):</p> -<code>echo $this->db->platform();</code> - - -<h2>$this->db->version()</h2> -<p>Outputs the database version you are running:</p> -<code>echo $this->db->version();</code> - - -<h2>$this->db->last_query();</h2> -<p>Returns the last query that was run (the query string, not the result). Example:</p> - -<code>$str = $this->db->last_query();<br /> -<br /> -// Produces: SELECT * FROM sometable.... -</code> - - -<p>The following two functions help simplify the process of writing database INSERTs and UPDATEs.</p> - - -<h2>$this->db->insert_string(); </h2> -<p>This function simplifies the process of writing database inserts. It returns a correctly formatted SQL insert string. Example:</p> - -<code>$data = array('name' => $name, 'email' => $email, 'url' => $url);<br /> -<br /> -$str = $this->db->insert_string('table_name', $data); -</code> - -<p>The first parameter is the table name, the second is an associative array with the data to be inserted. The above example produces:</p> -<code>INSERT INTO table_name (name, email, url) VALUES ('Rick', 'rick@example.com', 'example.com')</code> - -<p class="important">Note: Values are automatically escaped, producing safer queries.</p> - - - -<h2>$this->db->update_string(); </h2> -<p>This function simplifies the process of writing database updates. It returns a correctly formatted SQL update string. Example:</p> - -<code>$data = array('name' => $name, 'email' => $email, 'url' => $url);<br /> -<br /> -$where = "author_id = 1 AND status = 'active'"; -<br /><br /> -$str = $this->db->update_string('table_name', $data, $where); -</code> - -<p>The first parameter is the table name, the second is an associative array with the data to be updated, and the third parameter is the "where" clause. The above example produces:</p> -<code> UPDATE table_name SET name = 'Rick', email = 'rick@example.com', url = 'example.com' WHERE author_id = 1 AND status = 'active'</code> - -<p class="important">Note: Values are automatically escaped, producing safer queries.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="results.html">Query Results</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="active_record.html">Active Record Pattern</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/index.html b/user_guide/database/index.html deleted file mode 100644 index f27113675..000000000 --- a/user_guide/database/index.html +++ /dev/null @@ -1,99 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>The Database Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Database Library -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>The Database Class</h1> - -<p>CodeIgniter comes with a full-featured and very fast abstracted database class that supports both traditional -structures and Active Record patterns. The database functions offer clear, simple syntax.</p> - - <ul> - <li><a href="examples.html">Quick Start: Usage Examples</a></li> - <li><a href="configuration.html">Database Configuration</a></li> - <li><a href="connecting.html">Connecting to a Database</a></li> - <li><a href="queries.html">Running Queries</a></li> - <li><a href="results.html">Generating Query Results</a></li> - <li><a href="helpers.html">Query Helper Functions</a></li> - <li><a href="active_record.html">Active Record Class</a></li> - <li><a href="transactions.html">Transactions</a></li> - <li><a href="table_data.html">Table MetaData</a></li> - <li><a href="fields.html">Field MetaData</a></li> - <li><a href="call_function.html">Custom Function Calls</a></li> - <li><a href="caching.html">Query Caching</a></li> - <li><a href="forge.html">Database manipulation with Database Forge</a></li> - <li><a href="utilities.html">Database Utilities Class</a></li> - </ul> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../libraries/caching.html">Caching Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="examples.html">Quick Start: Usage Examples</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html deleted file mode 100644 index 83d79550b..000000000 --- a/user_guide/database/queries.html +++ /dev/null @@ -1,160 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Queries : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Queries -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Queries</h1> - -<h2>$this->db->query();</h2> - -<p>To submit a query, use the following function:</p> - -<code>$this->db->query('YOUR QUERY HERE');</code> - -<p>The <dfn>query()</dfn> function returns a database result <strong>object</strong> when "read" type queries are run, -which you can use to <a href="results.html">show your results</a>. When "write" type queries are run it simply returns TRUE or FALSE -depending on success or failure. When retrieving data you will typically assign the query to your own variable, like this:</p> - -<code><var>$query</var> = $this->db->query('YOUR QUERY HERE');</code> - -<h2>$this->db->simple_query();</h2> - -<p>This is a simplified version of the <dfn>$this->db->query()</dfn> function. It ONLY returns TRUE/FALSE on success or failure. -It DOES NOT return a database result set, nor does it set the query timer, or compile bind data, or store your query for debugging. -It simply lets you submit a query. Most users will rarely use this function.</p> - - -<h1>Working with Database prefixes manually</h1> -<p>If you have configured a database prefix and would like to prepend it to a table name for use in a native SQL query for example, then you can use the following:</p> -<p><code>$this->db->dbprefix('tablename');<br /> -// outputs prefix_tablename</code></p> - -<p>If for any reason you would like to change the prefix programatically without needing to create a new connection, you can use this method:</p> -<p><code>$this->db->set_dbprefix('newprefix');<br /><br /> -$this->db->dbprefix('tablename');<br /> -// outputs newprefix_tablename</code></p> - - -<h1>Protecting identifiers</h1> -<p>In many databases it is advisable to protect table and field names - for example with backticks in MySQL. <strong>Active Record queries are automatically protected</strong>, however if you need to manually protect an identifier you can use:</p> -<p><code>$this->db->protect_identifiers('table_name');</code></p> - -<p class="important">Although Active Record will try its best to properly quote any field and table names that you feed it, note that it is NOT designed to work with arbitrary user input. DO NOT feed it with unsanitized user data.</p> - -<p>This function will also add a table prefix to your table, assuming you have a prefix specified in your database config file. To enable the prefixing set <kbd>TRUE</kbd> (boolen) via the second parameter:</p> -<p><code>$this->db->protect_identifiers('table_name', <kbd>TRUE</kbd>);</code></p> - - -<h1>Escaping Queries</h1> -<p>It's a very good security practice to escape your data before submitting it into your database. -CodeIgniter has three methods that help you do this:</p> - -<ol> -<li><strong>$this->db->escape()</strong> This function determines the data type so that it -can escape only string data. It also automatically adds single quotes around the data so you don't have to: - -<code>$sql = "INSERT INTO table (title) VALUES(".$this->db->escape($title).")";</code></li> - -<li><strong>$this->db->escape_str()</strong> This function escapes the data passed to it, regardless of type. -Most of the time you'll use the above function rather than this one. Use the function like this: - -<code>$sql = "INSERT INTO table (title) VALUES('".$this->db->escape_str($title)."')";</code></li> - -<li><strong>$this->db->escape_like_str()</strong> This method should be used when strings are to be used in LIKE -conditions so that LIKE wildcards ('%', '_') in the string are also properly escaped. - -<code>$search = '20% raise';<br /> -$sql = "SELECT id FROM table WHERE column LIKE '%".$this->db->escape_like_str($search)."%'";</code></li> - -</ol> - - -<h1>Query Bindings</h1> - - -<p>Bindings enable you to simplify your query syntax by letting the system put the queries together for you. Consider the following example:</p> - -<code> -$sql = "SELECT * FROM some_table WHERE id = <var>?</var> AND status = <var>?</var> AND author = <var>?</var>"; -<br /><br /> -$this->db->query($sql, array(3, 'live', 'Rick')); -</code> - -<p>The question marks in the query are automatically replaced with the values in the array in the second parameter of the query function.</p> -<p class="important">The secondary benefit of using binds is that the values are automatically escaped, producing safer queries. You don't have to remember to manually escape data; the engine does it automatically for you.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="connecting.html">Connecting to your Database</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="results.html">Query Results</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/results.html b/user_guide/database/results.html deleted file mode 100644 index 28c442dac..000000000 --- a/user_guide/database/results.html +++ /dev/null @@ -1,259 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Generating Query Results : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Query Results -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - - -<h1>Generating Query Results</h1> - - -<p>There are several ways to generate query results:</p> - - <h2>result()</h2> - - <p>This function returns the query result as an array of <strong>objects</strong>, or <strong>an empty array</strong> on failure. - - Typically you'll use this in a foreach loop, like this:</p> - - <code> - $query = $this->db->query("YOUR QUERY");<br /> - <br /> - foreach ($query->result() as $row)<br /> - {<br /> - echo $row->title;<br /> - echo $row->name;<br /> - echo $row->body;<br /> - }</code> - - <p>The above <dfn>function</dfn> is an alias of <dfn>result_object()</dfn>.</p> - - <p>If you run queries that might <strong>not</strong> produce a result, you are encouraged to test the result first:</p> - - <code> - $query = $this->db->query("YOUR QUERY");<br /> - <br /> - if ($query->num_rows() > 0)<br /> - {<br /> - foreach ($query->result() as $row)<br /> - {<br /> - echo $row->title;<br /> - echo $row->name;<br /> - echo $row->body;<br /> - }<br /> - } - </code> - - <p>You can also pass a string to result() which represents a class to instantiate for each result object (note: this class must be loaded)</p> - - <code> - $query = $this->db->query("SELECT * FROM users;");<br /> - <br /> - foreach ($query->result('User') as $row)<br /> - {<br /> - echo $row->name; // call attributes<br /> - echo $row->reverse_name(); // or methods defined on the 'User' class<br /> - } - </code> - - <h2>result_array()</h2> - - <p>This function returns the query result as a pure array, or an empty array when no result is produced. Typically you'll use this in a foreach loop, like this:</p> - <code> - $query = $this->db->query("YOUR QUERY");<br /> - <br /> - foreach ($query->result_array() as $row)<br /> - {<br /> - echo $row['title'];<br /> - echo $row['name'];<br /> - echo $row['body'];<br /> - }</code> - - - <h2>row()</h2> - - <p>This function returns a single result row. If your query has more than one row, it returns only the first row. - The result is returned as an <strong>object</strong>. Here's a usage example:</p> - <code> - $query = $this->db->query("YOUR QUERY");<br /> - <br /> - if ($query->num_rows() > 0)<br /> - {<br /> - $row = $query->row(); - <br /><br /> - echo $row->title;<br /> - echo $row->name;<br /> - echo $row->body;<br /> - } - </code> - - <p>If you want a specific row returned you can submit the row number as a digit in the first parameter:</p> - - <code>$row = $query->row(<dfn>5</dfn>);</code> - - <p>You can also add a second String parameter, which is the name of a class to instantiate the row with:</p> - - <code> - $query = $this->db->query("SELECT * FROM users LIMIT 1;");<br /> - <br /> - $query->row(0, 'User')<br /> - echo $row->name; // call attributes<br /> - echo $row->reverse_name(); // or methods defined on the 'User' class<br /> - </code> - - <h2>row_array()</h2> - - <p>Identical to the above <var>row()</var> function, except it returns an array. Example:</p> - - <code> - $query = $this->db->query("YOUR QUERY");<br /> - <br /> - if ($query->num_rows() > 0)<br /> - {<br /> - $row = $query->row_array(); - <br /><br /> - echo $row['title'];<br /> - echo $row['name'];<br /> - echo $row['body'];<br /> - } - </code> - - - <p>If you want a specific row returned you can submit the row number as a digit in the first parameter:</p> - - <code>$row = $query->row_array(<dfn>5</dfn>);</code> - - - <p>In addition, you can walk forward/backwards/first/last through your results using these variations:</p> - -<p> - <strong>$row = $query->first_row()</strong><br /> - <strong>$row = $query->last_row()</strong><br /> - <strong>$row = $query->next_row()</strong><br /> - <strong>$row = $query->previous_row()</strong> -</p> - -<p>By default they return an object unless you put the word "array" in the parameter:</p> - -<p> - <strong>$row = $query->first_row('array')</strong><br /> - <strong>$row = $query->last_row('array')</strong><br /> - <strong>$row = $query->next_row('array')</strong><br /> - <strong>$row = $query->previous_row('array')</strong> -</p> - - - -<h1>Result Helper Functions</h1> - - -<h2>$query->num_rows()</h2> -<p>The number of rows returned by the query. Note: In this example, <dfn>$query</dfn> is the variable that the query result object is assigned to:</p> - -<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br /> -echo $query->num_rows(); -</code> - -<h2>$query->num_fields()</h2> -<p>The number of FIELDS (columns) returned by the query. Make sure to call the function using your query result object:</p> - -<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br /> -echo $query->num_fields(); -</code> - - - -<h2>$query->free_result()</h2> -<p>It frees the memory associated with the result and deletes the result resource ID. Normally PHP frees its memory automatically at the end of script -execution. However, if you are running a lot of queries in a particular script you might want to free the result after each query result has been -generated in order to cut down on memory consumptions. Example: -</p> - -<code>$query = $this->db->query('SELECT title FROM my_table');<br /><br /> -foreach ($query->result() as $row)<br /> -{<br /> - echo $row->title;<br /> -}<br /> -$query->free_result(); // The $query result object will no longer be available<br /> -<br /> -$query2 = $this->db->query('SELECT name FROM some_table');<br /><br /> -$row = $query2->row();<br /> -echo $row->name;<br /> -$query2->free_result(); // The $query2 result object will no longer be available -</code> - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="queries.html">Queries</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="helpers.html">Query Helper Functions</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html deleted file mode 100644 index 327bfc699..000000000 --- a/user_guide/database/table_data.html +++ /dev/null @@ -1,113 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Table Data : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Table Data -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - - -<h1>Table Data</h1> - -<p>These functions let you fetch table information.</p> - -<h2>$this->db->list_tables();</h2> - -<p>Returns an array containing the names of all the tables in the database you are currently connected to. Example:</p> - -<code>$tables = $this->db->list_tables();<br /> -<br /> -foreach ($tables as $table)<br /> -{<br /> - echo $table;<br /> -} -</code> - - -<h2>$this->db->table_exists();</h2> - -<p>Sometimes it's helpful to know whether a particular table exists before running an operation on it. -Returns a boolean TRUE/FALSE. Usage example:</p> - -<code> -if ($this->db->table_exists('table_name'))<br /> -{<br /> - // some code...<br /> -} -</code> - -<p>Note: Replace <em>table_name</em> with the name of the table you are looking for.</p> - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="transactions.html"> Transactions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="fields.html"> Field Metadata</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/transactions.html b/user_guide/database/transactions.html deleted file mode 100644 index 05143af8e..000000000 --- a/user_guide/database/transactions.html +++ /dev/null @@ -1,200 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Transactions : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Transactions -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Transactions</h1> - -<p>CodeIgniter's database abstraction allows you to use <dfn>transactions</dfn> with databases that support transaction-safe table types. In MySQL, you'll need -to be running InnoDB or BDB table types rather than the more common MyISAM. Most other database platforms support transactions natively.</p> - -<p>If you are not familiar with -transactions we recommend you find a good online resource to learn about them for your particular database. The information below assumes you -have a basic understanding of transactions. -</p> - -<h2>CodeIgniter's Approach to Transactions</h2> - -<p>CodeIgniter utilizes an approach to transactions that is very similar to the process used by the popular database class ADODB. We've chosen that approach -because it greatly simplifies the process of running transactions. In most cases all that is required are two lines of code.</p> - -<p>Traditionally, transactions have required a fair amount of work to implement since they demand that you to keep track of your queries -and determine whether to <dfn>commit</dfn> or <dfn>rollback</dfn> based on the success or failure of your queries. This is particularly cumbersome with -nested queries. In contrast, -we've implemented a smart transaction system that does all this for you automatically (you can also manage your transactions manually if you choose to, -but there's really no benefit).</p> - -<h2>Running Transactions</h2> - -<p>To run your queries using transactions you will use the <dfn>$this->db->trans_start()</dfn> and <dfn>$this->db->trans_complete()</dfn> functions as follows:</p> - -<code> -<kbd>$this->db->trans_start();</kbd><br /> -$this->db->query('AN SQL QUERY...');<br /> -$this->db->query('ANOTHER QUERY...');<br /> -$this->db->query('AND YET ANOTHER QUERY...');<br /> -<kbd>$this->db->trans_complete();</kbd> -</code> - -<p>You can run as many queries as you want between the start/complete functions and they will all be committed or rolled back based on success or failure -of any given query.</p> - - -<h2>Strict Mode</h2> - -<p>By default CodeIgniter runs all transactions in <dfn>Strict Mode</dfn>. When strict mode is enabled, if you are running multiple groups of -transactions, if one group fails all groups will be rolled back. If strict mode is disabled, each group is treated independently, meaning -a failure of one group will not affect any others.</p> - -<p>Strict Mode can be disabled as follows:</p> - -<code>$this->db->trans_strict(FALSE);</code> - - -<h2>Managing Errors</h2> - -<p>If you have error reporting enabled in your <dfn>config/database.php</dfn> file you'll see a standard error message if the commit was unsuccessful. If debugging is turned off, you can -manage your own errors like this:</p> - -<code> -$this->db->trans_start();<br /> -$this->db->query('AN SQL QUERY...');<br /> -$this->db->query('ANOTHER QUERY...');<br /> -$this->db->trans_complete();<br /> -<br /> -if (<kbd>$this->db->trans_status()</kbd> === FALSE)<br /> -{<br /> - // generate an error... or use the log_message() function to log your error<br /> -} -</code> - - -<h2>Enabling Transactions</h2> - -<p>Transactions are enabled automatically the moment you use <dfn>$this->db->trans_start()</dfn>. If you would like to disable transactions you -can do so using <dfn>$this->db->trans_off()</dfn>:</p> - -<code> -<kbd>$this->db->trans_off()</kbd><br /><br /> - -$this->db->trans_start();<br /> -$this->db->query('AN SQL QUERY...');<br /> -$this->db->trans_complete(); -</code> - -<p class="important">When transactions are disabled, your queries will be auto-commited, just as they are when running queries without transactions.</p> - - -<h2>Test Mode</h2> - -<p>You can optionally put the transaction system into "test mode", which will cause your queries to be rolled back -- even if the queries produce a valid result. -To use test mode simply set the first parameter in the <dfn>$this->db->trans_start()</dfn> function to <samp>TRUE</samp>:</p> - -<code> -$this->db->trans_start(<samp>TRUE</samp>); // Query will be rolled back<br /> -$this->db->query('AN SQL QUERY...');<br /> -$this->db->trans_complete(); -</code> - - -<h2>Running Transactions Manually</h2> - -<p>If you would like to run transactions manually you can do so as follows:</p> - -<code> -$this->db->trans_begin();<br /><br /> - -$this->db->query('AN SQL QUERY...');<br /> -$this->db->query('ANOTHER QUERY...');<br /> -$this->db->query('AND YET ANOTHER QUERY...');<br /> - -<br /> - -if ($this->db->trans_status() === FALSE)<br /> -{<br /> - $this->db->trans_rollback();<br /> -}<br /> -else<br /> -{<br /> - $this->db->trans_commit();<br /> -}<br /> -</code> - -<p class="important"><strong>Note:</strong> Make sure to use <kbd>$this->db->trans_begin()</kbd> when running manual transactions, <strong>NOT</strong> -<dfn>$this->db->trans_start()</dfn>.</p> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="fields.html">Field MetaData</a> · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="table_data.html">Table Metadata</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html deleted file mode 100644 index 9d30942fc..000000000 --- a/user_guide/database/utilities.html +++ /dev/null @@ -1,314 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Database Utility Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Database Library</a> › -Database Utility Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Database Utility Class</h1> - -<p>The Database Utility Class contains functions that help you manage your database.</p> - -<h3>Table of Contents</h3> - -<ul> -<li><a href="#init">Initializing the Utility Class</a></li> -<li><a href="#list">Listing your Databases</a></li> -<li><a href="#exists">Checking for a specific Database</a></li> -<li><a href="#opttb">Optimizing your Tables</a></li> -<li><a href="#repair">Repairing your Databases</a></li> -<li><a href="#optdb">Optimizing your Database</a></li> -<li><a href="#csv">CSV Files from a Database Result</a></li> -<li><a href="#xml">XML Files from a Database Result</a></li> -<li><a href="#backup">Backing up your Database</a></li> -</ul> - - - -<h2><a name="init"></a>Initializing the Utility Class</h2> - -<p class="important"><strong>Important:</strong> In order to initialize the Utility class, your database driver must -already be running, since the utilities class relies on it.</p> - -<p>Load the Utility Class as follows:</p> - -<code>$this->load->dbutil()</code> - -<p>Once initialized you will access the functions using the <dfn>$this->dbutil</dfn> object:</p> - -<code>$this->dbutil->some_function()</code> - -<h2><a name="list"></a>$this->dbutil->list_databases()</h2> -<p>Returns an array of database names:</p> - -<code> -$dbs = $this->dbutil->list_databases();<br /> -<br /> -foreach ($dbs as $db)<br /> -{<br /> - echo $db;<br /> -}</code> - - -<h2><a name="exists"></a>$this->dbutil->database_exists();</h2> - -<p>Sometimes it's helpful to know whether a particular database exists. -Returns a boolean TRUE/FALSE. Usage example:</p> - -<code> -if ($this->dbutil->database_exists('database_name'))<br /> -{<br /> - // some code...<br /> -} -</code> - -<p>Note: Replace <em>database_name</em> with the name of the table you are looking for. This function is case sensitive.</p> - - - -<h2><a name="opttb"></a>$this->dbutil->optimize_table('table_name');</h2> - -<p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p> - - -<p>Permits you to optimize a table using the table name specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p> - -<code> -if ($this->dbutil->optimize_table('table_name'))<br /> -{<br /> - echo 'Success!';<br /> -} -</code> - -<p><strong>Note:</strong> Not all database platforms support table optimization.</p> - - -<h2><a name="repair"></a>$this->dbutil->repair_table('table_name');</h2> - -<p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p> - - -<p>Permits you to repair a table using the table name specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p> - -<code> -if ($this->dbutil->repair_table('table_name'))<br /> -{<br /> - echo 'Success!';<br /> -} -</code> - -<p><strong>Note:</strong> Not all database platforms support table repairs.</p> - - -<h2><a name="optdb"></a>$this->dbutil->optimize_database();</h2> - -<p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p> - -<p>Permits you to optimize the database your DB class is currently connected to. Returns an array containing the DB status messages or FALSE on failure.</p> - -<code> -$result = $this->dbutil->optimize_database();<br /> -<br /> -if ($result !== FALSE)<br /> -{<br /> - print_r($result);<br /> -} -</code> - -<p><strong>Note:</strong> Not all database platforms support table optimization.</p> - - -<h2><a name="csv"></a>$this->dbutil->csv_from_result($db_result)</h2> - -<p>Permits you to generate a CSV file from a query result. The first parameter of the function must contain the result object from your query. -Example:</p> - -<code> -$this->load->dbutil();<br /> -<br /> -$query = $this->db->query("SELECT * FROM mytable");<br /> -<br /> -echo $this->dbutil->csv_from_result($query); -</code> - -<p>The second and third parameters allows you to -set the delimiter and newline character. By default tabs are used as the delimiter and "\n" is used as a new line. Example:</p> - -<code> -$delimiter = ",";<br /> -$newline = "\r\n";<br /> -<br /> -echo $this->dbutil->csv_from_result($query, $delimiter, $newline); -</code> - -<p><strong>Important:</strong> This function will NOT write the CSV file for you. It simply creates the CSV layout. -If you need to write the file use the <a href="../helpers/file_helper.html">File Helper</a>.</p> - - -<h2><a name="xml"></a>$this->dbutil->xml_from_result($db_result)</h2> - -<p>Permits you to generate an XML file from a query result. The first parameter expects a query result object, the second -may contain an optional array of config parameters. Example:</p> - -<code> -$this->load->dbutil();<br /> -<br /> -$query = $this->db->query("SELECT * FROM mytable");<br /> -<br /> -$config = array (<br /> - 'root' => 'root',<br /> - 'element' => 'element', <br /> - 'newline' => "\n", <br /> - 'tab' => "\t"<br /> - );<br /> -<br /> -echo $this->dbutil->xml_from_result($query, $config); -</code> - -<p><strong>Important:</strong> This function will NOT write the XML file for you. It simply creates the XML layout. -If you need to write the file use the <a href="../helpers/file_helper.html">File Helper</a>.</p> - - -<h2><a name="backup"></a>$this->dbutil->backup()</h2> - -<p>Permits you to backup your full database or individual tables. The backup data can be compressed in either Zip or Gzip format.</p> - -<p class="important"><strong>Note:</strong> This features is only available for MySQL databases.</p> - -<p>Note: Due to the limited execution time and memory available to PHP, backing up very large -databases may not be possible. If your database is very large you might need to backup directly from your SQL server -via the command line, or have your server admin do it for you if you do not have root privileges.</p> - -<h3>Usage Example</h3> - -<code> -<dfn>// Load the DB utility class</dfn><br /> -$this->load->dbutil();<br /><br /> - -<dfn>// Backup your entire database and assign it to a variable</dfn><br /> -$backup =& $this->dbutil->backup(); - -<br /><br /> -<dfn>// Load the file helper and write the file to your server</dfn><br /> -$this->load->helper('file');<br /> -write_file('/path/to/mybackup.gz', $backup); - -<br /><br /> -<dfn>// Load the download helper and send the file to your desktop</dfn><br /> -$this->load->helper('download');<br /> -force_download('mybackup.gz', $backup); -</code> - -<h3>Setting Backup Preferences</h3> - -<p>Backup preferences are set by submitting an array of values to the first parameter of the backup function. Example:</p> - -<code>$prefs = array(<br /> - 'tables' => array('table1', 'table2'), // Array of tables to backup.<br /> - 'ignore' => array(), // List of tables to omit from the backup<br /> - 'format' => 'txt', // gzip, zip, txt<br /> - 'filename' => 'mybackup.sql', // File name - NEEDED ONLY WITH ZIP FILES<br /> - 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file<br /> - 'add_insert' => TRUE, // Whether to add INSERT data to backup file<br /> - 'newline' => "\n" // Newline character used in backup file<br /> - );<br /> -<br /> -$this->dbutil->backup($prefs); -</code> - - -<h3>Description of Backup Preferences</h3> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr><tr> -<td class="td"><strong>tables</strong></td><td class="td">empty array</td><td class="td">None</td><td class="td">An array of tables you want backed up. If left blank all tables will be exported.</td> -</tr><tr> -<td class="td"><strong>ignore</strong></td><td class="td">empty array</td><td class="td">None</td><td class="td">An array of tables you want the backup routine to ignore.</td> -</tr><tr> -<td class="td"><strong>format</strong></td><td class="td">gzip</td><td class="td">gzip, zip, txt</td><td class="td">The file format of the export file.</td> -</tr><tr> -<td class="td"><strong>filename</strong></td><td class="td">the current date/time</td><td class="td">None</td><td class="td">The name of the backed-up file. The name is needed only if you are using zip compression.</td> -</tr><tr> -<td class="td"><strong>add_drop</strong></td><td class="td">TRUE</td><td class="td">TRUE/FALSE</td><td class="td">Whether to include DROP TABLE statements in your SQL export file.</td> -</tr><tr> -<td class="td"><strong>add_insert</strong></td><td class="td">TRUE</td><td class="td">TRUE/FALSE</td><td class="td">Whether to include INSERT statements in your SQL export file.</td> -</tr><tr> -<td class="td"><strong>newline</strong></td><td class="td">"\n"</td><td class="td">"\n", "\r", "\r\n"</td><td class="td">Type of newline to use in your SQL export file.</td> - -</tr> -</table> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="forge.html">DB Forge Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../libraries/javascript.html">Javascript Class</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/doc_style/index.html b/user_guide/doc_style/index.html deleted file mode 100644 index 83ccbe85a..000000000 --- a/user_guide/doc_style/index.html +++ /dev/null @@ -1,87 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Writing Documentation : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Writing Documentation -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Writing Documentation</h1> - -<p>To help facilitate a consistent, easy-to-read documentation style for CodeIgniter projects, EllisLab is making the markup and CSS from the CodeIgniter user guide freely available to the community for their use. For your convenience, a template file has been created that includes the primary blocks of markup used with brief samples.</p> - -<h2>Files</h2> - -<ul> - <li><a href="../userguide.css">Stylesheet</a></li> - <li><a href="./template.html">Page Template</a></li> -</ul> - - -</div> -<!-- END CONTENT --> - - - -<div id="footer"> -<p> -Previous Topic: <a href="../general/styleguide.html">PHP Style Guide</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../libraries/benchmark.html">Benchmarking Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/doc_style/template.html b/user_guide/doc_style/template.html deleted file mode 100644 index 67904ee08..000000000 --- a/user_guide/doc_style/template.html +++ /dev/null @@ -1,128 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Project Documentation Template</title> - -<style type='text/css' media='all'>@import url('./userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"></div></div> -<div id="nav2"><a name="top"> </a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>Project Title</h1></td> -<td id="breadcrumb_right"><a href="#">Right Breadcrumb</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://example.com/">Project Home</a> › -<a href="#">User Guide Home</a> › -Foo Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="example.com/user_guide/" />Search Project User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Foo Class</h1> - -<p>Brief description of Foo Class. If it extends a native CodeIgniter class, please link to the class in the CodeIgniter documents here.</p> - -<p class="important"><strong>Important:</strong> This is an important note with <kbd>EMPHASIS</kbd>.</p> - -<p>Features:</p> - -<ul> - <li>Foo</li> - <li>Bar</li> -</ul> - -<h2>Usage Heading</h2> - -<p>Within a text string, <var>highlight variables</var> using <var><var></var></var> tags, and <dfn>highlight code</dfn> using the <dfn><dfn></dfn></dfn> tags.</p> - -<h3>Sub-heading</h3> - -<p>Put code examples within <dfn><code></code></dfn> tags:</p> - -<code> - $this->load->library('foo');<br /> - <br /> - $this->foo->bar('bat'); -</code> - - -<h2>Table Preferences</h2> - -<p>Use tables where appropriate for long lists of preferences.</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> - <th>Preference</th> - <th>Default Value</th> - <th>Options</th> - <th>Description</th> -</tr> -<tr> - <td class="td"><strong>foo</strong></td> - <td class="td">Foo</td> - <td class="td">None</td> - <td class="td">Description of foo.</td> -</tr> -<tr> - <td class="td"><strong>bar</strong></td> - <td class="td">Bar</td> - <td class="td">bat, bag, or bak</td> - <td class="td">Description of bar.</td> -</tr> -</table> - -<h2>Foo Function Reference</h2> - -<h3>$this->foo->bar()</h3> -<p>Description</p> -<code>$this->foo->bar('<var>baz</var>')</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="#">Previous Class</a> - · -<a href="#top">Top of Page</a> · -<a href="#">User Guide Home</a> · -Next Topic: <a href="#">Next Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html deleted file mode 100644 index f15c4784c..000000000 --- a/user_guide/general/alternative_php.html +++ /dev/null @@ -1,147 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Alternate PHP Syntax for View Files : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Alternate PHP Syntax -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Alternate PHP Syntax for View Files</h1> - -<p>If you do not utilize CodeIgniter's <a href="../libraries/parser.html">template engine</a>, you'll be using pure PHP -in your View files. To minimize the PHP code in these files, and to make it easier to identify the code blocks it is recommended that you use -PHPs alternative syntax for control structures and short tag echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, -and eliminate "echo" statements.</p> - -<h2>Automatic Short Tag Support</h2> - -<p><strong>Note:</strong> If you find that the syntax described in this page does not work on your server it might -be that "short tags" are disabled in your PHP ini file. CodeIgniter will optionally rewrite short tags on-the-fly, -allowing you to use that syntax even if your server doesn't support it. This feature can be enabled in your -<dfn>config/config.php</dfn> file.</p> - -<p class="important">Please note that if you do use this feature, if PHP errors are encountered -in your <strong>view files</strong>, the error message and line number will not be accurately shown. Instead, all errors -will be shown as <kbd>eval()</kbd> errors.</p> - - -<h2>Alternative Echos</h2> - -<p>Normally to echo, or print out a variable you would do this:</p> - -<code><?php echo $variable; ?></code> - -<p>With the alternative syntax you can instead do it this way:</p> - -<code><?=$variable?></code> - - - -<h2>Alternative Control Structures</h2> - -<p>Controls structures, like <var>if</var>, <var>for</var>, <var>foreach</var>, and <var>while</var> can be -written in a simplified format as well. Here is an example using foreach:</p> - -<code> -<ul><br /> -<br /> -<var><?php foreach ($todo as $item): ?></var><br /> -<br /> -<li><var><?=$item?></var></li><br /> -<br /> -<var><?php endforeach; ?></var><br /> -<br /> -</ul></code> - -<p>Notice that there are no braces. Instead, the end brace is replaced with <var>endforeach</var>. -Each of the control structures listed above has a similar closing syntax: -<var>endif</var>, <var>endfor</var>, <var>endforeach</var>, and <var>endwhile</var></p> - -<p>Also notice that instead of using a semicolon after each structure (except the last one), there is a colon. This is -important!</p> - -<p>Here is another example, using if/elseif/else. Notice the colons:</p> - - -<code><var><?php if ($username == 'sally'): ?></var><br /> -<br /> - <h3>Hi Sally</h3><br /> -<br /> -<var><?php elseif ($username == 'joe'): ?></var><br /> -<br /> - <h3>Hi Joe</h3><br /> -<br /> -<var><?php else: ?></var><br /> -<br /> - <h3>Hi unknown user</h3><br /> -<br /> -<var><?php endif; ?></var></code> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="managing_apps.html">Managing Applications</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="security.html">Security</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html deleted file mode 100644 index 55c039d7e..000000000 --- a/user_guide/general/ancillary_classes.html +++ /dev/null @@ -1,117 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Creating Ancillary Classes : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Creating Ancillary Classes -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Creating Ancillary Classes</h1> - -<p>In some cases you may want to develop classes that exist apart from your controllers but have the ability to -utilize all of CodeIgniter's resources. This is easily possible as you'll see.</p> - -<h2>get_instance()</h2> - - -<p><strong>Any class that you instantiate within your controller functions can access CodeIgniter's native resources</strong> simply by using the <kbd>get_instance()</kbd> function. -This function returns the main CodeIgniter object.</p> - -<p>Normally, to call any of the available CodeIgniter functions requires you to use the <kbd>$this</kbd> construct:</p> - -<code> -<strong>$this</strong>->load->helper('url');<br /> -<strong>$this</strong>->load->library('session');<br /> -<strong>$this</strong>->config->item('base_url');<br /> -etc. -</code> - -<p><kbd>$this</kbd>, however, only works within your controllers, your models, or your views. -If you would like to use CodeIgniter's classes from within your own custom classes you can do so as follows:</p> - - -<p>First, assign the CodeIgniter object to a variable:</p> - -<code>$CI =& get_instance();</code> - -<p>Once you've assigned the object to a variable, you'll use that variable <em>instead</em> of <kbd>$this</kbd>:</p> - -<code> -$CI =& get_instance();<br /><br /> -$CI->load->helper('url');<br /> -$CI->load->library('session');<br /> -$CI->config->item('base_url');<br /> -etc. -</code> - -<p class="important"><strong>Note:</strong> You'll notice that the above get_instance() function is being passed by reference: -<br /><br /> -<var>$CI =& get_instance();</var> -<br /><br /> -This is very important. Assigning by reference allows you to use the original CodeIgniter object rather than creating a copy of it.</p> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="creating_libraries.html">Creating Core Libraries</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="autoloader.html">Auto-loading Resources</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html deleted file mode 100644 index e73d1ff83..000000000 --- a/user_guide/general/autoloader.html +++ /dev/null @@ -1,100 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Auto-loading Resources : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Auto-loading Resources -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Auto-loading Resources</h1> - -<p>CodeIgniter comes with an "Auto-load" feature that permits libraries, helpers, and models to be initialized -automatically every time the system runs. If you need certain resources globally throughout your application you should -consider auto-loading them for convenience.</p> - -<p>The following items can be loaded automatically:</p> - -<ul> -<li>Core classes found in the "libraries" folder</li> -<li>Helper files found in the "helpers" folder</li> -<li>Custom config files found in the "config" folder</li> -<li>Language files found in the "system/language" folder </li> -<li>Models found in the "models" folder</li> -</ul> - -<p>To autoload resources, open the <var>application/config/autoload.php</var> file and add the item you want -loaded to the <samp>autoload</samp> array. You'll find instructions in that file corresponding to each -type of item.</p> - -<p class="important"><strong>Note:</strong> Do not include the file extension (.php) when adding items to the autoload array.</p> - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="hooks.html">Hooks - Extending the Core</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="common_functions.html">Common Functions</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html deleted file mode 100644 index f841dee3b..000000000 --- a/user_guide/general/caching.html +++ /dev/null @@ -1,115 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Web Page Caching : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Page Caching -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Web Page Caching</h1> - -<p>CodeIgniter lets you cache your pages in order to achieve maximum performance.</p> - -<p>Although CodeIgniter is quite fast, the amount of dynamic information you display in your pages will correlate directly to the -server resources, memory, and processing cycles utilized, which affect your page load speeds. -By caching your pages, since they are saved in their fully rendered state, you can achieve performance that nears that of static web pages.</p> - - -<h2>How Does Caching Work?</h2> - -<p>Caching can be enabled on a per-page basis, and you can set the length of time that a page should remain cached before being refreshed. -When a page is loaded for the first time, the cache file will be written to your <dfn>application/cache</dfn> folder. On subsequent page loads the cache file will be retrieved -and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.</p> - -<p>Note: The Benchmark tag is not cached so you can still view your page load speed when caching is enabled.</p> - -<h2>Enabling Caching</h2> - -<p>To enable caching, put the following tag in any of your controller functions:</p> - -<code>$this->output->cache(<var>n</var>);</code> - -<p>Where <var>n</var> is the number of <strong>minutes</strong> you wish the page to remain cached between refreshes.</p> - -<p>The above tag can go anywhere within a function. It is not affected by the order that it appears, so place it wherever it seems -most logical to you. Once the tag is in place, your pages will begin being cached.</p> - -<p class="important"><strong>Warning:</strong> Because of the way CodeIgniter stores content for output, caching will only work if you are generating display for your controller with a <a href="./views.html">view</a>.</p> -<p class="important"><strong>Note:</strong> Before the cache files can be written you must set the file permissions on your -<dfn>application/cache</dfn> folder such that it is writable.</p> - -<h2>Deleting Caches</h2> - -<p>If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires. Note: -Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you -will need to manually delete it from your cache folder.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="errors.html">Error Handling</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="profiling.html">Profiling Your Application</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html deleted file mode 100644 index 948e508f7..000000000 --- a/user_guide/general/cli.html +++ /dev/null @@ -1,150 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Running via the CLI : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Running via the CLI -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Running via the CLI</h1> - -<p> - As well as calling an applications <a href="./controllers.html">Controllers</a> via the URL in a browser they can also be loaded via the command-line interface (CLI). -</p> - - -<ul> -<li><a href="#what">What is the CLI?</a></li> -<li><a href="#why">Why use this method?</a></li> -<li><a href="#how">How does it work?</a></li> -</ul> - - -<a name="what"></a> -<h2>What is the CLI?</h2> - -<p><dfn>The command-line interface is a text-based method of interacting with computers.</dfn> For more information, check the <a href="http://en.wikipedia.org/wiki/Command-line_interface">Wikipedia article</a>.</p> - -<a name="why"></a> - -<h2>Why run via the command-line?</h2> - -<p> - There are many reasons for running CodeIgniter from the command-line, but they are not always obvious.</p> - -<ul> - <li>Run your cron-jobs without needing to use wget or curl</li> - <li>Make your cron-jobs inaccessible from being loaded in the URL by checking for <kbd>$this->input->is_cli_request()</kbd></li> - <li>Make interactive "tasks" that can do things like set permissions, prune cache folders, run backups, etc.</li> - <li>Integrate with other applications in other languages. For example, a random C++ script could call one command and run code in your models!</li> -</ul> - -<a name="how"></a> -<h2>Let's try it: Hello World!</h2> - -<p>Let's create a simple controller so you can see it in action. Using your text editor, create a file called <dfn>tools.php</dfn>, and put the following code in it:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -<?php -class Tools extends CI_Controller { - - public function message($to = 'World') - { - echo "Hello {$to}!".PHP_EOL; - } -} -?> -</textarea> - -<p>Then save the file to your <dfn>application/controllers/</dfn> folder.</p> - -<p>Now normally you would visit the your site using a URL similar to this:</p> - -<code>example.com/index.php/<var>tools</var>/<var>message</var>/<var>to</var></code> - -<p>Instead, we are going to open Terminal in Mac/Lunix or go to Run > "cmd" in Windows and navigate to our CodeIgniter project.</p> - -<blockquote> - $ cd /path/to/project;<br/> - $ php index.php tools message -</blockquote> - -<p>If you did it right, you should see <samp>Hello World!</samp>.</p> - -<blockquote> - $ php index.php tools message "John Smith" -</blockquote> - -<p>Here we are passing it a argument in the same way that URL parameters work. "John Smith" is passed as a argument and output is: <samp>Hello John Smith!</samp>.</p> - -<h2>That's it!</h2> - -<p>That, in a nutshell, is all there is to know about controllers on the command line. Remember that this is just a normal controller, so routing and _remap works fine.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="urls.html">CodeIgniter URLs</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="reserved_names.html">Reserved Names</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html deleted file mode 100644 index 119d7fa7d..000000000 --- a/user_guide/general/common_functions.html +++ /dev/null @@ -1,127 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Common Functions : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Auto-loading Resources -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Common Functions</h1> - -<p>CodeIgniter uses a few functions for its operation that are globally defined, and are available to you at any point. These do not require loading any libraries or helpers.</p> - -<h2>is_php('<var>version_number</var>')</h2> - -<p>is_php() determines of the PHP version being used is greater than the supplied <var>version_number</var>.</p> - -<code>if (is_php('5.3.0'))<br /> -{<br /> - $str = quoted_printable_encode($str);<br /> -}</code> - -<p>Returns boolean <kbd>TRUE</kbd> if the installed version of PHP is equal to or greater than the supplied version number. Returns <kbd>FALSE</kbd> if the installed version of PHP is lower than the supplied version number.</p> - - -<h2>is_really_writable('<var>path/to/file</var>')</h2> - -<p>is_writable() returns TRUE on Windows servers when you really can't write to the file as the OS reports to PHP as FALSE only if the read-only attribute is marked. This function determines if a file is actually writable by attempting to write to it first. Generally only recommended on platforms where this information may be unreliable.</p> - -<code>if (is_really_writable('file.txt'))<br /> -{<br /> - echo "I could write to this if I wanted to";<br /> -}<br /> -else<br /> -{<br /> - echo "File is not writable";<br /> -}</code> - -<h2>config_item('<var>item_key</var>')</h2> -<p>The <a href="../libraries/config.html">Config library</a> is the preferred way of accessing configuration information, however config_item() can be used to retrieve single keys. See Config library documentation for more information.</p> - -<h2>show_error('<var>message</var>'), show_404('<var>page</var>'), log_message('<var>level</var>', '<samp>message</samp>')</h2> -<p>These are each outlined on the <a href="errors.html">Error Handling</a> page.</p> - -<h2>set_status_header(<var>code</var>, '<var>text</var>');</h2> - -<p>Permits you to manually set a server status header. Example:</p> - -<code>set_status_header(401);<br /> -// Sets the header as: Unauthorized</code> - -<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">See here</a> for a full list of headers.</p> - - -<h2>remove_invisible_characters(<var>$str</var>)</h2> -<p>This function prevents inserting null characters between ascii characters, like Java\0script.</p> - - -<h2>html_escape(<var>$mixed</var>)</h2> -<p>This function provides short cut for htmlspecialchars() function. It accepts string and array. To prevent Cross Site Scripting (XSS), it is very useful.</p> - -</div> - - -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="autoloader.html">Auto-loading Resources</a><a href="hooks.html"></a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="routing.html">URI Routing</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html deleted file mode 100644 index 263564aa7..000000000 --- a/user_guide/general/controllers.html +++ /dev/null @@ -1,388 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Controllers : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Controllers -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Controllers</h1> - -<p>Controllers are the heart of your application, as they determine how HTTP requests should be handled.</p> - - -<ul> -<li><a href="#what">What is a Controller?</a></li> -<li><a href="#hello">Hello World</a></li> -<li><a href="#functions">Functions</a></li> -<li><a href="#passinguri">Passing URI Segments to Your Functions</a></li> -<li><a href="#default">Defining a Default Controller</a></li> -<li><a href="#remapping">Remapping Function Calls</a></li> -<li><a href="#output">Controlling Output Data</a></li> -<li><a href="#private">Private Functions</a></li> -<li><a href="#subfolders">Organizing Controllers into Sub-folders</a></li> -<li><a href="#constructors">Class Constructors</a></li> -<li><a href="#reserved">Reserved Function Names</a></li> -</ul> - - -<a name="what"></a> -<h2>What is a Controller?</h2> - -<p><dfn>A Controller is simply a class file that is named in a way that can be associated with a URI.</dfn></p> - -<p>Consider this URI:</p> - -<code>example.com/index.php/<var>blog</var>/</code> - -<p>In the above example, CodeIgniter would attempt to find a controller named <dfn>blog.php</dfn> and load it.</p> - -<p><strong>When a controller's name matches the first segment of a URI, it will be loaded.</strong></p> - -<a name="hello"></a> -<h2>Let's try it: Hello World!</h2> - -<p>Let's create a simple controller so you can see it in action. Using your text editor, create a file called <dfn>blog.php</dfn>, and put the following code in it:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -<?php -class Blog extends CI_Controller { - - public function index() - { - echo 'Hello World!'; - } -} -?> -</textarea> - - - -<p>Then save the file to your <dfn>application/controllers/</dfn> folder.</p> - -<p>Now visit the your site using a URL similar to this:</p> - -<code>example.com/index.php/<var>blog</var>/</code> - -<p>If you did it right, you should see <samp>Hello World!</samp>.</p> - -<p>Note: Class names must start with an uppercase letter. In other words, this is valid:</p> - -<code><?php<br /> -class <var>Blog</var> extends CI_Controller {<br /> -<br /> -}<br /> -?></code> - -<p>This is <strong>not</strong> valid:</p> - -<code><?php<br /> -class <var>blog</var> extends CI_Controller {<br /> -<br /> -}<br /> -?></code> - -<p>Also, always make sure your controller <dfn>extends</dfn> the parent controller class so that it can inherit all its functions.</p> - - - -<a name="functions"></a> -<h2>Functions</h2> - -<p>In the above example the function name is <dfn>index()</dfn>. The "index" function is always loaded by default if the -<strong>second segment</strong> of the URI is empty. Another way to show your "Hello World" message would be this:</p> - -<code>example.com/index.php/<var>blog</var>/<samp>index</samp>/</code> - -<p><strong>The second segment of the URI determines which function in the controller gets called.</strong></p> - -<p>Let's try it. Add a new function to your controller:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="15"> -<?php -class Blog extends CI_Controller { - - public function index() - { - echo 'Hello World!'; - } - - public function comments() - { - echo 'Look at this!'; - } -} -?> -</textarea> - -<p>Now load the following URL to see the <dfn>comment</dfn> function:</p> - -<code>example.com/index.php/<var>blog</var>/<samp>comments</samp>/</code> - -<p>You should see your new message.</p> - -<a name="passinguri"></a> -<h2>Passing URI Segments to your Functions</h2> - -<p>If your URI contains more then two segments they will be passed to your function as parameters.</p> - -<p>For example, lets say you have a URI like this:</p> - -<code>example.com/index.php/<var>products</var>/<samp>shoes</samp>/<kbd>sandals</kbd>/<dfn>123</dfn></code> - -<p>Your function will be passed URI segments 3 and 4 ("sandals" and "123"):</p> - -<code> -<?php<br /> -class Products extends CI_Controller {<br /> -<br /> - public function shoes($sandals, $id)<br /> - {<br /> - echo $sandals;<br /> - echo $id;<br /> - }<br /> -}<br /> -?> -</code> - -<p class="important"><strong>Important:</strong> If you are using the <a href="routing.html">URI Routing</a> feature, the segments -passed to your function will be the re-routed ones.</p> - - -<a name="default"></a> -<h2>Defining a Default Controller</h2> - -<p>CodeIgniter can be told to load a default controller when a URI is not present, -as will be the case when only your site root URL is requested. To specify a default controller, open -your <dfn>application/config/routes.php</dfn> file and set this variable:</p> - -<code>$route['default_controller'] = '<var>Blog</var>';</code> - -<p>Where <var>Blog</var> is the name of the controller class you want used. If you now load your main index.php file without -specifying any URI segments you'll see your Hello World message by default.</p> - - - -<a name="remapping"></a> -<h2>Remapping Function Calls</h2> - -<p>As noted above, the second segment of the URI typically determines which function in the controller gets called. -CodeIgniter permits you to override this behavior through the use of the <kbd>_remap()</kbd> function:</p> - -<code>public function _remap()<br /> -{<br /> - // Some code here...<br /> -}</code> - -<p class="important"><strong>Important:</strong> If your controller contains a function named <kbd>_remap()</kbd>, it will <strong>always</strong> -get called regardless of what your URI contains. It overrides the normal behavior in which the URI determines which function is called, -allowing you to define your own function routing rules.</p> - -<p>The overridden function call (typically the second segment of the URI) will be passed as a parameter to the <kbd>_remap()</kbd> function:</p> - -<code>public function _remap(<var>$method</var>)<br /> -{<br /> - if ($method == 'some_method')<br /> - {<br /> - $this->$method();<br /> - }<br /> - else<br /> - {<br /> - $this->default_method();<br /> - }<br /> -}</code> - -<p>Any extra segments after the method name are passed into <kbd>_remap()</kbd> as an optional second parameter. This array can be used in combination with PHP's <a href="http://php.net/call_user_func_array">call_user_func_array</a> to emulate CodeIgniter's default behavior.</p> - -<code>public function _remap($method, $params = array())<br /> -{<br /> - $method = 'process_'.$method;<br /> - if (method_exists($this, $method))<br /> - {<br /> - return call_user_func_array(array($this, $method), $params);<br /> - }<br /> - show_404();<br /> -}</code> - - -<a name="output"></a> -<h2>Processing Output</h2> - -<p>CodeIgniter has an output class that takes care of sending your final rendered data to the web browser automatically. More information on this can be found in the -<a href="views.html">Views</a> and <a href="../libraries/output.html">Output class</a> pages. In some cases, however, you might want to -post-process the finalized data in some way and send it to the browser yourself. CodeIgniter permits you to -add a function named <dfn>_output()</dfn> to your controller that will receive the finalized output data.</p> - -<p><strong>Important:</strong> If your controller contains a function named <kbd>_output()</kbd>, it will <strong>always</strong> -be called by the output class instead of echoing the finalized data directly. The first parameter of the function will contain the finalized output.</p> - -<p>Here is an example:</p> - -<code> -public function _output($output)<br /> -{<br /> - echo $output;<br /> -}</code> - -<p class="important">Please note that your <dfn>_output()</dfn> function will receive the data in its finalized state. Benchmark and memory usage data will be rendered, -cache files written (if you have caching enabled), and headers will be sent (if you use that <a href="../libraries/output.html">feature</a>) -before it is handed off to the _output() function.<br /> -<br /> -To have your controller's output cached properly, its <dfn>_output()</dfn> method can use:<br /> - -<code>if ($this->output->cache_expiration > 0)<br /> -{<br /> - $this->output->_write_cache($output);<br /> -}</code> - -If you are using this feature the page execution timer and memory usage stats might not be perfectly accurate -since they will not take into acccount any further processing you do. For an alternate way to control output <em>before</em> any of the final processing is done, please see -the available methods in the <a href="../libraries/output.html">Output Class</a>.</p> - -<a name="private"></a> -<h2>Private Functions</h2> - - -<p>In some cases you may want certain functions hidden from public access. To make a function private, simply add an -underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:</p> - -<code> -private function _utility()<br /> -{<br /> - // some code<br /> -}</code> - -<p>Trying to access it via the URL, like this, will not work:</p> - -<code>example.com/index.php/<var>blog</var>/<samp>_utility</samp>/</code> - - - -<a name="subfolders"></a> -<h2>Organizing Your Controllers into Sub-folders</h2> - -<p>If you are building a large application you might find it convenient to organize your controllers into sub-folders. CodeIgniter permits you to do this.</p> - -<p>Simply create folders within your <dfn>application/controllers</dfn> directory and place your controller classes within them.</p> - -<p><strong>Note:</strong> When using this feature the first segment of your URI must specify the folder. For example, lets say you have a controller -located here:</p> - -<code>application/controllers/<kbd>products</kbd>/shoes.php</code> - -<p>To call the above controller your URI will look something like this:</p> - -<code>example.com/index.php/products/shoes/show/123</code> - -<p>Each of your sub-folders may contain a default controller which will be -called if the URL contains only the sub-folder. Simply name your default controller as specified in your -<dfn>application/config/routes.php</dfn> file</p> - - -<p>CodeIgniter also permits you to remap your URIs using its <a href="routing.html">URI Routing</a> feature.</p> - - -<h2><a name="constructors"></a>Class Constructors</h2> - - -<p>If you intend to use a constructor in any of your Controllers, you <strong>MUST</strong> place the following line of code in it:</p> - -<code>parent::__construct();</code> - -<p>The reason this line is necessary is because your local constructor will be overriding the one in the parent controller class so we need to manually call it.</p> - -<code> -<?php<br /> -class <kbd>Blog</kbd> extends CI_Controller {<br /> -<br /> - public function <kbd>__construct()</kbd><br /> - {<br /> - <var>parent::__construct();</var><br /> - // Your own constructor code<br /> - }<br /> -}<br /> -?></code> - -<p>Constructors are useful if you need to set some default values, or run a default process when your class is instantiated. -Constructors can't return a value, but they can do some default work.</p> - -<a name="reserved"></a> -<h2>Reserved Function Names</h2> - -<p>Since your controller classes will extend the main application controller you -must be careful not to name your functions identically to the ones used by that class, otherwise your local functions -will override them. See <a href="reserved_names.html">Reserved Names</a> for a full list.</p> - -<h2>That's it!</h2> - -<p>That, in a nutshell, is all there is to know about controllers.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="urls.html">CodeIgniter URLs</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="reserved_names.html">Reserved Names</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html deleted file mode 100644 index e01ce9260..000000000 --- a/user_guide/general/core_classes.html +++ /dev/null @@ -1,186 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Creating Core System Classes : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Creating Core System Classes -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Creating Core System Classes</h1> - -<p>Every time CodeIgniter runs there are several base classes that are initialized automatically as part of the core framework. -It is possible, however, to swap any of the core system classes with your own versions or even extend the core versions.</p> - -<p><strong>Most users will never have any need to do this, -but the option to replace or extend them does exist for those who would like to significantly alter the CodeIgniter core.</strong> -</p> - -<p class="important"><strong>Note:</strong> Messing with a core system class has a lot of implications, so make sure you -know what you are doing before attempting it.</p> - - -<h2>System Class List</h2> - -<p>The following is a list of the core system files that are invoked every time CodeIgniter runs:</p> - -<ul> -<li>Benchmark</li> -<li>Config</li> -<li>Controller</li> -<li>Exceptions</li> -<li>Hooks</li> -<li>Input</li> -<li>Language</li> -<li>Loader</li> -<li>Log</li> -<li>Output</li> -<li>Router</li> -<li>URI</li> -<li>Utf8</li> -</ul> - -<h2>Replacing Core Classes</h2> - -<p>To use one of your own system classes instead of a default one simply place your version inside your local <dfn>application/core</dfn> directory:</p> - -<code>application/core/<dfn>some-class.php</dfn></code> - -<p>If this directory does not exist you can create it.</p> - -<p>Any file named identically to one from the list above will be used instead of the one normally used.</p> - -<p>Please note that your class must use <kbd>CI</kbd> as a prefix. For example, if your file is named <kbd>Input.php</kbd> the class will be named:</p> - -<code> -class CI_Input {<br /><br /> - -} -</code> - - - -<h2>Extending Core Class</h2> - -<p>If all you need to do is add some functionality to an existing library - perhaps add a function or two - then -it's overkill to replace the entire library with your version. In this case it's better to simply extend the class. -Extending a class is nearly identical to replacing a class with a couple exceptions:</p> - -<ul> -<li>The class declaration must extend the parent class.</li> -<li>Your new class name and filename must be prefixed with <kbd>MY_</kbd> (this item is configurable. See below.).</li> -</ul> - -<p>For example, to extend the native <kbd>Input</kbd> class you'll create a file named <dfn>application/core/</dfn><kbd>MY_Input.php</kbd>, and declare your class with:</p> - -<code> -class MY_Input extends CI_Input {<br /><br /> - -}</code> - -<p>Note: If you need to use a constructor in your class make sure you extend the parent constructor:</p> - -<code> -class MY_Input extends CI_Input {<br /> -<br /> - function __construct()<br /> - {<br /> - parent::__construct();<br /> - }<br /> -}</code> - -<p class="important"><strong>Tip:</strong> Any functions in your class that are named identically to the functions in the parent class will be used instead of the native ones -(this is known as "method overriding"). -This allows you to substantially alter the CodeIgniter core.</p> - -<p>If you are extending the Controller core class, then be sure to extend your new class in your application controller's constructors.</p> - -<code>class Welcome extends MY_Controller {<br /> -<br /> - function __construct()<br /> - {<br /> - parent::__construct();<br /> - }<br /> -<br /> - function index()<br /> - {<br /> - $this->load->view('welcome_message');<br /> - }<br /> -}</code> - -<h3>Setting Your Own Prefix</h3> - -<p>To set your own sub-class prefix, open your <dfn>application/config/config.php</dfn> file and look for this item:</p> - -<code>$config['subclass_prefix'] = 'MY_';</code> - -<p>Please note that all native CodeIgniter libraries are prefixed with <kbd>CI_</kbd> so DO NOT use that as your prefix.</p> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="creating_libraries.html">Creating Your Own Libraries</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="hooks.html">Hooks - Extending the Core</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/creating_drivers.html b/user_guide/general/creating_drivers.html deleted file mode 100644 index 35950f641..000000000 --- a/user_guide/general/creating_drivers.html +++ /dev/null @@ -1,100 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Creating Drivers : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Creating Drivers -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Creating Drivers</h1> - -<h2>Driver Directory and File Structure</h2> - -<p>Sample driver directory and file structure layout:</p> - -<ul> - <li>/application/libraries/Driver_name - <ul> - <li>Driver_name.php</li> - <li>drivers - <ul> - <li>Driver_name_subclass_1.php</li> - <li>Driver_name_subclass_2.php</li> - <li>Driver_name_subclass_3.php</li> - </ul> - </li> - </ul> - </li> -</ul> - -<p class="important"><strong>NOTE:</strong> In order to maintain compatibility on case-sensitive file systems, the <samp>Driver_name</samp> directory must be <var>ucfirst()</var></p> - -<!-- @todo write this! --> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="drivers.html">Using CodeIgniter Drivers</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="core_classes.html">Creating Core System Classes</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html deleted file mode 100644 index c5c82e8dd..000000000 --- a/user_guide/general/creating_libraries.html +++ /dev/null @@ -1,293 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Creating Libraries : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Creating Libraries -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Creating Libraries</h1> - -<p>When we use the term "Libraries" we are normally referring to the classes that are located in the <kbd>libraries</kbd> -directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create -your own libraries within your <dfn>application/libraries</dfn> directory in order to maintain separation between your local resources -and the global framework resources.</p> - -<p>As an added bonus, CodeIgniter permits your libraries to <kbd>extend</kbd> native classes if you simply need to add some functionality -to an existing library. Or you can even replace native libraries just by placing identically named versions in your <dfn>application/libraries</dfn> folder.</p> - -<p>In summary:</p> - -<ul> -<li>You can create entirely new libraries.</li> -<li>You can extend native libraries.</li> -<li>You can replace native libraries.</li> -</ul> - -<p>The page below explains these three concepts in detail.</p> - -<p class="important"><strong>Note:</strong> The Database classes can not be extended or replaced with your own classes. All other classes are able to be replaced/extended.</p> - - -<h2>Storage</h2> - -<p>Your library classes should be placed within your <dfn>application/libraries</dfn> folder, as this is where CodeIgniter will look for them when -they are initialized.</p> - - -<h2>Naming Conventions</h2> - -<ul> -<li>File names must be capitalized. For example: <dfn>Myclass.php</dfn></li> -<li>Class declarations must be capitalized. For example: <kbd>class Myclass</kbd></li> -<li>Class names and file names must match.</li> -</ul> - - -<h2>The Class File</h2> - -<p>Classes should have this basic prototype (Note: We are using the name <kbd>Someclass</kbd> purely as an example):</p> - -<code><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); -<br /><br /> -class Someclass {<br /> -<br /> - public function some_function()<br /> - {<br /> - }<br /> -}<br /><br /> -/* End of file Someclass.php */</code> - - -<h2>Using Your Class</h2> - -<p>From within any of your <a href="controllers.html">Controller</a> functions you can initialize your class using the standard:</p> - -<code>$this->load->library('<kbd>someclass</kbd>');</code> - -<p>Where <em>someclass</em> is the file name, without the ".php" file extension. You can submit the file name capitalized or lower case. -CodeIgniter doesn't care.</p> - -<p>Once loaded you can access your class using the <kbd>lower case</kbd> version:</p> - -<code>$this-><kbd>someclass</kbd>->some_function(); // Object instances will always be lower case -</code> - - - -<h2>Passing Parameters When Initializing Your Class</h2> - -<p>In the library loading function you can dynamically pass data as an array via the second parameter and it will be passed to your class -constructor:</p> - -<code> -$params = array('type' => 'large', 'color' => 'red');<br /> -<br /> -$this->load->library('Someclass', <kbd>$params</kbd>);</code> - -<p>If you use this feature you must set up your class constructor to expect data:</p> - -<code><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');<br /> -<br /> -class Someclass {<br /> -<br /> - public function __construct($params)<br /> - {<br /> - // Do something with $params<br /> - }<br /> -}<br /><br /> -?></code> - -<p class="important">You can also pass parameters stored in a config file. Simply create a config file named identically to the class <kbd>file name</kbd> -and store it in your <dfn>application/config/</dfn> folder. Note that if you dynamically pass parameters as described above, -the config file option will not be available.</p> - - - - - - - -<h2>Utilizing CodeIgniter Resources within Your Library</h2> - - -<p>To access CodeIgniter's native resources within your library use the <kbd>get_instance()</kbd> function. -This function returns the CodeIgniter super object.</p> - -<p>Normally from within your controller functions you will call any of the available CodeIgniter functions using the <kbd>$this</kbd> construct:</p> - -<code> -<strong>$this</strong>->load->helper('url');<br /> -<strong>$this</strong>->load->library('session');<br /> -<strong>$this</strong>->config->item('base_url');<br /> -etc. -</code> - -<p><kbd>$this</kbd>, however, only works directly within your controllers, your models, or your views. -If you would like to use CodeIgniter's classes from within your own custom classes you can do so as follows:</p> - - -<p>First, assign the CodeIgniter object to a variable:</p> - -<code>$CI =& get_instance();</code> - -<p>Once you've assigned the object to a variable, you'll use that variable <em>instead</em> of <kbd>$this</kbd>:</p> - -<code> -$CI =& get_instance();<br /> -<br /> -$CI->load->helper('url');<br /> -$CI->load->library('session');<br /> -$CI->config->item('base_url');<br /> -etc. -</code> - -<p class="important"><strong>Note:</strong> You'll notice that the above get_instance() function is being passed by reference: -<br /><br /> -<var>$CI =& get_instance();</var> -<br /> -<br /> -<kbd>This is very important.</kbd> Assigning by reference allows you to use the original CodeIgniter object rather than creating a copy of it.</p> - - -<h2>Replacing Native Libraries with Your Versions</h2> - -<p>Simply by naming your class files identically to a native library will cause CodeIgniter to use it instead of the native one. To use this -feature you must name the file and the class declaration exactly the same as the native library. For example, to replace the native <kbd>Email</kbd> library -you'll create a file named <dfn>application/libraries/Email.php</dfn>, and declare your class with:</p> - -<code> -class CI_Email {<br /><br /> - -}</code> - -<p>Note that most native classes are prefixed with <kbd>CI_</kbd>.</p> - -<p>To load your library you'll see the standard loading function:</p> - -<code>$this->load->library('<kbd>email</kbd>');</code> - -<p class="important"><strong>Note:</strong> At this time the Database classes can not be replaced with your own versions.</p> - - -<h2>Extending Native Libraries</h2> - -<p>If all you need to do is add some functionality to an existing library - perhaps add a function or two - then -it's overkill to replace the entire library with your version. In this case it's better to simply extend the class. -Extending a class is nearly identical to replacing a class with a couple exceptions:</p> - -<ul> -<li>The class declaration must extend the parent class.</li> -<li>Your new class name and filename must be prefixed with <kbd>MY_</kbd> (this item is configurable. See below.).</li> -</ul> - -<p>For example, to extend the native <kbd>Email</kbd> class you'll create a file named <dfn>application/libraries/</dfn><kbd>MY_Email.php</kbd>, and declare your class with:</p> - -<code> -class MY_Email extends CI_Email {<br /><br /> - -}</code> - -<p>Note: If you need to use a constructor in your class make sure you extend the parent constructor:</p> - - -<code> -class MY_Email extends CI_Email {<br /> -<br /> - public function __construct()<br /> - {<br /> - parent::__construct();<br /> - }<br /> -}</code> - - -<h3>Loading Your Sub-class</h3> - -<p>To load your sub-class you'll use the standard syntax normally used. DO NOT include your prefix. For example, -to load the example above, which extends the Email class, you will use:</p> - -<code>$this->load->library('<kbd>email</kbd>');</code> - -<p>Once loaded you will use the class variable as you normally would for the class you are extending. In the case of -the email class all calls will use:</p> - - -<code>$this-><kbd>email</kbd>->some_function();</code> - - -<h3>Setting Your Own Prefix</h3> - -<p>To set your own sub-class prefix, open your <dfn>application/config/config.php</dfn> file and look for this item:</p> - -<code>$config['subclass_prefix'] = 'MY_';</code> - -<p>Please note that all native CodeIgniter libraries are prefixed with <kbd>CI_</kbd> so DO NOT use that as your prefix.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="libraries.html">Using CodeIgniter Libraries</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="drivers.html">Using CodeIgniter Drivers</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html deleted file mode 100644 index 07f00677d..000000000 --- a/user_guide/general/credits.html +++ /dev/null @@ -1,87 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Credits : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Credits -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Credits</h1> - -<p>CodeIgniter was originally developed by <a href="http://www.ellislab.com/">Rick Ellis</a> (CEO of -<a href="http://ellislab.com/">EllisLab, Inc.</a>). The framework was written for performance in the real -world, with many of the class libraries, helpers, and sub-systems borrowed from the code-base of -<a href="http://www.expressionengine.com/">ExpressionEngine</a>.</p> - -<p>It is currently developed and maintained by the ExpressionEngine Development Team.<br /> -Bleeding edge development is spearheaded by the handpicked contributors of the Reactor Team.</p> - -<p>A hat tip goes to Ruby on Rails for inspiring us to create a PHP framework, and for -bringing frameworks into the general consciousness of the web community.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../changelog.html">Change Log</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../installation/downloads.html">Downloading CodeIgniter</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/drivers.html b/user_guide/general/drivers.html deleted file mode 100644 index f47929cf4..000000000 --- a/user_guide/general/drivers.html +++ /dev/null @@ -1,104 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Using CodeIgniter Drivers : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Using CodeIgniter Drivers -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Using CodeIgniter Drivers</h1> - - -<p>Drivers are a special type of Library that has a parent class and any number of potential child classes. Child classes have access to the parent class, but not their siblings. Drivers provide an elegant syntax in your <a href="controllers.html">controllers</a> for libraries that benefit from or require being broken down into discrete classes.</p> - -<p>Drivers are found in the <dfn>system/libraries</dfn> folder, in their own folder which is identically named to the parent library class. Also inside that folder is a subfolder named <kbd>drivers</kbd>, which contains all of the possible child class files.</p> - -<p>To use a driver you will initialize it within a controller using the following initialization function:</p> - -<code>$this->load->driver('<var>class name</var>'); </code> - -<p>Where <var>class name</var> is the name of the driver class you want to invoke. For example, to load a driver named "Some Parent" you would do this:</p> - -<code>$this->load->driver('<var>some_parent</var>');</code> - -<p>Methods of that class can then be invoked with:</p> - -<code>$this->some_parent->some_method();</code> - -<p>The child classes, the drivers themselves, can then be called directly through the parent class, without initializing them:</p> - -<code>$this->some_parent->child_one->some_method();<br /> -$this->some_parent->child_two->another_method();</code> - -<h2>Creating Your Own Drivers</h2> - -<p>Please read the section of the user guide that discusses how to <a href="creating_drivers.html">create your own drivers</a>.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="creating_libraries.html">Creating Libraries</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="creating_drivers.html">Creating Drivers</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/environments.html b/user_guide/general/environments.html deleted file mode 100644 index 8c8a99b47..000000000 --- a/user_guide/general/environments.html +++ /dev/null @@ -1,126 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Handling Multiple Environments : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Handling Multiple Environments -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Handling Multiple Environments</h1> - -<p> - Developers often desire different system behavior depending on whether - an application is running in a development or production - environment. For example, verbose error output is something that would - be useful while developing an application, but it may also pose a security issue when "live". -</p> - -<h2>The ENVIRONMENT Constant</h2> - -<p> - By default, CodeIgniter comes with the environment constant set to - '<kbd>development</kbd>'. At the top of index.php, you will see: -</p> - -<code> -define('<var>ENVIRONMENT</var>', '<var>development</var>'); -</code> - -<p> - In addition to affecting some basic framework behavior (see the next section), - you may use this constant in your own development to differentiate - between which environment you are running in. -</p> - -<h2>Effects On Default Framework Behavior</h2> - -<p> - There are some places in the CodeIgniter system where the <kbd>ENVIRONMENT</kbd> - constant is used. This section describes how default framework behavior is - affected. -</p> - -<h3>Error Reporting</h3> - -<p> - Setting the <kbd>ENVIRONMENT</kbd> constant to a value of '<kbd>development</kbd>' will - cause all PHP errors to be rendered to the browser when they occur. Conversely, - setting the constant to '<kbd>production</kbd>' will disable all error output. Disabling - error reporting in production is a <a href="security.html">good security practice</a>. -</p> - -<h3>Configuration Files</h3> - -<p> - Optionally, you can have CodeIgniter load environment-specific - configuration files. This may be useful for managing things like differing API keys - across multiple environments. This is described in more detail in the - environment section of the <a href="../libraries/config.html#environments">Config Class</a> documentation. -</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="managing_apps.html">Managing Applications</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="alternative_php.html">Alternative PHP Syntax</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html deleted file mode 100644 index bba7d4e38..000000000 --- a/user_guide/general/errors.html +++ /dev/null @@ -1,140 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Error Handling : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Error Handling -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Error Handling</h1> - -<p>CodeIgniter lets you build error reporting into your applications using the functions described below. -In addition, it has an error logging class that permits error and debugging messages to be saved as text files.</p> - -<p class="important"><strong>Note:</strong> By default, CodeIgniter displays all PHP errors. You might -wish to change this behavior once your development is complete. You'll find the <dfn>error_reporting()</dfn> -function located at the top of your main index.php file. Disabling error reporting will NOT prevent log files -from being written if there are errors.</p> - -<p>Unlike most systems in CodeIgniter, the error functions are simple procedural interfaces that are available -globally throughout the application. This approach permits error messages to get triggered without having to worry -about class/function scoping.</p> - -<p>The following functions let you generate errors:</p> - -<h2>show_error('<var>message</var>' [, int <var>$status_code</var>= 500 ] )</h2> -<p>This function will display the error message supplied to it using the following error template:</p> -<p><dfn>application/errors/</dfn><kbd>error_general.php</kbd></p> -<p>The optional parameter $status_code determines what HTTP status code should be sent with the error.</p> - -<h2>show_404('<var>page</var>' [, '<var>log_error</var>'])</h2> -<p>This function will display the 404 error message supplied to it using the following error template:</p> -<p><dfn>application/errors/</dfn><kbd>error_404.php</kbd></p> - -<p>The function expects the string passed to it to be the file path to the page that isn't found. -Note that CodeIgniter automatically shows 404 messages if controllers are not found.</p> - -<p>CodeIgniter automatically logs any show_404() calls. Setting the optional second parameter to FALSE will skip logging.</p> - - -<h2>log_message('<var>level</var>', '<samp>message</samp>')</h2> - -<p>This function lets you write messages to your log files. You must supply one of three "levels" -in the first parameter, indicating what type of message it is (debug, error, info), with the message -itself in the second parameter. Example:</p> - -<code> -if ($some_var == "")<br /> -{<br /> - log_message('error', 'Some variable did not contain a value.');<br /> -}<br /> -else<br /> -{<br /> - log_message('debug', 'Some variable was correctly set');<br /> -}<br /> -<br /> -log_message('info', 'The purpose of some variable is to provide some value.');<br /> -</code> - -<p>There are three message types:</p> - -<ol> -<li>Error Messages. These are actual errors, such as PHP errors or user errors.</li> -<li>Debug Messages. These are messages that assist in debugging. For example, if a class has been initialized, you could log this as debugging info.</li> -<li>Informational Messages. These are the lowest priority messages, simply giving information regarding some process. CodeIgniter doesn't natively generate any info messages but you may want to in your application.</li> -</ol> - - -<p class="important"><strong>Note:</strong> In order for the log file to actually be written, the - "logs" folder must be writable. In addition, you must set the "threshold" for logging in <dfn>application/config/config.php</dfn>. -You might, for example, only want error messages to be logged, and not the other two types. -If you set it to zero logging will be disabled.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="routing.html">URI Routing</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="caching.html">Page Caching</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html deleted file mode 100644 index d1e03cc49..000000000 --- a/user_guide/general/helpers.html +++ /dev/null @@ -1,185 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Helper Functions : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Helper Functions -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Helper Functions</h1> - -<p>Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular -category. There are <dfn>URL Helpers</dfn>, that assist in creating links, there are <dfn>Form Helpers</dfn> -that help you create form elements, <dfn>Text Helpers</dfn> perform various text formatting routines, -<dfn>Cookie Helpers</dfn> set and read cookies, <dfn>File Helpers</dfn> help you deal with files, etc. -</p> - -<p>Unlike most other systems in CodeIgniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions. -Each helper function performs one specific task, with no dependence on other functions.</p> - -<p>CodeIgniter does not load Helper Files by default, so the first step in using -a Helper is to load it. Once loaded, it becomes globally available in your <a href="../general/controllers.html">controller</a> and <a href="../general/views.html">views</a>.</p> - -<p>Helpers are typically stored in your <dfn>system/helpers</dfn>, or <dfn>application/helpers </dfn>directory. CodeIgniter will look first in your <dfn>application/helpers</dfn> -directory. If the directory does not exist or the specified helper is not located there CI will instead look in your global -<dfn>system/helpers</dfn> folder.</p> - - -<h2>Loading a Helper</h2> - -<p>Loading a helper file is quite simple using the following function:</p> - -<code>$this->load->helper('<var>name</var>');</code> - -<p>Where <var>name</var> is the file name of the helper, without the .php file extension or the "helper" part.</p> - -<p>For example, to load the <dfn>URL Helper</dfn> file, which is named <var>url_helper.php</var>, you would do this:</p> - -<code>$this->load->helper('<var>url</var>');</code> - -<p>A helper can be loaded anywhere within your controller functions (or even within your View files, although that's not a good practice), -as long as you load it before you use it. You can load your helpers in your controller constructor so that they become available -automatically in any function, or you can load a helper in a specific function that needs it.</p> - -<p class="important">Note: The Helper loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.</p> - - -<h2>Loading Multiple Helpers</h2> - -<p>If you need to load more than one helper you can specify them in an array, like this:</p> - -<code>$this->load->helper( <samp>array(</samp>'<var>helper1</var>', '<var>helper2</var>', '<var>helper3</var>'<samp>)</samp> );</code> - -<h2>Auto-loading Helpers</h2> - -<p>If you find that you need a particular helper globally throughout your application, you can tell CodeIgniter to auto-load it during system initialization. -This is done by opening the <var>application/config/autoload.php</var> file and adding the helper to the autoload array.</p> - - -<h2>Using a Helper</h2> - -<p>Once you've loaded the Helper File containing the function you intend to use, you'll call it the way you would a standard PHP function.</p> - -<p>For example, to create a link using the <dfn>anchor()</dfn> function in one of your view files you would do this:</p> - -<code><?php echo anchor('blog/comments', 'Click Here');?></code> - -<p>Where "Click Here" is the name of the link, and "blog/comments" is the URI to the controller/function you wish to link to.</p> - -<h2>"Extending" Helpers</h2> - -<p>To "extend" Helpers, create a file in your <dfn>application/helpers/</dfn> folder with an identical name to the existing Helper, but prefixed with <kbd>MY_</kbd> (this item is configurable. See below.).</p> - -<p>If all you need to do is add some functionality to an existing helper - perhaps add a function or two, or change how a particular - helper function operates - then it's overkill to replace the entire helper with your version. In this case it's better to simply - "extend" the Helper. The term "extend" is used loosely since Helper functions are procedural and discrete and cannot be extended - in the traditional programmatic sense. Under the hood, this gives you the ability to add to the functions a Helper provides, - or to modify how the native Helper functions operate.</p> - -<p>For example, to extend the native <kbd>Array Helper</kbd> you'll create a file named <dfn>application/helpers/</dfn><kbd>MY_array_helper.php</kbd>, and add or override functions:</p> - -<code> -// any_in_array() is not in the Array Helper, so it defines a new function<br /> -function any_in_array($needle, $haystack)<br /> -{<br /> - $needle = (is_array($needle)) ? $needle : array($needle);<br /> - <br /> - foreach ($needle as $item)<br /> - {<br /> - if (in_array($item, $haystack))<br /> - {<br /> - return TRUE;<br /> - }<br /> - }<br /> - <br /> - return FALSE;<br /> -}<br /> -<br /> -// random_element() is included in Array Helper, so it overrides the native function<br /> -function random_element($array)<br /> -{<br /> - shuffle($array);<br /> - return array_pop($array);<br /> -}<br /> -</code> - -<h3>Setting Your Own Prefix</h3> - -<p>The filename prefix for "extending" Helpers is the same used to extend libraries and Core classes. To set your own prefix, open your <dfn>application/config/config.php</dfn> file and look for this item:</p> - -<code>$config['subclass_prefix'] = 'MY_';</code> - -<p>Please note that all native CodeIgniter libraries are prefixed with <kbd>CI_</kbd> so DO NOT use that as your prefix.</p> - - -<h2>Now What?</h2> - -<p>In the Table of Contents you'll find a list of all the available Helper Files. Browse each one to see what they do.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="models.html">Models</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="libraries.html">Using Libraries</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html deleted file mode 100644 index dbeecbed9..000000000 --- a/user_guide/general/hooks.html +++ /dev/null @@ -1,165 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Hooks : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Hooks - Extending the Framework Core -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Hooks - Extending the Framework Core</h1> - -<p>CodeIgniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files. -When CodeIgniter runs it follows a specific execution process, diagramed in the <a href="../overview/appflow.html">Application Flow</a> page. -There may be instances, however, where you'd like to cause some action to take place at a particular stage in the execution process. -For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of -your own scripts in some other location. -</p> - -<h2>Enabling Hooks</h2> - -<p>The hooks feature can be globally enabled/disabled by setting the following item in the <kbd>application/config/config.php</kbd> file:</p> - -<code>$config['enable_hooks'] = TRUE;</code> - - -<h2>Defining a Hook</h2> - -<p>Hooks are defined in <dfn>application/config/hooks.php</dfn> file. Each hook is specified as an array with this prototype:</p> - -<code> -$hook['pre_controller'] = array(<br /> - 'class' => 'MyClass',<br /> - 'function' => 'Myfunction',<br /> - 'filename' => 'Myclass.php',<br /> - 'filepath' => 'hooks',<br /> - 'params' => array('beer', 'wine', 'snacks')<br /> - );</code> - -<p><strong>Notes:</strong><br />The array index correlates to the name of the particular hook point you want to -use. In the above example the hook point is <kbd>pre_controller</kbd>. A list of hook points is found below. -The following items should be defined in your associative hook array:</p> - -<ul> -<li><strong>class</strong> The name of the class you wish to invoke. If you prefer to use a procedural function instead of a class, leave this item blank.</li> -<li><strong>function</strong> The function name you wish to call.</li> -<li><strong>filename</strong> The file name containing your class/function.</li> -<li><strong>filepath</strong> The name of the directory containing your script. Note: Your script must be located in a directory INSIDE your <kbd>application</kbd> folder, so the file path is relative to that folder. For example, if your script is located in <dfn>application/hooks</dfn>, you will simply use <samp>hooks</samp> as your filepath. If your script is located in <dfn>application/hooks/utilities</dfn> you will use <samp>hooks/utilities</samp> as your filepath. No trailing slash.</li> -<li><strong>params</strong> Any parameters you wish to pass to your script. This item is optional.</li> -</ul> - - -<h2>Multiple Calls to the Same Hook</h2> - -<p>If want to use the same hook point with more then one script, simply make your array declaration multi-dimensional, like this:</p> - -<code> -$hook['pre_controller']<kbd>[]</kbd> = array(<br /> - 'class' => 'MyClass',<br /> - 'function' => 'Myfunction',<br /> - 'filename' => 'Myclass.php',<br /> - 'filepath' => 'hooks',<br /> - 'params' => array('beer', 'wine', 'snacks')<br /> - );<br /> -<br /> -$hook['pre_controller']<kbd>[]</kbd> = array(<br /> - 'class' => 'MyOtherClass',<br /> - 'function' => 'MyOtherfunction',<br /> - 'filename' => 'Myotherclass.php',<br /> - 'filepath' => 'hooks',<br /> - 'params' => array('red', 'yellow', 'blue')<br /> - );</code> - -<p>Notice the brackets after each array index:</p> - -<code>$hook['pre_controller']<kbd>[]</kbd></code> - -<p>This permits you to have the same hook point with multiple scripts. The order you define your array will be the execution order.</p> - - -<h2>Hook Points</h2> - -<p>The following is a list of available hook points.</p> - -<ul> - <li><strong>pre_system</strong><br /> - Called very early during system execution. Only the benchmark and hooks class have been loaded at this point. No routing or other processes have happened.</li> - <li><strong>pre_controller</strong><br /> - Called immediately prior to any of your controllers being called. All base classes, routing, and security checks have been done.</li> - <li><strong>post_controller_constructor</strong><br /> - Called immediately after your controller is instantiated, but prior to any method calls happening.</li> - <li><strong>post_controller</strong><br /> - Called immediately after your controller is fully executed.</li> - <li><strong>display_override</strong><br /> - Overrides the <dfn>_display()</dfn> function, used to send the finalized page to the web browser at the end of system execution. This permits you to - use your own display methodology. Note that you will need to reference the CI superobject with <dfn>$this->CI =& get_instance()</dfn> and then the finalized data will be available by calling <dfn>$this->CI->output->get_output()</dfn></li> - <li><strong>cache_override</strong><br /> - Enables you to call your own function instead of the <dfn>_display_cache()</dfn> function in the output class. This permits you to use your own cache display mechanism.</li> - <li><strong>post_system</strong><br /> - Called after the final rendered page is sent to the browser, at the end of system execution after the finalized data is sent to the browser.</li> - </ul> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="core_classes.html">Creating Core Classes</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="autoloader.html">Auto-loading Resources</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html deleted file mode 100644 index d84fa110e..000000000 --- a/user_guide/general/libraries.html +++ /dev/null @@ -1,98 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Using CodeIgniter Libraries : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Using CodeIgniter Libraries -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Using CodeIgniter Libraries</h1> - - -<p>All of the available libraries are located in your <dfn>system/libraries</dfn> folder. -In most cases, to use one of these classes involves initializing it within a <a href="controllers.html">controller</a> using the following initialization function:</p> - -<code>$this->load->library('<var>class name</var>'); </code> - -<p>Where <var>class name</var> is the name of the class you want to invoke. For example, to load the form validation class you would do this:</p> - -<code>$this->load->library('<var>form_validation</var>'); </code> - -<p>Once initialized you can use it as indicated in the user guide page corresponding to that class.</p> - -<p>Additionally, multiple libraries can be loaded at the same time by passing an array of libraries to the load function.</p> - -<code>$this->load->library(array('<var>email</var>', '<var>table</var>'));</code> - -<h2>Creating Your Own Libraries</h2> - -<p>Please read the section of the user guide that discusses how to <a href="creating_libraries.html">create your own libraries</a></p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="helpers.html">Helpers</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="creating_libraries.html">Creating Libraries</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html deleted file mode 100644 index b964704c0..000000000 --- a/user_guide/general/managing_apps.html +++ /dev/null @@ -1,133 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Managing your Applications : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Managing your Applications -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Managing your Applications</h1> - -<p>By default it is assumed that you only intend to use CodeIgniter to manage one application, which you will build in your -<dfn>application/</dfn> directory. It is possible, however, to have multiple sets of applications that share a single -CodeIgniter installation, or even to rename or relocate your <dfn>application</dfn> folder.</p> - -<h2>Renaming the Application Folder</h2> - -<p>If you would like to rename your <dfn>application</dfn> folder you may do so as long as you open your main <kbd>index.php</kbd> -file and set its name using the <samp>$application_folder</samp> variable:</p> - -<code>$application_folder = "application";</code> - -<h2>Relocating your Application Folder</h2> - -<p>It is possible to move your <dfn>application</dfn> folder to a different location on your server than your <kbd>system</kbd> folder. -To do so open your main <kbd>index.php</kbd> and set a <em>full server path</em> in the <samp>$application_folder</samp> variable.</p> - - -<code>$application_folder = "/Path/to/your/application";</code> - - -<h2>Running Multiple Applications with one CodeIgniter Installation</h2> - -<p>If you would like to share a common CodeIgniter installation to manage several different applications simply -put all of the directories located inside your <kbd>application</kbd> folder into their -own sub-folder.</p> - -<p>For example, let's say you want to create two applications, "foo" and "bar". You could structure your -application folders like this:</p> - -<code>applications/<var>foo</var>/<br /> -applications/<var>foo</var>/config/<br /> -applications/<var>foo</var>/controllers/<br /> -applications/<var>foo</var>/errors/<br /> -applications/<var>foo</var>/libraries/<br /> -applications/<var>foo</var>/models/<br /> -applications/<var>foo</var>/views/<br /> -applications/<samp>bar</samp>/<br /> -applications/<samp>bar</samp>/config/<br /> -applications/<samp>bar</samp>/controllers/<br /> -applications/<samp>bar</samp>/errors/<br /> -applications/<samp>bar</samp>/libraries/<br /> -applications/<samp>bar</samp>/models/<br /> -applications/<samp>bar</samp>/views/</code> - - -<p>To select a particular application for use requires that you open your main <kbd>index.php</kbd> file and set the <dfn>$application_folder</dfn> -variable. For example, to select the "foo" application for use you would do this:</p> - -<code>$application_folder = "applications/foo";</code> - -<p class="important"><strong>Note:</strong> Each of your applications will need its own <dfn>index.php</dfn> file which -calls the desired application. The index.php file can be named anything you want.</p> - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="profiling.html">Profiling Your Application</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="alternative_php.html">Alternative PHP Syntax</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/models.html b/user_guide/general/models.html deleted file mode 100644 index ad72a8447..000000000 --- a/user_guide/general/models.html +++ /dev/null @@ -1,251 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Models : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Models -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Models</h1> - -<p>Models are <strong>optionally</strong> available for those who want to use a more traditional MVC approach.</p> - - - -<ul> -<li><a href="#what">What is a Model?</a></li> -<li><a href="#anatomy">Anatomy of a Model</a></li> -<li><a href="#loading">Loading a Model</a></li> -<li><a href="#auto_load_model">Auto-Loading a Model</a> </li> -<li><a href="#conn">Connecting to your Database</a></li> -</ul> - - - -<h2><a name="what"></a>What is a Model?</h2> - -<p>Models are PHP classes that are designed to work with information in your database. For example, let's say -you use CodeIgniter to manage a blog. You might have a model class that contains functions to insert, update, and -retrieve your blog data. Here is an example of what such a model class might look like:</p> - -<code> -class Blogmodel extends CI_Model {<br /> -<br /> - var $title = '';<br /> - var $content = '';<br /> - var $date = '';<br /> -<br /> - function __construct()<br /> - {<br /> - // Call the Model constructor<br /> - parent::__construct();<br /> - }<br /> - <br /> - function get_last_ten_entries()<br /> - {<br /> - $query = $this->db->get('entries', 10);<br /> - return $query->result();<br /> - }<br /> -<br /> - function insert_entry()<br /> - {<br /> - $this->title = $_POST['title']; // please read the below note<br /> - $this->content = $_POST['content'];<br /> - $this->date = time();<br /> -<br /> - $this->db->insert('entries', $this);<br /> - }<br /> -<br /> - function update_entry()<br /> - {<br /> - $this->title = $_POST['title'];<br /> - $this->content = $_POST['content'];<br /> - $this->date = time();<br /> -<br /> - $this->db->update('entries', $this, array('id' => $_POST['id']));<br /> - }<br /> -<br /> -}</code> - -<p>Note: The functions in the above example use the <a href="../database/active_record.html">Active Record</a> database functions.</p> -<p class="important"><strong>Note:</strong> For the sake of simplicity in this example we're using $_POST directly. This is generally bad practice, and a more common approach would be to use the <a href="../libraries/input.html">Input Class</a> $this->input->post('title')</p> -<h2><a name="anatomy"></a>Anatomy of a Model</h2> - -<p>Model classes are stored in your <dfn>application/models/</dfn> folder. They can be nested within sub-folders if you -want this type of organization.</p> - -<p>The basic prototype for a model class is this:</p> - - -<code> -class <var>Model_name</var> extends CI_Model {<br /> -<br /> - function <var>__construct</var>()<br /> - {<br /> - parent::__construct();<br /> - }<br /> -}</code> - -<p>Where <var>Model_name</var> is the name of your class. Class names <strong>must</strong> have the first letter capitalized with the rest of the name lowercase. -Make sure your class extends the base Model class.</p> - -<p>The file name will be a lower case version of your class name. For example, if your class is this:</p> - -<code> -class <var>User_model</var> extends CI_Model {<br /> -<br /> - function <var>__construct</var>()<br /> - {<br /> - parent::__construct();<br /> - }<br /> -}</code> - -<p>Your file will be this:</p> - -<code>application/models/<var>user_model.php</var></code> - - - -<h2><a name="loading"></a>Loading a Model</h2> - -<p>Your models will typically be loaded and called from within your <a href="controllers.html">controller</a> functions. -To load a model you will use the following function:</p> - -<code>$this->load->model('<var>Model_name</var>');</code> - -<p>If your model is located in a sub-folder, include the relative path from your models folder. For example, if -you have a model located at <dfn>application/models/blog/queries.php</dfn> you'll load it using:</p> - -<code>$this->load->model('<var>blog/queries</var>');</code> - - -<p>Once loaded, you will access your model functions using an object with the same name as your class:</p> - -<code> -$this->load->model('<var>Model_name</var>');<br /> -<br /> -$this-><var>Model_name</var>->function(); -</code> - -<p>If you would like your model assigned to a different object name you can specify it via the second parameter of the loading -function:</p> - - -<code> -$this->load->model('<var>Model_name</var>', '<kbd>fubar</kbd>');<br /> -<br /> -$this-><kbd>fubar</kbd>->function(); -</code> - -<p>Here is an example of a controller, that loads a model, then serves a view:</p> - -<code> -class Blog_controller extends CI_Controller {<br /> -<br /> - function blog()<br /> - {<br /> - $this->load->model('Blog');<br /> -<br /> - $data['query'] = $this->Blog->get_last_ten_entries();<br /><br /> - $this->load->view('blog', $data);<br /> - }<br /> -}</code> - -<h2><a name="auto_load_model" id="auto_load_model"></a>Auto-loading Models</h2> -<p>If you find that you need a particular model globally throughout your application, you can tell CodeIgniter to auto-load it during system initialization. This is done by opening the application/config/autoload.php file and adding the model to the autoload array.</p> - - -<h2><a name="conn"></a>Connecting to your Database</h2> - -<p>When a model is loaded it does <strong>NOT</strong> connect automatically to your database. The following options for connecting are available to you:</p> - -<ul> -<li>You can connect using the standard database methods <a href="../database/connecting.html">described here</a>, either from within your Controller class or your Model class.</li> -<li>You can tell the model loading function to auto-connect by passing <kbd>TRUE</kbd> (boolean) via the third parameter, -and connectivity settings, as defined in your database config file will be used: - - <code>$this->load->model('<var>Model_name</var>', '', <kbd>TRUE</kbd>);</code> - </li> - - -<li>You can manually pass database connectivity settings via the third parameter: - - - <code>$config['hostname'] = "localhost";<br /> - $config['username'] = "myusername";<br /> - $config['password'] = "mypassword";<br /> - $config['database'] = "mydatabase";<br /> - $config['dbdriver'] = "mysql";<br /> - $config['dbprefix'] = "";<br /> - $config['pconnect'] = FALSE;<br /> - $config['db_debug'] = TRUE;<br /> - <br /> - $this->load->model('<var>Model_name</var>', '', <kbd>$config</kbd>);</code></li> -</ul> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="views.html">Views</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="helpers.html">Helpers</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html deleted file mode 100644 index d34ab4c93..000000000 --- a/user_guide/general/profiling.html +++ /dev/null @@ -1,181 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Profiling Your Application : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Profiling Your Application -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Profiling Your Application</h1> - -<p>The Profiler Class will display benchmark results, queries you have run, and $_POST data at the bottom of your pages. -This information can be useful during development in order to help with debugging and optimization.</p> - - -<h2>Initializing the Class</h2> - -<p class="important"><strong>Important:</strong> This class does <kbd>NOT</kbd> need to be initialized. It is loaded automatically by the -<a href="../libraries/output.html">Output Class</a> if profiling is enabled as shown below.</p> - -<h2>Enabling the Profiler</h2> - - <p>To enable the profiler place the following function anywhere within your <a href="controllers.html">Controller</a> functions:</p> - <code>$this->output->enable_profiler(TRUE);</code> - - <p>When enabled a report will be generated and inserted at the bottom of your pages.</p> - - <p>To disable the profiler you will use:</p> - <code>$this->output->enable_profiler(FALSE);</code> - - -<h2>Setting Benchmark Points</h2> - - <p>In order for the Profiler to compile and display your benchmark data you must name your mark points using specific syntax.</p> - - <p>Please read the information on setting Benchmark points in <a href="../libraries/benchmark.html">Benchmark Class</a> page.</p> - - -<h2>Enabling and Disabling Profiler Sections</h2> - - <p>Each section of Profiler data can be enabled or disabled by setting a corresponding config variable to <var>TRUE</var> or <var>FALSE</var>. This can be done one of two ways. First, you can set application wide defaults with the <dfn>application/config/profiler.php</dfn> config file.</p> - - <code>$config['config'] = FALSE;<br /> - $config['queries'] = FALSE;<br /></code> - - <p>In your controllers, you can override the defaults and config file values by calling the <kbd>set_profiler_sections()</kbd> method of the <a href="../libraries/output.html">Output class</a>:</p> - - <code>$sections = array(<br /> - 'config' => TRUE,<br /> - 'queries' => TRUE<br /> - );<br /> - <br /> - $this->output->set_profiler_sections($sections);</code> - - <p>Available sections and the array key used to access them are described in the table below.</p> - - <table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> - <tr> - <th>Key</th> - <th>Description</th> - <th>Default</th> - </tr> - <tr> - <td class="td"><strong>benchmarks</strong></td> - <td class="td">Elapsed time of Benchmark points and total execution time</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>config</strong></td> - <td class="td">CodeIgniter Config variables</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>controller_info</strong></td> - <td class="td">The Controller class and method requested</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>get</strong></td> - <td class="td">Any GET data passed in the request</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>http_headers</strong></td> - <td class="td">The HTTP headers for the current request</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>memory_usage</strong></td> - <td class="td">Amount of memory consumed by the current request, in bytes</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>post</strong></td> - <td class="td">Any POST data passed in the request</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>queries</strong></td> - <td class="td">Listing of all database queries executed, including execution time</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>uri_string</strong></td> - <td class="td">The URI of the current request</td> - <td class="td">TRUE</td> - </tr> - <tr> - <td class="td"><strong>query_toggle_count</strong></td> - <td class="td">The number of queries after which the query block will default to hidden.</td> - <td class="td">25</td> - </tr> - </table> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="caching.html">Caching</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="managing_apps.html">Managing Applications</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html deleted file mode 100644 index 9db13f008..000000000 --- a/user_guide/general/quick_reference.html +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Quick Reference Chart : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Quick Reference Chart -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Quick Reference Chart</h1> - -<p>For a PDF version of this chart, <a href="http://ellislab.com/asset/ci_download_files/ci_quick_ref.pdf">click here</a>.</p> - -<p><img src="../images/ci_quick_ref.png" width="763" height="994" border="0" /></p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html deleted file mode 100644 index d49cbdd07..000000000 --- a/user_guide/general/requirements.html +++ /dev/null @@ -1,82 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Server Requirements : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Server Requirements -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Server Requirements</h1> - -<ul> - <li><a href="http://www.php.net/">PHP</a> version 5.1.6 or newer.</li> - <li>A Database is required for most web application programming. Current supported databases are MySQL (4.1+), MySQLi, MS SQL, Postgres, Oracle, SQLite, and ODBC.</li> -</ul> - - - -</div> -<!-- END CONTENT --> - - - -<div id="footer"> -<p> -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../license.html">License Agreement</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html deleted file mode 100644 index 3ff85de51..000000000 --- a/user_guide/general/reserved_names.html +++ /dev/null @@ -1,128 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Reserved Names : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Controllers -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Reserved Names</h1> - -<p>In order to help out, CodeIgniter uses a series of functions and names in its operation. Because of this, some names cannot be used by a developer. Following is a list of reserved names that cannot be used.</p> -<h3>Controller names</h3> -<p>Since your controller classes will extend the main application controller you -must be careful not to name your functions identically to the ones used by that class, otherwise your local functions -will override them. The following -is a list of reserved names. Do not name your controller any of these:</p> -<ul> - <li>Controller</li> - <li>CI_Base</li> - <li>_ci_initialize</li> - <li>Default</li> - <li>index</li> -</ul> -<h3>Functions</h3> -<ul> - <li>is_really_writable()</li> - <li>load_class()</li> - <li>get_config()</li> - <li>config_item()</li> - <li>show_error()</li> - <li>show_404()</li> - <li>log_message()</li> - <li>_exception_handler()</li> - <li>get_instance()</li> - </ul> -<h3>Variables</h3> -<ul> - <li>$config</li> - <li>$mimes</li> - <li>$lang</li> -</ul> -<h3>Constants</h3> -<ul> - <li>ENVIRONMENT</li> - <li>EXT</li> - <li>FCPATH</li> - <li>SELF</li> - <li>BASEPATH</li> - <li>APPPATH</li> - <li>CI_VERSION</li> - <li>FILE_READ_MODE</li> - <li>FILE_WRITE_MODE</li> - <li>DIR_READ_MODE</li> - <li>DIR_WRITE_MODE</li> - <li>FOPEN_READ</li> - <li>FOPEN_READ_WRITE</li> - <li>FOPEN_WRITE_CREATE_DESTRUCTIVE</li> - <li>FOPEN_READ_WRITE_CREATE_DESTRUCTIVE</li> - <li>FOPEN_WRITE_CREATE</li> - <li>FOPEN_READ_WRITE_CREATE</li> - <li>FOPEN_WRITE_CREATE_STRICT</li> - <li>FOPEN_READ_WRITE_CREATE_STRICT</li> -</ul> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="controllers.html">Controllers</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="views.html">Views</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html deleted file mode 100644 index ad4cffad3..000000000 --- a/user_guide/general/routing.html +++ /dev/null @@ -1,171 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>URI Routing : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -URI Routing -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>URI Routing</h1> - -<p>Typically there is a one-to-one relationship between a URL string and its corresponding controller class/method. -The segments in a URI normally follow this pattern:</p> - -<code>example.com/<dfn>class</dfn>/<samp>function</samp>/<var>id</var>/</code> - -<p>In some instances, however, you may want to remap this relationship so that a different class/function can be called -instead of the one corresponding to the URL.</p> - -<p>For example, lets say you want your URLs to have this prototype:</p> - -<p> -example.com/product/1/<br /> -example.com/product/2/<br /> -example.com/product/3/<br /> -example.com/product/4/ -</p> - -<p>Normally the second segment of the URL is reserved for the function name, but in the example above it instead has a product ID. -To overcome this, CodeIgniter allows you to remap the URI handler.</p> - - -<h2>Setting your own routing rules</h2> - -<p>Routing rules are defined in your <var>application/config/routes.php</var> file. In it you'll see an array called <dfn>$route</dfn> that -permits you to specify your own routing criteria. Routes can either be specified using <dfn>wildcards</dfn> or <dfn>Regular Expressions</dfn></p> - - -<h2>Wildcards</h2> - -<p>A typical wildcard route might look something like this:</p> - -<code>$route['product/:num'] = "catalog/product_lookup";</code> - -<p>In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to. -In the above example, if the literal word "product" is found in the first segment of the URL, and a number is found in the second segment, -the "catalog" class and the "product_lookup" method are instead used.</p> - -<p>You can match literal values or you can use two wildcard types:</p> - -<p><strong>(:num)</strong> will match a segment containing only numbers.<br /> -<strong>(:any)</strong> will match a segment containing any character. -</p> - -<p class="important"><strong>Note:</strong> Routes will run in the order they are defined. -Higher routes will always take precedence over lower ones.</p> - -<h2>Examples</h2> - -<p>Here are a few routing examples:</p> - -<code>$route['journals'] = "blogs";</code> -<p>A URL containing the word "journals" in the first segment will be remapped to the "blogs" class.</p> - -<code>$route['blog/joe'] = "blogs/users/34";</code> -<p>A URL containing the segments blog/joe will be remapped to the "blogs" class and the "users" method. The ID will be set to "34".</p> - -<code>$route['product/(:any)'] = "catalog/product_lookup";</code> -<p>A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup" method.</p> - -<code>$route['product/(:num)'] = "catalog/product_lookup_by_id/$1";</code> -<p>A URL with "product" as the first segment, and a number in the second will be remapped to the "catalog" class and the "product_lookup_by_id" method passing in the match as a variable to the function.</p> - -<p class="important"><strong>Important:</strong> Do not use leading/trailing slashes.</p> - -<h2>Regular Expressions</h2> - -<p>If you prefer you can use regular expressions to define your routing rules. Any valid regular expression is allowed, as are back-references.</p> - -<p class="important"><strong>Note:</strong> If you use back-references you must use the dollar syntax rather than the double backslash syntax.</p> - -<p>A typical RegEx route might look something like this:</p> - -<code>$route['products/([a-z]+)/(\d+)'] = "$1/id_$2";</code> - -<p>In the above example, a URI similar to <dfn>products/shirts/123</dfn> would instead call the <dfn>shirts</dfn> controller class and the <dfn>id_123</dfn> function.</p> - -<p>You can also mix and match wildcards with regular expressions.</p> - -<h2>Reserved Routes</h2> - -<p>There are two reserved routes:</p> - -<code>$route['default_controller'] = 'welcome';</code> - -<p>This route indicates which controller class should be loaded if the URI contains no data, which will be the case -when people load your root URL. In the above example, the "welcome" class would be loaded. You -are encouraged to always have a default route otherwise a 404 page will appear by default.</p> - -<code>$route['404_override'] = '';</code> - -<p>This route indicates which controller class should be loaded if the requested controller is not found. It will override the default 404 -error page. It won't affect to the <samp>show_404()</samp> function, which will continue loading the default <dfn>error_404.php</dfn> file at <var>application/errors/error_404.php</var>.</p> - -<p class="important"><strong>Important:</strong> The reserved routes must come before any wildcard or regular expression routes.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="common_functions.html">Common Functions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="errors.html">Error Handling</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/security.html b/user_guide/general/security.html deleted file mode 100644 index 76a5f0021..000000000 --- a/user_guide/general/security.html +++ /dev/null @@ -1,164 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Security : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Security -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Security</h1> - -<p>This page describes some "best practices" regarding web security, and details -CodeIgniter's internal security features.</p> - - -<h2>URI Security</h2> - -<p>CodeIgniter is fairly restrictive regarding which characters it allows in your URI strings in order to help -minimize the possibility that malicious data can be passed to your application. URIs may only contain the following: -</p> - -<ul> -<li>Alpha-numeric text</li> -<li>Tilde: ~ </li> -<li>Period: .</li> -<li>Colon: :</li> -<li>Underscore: _</li> -<li>Dash: -</li> -</ul> - -<h2>Register_globals</h2> - -<p>During system initialization all global variables are unset, except those found in the $_GET, $_POST, and $_COOKIE arrays. The unsetting -routine is effectively the same as register_globals = off.</p> - -<a name="error_reporting"></a> -<h2>error_reporting</h2> - -<p> - In production environments, it is typically desirable to disable PHP's - error reporting by setting the internal error_reporting flag to a value of 0. This disables native PHP - errors from being rendered as output, which may potentially contain - sensitive information. -</p> - -<p> - Setting CodeIgniter's <kbd>ENVIRONMENT</kbd> constant in index.php to a - value of '<kbd>production</kbd>' will turn off these errors. In development - mode, it is recommended that a value of '<kbd>development</kbd>' is used. - More information about differentiating between environments can be found - on the <a href="environments.html">Handling Environments</a> page. -</p> - -<h2>magic_quotes_runtime</h2> - -<p>The magic_quotes_runtime directive is turned off during system initialization so that you don't have to remove slashes when -retrieving data from your database.</p> - -<h1>Best Practices</h1> - -<p>Before accepting any data into your application, whether it be POST data from a form submission, COOKIE data, URI data, -XML-RPC data, or even data from the SERVER array, you are encouraged to practice this three step approach:</p> - -<ol> -<li>Filter the data as if it were tainted.</li> -<li>Validate the data to ensure it conforms to the correct type, length, size, etc. (sometimes this step can replace step one)</li> -<li>Escape the data before submitting it into your database.</li> -</ol> - -<p>CodeIgniter provides the following functions to assist in this process:</p> - -<ul> - -<li><h2>XSS Filtering</h2> - -<p>CodeIgniter comes with a Cross Site Scripting filter. This filter looks for commonly -used techniques to embed malicious Javascript into your data, or other types of code that attempt to hijack cookies -or do other malicious things. The XSS Filter is described <a href="../libraries/security.html">here</a>. -</p> -</li> - -<li><h2>Validate the data</h2> - -<p>CodeIgniter has a <a href="../libraries/form_validation.html">Form Validation Class</a> that assists you in validating, filtering, and prepping -your data.</p> -</li> - -<li><h2>Escape all data before database insertion</h2> - -<p>Never insert information into your database without escaping it. Please see the section that discusses -<a href="../database/queries.html">queries</a> for more information.</p> - -</li> - -</ul> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="alternative_php.html">Alternative PHP</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="styleguide.html">PHP Style Guide</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html deleted file mode 100644 index cdf95d27e..000000000 --- a/user_guide/general/styleguide.html +++ /dev/null @@ -1,679 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Style Guide : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<style type="text/css" media="screen"> - code { - white-space: pre; - } -</style> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Style Guide -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>General Style and Syntax</h1> - -<p>The following page describes the use of coding rules adhered to when developing CodeIgniter.</p> - - -<h2>Table of Contents</h2> -<ul class="minitoc"> - <li><a href="#file_format">File Format</a></li> - <li><a href="#php_closing_tag">PHP Closing Tag</a></li> - <li><a href="#class_and_method_naming">Class and Method Naming</a></li> - <li><a href="#variable_names">Variable Names</a></li> - <li><a href="#commenting">Commenting</a></li> - <li><a href="#constants">Constants</a></li> - <li><a href="#true_false_and_null">TRUE, FALSE, and NULL</a></li> - <li><a href="#logical_operators">Logical Operators</a></li> - <li><a href="#comparing_return_values_and_typecasting">Comparing Return Values and Typecasting</a></li> - <li><a href="#debugging_code">Debugging Code</a></li> - <li><a href="#whitespace_in_files">Whitespace in Files</a></li> - <li><a href="#compatibility">Compatibility</a></li> - <li><a href="#class_and_file_names_using_common_words">Class and File Names using Common Words</a></li> - <li><a href="#database_table_names">Database Table Names</a></li> - <li><a href="#one_file_per_class">One File per Class</a></li> - <li><a href="#whitespace">Whitespace</a></li> - <li><a href="#line_breaks">Line Breaks</a></li> - <li><a href="#code_indenting">Code Indenting</a></li> - <li><a href="#bracket_spacing">Bracket and Parenthetic Spacing</li> - <li><a href="#localized_text">Localized Text</a></li> - <li><a href="#private_methods_and_variables">Private Methods and Variables</a></li> - <li><a href="#php_errors">PHP Errors</a></li> - <li><a href="#short_open_tags">Short Open Tags</a></li> - <li><a href="#one_statement_per_line">One Statement Per Line</a></li> - <li><a href="#strings">Strings</a></li> - <li><a href="#sql_queries">SQL Queries</a></li> - <li><a href="#default_function_arguments">Default Function Arguments</a></li> -</ul> - -<li> - - <h2><a name="file_format"></a>File Format</h2> - <div class="guidelineDetails"> - <p>Files should be saved with Unicode (UTF-8) encoding. The <abbr title="Byte Order Mark">BOM</abbr> - should <em>not</em> be used. Unlike UTF-16 and UTF-32, there's no byte order to indicate in - a UTF-8 encoded file, and the <abbr title="Byte Order Mark">BOM</abbr> can have a negative side effect in PHP of sending output, - preventing the application from being able to set its own headers. Unix line endings should - be used (LF).</p> - - <p>Here is how to apply these settings in some of the more common text editors. Instructions for your - text editor may vary; check your text editor's documentation.</p> - - <h5>TextMate</h5> - - <ol> - <li>Open the Application Preferences</li> - <li>Click Advanced, and then the "Saving" tab</li> - <li>In "File Encoding", select "UTF-8 (recommended)"</li> - <li>In "Line Endings", select "LF (recommended)"</li> - <li><em>Optional:</em> Check "Use for existing files as well" if you wish to modify the line - endings of files you open to your new preference.</li> - </ol> - - <h5>BBEdit</h5> - - <ol> - <li>Open the Application Preferences</li> - <li>Select "Text Encodings" on the left.</li> - <li>In "Default text encoding for new documents", select "Unicode (UTF-8, no BOM)"</li> - <li><em>Optional:</em> In "If file's encoding can't be guessed, use", select - "Unicode (UTF-8, no BOM)"</li> - <li>Select "Text Files" on the left.</li> - <li>In "Default line breaks", select "Mac OS X and Unix (LF)"</li> - </ol> - </div> - - <h2><a name="php_closing_tag"></a>PHP Closing Tag</h2> - <div class="guidelineDetails"> - <p>The PHP closing tag on a PHP document <strong>?></strong> is optional to the PHP parser. However, if used, any whitespace following the closing tag, whether introduced - by the developer, user, or an FTP application, can cause unwanted output, PHP errors, or if the latter are suppressed, blank pages. For this reason, all PHP files should - <strong>OMIT</strong> the closing PHP tag, and instead use a comment block to mark the end of file and it's location relative to the application root. - This allows you to still identify a file as being complete and not truncated.</p> -<code><strong>INCORRECT</strong>: -<?php - -echo "Here's my code!"; - -?> - -<strong>CORRECT</strong>: -<?php - -echo "Here's my code!"; - -/* End of file myfile.php */ -/* Location: ./system/modules/mymodule/myfile.php */ -</code> - </div> - - - <h2><a name="class_and_method_naming"></a>Class and Method Naming</h2> - <div class="guidelineDetails"> - <p>Class names should always start with an uppercase letter. Multiple words should be separated with an underscore, and not CamelCased. All other class methods should be entirely lowercased and named to clearly indicate their function, preferably including a verb. Try to avoid overly long and verbose names.</p> - - <code><strong>INCORRECT</strong>: -class superclass -class SuperClass - -<strong>CORRECT</strong>: -class Super_class</code> - - - <code>class Super_class { - - function __construct() - { - - } -}</code> - - <p>Examples of improper and proper method naming:</p> - - <code><strong>INCORRECT</strong>: -function fileproperties() // not descriptive and needs underscore separator -function fileProperties() // not descriptive and uses CamelCase -function getfileproperties() // Better! But still missing underscore separator -function getFileProperties() // uses CamelCase -function get_the_file_properties_from_the_file() // wordy - -<strong>CORRECT</strong>: -function get_file_properties() // descriptive, underscore separator, and all lowercase letters</code> - - </div> - - - <h2><a name="variable_names"></a>Variable Names</h2> - <div class="guidelineDetails"> - <p>The guidelines for variable naming is very similar to that used for class methods. Namely, variables should contain only lowercase letters, use underscore separators, and be reasonably named to indicate their purpose and contents. Very short, non-word variables should only be used as iterators in for() loops.</p> -<code><strong>INCORRECT</strong>: -$j = 'foo'; // single letter variables should only be used in for() loops -$Str // contains uppercase letters -$bufferedText // uses CamelCasing, and could be shortened without losing semantic meaning -$groupid // multiple words, needs underscore separator -$name_of_last_city_used // too long - -<strong>CORRECT</strong>: -for ($j = 0; $j < 10; $j++) -$str -$buffer -$group_id -$last_city -</code> - </div> - - - <h2><a name="commenting"></a>Commenting</h2> - <div class="guidelineDetails"> - <p>In general, code should be commented prolifically. It not only helps describe the flow and intent of the code for less experienced programmers, but can prove invaluable when returning to your own code months down the line. There is not a required format for comments, but the following are recommended.</p> - - <p><a href="http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock">DocBlock</a> style comments preceding class and method declarations so they can be picked up by IDEs:</p> - -<code>/** - * Super Class - * - * @package Package Name - * @subpackage Subpackage - * @category Category - * @author Author Name - * @link http://example.com - */ -class Super_class {</code> - -<code>/** - * Encodes string for use in XML - * - * @access public - * @param string - * @return string - */ -function xml_encode($str)</code> - - <p>Use single line comments within code, leaving a blank line between large comment blocks and code.</p> - -<code>// break up the string by newlines -$parts = explode("\n", $str); - -// A longer comment that needs to give greater detail on what is -// occurring and why can use multiple single-line comments. Try to -// keep the width reasonable, around 70 characters is the easiest to -// read. Don't hesitate to link to permanent external resources -// that may provide greater detail: -// -// http://example.com/information_about_something/in_particular/ - -$parts = $this->foo($parts); -</code> - </div> - - - <h2><a name="constants"></a>Constants</h2> - <div class="guidelineDetails"> - <p>Constants follow the same guidelines as do variables, except constants should always be fully uppercase. <em>Always use CodeIgniter constants when appropriate, i.e. SLASH, LD, RD, PATH_CACHE, etc.</em></p> -<code><strong>INCORRECT</strong>: -myConstant // missing underscore separator and not fully uppercase -N // no single-letter constants -S_C_VER // not descriptive -$str = str_replace('{foo}', 'bar', $str); // should use LD and RD constants - -<strong>CORRECT</strong>: -MY_CONSTANT -NEWLINE -SUPER_CLASS_VERSION -$str = str_replace(LD.'foo'.RD, 'bar', $str); -</code> - </div> - - - <h2><a name="true_false_and_null"></a>TRUE, FALSE, and NULL</h2> - <div class="guidelineDetails"> - <p><strong>TRUE</strong>, <strong>FALSE</strong>, and <strong>NULL</strong> keywords should always be fully uppercase.</p> -<code><strong>INCORRECT</strong>: -if ($foo == true) -$bar = false; -function foo($bar = null) - -<strong>CORRECT</strong>: -if ($foo == TRUE) -$bar = FALSE; -function foo($bar = NULL)</code> - </div> - - - - <h2><a name="logical_operators"></a>Logical Operators</h2> - <div class="guidelineDetails"> - <p>Use of <strong>||</strong> is discouraged as its clarity on some output devices is low (looking like the number 11 for instance). - <strong>&&</strong> is preferred over <strong>AND</strong> but either are acceptable, and a space should always precede and follow <strong>!</strong>.</p> -<code><strong>INCORRECT</strong>: -if ($foo || $bar) -if ($foo AND $bar) // okay but not recommended for common syntax highlighting applications -if (!$foo) -if (! is_array($foo)) - -<strong>CORRECT</strong>: -if ($foo OR $bar) -if ($foo && $bar) // recommended -if ( ! $foo) -if ( ! is_array($foo)) -</code> - </div> - - - - <h2><a name="comparing_return_values_and_typecasting"></a>Comparing Return Values and Typecasting</h2> - <div class="guidelineDetails"> - <p>Some PHP functions return FALSE on failure, but may also have a valid return value of "" or 0, which would evaluate to FALSE in loose comparisons. Be explicit by comparing the variable type when using these return values in conditionals to ensure the return value is indeed what you expect, and not a value that has an equivalent loose-type evaluation.</p> - <p>Use the same stringency in returning and checking your own variables. Use <strong>===</strong> and <strong>!==</strong> as necessary. - -<code><strong>INCORRECT</strong>: -// If 'foo' is at the beginning of the string, strpos will return a 0, -// resulting in this conditional evaluating as TRUE -if (strpos($str, 'foo') == FALSE) - -<strong>CORRECT</strong>: -if (strpos($str, 'foo') === FALSE) -</code> - -<code><strong>INCORRECT</strong>: -function build_string($str = "") -{ - if ($str == "") // uh-oh! What if FALSE or the integer 0 is passed as an argument? - { - - } -} - -<strong>CORRECT</strong>: -function build_string($str = "") -{ - if ($str === "") - { - - } -}</code> - - <p>See also information regarding <a href="http://us3.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting">typecasting</a>, which can be quite useful. Typecasting has a slightly different effect which may be desirable. When casting a variable as a string, for instance, NULL and boolean FALSE variables become empty strings, 0 (and other numbers) become strings of digits, and boolean TRUE becomes "1":</p> - -<code>$str = (string) $str; // cast $str as a string</code> - - </div> - - - <h2><a name="debugging_code"></a>Debugging Code</h2> - <div class="guidelineDetails"> - <p>No debugging code can be left in place for submitted add-ons unless it is commented out, i.e. no var_dump(), print_r(), die(), and exit() calls that were used while creating the add-on, unless they are commented out.</p> - -<code>// print_r($foo);</code> - </div> - - - - <h2><a name="whitespace_in_files"></a>Whitespace in Files</h2> - <div class="guidelineDetails"> - <p>No whitespace can precede the opening PHP tag or follow the closing PHP tag. Output is buffered, so whitespace in your files can cause output to begin before CodeIgniter outputs its content, leading to errors and an inability for CodeIgniter to send proper headers. In the examples below, select the text with your mouse to reveal the incorrect whitespace.</p> - - <p><strong>INCORRECT</strong>:</p> -<code> -<?php - // ...there is whitespace and a linebreak above the opening PHP tag - // as well as whitespace after the closing PHP tag -?> -</code> - <p><strong>CORRECT</strong>:</p> -<code><?php - // this sample has no whitespace before or after the opening and closing PHP tags -?></code> - - </div> - - - <h2><a name="compatibility"></a>Compatibility</h2> - <div class="guidelineDetails"> - <p>Unless specifically mentioned in your add-on's documentation, all code must be compatible with PHP version 5.1+. Additionally, do not use PHP functions that require non-default libraries to be installed unless your code contains an alternative method when the function is not available, or you implicitly document that your add-on requires said PHP libraries.</p> - </div> - - - - <h2><a name="class_and_file_names_using_common_words"></a>Class and File Names using Common Words</h2> - <div class="guidelineDetails"> - <p>When your class or filename is a common word, or might quite likely be identically named in another PHP script, provide a unique prefix to help prevent collision. Always realize that your end users may be running other add-ons or third party PHP scripts. Choose a prefix that is unique to your identity as a developer or company.</p> - -<code><strong>INCORRECT</strong>: -class Email pi.email.php -class Xml ext.xml.php -class Import mod.import.php - -<strong>CORRECT</strong>: -class Pre_email pi.pre_email.php -class Pre_xml ext.pre_xml.php -class Pre_import mod.pre_import.php -</code> - </div> - - - <h2><a name="database_table_names"></a>Database Table Names</h2> - <div class="guidelineDetails"> - <p>Any tables that your add-on might use must use the 'exp_' prefix, followed by a prefix uniquely identifying you as the developer or company, and then a short descriptive table name. You do not need to be concerned about the database prefix being used on the user's installation, as CodeIgniter's database class will automatically convert 'exp_' to what is actually being used.</p> - -<code><strong>INCORRECT</strong>: -email_addresses // missing both prefixes -pre_email_addresses // missing exp_ prefix -exp_email_addresses // missing unique prefix - -<strong>CORRECT</strong>: -exp_pre_email_addresses -</code> - - <p class="important"><strong>NOTE:</strong> Be mindful that MySQL has a limit of 64 characters for table names. This should not be an issue as table names that would exceed this would likely have unreasonable names. For instance, the following table name exceeds this limitation by one character. Silly, no? <strong>exp_pre_email_addresses_of_registered_users_in_seattle_washington</strong> - </div> - - - - <h2><a name="one_file_per_class"></a>One File per Class</h2> - <div class="guidelineDetails"> - <p>Use separate files for each class your add-on uses, unless the classes are <em>closely related</em>. An example of CodeIgniter files that contains multiple classes is the Database class file, which contains both the DB class and the DB_Cache class, and the Magpie plugin, which contains both the Magpie and Snoopy classes.</p> - </div> - - - - <h2><a name="whitespace"></a>Whitespace</h2> - <div class="guidelineDetails"> - <p>Use tabs for whitespace in your code, not spaces. This may seem like a small thing, but using tabs instead of whitespace allows the developer looking at your code to have indentation at levels that they prefer and customize in whatever application they use. And as a side benefit, it results in (slightly) more compact files, storing one tab character versus, say, four space characters.</p> - </div> - - - - <h2><a name="line_breaks"></a>Line Breaks</h2> - <div class="guidelineDetails"> - <p>Files must be saved with Unix line breaks. This is more of an issue for developers who work in Windows, but in any case ensure that your text editor is setup to save files with Unix line breaks.</p> - </div> - - - - <h2><a name="code_indenting"></a>Code Indenting</h2> - <div class="guidelineDetails"> - <p>Use Allman style indenting. With the exception of Class declarations, braces are always placed on a line by themselves, and indented at the same level as the control statement that "owns" them.</p> - -<code><strong>INCORRECT</strong>: -function foo($bar) { - // ... -} - -foreach ($arr as $key => $val) { - // ... -} - -if ($foo == $bar) { - // ... -} else { - // ... -} - -for ($i = 0; $i < 10; $i++) - { - for ($j = 0; $j < 10; $j++) - { - // ... - } - } - -<strong>CORRECT</strong>: -function foo($bar) -{ - // ... -} - -foreach ($arr as $key => $val) -{ - // ... -} - -if ($foo == $bar) -{ - // ... -} -else -{ - // ... -} - -for ($i = 0; $i < 10; $i++) -{ - for ($j = 0; $j < 10; $j++) - { - // ... - } -}</code> - </div> - - - <h2><a name="bracket_spacing"></a>Bracket and Parenthetic Spacing</h2> - <div class="guidelineDetails"> - <p>In general, parenthesis and brackets should not use any additional spaces. The exception is that a space should always follow PHP control structures that accept arguments with parenthesis (declare, do-while, elseif, for, foreach, if, switch, while), to help distinguish them from functions and increase readability.</p> - -<code>INCORRECT: -$arr[ $foo ] = 'foo'; - -CORRECT: -$arr[$foo] = 'foo'; // no spaces around array keys - - -INCORRECT: -function foo ( $bar ) -{ - -} - -CORRECT: -function foo($bar) // no spaces around parenthesis in function declarations -{ - -} - - -INCORRECT: -foreach( $query->result() as $row ) - -CORRECT: -foreach ($query->result() as $row) // single space following PHP control structures, but not in interior parenthesis -</code> - </div> - - - - <h2><a name="localized_text"></a>Localized Text</h2> - <div class="guidelineDetails"> - <p>Any text that is output in the control panel should use language variables in your lang file to allow localization.</p> - -<code>INCORRECT: -return "Invalid Selection"; - -CORRECT: -return $this->lang->line('invalid_selection');</code> - </div> - - - - <h2><a name="private_methods_and_variables"></a>Private Methods and Variables</h2> - <div class="guidelineDetails"> - <p>Methods and variables that are only accessed internally by your class, such as utility and helper functions that your public methods use for code abstraction, should be prefixed with an underscore.</p> - -<code>convert_text() // public method -_convert_text() // private method</code> - </div> - - - - <h2><a name="php_errors"></a>PHP Errors</h2> - <div class="guidelineDetails"> - <p>Code must run error free and not rely on warnings and notices to be hidden to meet this requirement. For instance, never access a variable that you did not set yourself (such as $_POST array keys) without first checking to see that it isset().</p> - - <p>Make sure that while developing your add-on, error reporting is enabled for ALL users, and that display_errors is enabled in the PHP environment. You can check this setting with:</p> - -<code>if (ini_get('display_errors') == 1) -{ - exit "Enabled"; -}</code> - - <p>On some servers where display_errors is disabled, and you do not have the ability to change this in the php.ini, you can often enable it with:</p> - -<code>ini_set('display_errors', 1);</code> - - <p class="important"><strong>NOTE:</strong> Setting the <a href="http://us.php.net/manual/en/ref.errorfunc.php#ini.display-errors">display_errors</a> setting with ini_set() at runtime is not identical to having it enabled in the PHP environment. Namely, it will not have any effect if the script has fatal errors</p> - </div> - - - - <h2><a name="short_open_tags"></a>Short Open Tags</h2> - <div class="guidelineDetails"> - <p>Always use full PHP opening tags, in case a server does not have short_open_tag enabled.</p> - -<code><strong>INCORRECT</strong>: -<? echo $foo; ?> - -<?=$foo?> - -<strong>CORRECT</strong>: -<?php echo $foo; ?></code> - </div> - - - - <h2><a name="one_statement_per_line"></a>One Statement Per Line</h2> - <div class="guidelineDetails"> - <p>Never combine statements on one line.</p> - -<code><strong>INCORRECT</strong>: -$foo = 'this'; $bar = 'that'; $bat = str_replace($foo, $bar, $bag); - -<strong>CORRECT</strong>: -$foo = 'this'; -$bar = 'that'; -$bat = str_replace($foo, $bar, $bag); -</code> - </div> - - - - <h2><a name="strings"></a>Strings</h2> - <div class="guidelineDetails"> - <p>Always use single quoted strings unless you need variables parsed, and in cases where you do need variables parsed, use braces to prevent greedy token parsing. You may also use double-quoted strings if the string contains single quotes, so you do not have to use escape characters.</p> - -<code><strong>INCORRECT</strong>: -"My String" // no variable parsing, so no use for double quotes -"My string $foo" // needs braces -'SELECT foo FROM bar WHERE baz = \'bag\'' // ugly - -<strong>CORRECT</strong>: -'My String' -"My string {$foo}" -"SELECT foo FROM bar WHERE baz = 'bag'"</code> - </div> - - - - <h2><a name="sql_queries"></a>SQL Queries</h2> - <div class="guidelineDetails"> - <p>MySQL keywords are always capitalized: SELECT, INSERT, UPDATE, WHERE, AS, JOIN, ON, IN, etc.</p> - - <p>Break up long queries into multiple lines for legibility, preferably breaking for each clause.</p> - -<code><strong>INCORRECT</strong>: -// keywords are lowercase and query is too long for -// a single line (... indicates continuation of line) -$query = $this->db->query("select foo, bar, baz, foofoo, foobar as raboof, foobaz from exp_pre_email_addresses -...where foo != 'oof' and baz != 'zab' order by foobaz limit 5, 100"); - -<strong>CORRECT</strong>: -$query = $this->db->query("SELECT foo, bar, baz, foofoo, foobar AS raboof, foobaz - FROM exp_pre_email_addresses - WHERE foo != 'oof' - AND baz != 'zab' - ORDER BY foobaz - LIMIT 5, 100");</code> - </div> - - - - <h2><a name="default_function_arguments"></a>Default Function Arguments</h2> - <div class="guidelineDetails"> - <p>Whenever appropriate, provide function argument defaults, which helps prevent PHP errors with mistaken calls and provides common fallback values which can save a few lines of code. Example:</p> - -<code>function foo($bar = '', $baz = FALSE)</code> - </div> - - - -</div> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="security.html">Security</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../doc_style/index.html">Writing Documentation</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html deleted file mode 100644 index 53dff34e3..000000000 --- a/user_guide/general/urls.html +++ /dev/null @@ -1,151 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter URLs : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -URLS -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>CodeIgniter URLs</h1> - -<p>By default, URLs in CodeIgniter are designed to be search-engine and human friendly. Rather than using the standard "query string" -approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a <strong>segment-based</strong> approach:</p> - -<code>example.com/<var>news</var>/<dfn>article</dfn>/<samp>my_article</samp></code> - -<p class="important"><strong>Note:</strong> Query string URLs can be optionally enabled, as described below.</p> - -<h2>URI Segments</h2> - -<p>The segments in the URL, in following with the Model-View-Controller approach, usually represent:</p> - -<code>example.com/<var>class</var>/<dfn>function</dfn>/<samp>ID</samp></code> - -<ol> -<li>The first segment represents the controller <strong>class</strong> that should be invoked.</li> -<li>The second segment represents the class <strong>function</strong>, or method, that should be called.</li> -<li>The third, and any additional segments, represent the ID and any variables that will be passed to the controller.</li> -</ol> - -<p>The <a href="../libraries/uri.html">URI Class</a> and the <a href="../helpers/url_helper.html">URL Helper</a> -contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the -<a href="routing.html">URI Routing</a> feature for more flexibility.</p> - - - -<h2>Removing the index.php file</h2> - -<p>By default, the <strong>index.php</strong> file will be included in your URLs:</p> - -<code>example.com/<var>index.php</var>/news/article/my_article</code> - -<p>You can easily remove this file by using a .htaccess file with some simple rules. Here is an example - of such a file, using the "negative" method in which everything is redirected except the specified items:</p> - -<code>RewriteEngine on<br /> -RewriteCond $1 !^(index\.php|images|robots\.txt)<br /> -RewriteRule ^(.*)$ /index.php/$1 [L]</code> - -<p>In the above example, any HTTP request other than those for index.php, images, and robots.txt is treated as -a request for your index.php file.</p> - - -<h2>Adding a URL Suffix</h2> - -<p>In your <dfn>config/config.php</dfn> file you can specify a suffix that will be added to all URLs generated -by CodeIgniter. For example, if a URL is this:</p> - -<code>example.com/index.php/products/view/shoes</code> - -<p>You can optionally add a suffix, like <kbd>.html</kbd>, making the page appear to be of a certain type:</p> - -<code>example.com/index.php/products/view/shoes.html</code> - - -<h2>Enabling Query Strings</h2> - -<p>In some cases you might prefer to use query strings URLs:</p> - -<code>index.php?c=products&m=view&id=345</code> - -<p>CodeIgniter optionally supports this capability, which can be enabled in your <dfn>application/config.php</dfn> file. If you -open your config file you'll see these items:</p> - -<code>$config['enable_query_strings'] = FALSE;<br /> -$config['controller_trigger'] = 'c';<br /> -$config['function_trigger'] = 'm';</code> - -<p>If you change "enable_query_strings" to TRUE this feature will become active. Your controllers and functions will then -be accessible using the "trigger" words you've set to invoke your controllers and methods:</p> - -<code>index.php?c=controller&m=method</code> - -<p class="important"><strong>Please note:</strong> If you are using query strings you will have to build your own URLs, rather than utilizing -the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with -segment based URLs.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="controllers.html">Controllers</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/general/views.html b/user_guide/general/views.html deleted file mode 100644 index d6049191e..000000000 --- a/user_guide/general/views.html +++ /dev/null @@ -1,274 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Views : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Views -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Views</h1> - -<p>A <dfn>view</dfn> is simply a web page, or a page fragment, like a header, footer, sidebar, etc. -In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type -of hierarchy.</p> - -<p>Views are never called directly, they must be loaded by a <a href="controllers.html">controller</a>. Remember that in an MVC framework, the Controller acts as the -traffic cop, so it is responsible for fetching a particular view. If you have not read the <a href="controllers.html">Controllers</a> page -you should do so before continuing.</p> - -<p>Using the example controller you created in the <a href="controllers.html">controller</a> page, let's add a view to it.</p> - -<h2>Creating a View</h2> - -<p>Using your text editor, create a file called <dfn>blogview.php</dfn>, and put this in it:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -<html> -<head> -<title>My Blog</title> -</head> -<body> - <h1>Welcome to my Blog!</h1> -</body> -</html> -</textarea> - -<p>Then save the file in your <dfn>application/views/</dfn> folder.</p> - -<h2>Loading a View</h2> - -<p>To load a particular view file you will use the following function:</p> - -<code>$this->load->view('<var>name</var>');</code> - -<p>Where <var>name</var> is the name of your view file. Note: The .php file extension does not need to be specified unless you use something other than <kbd>.php</kbd>.</p> - - -<p>Now, open the controller file you made earlier called <dfn>blog.php</dfn>, and replace the echo statement with the view loading function:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -<?php -class Blog extends CI_Controller { - - function index() - { - $this->load->view('blogview'); - } -} -?> -</textarea> - - -<p>If you visit your site using the URL you did earlier you should see your new view. The URL was similar to this:</p> - -<code>example.com/index.php/<var>blog</var>/</code> - -<h2>Loading multiple views</h2> -<p>CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more than one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:</p> -<p><code><?php<br /> -<br /> -class Page extends CI_Controller {<br /><br /> - - function index()<br /> - {<br /> - $data['page_title'] = 'Your title';<br /> - $this->load->view('header');<br /> - $this->load->view('menu');<br /> - $this->load->view('content', $data);<br /> - $this->load->view('footer');<br /> - }<br /> -<br /> -}<br /> - ?></code></p> -<p>In the example above, we are using "dynamically added data", which you will see below.</p> -<h2>Storing Views within Sub-folders</h2> -<p>Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need -to include the folder name loading the view. Example:</p> - -<code>$this->load->view('<kbd>folder_name</kbd>/<var>file_name</var>');</code> - - -<h2>Adding Dynamic Data to the View</h2> - -<p>Data is passed from the controller to the view by way of an <strong>array</strong> or an <strong>object</strong> in the second -parameter of the view loading function. Here is an example using an array:</p> - -<code>$data = array(<br /> - 'title' => 'My Title',<br /> - 'heading' => 'My Heading',<br /> - 'message' => 'My Message'<br /> - );<br /> -<br /> -$this->load->view('blogview', <var>$data</var>);</code> - -<p>And here's an example using an object:</p> - -<code>$data = new Someclass();<br /> -$this->load->view('blogview', <var>$data</var>);</code> - -<p>Note: If you use an object, the class variables will be turned into array elements.</p> - - -<p>Let's try it with your controller file. Open it add this code:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="14"> -<?php -class Blog extends CI_Controller { - - function index() - { - $data['title'] = "My Real Title"; - $data['heading'] = "My Real Heading"; - - $this->load->view('blogview', $data); - } -} -?> -</textarea> - - -<p>Now open your view file and change the text to variables that correspond to the array keys in your data:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -<html> -<head> -<title><?php echo $title;?></title> -</head> -<body> - <h1><?php echo $heading;?></h1> -</body> -</html> -</textarea> - -<p>Then load the page at the URL you've been using and you should see the variables replaced.</p> - -<h2>Creating Loops</h2> - -<p>The data array you pass to your view files is not limited to simple variables. You can -pass multi dimensional arrays, which can be looped to generate multiple rows. For example, if you -pull data from your database it will typically be in the form of a multi-dimensional array.</p> - -<p>Here's a simple example. Add this to your controller:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="17"> -<?php -class Blog extends CI_Controller { - - function index() - { - $data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands'); - - $data['title'] = "My Real Title"; - $data['heading'] = "My Real Heading"; - - $this->load->view('blogview', $data); - } -} -?> -</textarea> - - -<p>Now open your view file and create a loop:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="24"> -<html> -<head> -<title><?php echo $title;?></title> -</head> -<body> -<h1><?php echo $heading;?></h1> - -<h3>My Todo List</h3> - -<ul> -<?php foreach ($todo_list as $item):?> - -<li><?php echo $item;?></li> - -<?php endforeach;?> -</ul> - -</body> -</html> -</textarea> -<p><strong>Note:</strong> You'll notice that in the example above we are using PHP's alternative syntax. If you -are not familiar with it you can read about it <a href="alternative_php.html">here</a>.</p> - -<h2>Returning views as data</h2> - -<p>There is a third <strong>optional</strong> parameter lets you change the behavior of the function so that it returns data as a string -rather than sending it to your browser. This can be useful if you want to process the data in some way. If you -set the parameter to <kbd>true</kbd> (boolean) it will return data. The default behavior is <kbd>false</kbd>, which sends it -to your browser. Remember to assign it to a variable if you want the data returned:</p> - -<code>$string = $this->load->view('<var>myfile</var>', '', <kbd>true</kbd>);</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="reserved_names.html">Reserved Names</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="models.html">Models</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html deleted file mode 100644 index c709c11c9..000000000 --- a/user_guide/helpers/array_helper.html +++ /dev/null @@ -1,170 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Array Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Array Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Array Helper</h1> - -<p>The Array Helper file contains functions that assist in working with arrays.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('array');</code> - -<p>The following functions are available:</p> - -<h2>element()</h2> - -<p>Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If -a value exists it is returned. If a value does not exist it returns FALSE, or whatever you've specified as the default value via the third parameter. Example:</p> - -<code> -$array = array('color' => 'red', 'shape' => 'round', 'size' => '');<br /> -<br /> -// returns "red"<br /> -echo element('color', $array);<br /> -<br /> -// returns NULL<br /> -echo element('size', $array, NULL); -</code> - - -<h2>random_element()</h2> - -<p>Takes an array as input and returns a random element from it. Usage example:</p> - -<code>$quotes = array(<br /> - "I find that the harder I work, the more luck I seem to have. - Thomas Jefferson",<br /> - "Don't stay in bed, unless you can make money in bed. - George Burns",<br /> - "We didn't lose the game; we just ran out of time. - Vince Lombardi",<br /> - "If everything seems under control, you're not going fast enough. - Mario Andretti",<br /> - "Reality is merely an illusion, albeit a very persistent one. - Albert Einstein",<br /> - "Chance favors the prepared mind - Louis Pasteur"<br /> - );<br /> -<br /> -echo random_element($quotes);</code> - - -<h2>elements()</h2> - -<p>Lets you fetch a number of items from an array. The function tests whether each of the array indices is set. If an index does not exist -it is set to FALSE, or whatever you've specified as the default value via the third parameter. Example:</p> - -<code> -$array = array(<br /> - 'color' => 'red',<br /> - 'shape' => 'round',<br /> - 'radius' => '10',<br /> - 'diameter' => '20'<br /> -);<br /> -<br /> -$my_shape = elements(array('color', 'shape', 'height'), $array);<br /> -</code> - -<p>The above will return the following array:</p> - -<code> -array(<br /> - 'color' => 'red',<br /> - 'shape' => 'round',<br /> - 'height' => FALSE<br /> -); -</code> - -<p>You can set the third parameter to any default value you like:</p> - -<code> -$my_shape = elements(array('color', 'shape', 'height'), $array, NULL);<br /> -</code> - -<p>The above will return the following array:</p> - -<code> -array(<br /> - 'color' => 'red',<br /> - 'shape' => 'round',<br /> - 'height' => NULL<br /> -); -</code> - -<p>This is useful when sending the <kbd>$_POST</kbd> array to one of your Models. This prevents users from -sending additional POST data to be entered into your tables:</p> - -<code> -$this->load->model('post_model');<br /> -<br /> -$this->post_model->update(elements(array('id', 'title', 'content'), $_POST)); -</code> - -<p>This ensures that only the id, title and content fields are sent to be updated.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../libraries/javascript.html">Javascript Class</a> · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="captcha_helper.html">CAPTCHA Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/captcha_helper.html b/user_guide/helpers/captcha_helper.html deleted file mode 100644 index 6780464b2..000000000 --- a/user_guide/helpers/captcha_helper.html +++ /dev/null @@ -1,195 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CAPTCHA Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -CAPTCHA Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>CAPTCHA Helper</h1> - -<p>The CAPTCHA Helper file contains functions that assist in creating CAPTCHA images.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('captcha');</code> - -<p>The following functions are available:</p> - -<h2>create_captcha(<var>$data</var>)</h2> - -<p>Takes an array of information to generate the CAPTCHA as input and creates the image to your specifications, returning an array of associative data about the image.</p> - -<code>[array]<br /> -(<br /> - 'image' => IMAGE TAG<br /> - 'time' => TIMESTAMP (in microtime)<br /> - 'word' => CAPTCHA WORD<br /> -)</code> - - <p>The "image" is the actual image tag: -<code><img src="http://example.com/captcha/12345.jpg" width="140" height="50" /></code></p> - - <p>The "time" is the micro timestamp used as the image name without the file - extension. It will be a number like this: 1139612155.3422</p> - - <p>The "word" is the word that appears in the captcha image, which if not - supplied to the function, will be a random string.</p> - - <h3>Using the CAPTCHA helper</h3> - - <p>Once loaded you can generate a captcha like this:</p> - -<code>$vals = array(<br /> - 'word' => 'Random word',<br /> - 'img_path' => './captcha/',<br /> - 'img_url' => 'http://example.com/captcha/',<br /> - 'font_path' => './path/to/fonts/texb.ttf',<br /> - 'img_width' => '150',<br /> - 'img_height' => 30,<br /> - 'expiration' => 7200<br /> - );<br /> -<br /> -$cap = create_captcha($vals);<br /> -echo $cap['image'];</code> - - <ul> - <li>The captcha function requires the GD image library.</li> - <li>Only the img_path and img_url are required.</li> - <li>If a "word" is not supplied, the function will generate a random - ASCII string. You might put together your own word library that - you can draw randomly from.</li> - <li>If you do not specify a path to a TRUE TYPE font, the native ugly GD - font will be used.</li> - <li>The "captcha" folder must be writable (666, or 777)</li> - <li>The "expiration" (in seconds) signifies how long an image will - remain in the captcha folder before it will be deleted. The default - is two hours.</li> - </ul> - - <h3>Adding a Database</h3> - - <p>In order for the captcha function to prevent someone from submitting, you will need - to add the information returned from <kbd>create_captcha()</kbd> function to your database. - Then, when the data from the form is submitted by the user you will need to verify - that the data exists in the database and has not expired.</p> - - <p>Here is a table prototype:</p> - -<code>CREATE TABLE captcha (<br /> - captcha_id bigint(13) unsigned NOT NULL auto_increment,<br /> - captcha_time int(10) unsigned NOT NULL,<br /> - ip_address varchar(16) default '0' NOT NULL,<br /> - word varchar(20) NOT NULL,<br /> - PRIMARY KEY `captcha_id` (`captcha_id`),<br /> - KEY `word` (`word`)<br /> -);</code> - - <p>Here is an example of usage with a database. On the page where the CAPTCHA will be shown you'll have something like this:</p> - -<code>$this->load->helper('captcha');<br /> -$vals = array(<br /> - 'img_path' => './captcha/',<br /> - 'img_url' => 'http://example.com/captcha/'<br /> - );<br /> -<br /> -$cap = create_captcha($vals);<br /> -<br /> -$data = array(<br /> - 'captcha_time' => $cap['time'],<br /> - 'ip_address' => $this->input->ip_address(),<br /> - 'word' => $cap['word']<br /> - );<br /> -<br /> -$query = $this->db->insert_string('captcha', $data);<br /> -$this->db->query($query);<br /> -<br /> -echo 'Submit the word you see below:';<br /> -echo $cap['image'];<br /> -echo '<input type="text" name="captcha" value="" />';</code> - - <p>Then, on the page that accepts the submission you'll have something like this:</p> - -<code>// First, delete old captchas<br /> -$expiration = time()-7200; // Two hour limit<br /> -$this->db->query("DELETE FROM captcha WHERE captcha_time < ".$expiration); <br /> -<br /> -// Then see if a captcha exists:<br /> -$sql = "SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?";<br /> -$binds = array($_POST['captcha'], $this->input->ip_address(), $expiration);<br /> -$query = $this->db->query($sql, $binds);<br /> -$row = $query->row();<br /> -<br /> -if ($row->count == 0)<br /> -{<br /> - echo "You must submit the word that appears in the image";<br /> -}</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="array_helper.html">Array Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="cookie_helper.html">Cookie Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/cookie_helper.html b/user_guide/helpers/cookie_helper.html deleted file mode 100644 index 7695b65a3..000000000 --- a/user_guide/helpers/cookie_helper.html +++ /dev/null @@ -1,107 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Cookie Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Cookie Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Cookie Helper</h1> - -<p>The Cookie Helper file contains functions that assist in working with cookies.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('cookie');</code> - -<p>The following functions are available:</p> - -<h2>set_cookie()</h2> - -<p>This helper function gives you view file friendly syntax to set browser cookies. Refer to the <a href="../libraries/input.html">Input class</a> for a description of use, as this function is an alias to $this->input->set_cookie().</p> - -<h2>get_cookie()</h2> - -<p>This helper function gives you view file friendly syntax to get browser cookies. Refer to the <a href="../libraries/input.html">Input class</a> for a description of use, as this function is an alias to $this->input->cookie().</p> - - -<h2>delete_cookie()</h2> - -<p>Lets you delete a cookie. Unless you've set a custom path or other values, only the name of the cookie is needed:</p> - -<code>delete_cookie("name");</code> - -<p>This function is otherwise identical to <dfn>set_cookie()</dfn>, except that it does not have the value and expiration parameters. You can submit an array -of values in the first parameter or you can set discrete parameters.</p> - -<code>delete_cookie($name, $domain, $path, $prefix)</code> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="captcha_helper.html">CAPTCHA Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="date_helper.html">Date Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html deleted file mode 100644 index 48aa682d1..000000000 --- a/user_guide/helpers/date_helper.html +++ /dev/null @@ -1,408 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Date Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Date Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Date Helper</h1> - -<p>The Date Helper file contains functions that help you work with dates.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('date');</code> - - -<p>The following functions are available:</p> - -<h2>now()</h2> - -<p>Returns the current time as a Unix timestamp, referenced either to your server's local time or GMT, based on the "time reference" -setting in your config file. If you do not intend to set your master time reference to GMT (which you'll typically do if you -run a site that lets each user set their own timezone settings) there is no benefit to using this function over PHP's time() function. -</p> - - - - -<h2>mdate()</h2> - -<p>This function is identical to PHPs <a href="http://www.php.net/date">date()</a> function, except that it lets you -use MySQL style date codes, where each code letter is preceded with a percent sign: %Y %m %d etc.</p> - -<p>The benefit of doing dates this way is that you don't have to worry about escaping any characters that -are not date codes, as you would normally have to do with the date() function. Example:</p> - -<code>$datestring = "Year: %Y Month: %m Day: %d - %h:%i %a";<br /> -$time = time();<br /> -<br /> -echo mdate($datestring, $time);</code> - -<p>If a timestamp is not included in the second parameter the current time will be used.</p> - - -<h2>standard_date()</h2> - -<p>Lets you generate a date string in one of several standardized formats. Example:</p> - -<code> -$format = 'DATE_RFC822';<br /> -$time = time();<br /> -<br /> -echo standard_date($format, $time); -</code> - -<p>The first parameter must contain the format, the second parameter must contain the date as a Unix timestamp.</p> - -<p>Supported formats:</p> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> - <tr> - <th>Constant</th> - <th>Description</th> - <th>Example</th> - </tr> - <tr> - <td>DATE_ATOM</td> - <td>Atom</td> - <td>2005-08-15T16:13:03+0000</td> - </tr> - <tr> - <td>DATE_COOKIE</td> - <td>HTTP Cookies</td> - <td>Sun, 14 Aug 2005 16:13:03 UTC</td> - </tr> - <tr> - <td>DATE_ISO8601</td> - <td>ISO-8601</td> - <td>2005-08-14T16:13:03+00:00</td> - </tr> - <tr> - <td>DATE_RFC822</td> - <td>RFC 822</td> - <td>Sun, 14 Aug 05 16:13:03 UTC</td> - </tr> - <tr> - <td>DATE_RFC850</td> - <td>RFC 850</td> - <td>Sunday, 14-Aug-05 16:13:03 UTC</td> - </tr> - <tr> - <td>DATE_RFC1036</td> - <td>RFC 1036</td> - <td>Sunday, 14-Aug-05 16:13:03 UTC</td> - </tr> - <tr> - <td>DATE_RFC1123</td> - <td>RFC 1123</td> - <td>Sun, 14 Aug 2005 16:13:03 UTC</td> - </tr> - <tr> - <td>DATE_RFC2822</td> - <td>RFC 2822</td> - <td>Sun, 14 Aug 2005 16:13:03 +0000</td> - </tr> - <tr> - <td>DATE_RSS</td> - <td>RSS</td> - <td>Sun, 14 Aug 2005 16:13:03 UTC</td> - </tr> - <tr> - <td>DATE_W3C</td> - <td>World Wide Web Consortium</td> - <td>2005-08-14T16:13:03+0000</td> - </tr> -</table> - -<h2>local_to_gmt()</h2> - -<p>Takes a Unix timestamp as input and returns it as GMT. Example:</p> - -<code>$now = time();<br /> -<br /> -$gmt = local_to_gmt($now);</code> - - -<h2>gmt_to_local()</h2> - -<p>Takes a Unix timestamp (referenced to GMT) as input, and converts it to a localized timestamp based on the -timezone and Daylight Saving time submitted. Example:</p> - -<code> -$timestamp = '1140153693';<br /> -$timezone = 'UM8';<br /> -$daylight_saving = TRUE;<br /> -<br /> -echo gmt_to_local($timestamp, $timezone, $daylight_saving);</code> - -<p><strong>Note:</strong> For a list of timezones see the reference at the bottom of this page.</p> - -<h2>mysql_to_unix()</h2> - -<p>Takes a MySQL Timestamp as input and returns it as Unix. Example:</p> - -<code>$mysql = '20061124092345';<br /> -<br /> -$unix = mysql_to_unix($mysql);</code> - - -<h2>unix_to_human()</h2> - -<p>Takes a Unix timestamp as input and returns it in a human readable format with this prototype:</p> - -<code>YYYY-MM-DD HH:MM:SS AM/PM</code> - -<p>This can be useful if you need to display a date in a form field for submission.</p> - -<p>The time can be formatted with or without seconds, and it can be set to European or US format. If only -the timestamp is submitted it will return the time without seconds formatted for the U.S. Examples:</p> - -<code>$now = time();<br /> -<br /> -echo unix_to_human($now); // U.S. time, no seconds<br /> -<br /> -echo unix_to_human($now, TRUE, 'us'); // U.S. time with seconds<br /> -<br /> -echo unix_to_human($now, TRUE, 'eu'); // Euro time with seconds</code> - - -<h2>human_to_unix()</h2> - -<p>The opposite of the above function. Takes a "human" time as input and returns it as Unix. This function is -useful if you accept "human" formatted dates submitted via a form. Returns FALSE (boolean) if -the date string passed to it is not formatted as indicated above. Example:</p> - -<code>$now = time();<br /> -<br /> -$human = unix_to_human($now);<br /> -<br /> -$unix = human_to_unix($human);</code> - - - - - -<h2>timespan()</h2> - -<p>Formats a unix timestamp so that is appears similar to this:</p> - -<code>1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes</code> - -<p>The first parameter must contain a Unix timestamp. The second parameter must contain a -timestamp that is greater that the first timestamp. If the second parameter empty, the current time will be used. The most common purpose -for this function is to show how much time has elapsed from some point in time in the past to now. Example:</p> - -<code>$post_date = '1079621429';<br /> -$now = time();<br /> -<br /> -echo timespan($post_date, $now);</code> - -<p class="important"><strong>Note:</strong> The text generated by this function is found in the following language file: language/<your_lang>/date_lang.php</p> - - -<h2>days_in_month()</h2> - -<p>Returns the number of days in a given month/year. Takes leap years into account. Example:</p> -<code>echo days_in_month(06, 2005);</code> - -<p>If the second parameter is empty, the current year will be used.</p> -<h2>timezones()</h2> -<p> Takes a timezone reference (for a list of valid timezones, see the "Timezone Reference" below) and returns the number of hours offset from UTC.</p> -<p><code>echo timezones('UM5');</code></p> -<p>This function is useful when used with timezone_menu(). </p> -<h2>timezone_menu()</h2> -<p>Generates a pull-down menu of timezones, like this one:</p> - -<form action="#"> -<select name="timezones"> -<option value='UM12'>(UTC - 12:00) Enitwetok, Kwajalien</option> -<option value='UM11'>(UTC - 11:00) Nome, Midway Island, Samoa</option> -<option value='UM10'>(UTC - 10:00) Hawaii</option> -<option value='UM9'>(UTC - 9:00) Alaska</option> -<option value='UM8'>(UTC - 8:00) Pacific Time</option> -<option value='UM7'>(UTC - 7:00) Mountain Time</option> -<option value='UM6'>(UTC - 6:00) Central Time, Mexico City</option> -<option value='UM5'>(UTC - 5:00) Eastern Time, Bogota, Lima, Quito</option> -<option value='UM4'>(UTC - 4:00) Atlantic Time, Caracas, La Paz</option> -<option value='UM25'>(UTC - 3:30) Newfoundland</option> -<option value='UM3'>(UTC - 3:00) Brazil, Buenos Aires, Georgetown, Falkland Is.</option> -<option value='UM2'>(UTC - 2:00) Mid-Atlantic, Ascention Is., St Helena</option> -<option value='UM1'>(UTC - 1:00) Azores, Cape Verde Islands</option> -<option value='UTC' selected='selected'>(UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</option> -<option value='UP1'>(UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome</option> -<option value='UP2'>(UTC + 2:00) Kaliningrad, South Africa, Warsaw</option> -<option value='UP3'>(UTC + 3:00) Baghdad, Riyadh, Moscow, Nairobi</option> -<option value='UP25'>(UTC + 3:30) Tehran</option> -<option value='UP4'>(UTC + 4:00) Adu Dhabi, Baku, Muscat, Tbilisi</option> -<option value='UP35'>(UTC + 4:30) Kabul</option> -<option value='UP5'>(UTC + 5:00) Islamabad, Karachi, Tashkent</option> -<option value='UP45'>(UTC + 5:30) Bombay, Calcutta, Madras, New Delhi</option> -<option value='UP6'>(UTC + 6:00) Almaty, Colomba, Dhaka</option> -<option value='UP7'>(UTC + 7:00) Bangkok, Hanoi, Jakarta</option> -<option value='UP8'>(UTC + 8:00) Beijing, Hong Kong, Perth, Singapore, Taipei</option> -<option value='UP9'>(UTC + 9:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk</option> -<option value='UP85'>(UTC + 9:30) Adelaide, Darwin</option> -<option value='UP10'>(UTC + 10:00) Melbourne, Papua New Guinea, Sydney, Vladivostok</option> -<option value='UP11'>(UTC + 11:00) Magadan, New Caledonia, Solomon Islands</option> -<option value='UP12'>(UTC + 12:00) Auckland, Wellington, Fiji, Marshall Island</option> -</select> -</form> - -<p>This menu is useful if you run a membership site in which your users are allowed to set their local timezone value.</p> - -<p>The first parameter lets you set the "selected" state of the menu. For example, to set Pacific time as the default you will do this:</p> - -<code>echo timezone_menu('UM8');</code> - -<p>Please see the timezone reference below to see the values of this menu.</p> - -<p>The second parameter lets you set a CSS class name for the menu.</p> - -<p class="important"><strong>Note:</strong> The text contained in the menu is found in the following language file: language/<your_lang>/date_lang.php</p> - - - -<h2>Timezone Reference</h2> - -<p>The following table indicates each timezone and its location.</p> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Time Zone</th> -<th>Location</th> -</tr><tr> - -<td class="td">UM12</td><td class="td">(UTC - 12:00) Enitwetok, Kwajalien</td> -</tr><tr> -<td class="td">UM11</td><td class="td">(UTC - 11:00) Nome, Midway Island, Samoa</td> -</tr><tr> -<td class="td">UM10</td><td class="td">(UTC - 10:00) Hawaii</td> -</tr><tr> -<td class="td">UM9</td><td class="td">(UTC - 9:00) Alaska</td> -</tr><tr> -<td class="td">UM8</td><td class="td">(UTC - 8:00) Pacific Time</td> -</tr><tr> -<td class="td">UM7</td><td class="td">(UTC - 7:00) Mountain Time</td> -</tr><tr> -<td class="td">UM6</td><td class="td">(UTC - 6:00) Central Time, Mexico City</td> -</tr><tr> -<td class="td">UM5</td><td class="td">(UTC - 5:00) Eastern Time, Bogota, Lima, Quito</td> -</tr><tr> -<td class="td">UM4</td><td class="td">(UTC - 4:00) Atlantic Time, Caracas, La Paz</td> -</tr><tr> -<td class="td">UM25</td><td class="td">(UTC - 3:30) Newfoundland</td> -</tr><tr> -<td class="td">UM3</td><td class="td">(UTC - 3:00) Brazil, Buenos Aires, Georgetown, Falkland Is.</td> -</tr><tr> -<td class="td">UM2</td><td class="td">(UTC - 2:00) Mid-Atlantic, Ascention Is., St Helena</td> -</tr><tr> -<td class="td">UM1</td><td class="td">(UTC - 1:00) Azores, Cape Verde Islands</td> -</tr><tr> -<td class="td">UTC</td><td class="td">(UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</td> -</tr><tr> -<td class="td">UP1</td><td class="td">(UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome</td> -</tr><tr> -<td class="td">UP2</td><td class="td">(UTC + 2:00) Kaliningrad, South Africa, Warsaw</td> -</tr><tr> -<td class="td">UP3</td><td class="td">(UTC + 3:00) Baghdad, Riyadh, Moscow, Nairobi</td> -</tr><tr> -<td class="td">UP25</td><td class="td">(UTC + 3:30) Tehran</td> -</tr><tr> -<td class="td">UP4</td><td class="td">(UTC + 4:00) Adu Dhabi, Baku, Muscat, Tbilisi</td> -</tr><tr> -<td class="td">UP35</td><td class="td">(UTC + 4:30) Kabul</td> -</tr><tr> -<td class="td">UP5</td><td class="td">(UTC + 5:00) Islamabad, Karachi, Tashkent</td> -</tr><tr> -<td class="td">UP45</td><td class="td">(UTC + 5:30) Bombay, Calcutta, Madras, New Delhi</td> -</tr><tr> -<td class="td">UP6</td><td class="td">(UTC + 6:00) Almaty, Colomba, Dhaka</td> -</tr><tr> -<td class="td">UP7</td><td class="td">(UTC + 7:00) Bangkok, Hanoi, Jakarta</td> -</tr><tr> -<td class="td">UP8</td><td class="td">(UTC + 8:00) Beijing, Hong Kong, Perth, Singapore, Taipei</td> -</tr><tr> -<td class="td">UP9</td><td class="td">(UTC + 9:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk</td> -</tr><tr> -<td class="td">UP85</td><td class="td">(UTC + 9:30) Adelaide, Darwin</td> -</tr><tr> -<td class="td">UP10</td><td class="td">(UTC + 10:00) Melbourne, Papua New Guinea, Sydney, Vladivostok</td> -</tr><tr> -<td class="td">UP11</td><td class="td">(UTC + 11:00) Magadan, New Caledonia, Solomon Islands</td> -</tr><tr> -<td class="td">UP12</td><td class="td">(UTC + 12:00) Auckland, Wellington, Fiji, Marshall Island</td> -</tr> -</table> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="cookie_helper.html">Cookie Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="directory_helper.html">Directory Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/directory_helper.html b/user_guide/helpers/directory_helper.html deleted file mode 100644 index f3e41e692..000000000 --- a/user_guide/helpers/directory_helper.html +++ /dev/null @@ -1,143 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Directory Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Directory Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Directory Helper</h1> - -<p>The Directory Helper file contains functions that assist in working with directories.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('directory');</code> - -<p>The following functions are available:</p> - -<h2>directory_map('<var>source directory</var>')</h2> - -<p>This function reads the directory path specified in the first parameter -and builds an array representation of it and all its contained files. Example:</p> - -<code>$map = directory_map('./mydirectory/');</code> - -<p class="important"><strong>Note:</strong> Paths are almost always relative to your main index.php file.</p> - -<p>Sub-folders contained within the directory will be mapped as well. If you wish to control the recursion depth, -you can do so using the second parameter (integer). A depth of 1 will only map the top level directory:</p> - -<code>$map = directory_map('./mydirectory/', 1);</code> - -<p>By default, hidden files will not be included in the returned array. To override this behavior, -you may set a third parameter to <var>true</var> (boolean):</p> - -<code>$map = directory_map('./mydirectory/', FALSE, TRUE);</code> - -<p>Each folder name will be an array index, while its contained files will be numerically indexed. -Here is an example of a typical array:</p> - -<code>Array<br /> -(<br /> - [libraries] => Array<br /> - (<br /> - [0] => benchmark.html<br /> - [1] => config.html<br /> - [database] => Array<br /> - (<br /> - [0] => active_record.html<br /> - [1] => binds.html<br /> - [2] => configuration.html<br /> - [3] => connecting.html<br /> - [4] => examples.html<br /> - [5] => fields.html<br /> - [6] => index.html<br /> - [7] => queries.html<br /> - )<br /> - [2] => email.html<br /> - [3] => file_uploading.html<br /> - [4] => image_lib.html<br /> - [5] => input.html<br /> - [6] => language.html<br /> - [7] => loader.html<br /> - [8] => pagination.html<br /> - [9] => uri.html<br /> -)</code> - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="date_helper.html">Date Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="download_helper.html">Download Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/download_helper.html b/user_guide/helpers/download_helper.html deleted file mode 100644 index 6582fbbba..000000000 --- a/user_guide/helpers/download_helper.html +++ /dev/null @@ -1,112 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Download Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Download Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Download Helper</h1> - -<p>The Download Helper lets you download data to your desktop.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('download');</code> - -<p>The following functions are available:</p> - -<h2>force_download('<var>filename</var>', '<var>data</var>')</h2> - -<p>Generates server headers which force data to be downloaded to your desktop. Useful with file downloads. -The first parameter is the <strong>name you want the downloaded file to be named</strong>, the second parameter is the file data. -Example:</p> - -<code> -$data = 'Here is some text!';<br /> -$name = 'mytext.txt';<br /> -<br /> -force_download($name, $data); -</code> - -<p>If you want to download an existing file from your server you'll need to read the file into a string:</p> - -<code> -$data = file_get_contents("/path/to/photo.jpg"); // Read the file's contents<br /> -$name = 'myphoto.jpg';<br /> -<br /> -force_download($name, $data); -</code> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="directory_helper.html">Directory Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="email_helper.html">Email Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/email_helper.html b/user_guide/helpers/email_helper.html deleted file mode 100644 index 242efaf32..000000000 --- a/user_guide/helpers/email_helper.html +++ /dev/null @@ -1,102 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Email Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Email Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Email Helper</h1> - -<p>The Email Helper provides some assistive functions for working with Email. For a more robust email solution, see CodeIgniter's <a href="../libraries/email.html">Email Class</a>.</p> - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<p><code>$this->load->helper('email');</code></p> - -<p>The following functions are available:</p> - -<h2>valid_email('<var>email</var>')</h2> - -<p>Checks if an email is a correctly formatted email. Note that is doesn't actually prove the email will recieve mail, simply that it is a validly formed address.</p> -<p>It returns TRUE/FALSE</p> -<code> $this->load->helper('email');<br /> -<br /> -if (valid_email('email@somesite.com'))<br /> -{<br /> - echo 'email is valid';<br /> -}<br /> -else<br /> -{<br /> - echo 'email is not valid';<br /> -}</code> -<h2>send_email('<var>recipient</var>', '<var>subject</var>', '<var>message</var>')</h2> -<p>Sends an email using PHP's native <a href="http://www.php.net/function.mail">mail()</a> function. For a more robust email solution, see CodeIgniter's <a href="../libraries/email.html">Email Class</a>.</p> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="download_helper.html">Download Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="file_helper.html">File Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html deleted file mode 100644 index 6c1a48fce..000000000 --- a/user_guide/helpers/file_helper.html +++ /dev/null @@ -1,179 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>File Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -File Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>File Helper</h1> - -<p>The File Helper file contains functions that assist in working with files.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('file');</code> - -<p>The following functions are available:</p> - -<h2>read_file('<var>path</var>')</h2> - -<p>Returns the data contained in the file specified in the path. Example:</p> - -<code>$string = read_file('./path/to/file.php');</code> - -<p>The path can be a relative or full server path. Returns FALSE (boolean) on failure.</p> - -<p class="important"><strong>Note:</strong> The path is relative to your main site index.php file, NOT your controller or view files. -CodeIgniter uses a front controller so paths are always relative to the main site index.</p> - -<p>If your server is running an open_basedir restriction this function -might not work if you are trying to access a file above the calling script.</p> - -<h2>write_file('<var>path</var>', <kbd>$data</kbd>)</h2> - -<p>Writes data to the file specified in the path. If the file does not exist the function will create it. Example:</p> - -<code> -$data = 'Some file data';<br /> -<br /> -if ( ! write_file('./path/to/file.php', $data))<br /> -{<br /> - echo 'Unable to write the file';<br /> -}<br /> -else<br /> -{<br /> - echo 'File written!';<br /> -}</code> - -<p>You can optionally set the write mode via the third parameter:</p> - -<code>write_file('./path/to/file.php', $data, <var>'r+'</var>);</code> - -<p>The default mode is <kbd>wb</kbd>. Please see the <a href="http://php.net/fopen">PHP user guide</a> for mode options.</p> - -<p>Note: In order for this function to write data to a file its file permissions must be set such that it is writable (666, 777, etc.). -If the file does not already exist, the directory containing it must be writable.</p> - -<p class="important"><strong>Note:</strong> The path is relative to your main site index.php file, NOT your controller or view files. -CodeIgniter uses a front controller so paths are always relative to the main site index.</p> - -<h2>delete_files('<var>path</var>')</h2> - -<p>Deletes ALL files contained in the supplied path. Example:</p> -<code>delete_files('./path/to/directory/');</code> - -<p>If the second parameter is set to <kbd>true</kbd>, any directories contained within the supplied root path will be deleted as well. Example:</p> - -<code>delete_files('./path/to/directory/', TRUE);</code> - -<p class="important"><strong>Note:</strong> The files must be writable or owned by the system in order to be deleted.</p> - -<h2>get_filenames('<var>path/to/directory/</var>')</h2> - -<p>Takes a server path as input and returns an array containing the names of all files contained within it. The file path -can optionally be added to the file names by setting the second parameter to TRUE.</p> - -<h2>get_dir_file_info('<var>path/to/directory/</var>', <kbd>$top_level_only</kbd> = TRUE)</h2> - -<p>Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced - by sending the second parameter, <kbd>$top_level_only</kbd> to <samp>FALSE</samp>, as this can be an intensive operation.</p> - -<h2>get_file_info('<var>path/to/file</var>', <kbd>$file_information</kbd>)</h2> - -<p>Given a file and path, returns the name, path, size, date modified. Second parameter allows you to explicitly declare what information you want returned; options are: name, server_path, size, date, readable, writable, executable, fileperms. Returns FALSE if the file cannot be found.</p> - -<p class="important"><strong>Note:</strong> The "writable" uses the PHP function is_writable() which is known to have issues on the IIS webserver. Consider using fileperms instead, which returns information from PHP's fileperms() function.</p> -<h2>get_mime_by_extension('<var>file</var>')</h2> - -<p>Translates a file extension into a mime type based on config/mimes.php. Returns FALSE if it can't determine the type, or open the mime config file.</p> -<p> -<code>$file = "somefile.png";<br /> -echo $file . ' is has a mime type of ' . get_mime_by_extension($file);</code> -</p> -<p class="critical"><strong>Note:</strong> This is not an accurate way of determining file mime types, and is here strictly as a convenience. It should not be used for security.</p> - -<h2>symbolic_permissions(<kbd>$perms</kbd>)</h2> - -<p>Takes numeric permissions (such as is returned by <kbd>fileperms()</kbd> and returns standard symbolic notation of file permissions.</p> - -<code>echo symbolic_permissions(fileperms('./index.php'));<br /> -<br /> -// -rw-r--r--</code> - -<h2>octal_permissions(<kbd>$perms</kbd>)</h2> - -<p>Takes numeric permissions (such as is returned by <kbd>fileperms()</kbd> and returns a three character octal notation of file permissions.</p> - -<code>echo octal_permissions(fileperms('./index.php'));<br /> -<br /> -// 644</code> - -</div> - -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="email_helper.html">Email Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="form_helper.html">Form Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html deleted file mode 100644 index 1d11affed..000000000 --- a/user_guide/helpers/form_helper.html +++ /dev/null @@ -1,484 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Form Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Form Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Form Helper</h1> - -<p>The Form Helper file contains functions that assist in working with forms.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('form');</code> - -<p>The following functions are available:</p> - - - -<h2>form_open()</h2> - -<p>Creates an opening form tag with a base URL <strong>built from your config preferences</strong>. It will optionally let you -add form attributes and hidden input fields, and will always add the attribute <kbd>accept-charset</kbd> based on the charset value in your config file.</p> - -<p>The main benefit of using this tag rather than hard coding your own HTML is that it permits your site to be more portable -in the event your URLs ever change.</p> - -<p>Here's a simple example:</p> - -<code>echo form_open('email/send');</code> - -<p>The above example would create a form that points to your base URL plus the "email/send" URI segments, like this:</p> - -<code><form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send" /></code> - -<h4>Adding Attributes</h4> - -<p>Attributes can be added by passing an associative array to the second parameter, like this:</p> - -<code> -$attributes = array('class' => 'email', 'id' => 'myform');<br /> -<br /> -echo form_open('email/send', $attributes);</code> - -<p>The above example would create a form similar to this:</p> - -<code><form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send" class="email" id="myform" /></code> - -<h4>Adding Hidden Input Fields</h4> - -<p>Hidden fields can be added by passing an associative array to the third parameter, like this:</p> - -<code> -$hidden = array('username' => 'Joe', 'member_id' => '234');<br /> -<br /> -echo form_open('email/send', '', $hidden);</code> - -<p>The above example would create a form similar to this:</p> - -<code><form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send"><br /> -<input type="hidden" name="username" value="Joe" /><br /> -<input type="hidden" name="member_id" value="234" /></code> - - -<h2>form_open_multipart()</h2> - -<p>This function is absolutely identical to the <dfn>form_open()</dfn> tag above except that it adds a multipart attribute, -which is necessary if you would like to use the form to upload files with.</p> - -<h2>form_hidden()</h2> - -<p>Lets you generate hidden input fields. You can either submit a name/value string to create one field:</p> - -<code>form_hidden('username', 'johndoe');<br /> -<br /> -// Would produce:<br /><br /> -<input type="hidden" name="username" value="johndoe" /></code> - -<p>Or you can submit an associative array to create multiple fields:</p> - -<code>$data = array(<br /> - 'name' => 'John Doe',<br /> - 'email' => 'john@example.com',<br /> - 'url' => 'http://example.com'<br /> - );<br /> -<br /> -echo form_hidden($data);<br /> -<br /> -// Would produce:<br /><br /> -<input type="hidden" name="name" value="John Doe" /><br /> -<input type="hidden" name="email" value="john@example.com" /><br /> -<input type="hidden" name="url" value="http://example.com" /></code> - - - - -<h2>form_input()</h2> - -<p>Lets you generate a standard text input field. You can minimally pass the field name and value in the first -and second parameter:</p> - -<code>echo form_input('username', 'johndoe');</code> - -<p>Or you can pass an associative array containing any data you wish your form to contain:</p> - -<code>$data = array(<br /> - 'name' => 'username',<br /> - 'id' => 'username',<br /> - 'value' => 'johndoe',<br /> - 'maxlength' => '100',<br /> - 'size' => '50',<br /> - 'style' => 'width:50%',<br /> - );<br /> -<br /> -echo form_input($data);<br /> -<br /> -// Would produce:<br /><br /> -<input type="text" name="username" id="username" value="johndoe" maxlength="100" size="50" style="width:50%" /></code> - -<p>If you would like your form to contain some additional data, like Javascript, you can pass it as a string in the -third parameter:</p> - -<code>$js = 'onClick="some_function()"';<br /> -<br /> -echo form_input('username', 'johndoe', $js);</code> - -<h2>form_password()</h2> - -<p>This function is identical in all respects to the <dfn>form_input()</dfn> function above -except that is sets it as a "password" type.</p> - -<h2>form_upload()</h2> - -<p>This function is identical in all respects to the <dfn>form_input()</dfn> function above -except that is sets it as a "file" type, allowing it to be used to upload files.</p> - -<h2>form_textarea()</h2> - -<p>This function is identical in all respects to the <dfn>form_input()</dfn> function above -except that it generates a "textarea" type. Note: Instead of the "maxlength" and "size" attributes in the above -example, you will instead specify "rows" and "cols".</p> - - -<h2>form_dropdown()</h2> - -<p>Lets you create a standard drop-down field. The first parameter will contain the name of the field, -the second parameter will contain an associative array of options, and the third parameter will contain the -value you wish to be selected. You can also pass an array of multiple items through the third parameter, and CodeIgniter will create a multiple select for you. Example:</p> - -<code>$options = array(<br /> - 'small' => 'Small Shirt',<br /> - 'med' => 'Medium Shirt',<br /> - 'large' => 'Large Shirt',<br /> - 'xlarge' => 'Extra Large Shirt',<br /> - );<br /> -<br /> -$shirts_on_sale = array('small', 'large');<br /> -<br /> -echo form_dropdown('shirts', $options, 'large');<br /> -<br /> -// Would produce:<br /> -<br /> -<select name="shirts"><br /> -<option value="small">Small Shirt</option><br /> -<option value="med">Medium Shirt</option><br /> -<option value="large" selected="selected">Large Shirt</option><br /> -<option value="xlarge">Extra Large Shirt</option><br /> -</select><br /> -<br /> -echo form_dropdown('shirts', $options, $shirts_on_sale);<br /> -<br /> -// Would produce:<br /> -<br /> -<select name="shirts" multiple="multiple"><br /> -<option value="small" selected="selected">Small Shirt</option><br /> -<option value="med">Medium Shirt</option><br /> -<option value="large" selected="selected">Large Shirt</option><br /> -<option value="xlarge">Extra Large Shirt</option><br /> -</select></code> - - -<p>If you would like the opening <select> to contain additional data, like an <kbd>id</kbd> attribute or JavaScript, you can pass it as a string in the -fourth parameter:</p> - -<code>$js = 'id="shirts" onChange="some_function();"';<br /> -<br /> -echo form_dropdown('shirts', $options, 'large', $js);</code> - -<p>If the array passed as $options is a multidimensional array, form_dropdown() will produce an <optgroup> with the array key as the label.</p> - -<h2>form_multiselect()</h2> - -<p>Lets you create a standard multiselect field. The first parameter will contain the name of the field, -the second parameter will contain an associative array of options, and the third parameter will contain the -value or values you wish to be selected. The parameter usage is identical to using <kbd>form_dropdown()</kbd> above, -except of course that the name of the field will need to use POST array syntax, e.g. <samp>foo[]</samp>.</p> - - -<h2>form_fieldset()</h2> - -<p>Lets you generate fieldset/legend fields.</p> -<code>echo form_fieldset('Address Information');<br /> -echo "<p>fieldset content here</p>\n";<br /> -echo form_fieldset_close(); -<br /> -<br /> -// Produces<br /> -<fieldset> -<br /> -<legend>Address Information</legend> -<br /> -<p>form content here</p> -<br /> -</fieldset></code> -<p>Similar to other functions, you can submit an associative array in the second parameter if you prefer to set additional attributes. </p> -<p><code>$attributes = array('id' => 'address_info', 'class' => 'address_info');<br /> - echo form_fieldset('Address Information', $attributes);<br /> -echo "<p>fieldset content here</p>\n";<br /> -echo form_fieldset_close(); <br /> -<br /> -// Produces<br /> -<fieldset id="address_info" class="address_info"> <br /> -<legend>Address Information</legend> <br /> -<p>form content here</p> <br /> -</fieldset></code></p> -<h2>form_fieldset_close()</h2> -<p>Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it - which will be added below the tag. For example:</p> -<code>$string = "</div></div>";<br /> -<br /> -echo form_fieldset_close($string);<br /> -<br /> -// Would produce:<br /> -</fieldset><br /> -</div></div></code> -<h2>form_checkbox()</h2> -<p>Lets you generate a checkbox field. Simple example:</p> -<code>echo form_checkbox('newsletter', 'accept', TRUE);<br /> -<br /> -// Would produce:<br /> -<br /> -<input type="checkbox" name="newsletter" value="accept" checked="checked" /></code> -<p>The third parameter contains a boolean TRUE/FALSE to determine whether the box should be checked or not.</p> -<p>Similar to the other form functions in this helper, you can also pass an array of attributes to the function:</p> - -<code>$data = array(<br /> - 'name' => 'newsletter',<br /> - 'id' => 'newsletter',<br /> - 'value' => 'accept',<br /> - 'checked' => TRUE,<br /> - 'style' => 'margin:10px',<br /> - );<br /> -<br /> -echo form_checkbox($data);<br /> -<br /> -// Would produce:<br /><br /> -<input type="checkbox" name="newsletter" id="newsletter" value="accept" checked="checked" style="margin:10px" /></code> - -<p>As with other functions, if you would like the tag to contain additional data, like JavaScript, you can pass it as a string in the -fourth parameter:</p> - -<code>$js = 'onClick="some_function()"';<br /> -<br /> - echo form_checkbox('newsletter', 'accept', TRUE, $js)</code> - - -<h2>form_radio()</h2> -<p>This function is identical in all respects to the <dfn>form_checkbox()</dfn> function above except that is sets it as a "radio" type.</p> - - -<h2>form_submit()</h2> - -<p>Lets you generate a standard submit button. Simple example:</p> -<code>echo form_submit('mysubmit', 'Submit Post!');<br /> -<br /> -// Would produce:<br /> -<br /> -<input type="submit" name="mysubmit" value="Submit Post!" /></code> -<p>Similar to other functions, you can submit an associative array in the first parameter if you prefer to set your own attributes. - The third parameter lets you add extra data to your form, like JavaScript.</p> -<h2>form_label()</h2> -<p>Lets you generate a <label>. Simple example:</p> -<code>echo form_label('What is your Name', 'username');<br /> -<br /> -// Would produce: -<br /> -<label for="username">What is your Name</label></code> -<p>Similar to other functions, you can submit an associative array in the third parameter if you prefer to set additional attributes. </p> -<p><code>$attributes = array(<br /> - 'class' => 'mycustomclass',<br /> - 'style' => 'color: #000;',<br /> -);<br /> - echo form_label('What is your Name', 'username', $attributes);<br /> - <br /> -// Would produce: <br /> -<label for="username" class="mycustomclass" style="color: #000;">What is your Name</label></code></p> -<h2>form_reset()</h2> - -<p>Lets you generate a standard reset button. Use is identical to <dfn>form_submit()</dfn>.</p> - -<h2>form_button()</h2> - -<p>Lets you generate a standard button element. You can minimally pass the button name and content in the first and second parameter:</p> -<code> -echo form_button('name','content');<br /> -<br /> -// Would produce<br /> -<button name="name" type="button">Content</button> -</code> - -Or you can pass an associative array containing any data you wish your form to contain: -<code> -$data = array(<br /> - 'name' => 'button',<br /> - 'id' => 'button',<br /> - 'value' => 'true',<br /> - 'type' => 'reset',<br /> - 'content' => 'Reset'<br /> -);<br /> -<br /> -echo form_button($data);<br /> -<br /> -// Would produce:<br /> -<button name="button" id="button" value="true" type="reset">Reset</button> -</code> - -If you would like your form to contain some additional data, like JavaScript, you can pass it as a string in the third parameter: -<code> -$js = 'onClick="some_function()"';<br /><br /> -echo form_button('mybutton', 'Click Me', $js); -</code> - - -<h2>form_close()</h2> - -<p>Produces a closing </form> tag. The only advantage to using this function is it permits you to pass data to it -which will be added below the tag. For example:</p> - -<code>$string = "</div></div>";<br /> -<br /> -echo form_close($string);<br /> -<br /> -// Would produce:<br /> -<br /> -</form><br /> -</div></div></code> - - - - - -<h2>form_prep()</h2> - -<p>Allows you to safely use HTML and characters such as quotes within form elements without breaking out of the form. Consider this example:</p> - -<code>$string = 'Here is a string containing <strong>"quoted"</strong> text.';<br /> -<br /> -<input type="text" name="myform" value="<var>$string</var>" /></code> - -<p>Since the above string contains a set of quotes it will cause the form to break. -The form_prep function converts HTML so that it can be used safely:</p> - -<code><input type="text" name="myform" value="<var><?php echo form_prep($string); ?></var>" /></code> - -<p class="important"><strong>Note:</strong> If you use any of the form helper functions listed in this page the form -values will be prepped automatically, so there is no need to call this function. Use it only if you are -creating your own form elements.</p> - - -<h2>set_value()</h2> - -<p>Permits you to set the value of an input form or textarea. You must supply the field name via the first parameter of the function. -The second (optional) parameter allows you to set a default value for the form. Example:</p> - -<code><input type="text" name="quantity" value="<dfn><?php echo set_value('quantity', '0'); ?></dfn>" size="50" /></code> - -<p>The above form will show "0" when loaded for the first time.</p> - -<h2>set_select()</h2> - -<p>If you use a <dfn><select></dfn> menu, this function permits you to display the menu item that was selected. The first parameter -must contain the name of the select menu, the second parameter must contain the value of -each item, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE).</p> - -<p>Example:</p> - -<code> -<select name="myselect"><br /> -<option value="one" <dfn><?php echo set_select('myselect', 'one', TRUE); ?></dfn> >One</option><br /> -<option value="two" <dfn><?php echo set_select('myselect', 'two'); ?></dfn> >Two</option><br /> -<option value="three" <dfn><?php echo set_select('myselect', 'three'); ?></dfn> >Three</option><br /> -</select> -</code> - - -<h2>set_checkbox()</h2> - -<p>Permits you to display a checkbox in the state it was submitted. The first parameter -must contain the name of the checkbox, the second parameter must contain its value, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE). Example:</p> - -<code><input type="checkbox" name="mycheck" value="1" <dfn><?php echo set_checkbox('mycheck', '1'); ?></dfn> /><br /> -<input type="checkbox" name="mycheck" value="2" <dfn><?php echo set_checkbox('mycheck', '2'); ?></dfn> /></code> - - -<h2>set_radio()</h2> - -<p>Permits you to display radio buttons in the state they were submitted. This function is identical to the <strong>set_checkbox()</strong> function above.</p> - -<code><input type="radio" name="myradio" value="1" <dfn><?php echo set_radio('myradio', '1', TRUE); ?></dfn> /><br /> -<input type="radio" name="myradio" value="2" <dfn><?php echo set_radio('myradio', '2'); ?></dfn> /></code> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="file_helper.html">File Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="html_helper.html">HTML Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html deleted file mode 100644 index 2a8cb1a1d..000000000 --- a/user_guide/helpers/html_helper.html +++ /dev/null @@ -1,390 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>HTML Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -HTML Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>HTML Helper</h1> - -<p>The HTML Helper file contains functions that assist in working with HTML.</p> - -<ul> - <li><a href="#br">br()</a></li> - <li><a href="#heading">heading()</a></li> - <li><a href="#img">img()</a></li> - <li><a href="#link_tag">link_tag()</a></li> - <li><a href="#nbs">nbs()</a></li> - <li><a href="#ol_and_ul">ol() and ul()</a></li> - <li><a href="#meta">meta()</a></li> - <li><a href="#doctype">doctype()</a></li> -</ul> - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('html');</code> - -<p>The following functions are available:</p> - -<h2><a name="br"></a>br()</h2> -<p>Generates line break tags (<br />) based on the number you submit. Example:</p> -<code>echo br(3);</code> -<p>The above would produce: <br /><br /><br /></p> - -<h2><a name="heading"></a>heading()</h2> -<p>Lets you create HTML <h1> tags. The first parameter will contain the data, the -second the size of the heading. Example:</p> -<code>echo heading('Welcome!', 3);</code> -<p>The above would produce: <h3>Welcome!</h3></p> - -<p>Additionally, in order to add attributes to the heading tag such as HTML classes, ids or inline styles, a third parameter is available.</p> -<code>echo heading('Welcome!', 3, 'class="pink"')</code> -<p>The above code produces: <h3 class="pink">Welcome!<<h3></p> - - -<h2><a name="img"></a>img()</h2> -<p>Lets you create HTML <img /> tags. The first parameter contains the image source. Example:</p> -<code>echo img('images/picture.jpg');<br /> -// gives <img src="http://site.com/images/picture.jpg" /></code> -<p>There is an optional second parameter that is a TRUE/FALSE value that specifics if the src should have the page specified by $config['index_page'] added to the address it creates. Presumably, this would be if you were using a media controller.</p> -<p><code>echo img('images/picture.jpg', TRUE);<br /> -// gives <img src="http://site.com/index.php/images/picture.jpg" alt="" /></code></p> -<p>Additionally, an associative array can be passed to the img() function for complete control over all attributes and values. If an alt attribute is not provided, CodeIgniter will generate an empty string.</p> -<p><code> $image_properties = array(<br /> - 'src' => 'images/picture.jpg',<br /> - 'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time',<br /> - 'class' => 'post_images',<br /> - 'width' => '200',<br /> - 'height' => '200',<br /> - 'title' => 'That was quite a night',<br /> - 'rel' => 'lightbox',<br /> - );<br /> - <br /> - img($image_properties);<br /> - // <img src="http://site.com/index.php/images/picture.jpg" alt="Me, demonstrating how to eat 4 slices of pizza at one time" class="post_images" width="200" height="200" title="That was quite a night" rel="lightbox" /></code></p> - -<h2><a name="link_tag"></a>link_tag()</h2> -<p>Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates.<code> -echo link_tag('css/mystyles.css');<br /> -// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" /></code></p> -<p>Further examples:</p> - -<code> - echo link_tag('favicon.ico', 'shortcut icon', 'image/ico');<br /> - // <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" /> - <br /> - <br /> - echo link_tag('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');<br /> - // <link href="http://site.com/feed" rel="alternate" type="application/rss+xml" title="My RSS Feed" /> </code> -<p>Additionally, an associative array can be passed to the link() function for complete control over all attributes and values.</p> -<p><code> - $link = array(<br /> - 'href' => 'css/printer.css',<br /> - 'rel' => 'stylesheet',<br /> - 'type' => 'text/css',<br /> - 'media' => 'print'<br /> - );<br /> - <br /> - echo link_tag($link);<br /> - // <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" /></code></p> - -<h2><a name="nbs"></a>nbs()</h2> -<p>Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:</p> -<code>echo nbs(3);</code> -<p>The above would produce: &nbsp;&nbsp;&nbsp;</p> - -<h2><a name="ol_and_ul"></a>ol() and ul()</h2> - -<p>Permits you to generate ordered or unordered HTML lists from simple or multi-dimensional arrays. Example:</p> - -<code> -$this->load->helper('html');<br /> -<br /> -$list = array(<br /> - 'red', <br /> - 'blue', <br /> - 'green',<br /> - 'yellow'<br /> - );<br /> -<br /> -$attributes = array(<br /> - 'class' => 'boldlist',<br /> - 'id' => 'mylist'<br /> - );<br /> -<br /> -echo ul($list, $attributes);<br /> -</code> - -<p>The above code will produce this:</p> - -<code> -<ul class="boldlist" id="mylist"><br /> - <li>red</li><br /> - <li>blue</li><br /> - <li>green</li><br /> - <li>yellow</li><br /> -</ul> -</code> - -<p>Here is a more complex example, using a multi-dimensional array:</p> - -<code> -$this->load->helper('html');<br /> -<br /> -$attributes = array(<br /> - 'class' => 'boldlist',<br /> - 'id' => 'mylist'<br /> - );<br /> -<br /> -$list = array(<br /> - 'colors' => array(<br /> - 'red',<br /> - 'blue',<br /> - 'green'<br /> - ),<br /> - 'shapes' => array(<br /> - 'round', <br /> - 'square',<br /> - 'circles' => array(<br /> - 'ellipse', <br /> - 'oval', <br /> - 'sphere'<br /> - )<br /> - ),<br /> - 'moods' => array(<br /> - 'happy', <br /> - 'upset' => array(<br /> - 'defeated' => array(<br /> - 'dejected',<br /> - 'disheartened',<br /> - 'depressed'<br /> - ),<br /> - 'annoyed',<br /> - 'cross',<br /> - 'angry'<br /> - )<br /> - )<br /> - );<br /> -<br /> -<br /> -echo ul($list, $attributes);</code> - -<p>The above code will produce this:</p> - -<code> -<ul class="boldlist" id="mylist"><br /> - <li>colors<br /> - <ul><br /> - <li>red</li><br /> - <li>blue</li><br /> - <li>green</li><br /> - </ul><br /> - </li><br /> - <li>shapes<br /> - <ul><br /> - <li>round</li><br /> - <li>suare</li><br /> - <li>circles<br /> - <ul><br /> - <li>elipse</li><br /> - <li>oval</li><br /> - <li>sphere</li><br /> - </ul><br /> - </li><br /> - </ul><br /> - </li><br /> - <li>moods<br /> - <ul><br /> - <li>happy</li><br /> - <li>upset<br /> - <ul><br /> - <li>defeated<br /> - <ul><br /> - <li>dejected</li><br /> - <li>disheartened</li><br /> - <li>depressed</li><br /> - </ul><br /> - </li><br /> - <li>annoyed</li><br /> - <li>cross</li><br /> - <li>angry</li><br /> - </ul><br /> - </li><br /> - </ul><br /> - </li><br /> -</ul> -</code> - - - -<h2><a name="meta"></a>meta()</h2> - -<p>Helps you generate meta tags. You can pass strings to the function, or simple arrays, or multidimensional ones. Examples:</p> - -<code> -echo meta('description', 'My Great site');<br /> -// Generates: <meta name="description" content="My Great Site" /><br /> -<br /><br /> - -echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); // Note the third parameter. Can be "equiv" or "name"<br /> -// Generates: <meta http-equiv="Content-type" content="text/html; charset=utf-8" /><br /> - -<br /><br /> - -echo meta(array('name' => 'robots', 'content' => 'no-cache'));<br /> -// Generates: <meta name="robots" content="no-cache" /><br /> - -<br /><br /> - -$meta = array(<br /> - array('name' => 'robots', 'content' => 'no-cache'),<br /> - array('name' => 'description', 'content' => 'My Great Site'),<br /> - array('name' => 'keywords', 'content' => 'love, passion, intrigue, deception'),<br /> - array('name' => 'robots', 'content' => 'no-cache'),<br /> - array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv')<br /> - );<br /> -<br /> -echo meta($meta); -<br /> -// Generates: <br /> -// <meta name="robots" content="no-cache" /><br /> -// <meta name="description" content="My Great Site" /><br /> -// <meta name="keywords" content="love, passion, intrigue, deception" /><br /> -// <meta name="robots" content="no-cache" /><br /> -// <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> -</code> - - -<h2><a name="doctype"></a>doctype()</h2> - -<p>Helps you generate document type declarations, or DTD's. XHTML 1.0 Strict is used by default, but many doctypes are available.</p> - -<code> -echo doctype();<br /> -// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br /> -<br /> -echo doctype('html4-trans');<br /> -// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -</code> - -<p>The following is a list of doctype choices. These are configurable, and pulled from <samp>application/config/doctypes.php</samp></p> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> - <tr> - <th>Doctype</th> - <th>Option</th> - <th>Result</th> - </tr> - <tr> - <td class="td">XHTML 1.1</td> - <td class="td">doctype('xhtml11')</td> - <td class="td"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"></td> - </tr> - <tr> - <td class="td">XHTML 1.0 Strict</td> - <td class="td">doctype('xhtml1-strict')</td> - <td class="td"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></td> - </tr> - <tr> - <td class="td">XHTML 1.0 Transitional</td> - <td class="td">doctype('xhtml1-trans')</td> - <td class="td"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></td> - </tr> - <tr> - <td class="td">XHTML 1.0 Frameset</td> - <td class="td">doctype('xhtml1-frame')</td> - <td class="td"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"></td> - </tr> - <tr> - <td class="td">HTML 5</td> - <td class="td">doctype('html5')</td> - <td class="td"><!DOCTYPE html></td> - </tr> - <tr> - <td class="td">HTML 4 Strict</td> - <td class="td">doctype('html4-strict')</td> - <td class="td"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"></td> - </tr> - <tr> - <td class="td">HTML 4 Transitional</td> - <td class="td">doctype('html4-trans')</td> - <td class="td"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"></td> - </tr> - <tr> - <td class="td">HTML 4 Frameset</td> - <td class="td">doctype('html4-frame')</td> - <td class="td"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"></td> - </tr> -</table> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="form_helper.html">Form Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="path_helper.html"> Path Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html deleted file mode 100644 index ec81ac08e..000000000 --- a/user_guide/helpers/inflector_helper.html +++ /dev/null @@ -1,151 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Inflector Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Inflector Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Inflector Helper</h1> - -<p>The Inflector Helper file contains functions that permits you to change words to plural, singular, camel case, etc.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('inflector');</code> - -<p>The following functions are available:</p> - - -<h2>singular()</h2> - -<p>Changes a plural word to singular. Example:</p> - -<code> -$word = "dogs";<br /> -echo singular($word); // Returns "dog" -</code> - - -<h2>plural()</h2> - -<p>Changes a singular word to plural. Example:</p> - -<code> -$word = "dog";<br /> -echo plural($word); // Returns "dogs" -</code> - - -<p>To force a word to end with "es" use a second "true" argument. </p> -<code> $word = "pass";<br /> -echo plural($word, TRUE); // Returns "passes" </code> - -<h2>camelize()</h2> -<p>Changes a string of words separated by spaces or underscores to camel case. Example:</p> - -<code> -$word = "my_dog_spot";<br /> -echo camelize($word); // Returns "myDogSpot" -</code> - - -<h2>underscore()</h2> - -<p>Takes multiple words separated by spaces and underscores them. Example:</p> - -<code> -$word = "my dog spot";<br /> -echo underscore($word); // Returns "my_dog_spot" -</code> - - -<h2>humanize()</h2> - -<p>Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized. Example:</p> - -<code> -$word = "my_dog_spot";<br /> -echo humanize($word); // Returns "My Dog Spot" -</code> - - - - - - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="html_helper.html"> HTML Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="number_helper.html">Number Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/language_helper.html b/user_guide/helpers/language_helper.html deleted file mode 100644 index 522cbda7d..000000000 --- a/user_guide/helpers/language_helper.html +++ /dev/null @@ -1,98 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Language Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Language Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Language Helper</h1> - -<p>The Language Helper file contains functions that assist in working with language files.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('language');</code> - -<p>The following functions are available:</p> - -<h2>lang('<var>language line</var>', '<var>element id</var>')</h2> - -<p>This function returns a line of text from a loaded language file with simplified syntax - that may be more desirable for view files than calling <kbd>$this->lang->line()</kbd>. - The optional second parameter will also output a form label for you. Example:</p> - -<code>echo lang('<samp>language_key</samp>', '<samp>form_item_id</samp>');<br /> -// becomes <label for="form_item_id">language_key</label></code> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="date_helper.html">Date Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="download_helper.html">Download Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/number_helper.html b/user_guide/helpers/number_helper.html deleted file mode 100644 index b97c5f34b..000000000 --- a/user_guide/helpers/number_helper.html +++ /dev/null @@ -1,113 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Number Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Number Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Number Helper</h1> - -<p>The Number Helper file contains functions that help you work with numeric data.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('number');</code> - -<p>The following functions are available:</p> - - -<h2>byte_format()</h2> - -<p>Formats a numbers as bytes, based on size, and adds the appropriate suffix. Examples:</p> - -<code> -echo byte_format(456); // Returns 456 Bytes<br /> -echo byte_format(4567); // Returns 4.5 KB<br /> -echo byte_format(45678); // Returns 44.6 KB<br /> -echo byte_format(456789); // Returns 447.8 KB<br /> -echo byte_format(3456789); // Returns 3.3 MB<br /> -echo byte_format(12345678912345); // Returns 1.8 GB<br /> -echo byte_format(123456789123456789); // Returns 11,228.3 TB -</code> - -<p>An optional second parameter allows you to set the precision of the result.</p> - -<code> -echo byte_format(45678, 2); // Returns 44.61 KB -</code> - -<p class="important"> -<strong>Note:</strong> -The text generated by this function is found in the following language file: language/<your_lang>/number_lang.php -</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="inflector_helper.html">Inflector Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="path_helper.html">Path Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/path_helper.html b/user_guide/helpers/path_helper.html deleted file mode 100644 index 1b4665a61..000000000 --- a/user_guide/helpers/path_helper.html +++ /dev/null @@ -1,106 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Path Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Path Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Path Helper</h1> - -<p>The Path Helper file contains functions that permits you to work with file paths on the server.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('path');</code> - -<p>The following functions are available:</p> - - -<h2>set_realpath()</h2> - -<p>Checks to see if the path exists. This function will return a server path without symbolic links or relative directory structures. An optional second argument will cause an error to be triggered if the path cannot be resolved.</p> - -<code>$directory = '/etc/passwd';<br /> -echo set_realpath($directory);<br /> -// returns "/etc/passwd"<br /> -<br /> -$non_existent_directory = '/path/to/nowhere';<br /> -echo set_realpath($non_existent_directory, TRUE);<br /> -// returns an <strong>error</strong>, as the path could not be resolved -<br /><br /> -echo set_realpath($non_existent_directory, FALSE);<br /> -// returns "/path/to/nowhere" - - - -</code> -<h2> </h2> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="number_helper.html">Number Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="security_helper.html">Security Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html deleted file mode 100644 index 53f3e2f48..000000000 --- a/user_guide/helpers/security_helper.html +++ /dev/null @@ -1,132 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Security Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Security Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Security Helper</h1> - -<p>The Security Helper file contains security related functions.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('security');</code> - -<p>The following functions are available:</p> - - -<h2>xss_clean()</h2> - -<p>Provides Cross Site Script Hack filtering. This function is an alias to the one in the -<a href="../libraries/input.html">Input class</a>. More info can be found there.</p> - - -<h2>sanitize_filename()</h2> - -<p>Provides protection against directory traversal. This function is an alias to the one in the -<a href="../libraries/security.html">Security class</a>. More info can be found there.</p> - - -<h2>do_hash()</h2> - -<p>Permits you to create SHA1 or MD5 one way hashes suitable for encrypting passwords. Will create SHA1 by default. Examples:</p> - -<code> -$str = do_hash($str); // SHA1<br /> -<br /> -$str = do_hash($str, 'md5'); // MD5 -</code> - -<p class="important"><strong>Note:</strong> This function was formerly named <kbd>dohash()</kbd>, which has been deprecated in favour of <kbd>do_hash()</kbd>.</p> - - - -<h2>strip_image_tags()</h2> - -<p>This is a security function that will strip image tags from a string. It leaves the image URL as plain text.</p> - -<code>$string = strip_image_tags($string);</code> - - -<h2>encode_php_tags()</h2> - -<p>This is a security function that converts PHP tags to entities. Note: If you use the XSS filtering function it does this automatically.</p> - -<code>$string = encode_php_tags($string);</code> - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="path_helper.html"> Path Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="smiley_helper.html">Smiley Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html deleted file mode 100644 index 9c9acd673..000000000 --- a/user_guide/helpers/smiley_helper.html +++ /dev/null @@ -1,215 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Smiley Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Smiley Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Smiley Helper</h1> - -<p>The Smiley Helper file contains functions that let you manage smileys (emoticons).</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('smiley');</code> - -<h2>Overview</h2> - -<p>The Smiley helper has a renderer that takes plain text simileys, like <dfn>:-)</dfn> and turns -them into a image representation, like <img src="../images/smile.gif" width="19" height="19" border="0" alt="smile!" /></p> - -<p>It also lets you display a set of smiley images that when clicked will be inserted into a form field. -For example, if you have a blog that allows user commenting you can show the smileys next to the comment form. -Your users can click a desired smiley and with the help of some JavaScript it will be placed into the form field.</p> - - - -<h2>Clickable Smileys Tutorial</h2> - -<p>Here is an example demonstrating how you might create a set of clickable smileys next to a form field. This example -requires that you first download and install the smiley images, then create a controller and the View as described.</p> - -<p class="important"><strong>Important:</strong> Before you begin, please <a href="http://ellislab.com/asset/ci_download_files/smileys.zip">download the smiley images</a> and put them in -a publicly accessible place on your server. This helper also assumes you have the smiley replacement array located at -<dfn>application/config/smileys.php</dfn></p> - - -<h3>The Controller</h3> - -<p>In your <dfn>application/controllers/</dfn> folder, create a file called <kbd>smileys.php</kbd> and place the code below in it.</p> - -<p><strong>Important:</strong> Change the URL in the <dfn>get_clickable_smileys()</dfn> function below so that it points to -your <dfn>smiley</dfn> folder.</p> - -<p>You'll notice that in addition to the smiley helper we are using the <a href="../libraries/table.html">Table Class</a>.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="25"> -<?php - -class Smileys extends CI_Controller { - - function __construct() - { - parent::__construct(); - } - - function index() - { - $this->load->helper('smiley'); - $this->load->library('table'); - - $image_array = get_clickable_smileys('http://example.com/images/smileys/', 'comments'); - - $col_array = $this->table->make_columns($image_array, 8); - - $data['smiley_table'] = $this->table->generate($col_array); - - $this->load->view('smiley_view', $data); - } - -} -?> -</textarea> - -<p>In your <dfn>application/views/</dfn> folder, create a file called <kbd>smiley_view.php</kbd> and place this code in it:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="20"> -<html> -<head> -<title>Smileys</title> - -<?php echo smiley_js(); ?> - -</head> -<body> - -<form name="blog"> -<textarea name="comments" id="comments" cols="40" rows="4"></textarea> -</form> - -<p>Click to insert a smiley!</p> - -<?php echo $smiley_table; ?> - -</body> -</html> -</textarea> - - -<p>When you have created the above controller and view, load it by visiting <dfn>http://www.example.com/index.php/smileys/</dfn></p> - - -<h3>Field Aliases</h3> - -<p>When making changes to a view it can be inconvenient to have the field id in the controller. To work around this, -you can give your smiley links a generic name that will be tied to a specific id in your view.</p> -<code>$image_array = get_smiley_links("http://example.com/images/smileys/", "comment_textarea_alias");</code> - -<p>To map the alias to the field id, pass them both into the smiley_js function:</p> -<code>$image_array = smiley_js("comment_textarea_alias", "comments");</code> - - -<h1>Function Reference</h1> - -<h2>get_clickable_smileys()</h2> - -<p>Returns an array containing your smiley images wrapped in a clickable link. You must supply the URL to your smiley folder -and a field id or field alias.</p> - -<code>$image_array = get_smiley_links("http://example.com/images/smileys/", "comment");</code> -<p class="important">Note: Usage of this function without the second parameter, in combination with js_insert_smiley has been deprecated.</p> - - -<h2>smiley_js()</h2> - -<p>Generates the JavaScript that allows the images to be clicked and inserted into a form field. -If you supplied an alias instead of an id when generating your smiley links, you need to pass the -alias and corresponding form id into the function. -This function is designed to be placed into the <head> area of your web page.</p> - -<code><?php echo smiley_js(); ?></code> -<p class="important">Note: This function replaces js_insert_smiley, which has been deprecated.</p> - - -<h2>parse_smileys()</h2> - -<p>Takes a string of text as input and replaces any contained plain text smileys into the image -equivalent. The first parameter must contain your string, the second must contain the URL to your smiley folder:</p> - -<code> -$str = 'Here are some simileys: :-) ;-)'; - -$str = parse_smileys($str, "http://example.com/images/smileys/"); - -echo $str; -</code> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="security_helper.html">Security Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="string_helper.html">String Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html deleted file mode 100644 index d1097d79c..000000000 --- a/user_guide/helpers/string_helper.html +++ /dev/null @@ -1,189 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>String Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -String Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>String Helper</h1> - -<p>The String Helper file contains functions that assist in working with strings.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('string');</code> - -<p>The following functions are available:</p> - -<h2>random_string()</h2> - -<p>Generates a random string based on the type and length you specify. Useful for creating passwords or generating random hashes.</p> - -<p>The first parameter specifies the type of string, the second parameter specifies the length. The following choices are available:</p> - - alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1 -<ul> - <li><strong>alpha</strong>: A string with lower and uppercase letters only.</li> - <li><strong>alnum</strong>: Alpha-numeric string with lower and uppercase characters.</li> - <li><strong>numeric</strong>: Numeric string.</li> - <li><strong>nozero</strong>: Numeric string with no zeros.</li> - <li><strong>unique</strong>: Encrypted with MD5 and uniqid(). Note: The length parameter is not available for this type. - Returns a fixed length 32 character string.</li> - <li><strong>sha1</strong>: An encrypted random number based on <kbd>do_hash()</kbd> from the <a href="security_helper.html">security helper</a>.</li> -</ul> - -<p>Usage example:</p> - -<code>echo random_string('alnum', 16);</code> - - -<h2>increment_string()</h2> - -<p>Increments a string by appending a number to it or increasing the number. Useful for creating "copies" or a file or duplicating database content which has unique titles or slugs.</p> - -<p>Usage example:</p> - -<code>echo increment_string('file', '_'); // "file_1"<br/> -echo increment_string('file', '-', 2); // "file-2"<br/> -echo increment_string('file-4'); // "file-5"<br/></code> - - -<h2>alternator()</h2> - -<p>Allows two or more items to be alternated between, when cycling through a loop. Example:</p> - -<code>for ($i = 0; $i < 10; $i++)<br /> -{<br /> - echo alternator('string one', 'string two');<br /> -}<br /> -</code> - -<p>You can add as many parameters as you want, and with each iteration of your loop the next item will be returned.</p> - -<code>for ($i = 0; $i < 10; $i++)<br /> -{<br /> - echo alternator('one', 'two', 'three', 'four', 'five');<br /> -}<br /> -</code> - -<p><strong>Note:</strong> To use multiple separate calls to this function simply call the function with no arguments to re-initialize.</p> - - - -<h2>repeater()</h2> -<p>Generates repeating copies of the data you submit. Example:</p> -<code>$string = "\n";<br /> -echo repeater($string, 30);</code> - -<p>The above would generate 30 newlines.</p> -<h2>reduce_double_slashes()</h2> -<p>Converts double slashes in a string to a single slash, except those found in http://. Example: </p> -<code>$string = "http://example.com//index.php";<br /> -echo reduce_double_slashes($string); // results in "http://example.com/index.php"</code> -<h2>trim_slashes()</h2> -<p>Removes any leading/trailing slashes from a string. Example:<br /> - <br /> - <code>$string = "/this/that/theother/";<br /> -echo trim_slashes($string); // results in this/that/theother</code></p> - - -<h2>reduce_multiples()</h2> -<p>Reduces multiple instances of a particular character occuring directly after each other. Example:</p> -<code> -$string="Fred, Bill,, Joe, Jimmy";<br /> -$string=reduce_multiples($string,","); //results in "Fred, Bill, Joe, Jimmy" -</code> -<p>The function accepts the following parameters: -<code>reduce_multiples(string: text to search in, string: character to reduce, boolean: whether to remove the character from the front and end of the string)</code> - -The first parameter contains the string in which you want to reduce the multiplies. The second parameter contains the character you want to have reduced. -The third parameter is FALSE by default; if set to TRUE it will remove occurences of the character at the beginning and the end of the string. Example: - -<code> -$string=",Fred, Bill,, Joe, Jimmy,";<br /> -$string=reduce_multiples($string, ", ", TRUE); //results in "Fred, Bill, Joe, Jimmy" -</code> -</p> - -<h2>quotes_to_entities()</h2> -<p>Converts single and double quotes in a string to the corresponding HTML entities. Example:</p> -<code>$string="Joe's \"dinner\"";<br /> -$string=quotes_to_entities($string); //results in "Joe&#39;s &quot;dinner&quot;" -</code> - -<h2>strip_quotes()</h2> -<p>Removes single and double quotes from a string. Example:</p> -<code>$string="Joe's \"dinner\"";<br /> -$string=strip_quotes($string); //results in "Joes dinner" -</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="smiley_helper.html">Smiley Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="text_helper.html">Text Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html deleted file mode 100644 index cf2f07fdd..000000000 --- a/user_guide/helpers/text_helper.html +++ /dev/null @@ -1,211 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Text Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Text Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Text Helper</h1> - -<p>The Text Helper file contains functions that assist in working with text.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('text');</code> - -<p>The following functions are available:</p> - - -<h2>word_limiter()</h2> - -<p>Truncates a string to the number of <strong>words</strong> specified. Example:</p> - -<code> -$string = "Here is a nice text string consisting of eleven words.";<br /> -<br /> -$string = word_limiter($string, 4);<br /><br /> - -// Returns: Here is a nice… -</code> - -<p>The third parameter is an optional suffix added to the string. By default it adds an ellipsis.</p> - - -<h2>character_limiter()</h2> - -<p>Truncates a string to the number of <strong>characters</strong> specified. It maintains the integrity -of words so the character count may be slightly more or less then what you specify. Example:</p> - -<code> -$string = "Here is a nice text string consisting of eleven words.";<br /> -<br /> -$string = character_limiter($string, 20);<br /><br /> - -// Returns: Here is a nice text string… -</code> - -<p>The third parameter is an optional suffix added to the string, if undeclared this helper uses an ellipsis.</p> - - - -<h2>ascii_to_entities()</h2> - -<p>Converts ASCII values to character entities, including high ASCII and MS Word characters that can cause problems when used in a web page, -so that they can be shown consistently regardless of browser settings or stored reliably in a database. -There is some dependence on your server's supported character sets, so it may not be 100% reliable in all cases, but for the most -part it should correctly identify characters outside the normal range (like accented characters). Example:</p> - -<code>$string = ascii_to_entities($string);</code> - - -<h2>entities_to_ascii()</h2> - -<p>This function does the opposite of the previous one; it turns character entities back into ASCII.</p> - -<h2>convert_accented_characters()</h2> - -<p>Transliterates high ASCII characters to low ASCII equivalents, useful when non-English characters need to be used where only standard ASCII characters are safely used, for instance, in URLs.</p> - -<code>$string = convert_accented_characters($string);</code> - -<p>This function uses a companion config file <dfn>application/config/foreign_chars.php</dfn> to define the to and from array for transliteration.</p> - -<h2>word_censor()</h2> - -<p>Enables you to censor words within a text string. The first parameter will contain the original string. The -second will contain an array of words which you disallow. The third (optional) parameter can contain a replacement value -for the words. If not specified they are replaced with pound signs: ####. Example:</p> - -<code> -$disallowed = array('darn', 'shucks', 'golly', 'phooey');<br /> -<br /> -$string = word_censor($string, $disallowed, 'Beep!');</code> - - -<h2>highlight_code()</h2> - -<p>Colorizes a string of code (PHP, HTML, etc.). Example:</p> - -<code>$string = highlight_code($string);</code> - -<p>The function uses PHP's highlight_string() function, so the colors used are the ones specified in your php.ini file.</p> - - -<h2>highlight_phrase()</h2> - -<p>Will highlight a phrase within a text string. The first parameter will contain the original string, the second will -contain the phrase you wish to highlight. The third and fourth parameters will contain the opening/closing HTML tags -you would like the phrase wrapped in. Example:</p> - -<code> -$string = "Here is a nice text string about nothing in particular.";<br /> -<br /> -$string = highlight_phrase($string, "nice text", '<span style="color:#990000">', '</span>'); -</code> - -<p>The above text returns:</p> - -<p>Here is a <span style="color:#990000">nice text</span> string about nothing in particular.</p> - - - -<h2>word_wrap()</h2> - -<p>Wraps text at the specified <strong>character</strong> count while maintaining complete words. Example:</p> - -<code>$string = "Here is a simple string of text that will help us demonstrate this function.";<br /> -<br /> -echo word_wrap($string, 25);<br /> -<br /> -// Would produce:<br /> -<br /> -Here is a simple string<br /> -of text that will help<br /> -us demonstrate this<br /> -function</code> - -<h2>ellipsize()</h2> - -<p>This function will strip tags from a string, split it at a defined maximum length, and insert an ellipsis.</p> -<p>The first parameter is the string to ellipsize, the second is the number of characters in the final string. The third parameter is where in the string the ellipsis should appear from 0 - 1, left to right. For example. a value of 1 will place the ellipsis at the right of the string, .5 in the middle, and 0 at the left.</p> -<p>An optional forth parameter is the kind of ellipsis. By default, <samp>&hellip;</samp> will be inserted.</p> - -<code>$str = 'this_string_is_entirely_too_long_and_might_break_my_design.jpg';<br /> -<br /> -echo ellipsize($str, 32, .5);</code> - -Produces: - -<code>this_string_is_e…ak_my_design.jpg</code> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="string_helper.html">String Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="typography_helper.html">Typography Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/typography_helper.html b/user_guide/helpers/typography_helper.html deleted file mode 100644 index 08a22cddf..000000000 --- a/user_guide/helpers/typography_helper.html +++ /dev/null @@ -1,112 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Typography Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Typography Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Typography Helper</h1> - -<p>The Typography Helper file contains functions that help your format text in semantically relevant ways.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('typography');</code> - -<p>The following functions are available:</p> - - -<h2>auto_typography()</h2> - -<p>Formats text so that it is semantically and typographically correct HTML. Please see the <a href="../libraries/typography.html">Typography Class</a> for more info.</p> - -<p>Usage example:</p> - -<code>$string = auto_typography($string);</code> - -<p><strong>Note:</strong> Typographic formatting can be processor intensive, particularly if you have a lot of content being formatted. -If you choose to use this function you may want to consider -<a href="../general/caching.html">caching</a> your pages.</p> - - -<h2>nl2br_except_pre()</h2> - -<p>Converts newlines to <br /> tags unless they appear within <pre> tags. -This function is identical to the native PHP <dfn>nl2br()</dfn> function, except that it ignores <pre> tags.</p> - -<p>Usage example:</p> - -<code>$string = nl2br_except_pre($string);</code> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="text_helper.html">Text Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="url_helper.html">URL Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html deleted file mode 100644 index be81e6096..000000000 --- a/user_guide/helpers/url_helper.html +++ /dev/null @@ -1,302 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>URL Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -URL Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>URL Helper</h1> - -<p>The URL Helper file contains functions that assist in working with URLs.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('url');</code> - -<p>The following functions are available:</p> - -<h2>site_url()</h2> - -<p>Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your -site <dfn>index_page</dfn> in your config file) will be added to the URL, as will any URI segments you pass to the function, and the <dfn>url_suffix</dfn> as set in your config file.</p> - -<p>You are encouraged to use this function any time you need to generate a local URL so that your pages become more portable -in the event your URL changes.</p> - -<p>Segments can be optionally passed to the function as a string or an array. Here is a string example:</p> - -<code>echo site_url("news/local/123");</code> - -<p>The above example would return something like: http://example.com/index.php/news/local/123</p> - -<p>Here is an example of segments passed as an array:</p> - -<code> -$segments = array('news', 'local', '123');<br /> -<br /> -echo site_url($segments);</code> - - -<h2>base_url()</h2> -<p>Returns your site base URL, as specified in your config file. Example:</p> -<code>echo base_url();</code> - -<p>This function returns the same thing as site_url, without the <dfn>index_page</dfn> or <dfn>url_suffix</dfn> being appended.</p> - -<p>Also like site_url, you can supply segments as a string or an array. Here is a string example:</p> - -<code>echo base_url("blog/post/123");</code> - -<p>The above example would return something like: http://example.com/blog/post/123</p> - -<p>This is useful because unlike site_url(), you can supply a string to a file, such as an image or stylesheet. For example:</p> - -<code>echo base_url("images/icons/edit.png");</code> - -<p>This would give you something like: http://example.com/images/icons/edit.png</p> - - -<h2>current_url()</h2> -<p>Returns the full URL (including segments) of the page being currently viewed.</p> - - -<h2>uri_string()</h2> -<p>Returns the URI segments of any page that contains this function. For example, if your URL was this:</p> -<code>http://some-site.com/blog/comments/123</code> - -<p>The function would return:</p> -<code>/blog/comments/123</code> - - -<h2>index_page()</h2> -<p>Returns your site "index" page, as specified in your config file. Example:</p> -<code>echo index_page();</code> - - - -<h2>anchor()</h2> - -<p>Creates a standard HTML anchor link based on your local site URL:</p> - -<code><a href="http://example.com">Click Here</a></code> - -<p>The tag has three optional parameters:</p> - -<code>anchor(<var>uri segments</var>, <var>text</var>, <var>attributes</var>)</code> - -<p>The first parameter can contain any segments you wish appended to the URL. As with the <dfn>site_url()</dfn> function above, -segments can be a string or an array.</p> - -<p><strong>Note:</strong> If you are building links that are internal to your application do not include the base URL (http://...). This -will be added automatically from the information specified in your config file. Include only the URI segments you wish appended to the URL.</p> - -<p>The second segment is the text you would like the link to say. If you leave it blank, the URL will be used.</p> - -<p>The third parameter can contain a list of attributes you would like added to the link. The attributes can be a simple string or an associative array.</p> - -<p>Here are some examples:</p> - -<code>echo anchor('news/local/123', 'My News', 'title="News title"');</code> - -<p>Would produce: <a href="http://example.com/index.php/news/local/123" title="News title">My News</a></p> - -<code>echo anchor('news/local/123', 'My News', array('title' => 'The best news!'));</code> - -<p>Would produce: <a href="http://example.com/index.php/news/local/123" title="The best news!">My News</a></p> - - -<h2>anchor_popup()</h2> - -<p>Nearly identical to the <dfn>anchor()</dfn> function except that it opens the URL in a new window. - -You can specify JavaScript window attributes in the third parameter to control how the window is opened. If -the third parameter is not set it will simply open a new window with your own browser settings. Here is an example -with attributes:</p> - -<code> - -$atts = array(<br /> - 'width' => '800',<br /> - 'height' => '600',<br /> - 'scrollbars' => 'yes',<br /> - 'status' => 'yes',<br /> - 'resizable' => 'yes',<br /> - 'screenx' => '0',<br /> - 'screeny' => '0'<br /> - );<br /> -<br /> -echo anchor_popup('news/local/123', 'Click Me!', $atts);</code> - -<p>Note: The above attributes are the function defaults so you only need to set the ones that are different from what you need. -If you want the function to use all of its defaults simply pass an empty array in the third parameter:</p> - -<code>echo anchor_popup('news/local/123', 'Click Me!', array());</code> - - -<h2>mailto()</h2> - -<p>Creates a standard HTML email link. Usage example:</p> - -<code>echo mailto('me@my-site.com', 'Click Here to Contact Me');</code> - -<p>As with the <dfn>anchor()</dfn> tab above, you can set attributes using the third parameter.</p> - - -<h2>safe_mailto()</h2> - -<p>Identical to the above function except it writes an obfuscated version of the mailto tag using ordinal numbers -written with JavaScript to help prevent the email address from being harvested by spam bots.</p> - - -<h2>auto_link()</h2> - -<p>Automatically turns URLs and email addresses contained in a string into links. Example:</p> - -<code>$string = auto_link($string);</code> - -<p>The second parameter determines whether URLs and emails are converted or just one or the other. Default behavior is both -if the parameter is not specified. Email links are encoded as safe_mailto() as shown above.</p> - -<p>Converts only URLs:</p> -<code>$string = auto_link($string, 'url');</code> - -<p>Converts only Email addresses:</p> -<code>$string = auto_link($string, 'email');</code> - -<p>The third parameter determines whether links are shown in a new window. The value can be TRUE or FALSE (boolean):</p> -<code>$string = auto_link($string, 'both', TRUE);</code> - - -<h2>url_title()</h2> -<p>Takes a string as input and creates a human-friendly URL string. This is useful if, for example, you have a blog -in which you'd like to use the title of your entries in the URL. Example:</p> - -<code>$title = "What's wrong with CSS?";<br /> -<br /> -$url_title = url_title($title);<br /> -<br /> -// Produces: Whats-wrong-with-CSS -</code> - - -<p>The second parameter determines the word delimiter. By default dashes are used.</p> - -<code>$title = "What's wrong with CSS?";<br /> -<br /> -$url_title = url_title($title, '_');<br /> -<br /> -// Produces: Whats_wrong_with_CSS -</code> - -<p>The third parameter determines whether or not lowercase characters are forced. By default they are not. Options are boolean <dfn>TRUE</dfn>/<dfn>FALSE</dfn>:</p> - -<code>$title = "What's wrong with CSS?";<br /> -<br /> -$url_title = url_title($title, '_', TRUE);<br /> -<br /> -// Produces: whats_wrong_with_css -</code> - -<h3>prep_url()</h3> -<p>This function will add <kbd>http://</kbd> in the event that a scheme is missing from a URL. Pass the URL string to the function like this:</p> -<code> -$url = "example.com";<br /><br /> -$url = prep_url($url);</code> - - - - -<h2>redirect()</h2> - -<p>Does a "header redirect" to the URI specified. If you specify the full site URL that link will be build, but for local links simply providing the URI segments -to the controller you want to direct to will create the link. The function will build the URL based on your config file values.</p> - -<p>The optional second parameter allows you to choose between the "location" -method (default) or the "refresh" method. Location is faster, but on Windows servers it can sometimes be a problem. The optional third parameter allows you to send a specific HTTP Response Code - this could be used for example to create 301 redirects for search engine purposes. The default Response Code is 302. The third parameter is <em>only</em> available with 'location' redirects, and not 'refresh'. Examples:</p> - -<code>if ($logged_in == FALSE)<br /> -{<br /> - redirect('/login/form/', 'refresh');<br /> -}<br /> -<br /> -// with 301 redirect<br /> -redirect('/article/13', 'location', 301);</code> - -<p class="important"><strong>Note:</strong> In order for this function to work it must be used before anything is outputted -to the browser since it utilizes server headers.<br /> -<strong>Note:</strong> For very fine grained control over headers, you should use the <a href="../libraries/output.html">Output Library</a>'s set_header() function.</p> - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="typography_helper.html">Typography Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="xml_helper.html">XML Helper</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/helpers/xml_helper.html b/user_guide/helpers/xml_helper.html deleted file mode 100644 index 2c44471fe..000000000 --- a/user_guide/helpers/xml_helper.html +++ /dev/null @@ -1,105 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>XML Helper : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -XML Helper -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>XML Helper</h1> - -<p>The XML Helper file contains functions that assist in working with XML data.</p> - - -<h2>Loading this Helper</h2> - -<p>This helper is loaded using the following code:</p> -<code>$this->load->helper('xml');</code> - -<p>The following functions are available:</p> - -<h2>xml_convert('<var>string</var>')</h2> - -<p>Takes a string as input and converts the following reserved XML characters to entities:</p> - -<p> -Ampersands: &<br /> -Less then and greater than characters: < ><br /> -Single and double quotes: ' "<br /> -Dashes: -</p> - -<p>This function ignores ampersands if they are part of existing character entities. Example:</p> - -<code>$string = xml_convert($string);</code> - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="url_helper.html">URL Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/images/appflowchart.gif b/user_guide/images/appflowchart.gif Binary files differdeleted file mode 100644 index 4328e48fe..000000000 --- a/user_guide/images/appflowchart.gif +++ /dev/null diff --git a/user_guide/images/arrow.gif b/user_guide/images/arrow.gif Binary files differdeleted file mode 100644 index 9e9c79a79..000000000 --- a/user_guide/images/arrow.gif +++ /dev/null diff --git a/user_guide/images/ci_logo.jpg b/user_guide/images/ci_logo.jpg Binary files differdeleted file mode 100644 index 3ae0eee07..000000000 --- a/user_guide/images/ci_logo.jpg +++ /dev/null diff --git a/user_guide/images/ci_logo_flame.jpg b/user_guide/images/ci_logo_flame.jpg Binary files differdeleted file mode 100644 index 17e9c586b..000000000 --- a/user_guide/images/ci_logo_flame.jpg +++ /dev/null diff --git a/user_guide/images/ci_quick_ref.png b/user_guide/images/ci_quick_ref.png Binary files differdeleted file mode 100644 index c07d6b469..000000000 --- a/user_guide/images/ci_quick_ref.png +++ /dev/null diff --git a/user_guide/images/codeigniter_1.7.1_helper_reference.pdf b/user_guide/images/codeigniter_1.7.1_helper_reference.pdf Binary files differdeleted file mode 100644 index 85af7c83b..000000000 --- a/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +++ /dev/null diff --git a/user_guide/images/codeigniter_1.7.1_helper_reference.png b/user_guide/images/codeigniter_1.7.1_helper_reference.png Binary files differdeleted file mode 100644 index 15a7c1576..000000000 --- a/user_guide/images/codeigniter_1.7.1_helper_reference.png +++ /dev/null diff --git a/user_guide/images/codeigniter_1.7.1_library_reference.pdf b/user_guide/images/codeigniter_1.7.1_library_reference.pdf Binary files differdeleted file mode 100644 index 13cb36097..000000000 --- a/user_guide/images/codeigniter_1.7.1_library_reference.pdf +++ /dev/null diff --git a/user_guide/images/codeigniter_1.7.1_library_reference.png b/user_guide/images/codeigniter_1.7.1_library_reference.png Binary files differdeleted file mode 100644 index 7f054f95f..000000000 --- a/user_guide/images/codeigniter_1.7.1_library_reference.png +++ /dev/null diff --git a/user_guide/images/file.gif b/user_guide/images/file.gif Binary files differdeleted file mode 100644 index 8141e0357..000000000 --- a/user_guide/images/file.gif +++ /dev/null diff --git a/user_guide/images/folder.gif b/user_guide/images/folder.gif Binary files differdeleted file mode 100644 index fef31a60b..000000000 --- a/user_guide/images/folder.gif +++ /dev/null diff --git a/user_guide/images/nav_bg_darker.jpg b/user_guide/images/nav_bg_darker.jpg Binary files differdeleted file mode 100644 index 816efad6a..000000000 --- a/user_guide/images/nav_bg_darker.jpg +++ /dev/null diff --git a/user_guide/images/nav_separator_darker.jpg b/user_guide/images/nav_separator_darker.jpg Binary files differdeleted file mode 100644 index a09bd5a6a..000000000 --- a/user_guide/images/nav_separator_darker.jpg +++ /dev/null diff --git a/user_guide/images/nav_toggle_darker.jpg b/user_guide/images/nav_toggle_darker.jpg Binary files differdeleted file mode 100644 index eff33de4f..000000000 --- a/user_guide/images/nav_toggle_darker.jpg +++ /dev/null diff --git a/user_guide/images/reactor-bullet.png b/user_guide/images/reactor-bullet.png Binary files differdeleted file mode 100755 index 89c8129a4..000000000 --- a/user_guide/images/reactor-bullet.png +++ /dev/null diff --git a/user_guide/images/smile.gif b/user_guide/images/smile.gif Binary files differdeleted file mode 100644 index bf0922504..000000000 --- a/user_guide/images/smile.gif +++ /dev/null diff --git a/user_guide/images/transparent.gif b/user_guide/images/transparent.gif Binary files differdeleted file mode 100644 index b7406476a..000000000 --- a/user_guide/images/transparent.gif +++ /dev/null diff --git a/user_guide/index.html b/user_guide/index.html deleted file mode 100644 index 68c8e0c1d..000000000 --- a/user_guide/index.html +++ /dev/null @@ -1,98 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Welcome to CodeIgniter : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='userguide.css' /> - -<script type="text/javascript" src="nav/nav.js"></script> -<script type="text/javascript" src="nav/prototype.lite.js"></script> -<script type="text/javascript" src="nav/moo.fx.js"></script> -<script type="text/javascript" src="nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('null');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › CodeIgniter User Guide -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> - - - -<br clear="all" /> - -<div class="center"><img src="images/ci_logo_flame.jpg" width="150" height="164" border="0" alt="CodeIgniter" /></div> - - -<!-- START CONTENT --> -<div id="content"> - - - -<h2>Welcome to CodeIgniter</h2> - -<p>CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. -Its goal is to enable you to develop projects much faster than you could if you were writing code -from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and -logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by -minimizing the amount of code needed for a given task.</p> - - -<h2>Who is CodeIgniter For?</h2> - -<p>CodeIgniter is right for you if:</p> - -<ul> -<li>You want a framework with a small footprint.</li> -<li>You need exceptional performance.</li> -<li>You need broad compatibility with standard hosting accounts that run a variety of PHP versions and configurations.</li> -<li>You want a framework that requires nearly zero configuration.</li> -<li>You want a framework that does not require you to use the command line.</li> -<li>You want a framework that does not require you to adhere to restrictive coding rules.</li> -<li>You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).</li> -<li>You eschew complexity, favoring simple solutions.</li> -<li>You need clear, thorough documentation.</li> -</ul> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p><a href="#top">Top of Page</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - - - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html deleted file mode 100644 index bb6b9b681..000000000 --- a/user_guide/installation/downloads.html +++ /dev/null @@ -1,121 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Downloading CodeIgniter : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Downloading CodeIgniter -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Downloading CodeIgniter</h1> - -<ul> - <li><a href="http://ellislab.com/codeigniter/download">CodeIgniter V 2.2.0 (Current version)</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.1.4.zip">CodeIgniter V 2.1.4</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.1.3.zip">CodeIgniter V 2.1.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.1.2.zip">CodeIgniter V 2.1.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.1.1.zip">CodeIgniter V 2.1.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.1.0.zip">CodeIgniter V 2.1.0</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.0.3.zip">CodeIgniter V 2.0.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.0.2.zip">CodeIgniter V 2.0.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.0.1.zip">CodeIgniter V 2.0.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_2.0.0.zip">CodeIgniter V 2.0.0</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.7.3.zip">CodeIgniter V 1.7.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.7.2.zip">CodeIgniter V 1.7.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.7.1.zip">CodeIgniter V 1.7.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.7.0.zip">CodeIgniter V 1.7.0</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.6.3.zip">CodeIgniter V 1.6.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.6.2.zip">CodeIgniter V 1.6.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.6.1.zip">CodeIgniter V 1.6.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.6.0.zip">CodeIgniter V 1.6.0</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.5.4.zip">CodeIgniter V 1.5.4</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.5.3.zip">CodeIgniter V 1.5.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.5.2.zip">CodeIgniter V 1.5.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.5.1.zip">CodeIgniter V 1.5.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.4.1.zip">CodeIgniter V 1.4.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.3.3.zip">CodeIgniter V 1.3.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.3.2.zip">CodeIgniter V 1.3.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.3.1.zip">CodeIgniter V 1.3.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.3.zip">CodeIgniter V 1.3</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.2.zip">CodeIgniter V 1.2</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.1b.zip">CodeIgniter V 1.1</a></li> - <li><a href="http://ellislab.com/asset/ci_download_files/CodeIgniter_1.0b.zip">CodeIgniter V 1.0</a></li> -</ul> - - - - -<h1 id="git">Git Server</h1> -<p><a href="http://git-scm.com/about">Git</a> is a distributed version control system.</p> - -<p>Public Git access is available at <a href="https://github.com/EllisLab/CodeIgniter">GitHub</a>. - Please note that while every effort is made to keep this code base functional, we cannot guarantee the functionality of code taken - from the tip.</p> - -<p>Beginning with version 2.0.3, stable tags are also available via GitHub, simply select the version from the Tags dropdown.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../general/credits.html">Credits</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../installation/index.html">Installation Instructions</a> -</p> -<p><a href="http://codeigniter.com/">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/index.html b/user_guide/installation/index.html deleted file mode 100644 index f53a24cfe..000000000 --- a/user_guide/installation/index.html +++ /dev/null @@ -1,108 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Installation Instructions : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Installation Instructions -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Installation Instructions</h1> - -<p>CodeIgniter is installed in four steps:</p> - -<ol> -<li>Unzip the package.</li> -<li>Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.</li> -<li>Open the <dfn>application/config/config.php</dfn> file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key.</li> -<li>If you intend to use a database, open the <dfn>application/config/database.php</dfn> file with a text editor and set your database settings.</li> -</ol> - -<p>If you wish to increase security by hiding the location of your CodeIgniter files you can rename the <dfn>system</dfn> and <dfn>application</dfn> folders -to something more private. If you do rename them, you must open your main <kbd>index.php</kbd> file and set the <samp>$system_folder</samp> and <samp>$application_folder</samp> -variables at the top of the file with the new name you've chosen.</p> - -<p>For the best security, both the <dfn>system</dfn> and any <dfn>application</dfn> folders should be placed above web root so that they are not directly accessible via a browser. By default, .htaccess files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn't abide by the .htaccess.</p> - -<p>After moving them, open your main <kdb>index.php</kbd> file and set the <samp>$system_folder</samp> and <samp>$application_folder</samp> variables, preferably with a full path, e.g. '<dfn>/www/MyUser/system</dfn>'.</p> - -<p> - One additional measure to take in production environments is to disable - PHP error reporting and any other development-only functionality. In CodeIgniter, - this can be done by setting the <kbd>ENVIRONMENT</kbd> constant, which is - more fully described on the <a href="../general/security.html">security page</a>. -</p> - -<p>That's it!</p> - -<p>If you're new to CodeIgniter, please read the <a href="../overview/getting_started.html">Getting Started</a> section of the User Guide to begin learning how -to build dynamic PHP applications. Enjoy!</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../general/credits.html">Credits</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="upgrading.html">Upgrading from a Previous Version</a> -</p> - -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/troubleshooting.html b/user_guide/installation/troubleshooting.html deleted file mode 100644 index 49ebdcff5..000000000 --- a/user_guide/installation/troubleshooting.html +++ /dev/null @@ -1,90 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Troubleshooting : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Trouble Shooting -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Troubleshooting</h1> - -<p>If you find that no matter what you put in your URL only your default page is loading, it might be that your server -does not support the PATH_INFO variable needed to serve search-engine friendly URLs. - -As a first step, open your <dfn>application/config/config.php</dfn> file and look for the <kbd>URI Protocol</kbd> -information. It will recommend that you try a couple alternate settings. If it still doesn't work after you've tried this you'll need -to force CodeIgniter to add a question mark to your URLs. To do this open your <kbd>application/config/config.php</kbd> file and change this:</p> - -<code>$config['index_page'] = "index.php";</code> - -<p>To this:</p> - -<code>$config['index_page'] = "index.php?";</code> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="upgrading.html">Upgrading from a Previous Version</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../overview/at_a_glance.html">CodeIgniter at a Glance</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_120.html b/user_guide/installation/upgrade_120.html deleted file mode 100644 index 2806d5146..000000000 --- a/user_guide/installation/upgrade_120.html +++ /dev/null @@ -1,92 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from Beta 1.1 to Final 1.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading From Beta 1.0 to Final 1.2</h1> - -<p>To upgrade to Version 1.2 please replace the following directories with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>drivers</li> -<li>helpers</li> -<li>init</li> -<li>language</li> -<li>libraries</li> -<li>plugins</li> -<li>scaffolding</li> -</ul> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_130.html b/user_guide/installation/upgrade_130.html deleted file mode 100644 index 6495daebb..000000000 --- a/user_guide/installation/upgrade_130.html +++ /dev/null @@ -1,203 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.2 to 1.3 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.2 to 1.3</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.2. If you -have not upgraded to that version please do so first.</p> - - -<p>Before performing an update you should take your site offline by replacing the index.php file -with a static one.</p> - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace the following directories in your "system" folder with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>application/<strong>models</strong>/ (new for 1.3)</li> -<li>codeigniter (new for 1.3)</li> -<li>drivers</li> -<li>helpers</li> -<li>init</li> -<li>language</li> -<li>libraries</li> -<li>plugins</li> -<li>scaffolding</li> -</ul> - - -<h2>Step 2: Update your error files</h2> - -<p>Version 1.3 contains two new error templates located in <dfn>application/errors</dfn>, and for naming consistency the other error templates have -been renamed.</p> - -<p>If you <strong>have not</strong> customized any of the error templates simply -replace this folder:</p> - -<ul> -<li>application/errors/</li> -</ul> - -<p>If you <strong>have</strong> customized your error templates, rename them as follows:</p> - - -<ul> -<li>404.php = error_404.php</li> -<li>error.php = error_general.php</li> -<li>error_db.php (new)</li> -<li>error_php.php (new)</li> -</ul> - - -<h2>Step 3: Update your index.php file</h2> - -<p>Please open your main <dfn>index.php</dfn> file (located at your root). At the very bottom of the file, change this:</p> - -<code>require_once BASEPATH.'libraries/Front_controller'.EXT;</code> - -<p>To this:</p> - -<code>require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;</code> - - -<h2>Step 4: Update your config.php file</h2> - -<p>Open your <dfn>application/config/config.php</dfn> file and add these new items:</p> - -<pre> -/* -|------------------------------------------------ -| URL suffix -|------------------------------------------------ -| -| This option allows you to add a suffix to all URLs. -| For example, if a URL is this: -| -| example.com/index.php/products/view/shoes -| -| You can optionally add a suffix, like ".html", -| making the page appear to be of a certain type: -| -| example.com/index.php/products/view/shoes.html -| -*/ -$config['url_suffix'] = ""; - - -/* -|------------------------------------------------ -| Enable Query Strings -|------------------------------------------------ -| -| By default CodeIgniter uses search-engine and -| human-friendly segment based URLs: -| -| example.com/who/what/where/ -| -| You can optionally enable standard query string -| based URLs: -| -| example.com?who=me&what=something&where=here -| -| Options are: TRUE or FALSE (boolean) -| -| The two other items let you set the query string "words" -| that will invoke your controllers and functions: -| example.com/index.php?c=controller&m=function -| -*/ -$config['enable_query_strings'] = FALSE; -$config['controller_trigger'] = 'c'; -$config['function_trigger'] = 'm'; -</pre> - - -<h2>Step 5: Update your database.php file</h2> - -<p>Open your <dfn>application/config/database.php</dfn> file and add these new items:</p> - -<pre> -$db['default']['dbprefix'] = ""; -$db['default']['active_r'] = TRUE; -</pre> - - -<h2>Step 6: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_131.html b/user_guide/installation/upgrade_131.html deleted file mode 100644 index ad0388dbe..000000000 --- a/user_guide/installation/upgrade_131.html +++ /dev/null @@ -1,102 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.3 to 1.3.1 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.3 to 1.3.1</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.3. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace the following directories in your "system" folder with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>drivers</li> -<li>init/init_unit_test.php (new for 1.3.1)</li> -<li>language/</li> -<li>libraries</li> -<li>scaffolding</li> -</ul> - - -<h2>Step 2: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_132.html b/user_guide/installation/upgrade_132.html deleted file mode 100644 index 348b2e535..000000000 --- a/user_guide/installation/upgrade_132.html +++ /dev/null @@ -1,100 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.3.1 to 1.3.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.3.1 to 1.3.2</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.3.1. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace the following directories in your "system" folder with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>drivers</li> -<li>init</li> -<li>libraries</li> -</ul> - - -<h2>Step 2: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_133.html b/user_guide/installation/upgrade_133.html deleted file mode 100644 index f38b0d94c..000000000 --- a/user_guide/installation/upgrade_133.html +++ /dev/null @@ -1,112 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.3.2 to 1.3.3 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.3.2 to 1.3.3</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.3.2. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace the following directories in your "system" folder with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>codeigniter</li> -<li>drivers</li> -<li>helpers</li> -<li>init</li> -<li>libraries</li> -</ul> - - -<h2>Step 2: Update your Models</h2> - -<p>If you are <strong>NOT</strong> using CodeIgniter's <a href="../general/models.html">Models</a> feature disregard this step.</p> - -<p>As of version 1.3.3, CodeIgniter does <strong>not</strong> connect automatically to your database when a model is loaded. This -allows you greater flexibility in determining which databases you would like used with your models. If your application is not connecting -to your database prior to a model being loaded you will have to update your code. There are several options for connecting, -<a href="../general/models.html">as described here</a>.</p> - - -<h2>Step 3: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_140.html b/user_guide/installation/upgrade_140.html deleted file mode 100644 index 9f3b82a7e..000000000 --- a/user_guide/installation/upgrade_140.html +++ /dev/null @@ -1,145 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.3.3 to 1.4.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.3.3 to 1.4.0</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.3.3. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace the following directories in your "system" folder with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>application/config/<strong>hooks.php</strong></li> -<li>application/config/<strong>mimes.php</strong></li> -<li>codeigniter</li> -<li>drivers</li> -<li>helpers</li> -<li>init</li> -<li>language</li> -<li>libraries</li> -<li>scaffolding</li> -</ul> - - -<h2>Step 2: Update your config.php file</h2> - -<p>Open your <dfn>application/config/config.php</dfn> file and add these new items:</p> - -<pre> - -/* -|-------------------------------------------------------------------------- -| Enable/Disable System Hooks -|-------------------------------------------------------------------------- -| -| If you would like to use the "hooks" feature you must enable it by -| setting this variable to TRUE (boolean). See the user guide for details. -| -*/ -$config['enable_hooks'] = FALSE; - - -/* -|-------------------------------------------------------------------------- -| Allowed URL Characters -|-------------------------------------------------------------------------- -| -| This lets you specify which characters are permitted within your URLs. -| When someone tries to submit a URL with disallowed characters they will -| get a warning message. -| -| As a security measure you are STRONGLY encouraged to restrict URLs to -| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_- -| -| Leave blank to allow all characters -- but only if you are insane. -| -| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! -| -*/ -$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-'; -</pre> - - -<h2>Step 3: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_141.html b/user_guide/installation/upgrade_141.html deleted file mode 100644 index 74db82f58..000000000 --- a/user_guide/installation/upgrade_141.html +++ /dev/null @@ -1,148 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.4.0 to 1.4.1 </td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.4.0 to 1.4.1</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.4.0. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace the following directories in your "system" folder with the new versions:</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<ul> -<li>codeigniter</li> -<li>drivers</li> -<li>helpers</li> -<li>libraries</li> -</ul> - - -<h2>Step 2: Update your config.php file</h2> - -<p>Open your <dfn>application/config/config.php</dfn> file and add this new item:</p> - -<pre> - -/* -|-------------------------------------------------------------------------- -| Output Compression -|-------------------------------------------------------------------------- -| -| Enables Gzip output compression for faster page loads. When enabled, -| the output class will test whether your server supports Gzip. -| Even if it does, however, not all browsers support compression -| so enable only if you are reasonably sure your visitors can handle it. -| -| VERY IMPORTANT: If you are getting a blank page when compression is enabled it -| means you are prematurely outputting something to your browser. It could -| even be a line of whitespace at the end of one of your scripts. For -| compression to work, nothing can be sent before the output buffer is called -| by the output class. Do not "echo" any values with compression enabled. -| -*/ -$config['compress_output'] = FALSE; - -</pre> - - - -<h2>Step 3: Rename an Autoload Item</h2> - -<p>Open the following file: <dfn>application/config/autoload.php</dfn></p> - -<p>Find this array item:</p> - -<code>$autoload['core'] = array();</code> - -<p>And rename it to this:</p> - -<code>$autoload['libraries'] = array();</code> - -<p>This change was made to improve clarity since some users were not sure that their own libraries could be auto-loaded.</p> - - - - - - -<h2>Step 4: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html deleted file mode 100644 index 42932eade..000000000 --- a/user_guide/installation/upgrade_150.html +++ /dev/null @@ -1,178 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.4.1 to 1.5.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.4.1 to 1.5.0</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.4.1. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>application/config/user_agents.php</dfn> (new file for 1.5)</li> -<li><dfn>application/config/smileys.php</dfn> (new file for 1.5)</li> -<li><dfn>codeigniter/</dfn></li> -<li><dfn>database/</dfn> (new folder for 1.5. Replaces the "drivers" folder)</li> -<li><dfn>helpers/</dfn></li> -<li><dfn>language/</dfn></li> -<li><dfn>libraries/</dfn></li> -<li><dfn>scaffolding/</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Update your database.php file</h2> - -<p>Open your <dfn>application/config/database.php</dfn> file and add these new items:</p> - -<pre> -$db['default']['cache_on'] = FALSE; -$db['default']['cachedir'] = ''; -</pre> - - - -<h2>Step 3: Update your config.php file</h2> - -<p>Open your <dfn>application/config/config.php</dfn> file and <kbd>ADD</kbd> these new items:</p> - -<pre> -/* -|-------------------------------------------------------------------------- -| Class Extension Prefix -|-------------------------------------------------------------------------- -| -| This item allows you to set the filename/classname prefix when extending -| native libraries. For more information please see the user guide: -| -| http://codeigniter.com/user_guide/general/core_classes.html -| http://codeigniter.com/user_guide/general/creating_libraries.html -| -*/ -$config['subclass_prefix'] = 'MY_'; - -/* -|-------------------------------------------------------------------------- -| Rewrite PHP Short Tags -|-------------------------------------------------------------------------- -| -| If your PHP installation does not have short tag support enabled CI -| can rewrite the tags on-the-fly, enabling you to utilize that syntax -| in your view files. Options are TRUE or FALSE (boolean) -| -*/ -$config['rewrite_short_tags'] = FALSE; -</pre> - -<p>In that same file <kbd>REMOVE</kbd> this item:</p> - - -<pre> -/* -|-------------------------------------------------------------------------- -| Enable/Disable Error Logging -|-------------------------------------------------------------------------- -| -| If you would like errors or debug messages logged set this variable to -| TRUE (boolean). Note: You must set the file permissions on the "logs" folder -| such that it is writable. -| -*/ -$config['log_errors'] = FALSE; -</pre> - -<p>Error logging is now disabled simply by setting the threshold to zero.</p> - - - -<h2>Step 4: Update your main index.php file</h2> - -<p>If you are running a stock <dfn>index.php</dfn> file simply replace your version with the new one.</p> - -<p>If your <dfn>index.php</dfn> file has internal modifications, please add your modifications to the new file and use it.</p> - - - -<h2>Step 5: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_152.html b/user_guide/installation/upgrade_152.html deleted file mode 100644 index f848c9d82..000000000 --- a/user_guide/installation/upgrade_152.html +++ /dev/null @@ -1,111 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.5.0 to 1.5.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.5.0 to 1.5.2</h1> - -<p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.5.0 or 1.5.1. If you -have not upgraded to that version please do so first.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/helpers/download_helper.php</dfn></li> -<li><dfn>system/helpers/form_helper.php</dfn></li> -<li><dfn>system/libraries/Table.php</dfn></li> -<li><dfn>system/libraries/User_agent.php</dfn></li> -<li><dfn>system/libraries/Exceptions.php</dfn></li> -<li><dfn>system/libraries/Input.php</dfn></li> -<li><dfn>system/libraries/Router.php</dfn></li> -<li><dfn>system/libraries/Loader.php</dfn></li> -<li><dfn>system/libraries/Image_lib.php</dfn></li> -<li><dfn>system/language/english/unit_test_lang.php</dfn></li> -<li><dfn>system/database/DB_active_rec.php</dfn></li> -<li><dfn> system/database/drivers/mysqli/mysqli_driver.php</dfn></li> -<li><dfn>codeigniter/</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_153.html b/user_guide/installation/upgrade_153.html deleted file mode 100644 index 5ea7de6ea..000000000 --- a/user_guide/installation/upgrade_153.html +++ /dev/null @@ -1,100 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › Upgrading from 1.5.2 to 1.5.3 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.5.2 to 1.5.3</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/database/drivers</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/libraries/Input.php</dfn></li> -<li><dfn>system/libraries/Loader.php</dfn></li> -<li><dfn>system/libraries/Profiler.php</dfn></li> -<li><dfn>system/libraries/Table.php</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Update your user guide</h2> - -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_154.html b/user_guide/installation/upgrade_154.html deleted file mode 100644 index a39384efd..000000000 --- a/user_guide/installation/upgrade_154.html +++ /dev/null @@ -1,116 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.5.3 to 1.5.4 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.5.3 to 1.5.4 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.5.3 to 1.5.4</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>application/config/mimes.php</dfn></li> -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/libraries</dfn></li> -<li><dfn>system/plugins</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Add charset to your config.php </h2> -<p>Add the following to application/config/config.php</p> -<code>/*<br /> - |--------------------------------------------------------------------------<br /> - | Default Character Set<br /> - |--------------------------------------------------------------------------<br /> - |<br /> - | This determines which character set is used by default in various methods<br /> - | that require a character set to be provided.<br /> - |<br /> - */<br /> - $config['charset'] = "UTF-8";</code> - -<h2>Step 3: Autoloading language files </h2> -<p>If you want to autoload any language files, add this line to application/config/autoload.php</p> -<code>$autoload['language'] = array();</code> - -<h2>Step 4: Update your user guide</h2> -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_160.html b/user_guide/installation/upgrade_160.html deleted file mode 100644 index 9aab9cc7a..000000000 --- a/user_guide/installation/upgrade_160.html +++ /dev/null @@ -1,125 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.5.4 to 1.6.0 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.5.4 to 1.6.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.5.4 to 1.6.0</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/libraries</dfn></li> -<li><dfn>system/plugins</dfn></li> -<li><dfn>system/language</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Add time_to_update to your config.php </h2> -<p>Add the following to application/config/config.php with the other session configuration options</p> -<p><code>$config['sess_time_to_update'] = 300;</code></p> -<h2>Step 3: Add $autoload['model']</h2> -<p>Add the following to application/config/autoload.php</p> -<p><code> /*<br /> - | -------------------------------------------------------------------<br /> - | Auto-load Model files<br /> - | -------------------------------------------------------------------<br /> - | Prototype:<br /> - |<br /> - | $autoload['model'] = array('my_model');<br /> - |<br /> - */<br /> - <br /> - $autoload['model'] = array();</code></p> -<h2>Step 4: Add to your database.php </h2> -<p>Make the following changes to your application/config/database.php file:</p> -<p>Add the following variable above the database configuration options, with <dfn>$active_group</dfn></p> -<p><code>$active_record = TRUE;</code></p> -<p>Remove the following from your database configuration options</p> -<p><code>$db['default']['active_r'] = TRUE;</code></p> -<p>Add the following to your database configuration options</p> -<p><code>$db['default']['char_set'] = "utf8";<br /> -$db['default']['dbcollat'] = "utf8_general_ci";</code></p> - -<h2>Step 5: Update your user guide</h2> -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_161.html b/user_guide/installation/upgrade_161.html deleted file mode 100644 index c6defba16..000000000 --- a/user_guide/installation/upgrade_161.html +++ /dev/null @@ -1,98 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.6.0 to 1.6.1 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.6.0 to 1.6.1 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.6.0 to 1.6.1</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/language</dfn></li> -<li><dfn>system/libraries</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Update your user guide</h2> -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_162.html b/user_guide/installation/upgrade_162.html deleted file mode 100644 index 8024bf57c..000000000 --- a/user_guide/installation/upgrade_162.html +++ /dev/null @@ -1,106 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.6.1 to 1.6.2 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.6.1 to 1.6.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.6.1 to 1.6.2</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/language</dfn></li> -<li><dfn>system/libraries</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Encryption Key</h2> -<p>If you are using sessions, open up application/config/config.php and verify you've set an encryption key.</p> - -<h2>Step 3: Constants File</h2> -<p>Copy /application/config/constants.php to your installation, and modify if necessary.</p> -<h2>Step 4: Mimes File</h2> -<p>Replace /application/config/mimes.php with the dowloaded version. If you've added custom mime types, you'll need to re-add them.</p> -<h2>Step 5: Update your user guide</h2> -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_163.html b/user_guide/installation/upgrade_163.html deleted file mode 100644 index 3c9634675..000000000 --- a/user_guide/installation/upgrade_163.html +++ /dev/null @@ -1,99 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.6.2 to 1.6.3 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.6.2 to 1.6.3 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.6.2 to 1.6.3</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/language</dfn></li> -<li><dfn>system/libraries</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Update your user guide</h2> -<p>Please also replace your local copy of the user guide with the new version.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_170.html b/user_guide/installation/upgrade_170.html deleted file mode 100644 index 5f3c5a318..000000000 --- a/user_guide/installation/upgrade_170.html +++ /dev/null @@ -1,121 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.6.3 to 1.7.0 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.6.3 to 1.7.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.6.3 to 1.7.0</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/language</dfn></li> -<li><dfn>system/libraries</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Update your Session Table</h2> - -<p>If you are using the Session class in your application, AND if you are storing session data to a database, you must add a new column named <dfn>user_data</dfn> to your session table. -Here is an example of what this column might look like for MySQL:</p> - -<code>user_data text NOT NULL</code> - -<p>To add this column you will run a query similar to this:</p> - -<code>ALTER TABLE `ci_sessions` ADD `user_data` text NOT NULL</code> - -<p>You'll find more information regarding the new Session functionality in the <a href="../libraries/sessions.html">Session class</a> page.</p> - - -<h2>Step 3: Update your Validation Syntax</h2> - -<p>This is an <strong>optional</strong>, but recommended step, for people currently using the Validation class. CI 1.7 introduces a new <a href="../libraries/form_validation.html">Form Validation class</a>, which -deprecates the old Validation library. We have left the old one in place so that existing applications that use it will not break, but you are encouraged to -migrate to the new version as soon as possible. Please read the user guide carefully as the new library works a little differently, and has several new features.</p> - - - -<h2>Step 4: Update your user guide</h2> -<p>Please replace your local copy of the user guide with the new version, including the image files.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_171.html b/user_guide/installation/upgrade_171.html deleted file mode 100644 index 1687a690e..000000000 --- a/user_guide/installation/upgrade_171.html +++ /dev/null @@ -1,98 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.7.0 to 1.7.1 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.7.0 to 1.7.1 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.7.0 to 1.7.1</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/language</dfn></li> -<li><dfn>system/libraries</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Update your user guide</h2> -<p>Please replace your local copy of the user guide with the new version, including the image files.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_172.html b/user_guide/installation/upgrade_172.html deleted file mode 100644 index 048dc2215..000000000 --- a/user_guide/installation/upgrade_172.html +++ /dev/null @@ -1,109 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.7.1 to 1.7.2 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.7.1 to 1.7.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.7.1 to 1.7.2</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace these files and directories in your "system" folder with the new versions:</p> - -<ul> - -<li><dfn>system/codeigniter</dfn></li> -<li><dfn>system/database</dfn></li> -<li><dfn>system/helpers</dfn></li> -<li><dfn>system/language</dfn></li> -<li><dfn>system/libraries</dfn></li> -<li><dfn>index.php</dfn></li> -</ul> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Remove header() from 404 error template</h2> -<p>If you are using header() in your 404 error template, such as the case with the default <samp>error_404.php</samp> template shown below, remove that line of code.</p> - -<code><?php header("HTTP/1.1 404 Not Found"); ?></code> - -<p>404 status headers are now properly handled in the show_404() method itself.</p> - -<h2>Step 3: Confirm your system_path</h2> -<p>In your updated index.php file, confirm that the <dfn>$system_path</dfn> variable is set to your application's system folder.</p> - -<h2>Step 4: Update your user guide</h2> -<p>Please replace your local copy of the user guide with the new version, including the image files.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_200.html b/user_guide/installation/upgrade_200.html deleted file mode 100644 index a17a1a2d2..000000000 --- a/user_guide/installation/upgrade_200.html +++ /dev/null @@ -1,131 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 1.7.2 to 2.0.0 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 1.7.2 to 2.0.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 1.7.2 to 2.0.0</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder <strong>except</strong> your <kbd>application</kbd> folder.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Adjust get_dir_file_info() where necessary</h2> - -<p>Version 2.0.0 brings a non-backwards compatible change to <kbd>get_dir_file_info()</kbd> in the <a href="../helpers/file_helper.html">File Helper</a>. Non-backwards compatible changes are extremely rare - in CodeIgniter, but this one we feel was warranted due to how easy it was to create serious server performance issues. If you <em>need</em> - recursiveness where you are using this helper function, change such instances, setting the second parameter, <kbd>$top_level_only</kbd> to FALSE:</p> - -<code>get_dir_file_info('/path/to/directory', <kbd>FALSE</kbd>);</code> - -</p> - -<h2>Step 3: Convert your Plugins to Helpers</h2> - -<p>2.0.0 gets rid of the "Plugin" system as their functionality was identical to Helpers, but non-extensible. You will need to rename your plugin files from <var>filename_pi.php</var> to <var>filename_helper.php</var>, move them to your <kbd>helpers</kbd> folder, and change all instances of: - - <code>$this->load->plugin('foo');</code> - -to - - <code>$this->load->helper('foo');</code> - -</p> - -<h2>Step 4: Update stored encrypted data</h2> - -<p class="important"><strong>Note:</strong> If your application does not use the Encryption library, does not store Encrypted data permanently, or is on an environment that does not support Mcrypt, you may skip this step.</p> - -<p>The Encryption library has had a number of improvements, some for encryption strength and some for performance, that has an unavoidable consequence of - making it no longer possible to decode encrypted data produced by the original version of this library. To help with the transition, a new method has - been added, <kbd>encode_from_legacy()</kbd> that will decode the data with the original algorithm and return a re-encoded string using the improved methods. - This will enable you to easily replace stale encrypted data with fresh in your applications, either on the fly or en masse.</p> - -<p>Please read <a href="../libraries/encryption.html#legacy">how to use this method</a> in the Encryption library documentation.</p> - -<h2>Step 5: Remove loading calls for the compatibility helper.</h2> -<p>The compatibility helper has been removed from the CodeIgniter core. All methods in it should be natively available in supported PHP versions.</p> - -<h2>Step 6: Update Class extension</h2> -<p>All core classes are now prefixed with <kbd>CI_</kbd>. Update Models and Controllers to extend CI_Model and CI_Controller, respectively.</p> - -<h2>Step 7: Update Parent Constructor calls</h2> -<p>All native CodeIgniter classes now use the PHP 5 <kbd>__construct()</kbd> convention. Please update extended libraries to call <kbd>parent::__construct()</kbd>.</p> - -<h2>Step 8: Update your user guide</h2> -<p>Please replace your local copy of the user guide with the new version, including the image files.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_201.html b/user_guide/installation/upgrade_201.html deleted file mode 100644 index 654e0cd9b..000000000 --- a/user_guide/installation/upgrade_201.html +++ /dev/null @@ -1,105 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.0.0 to 2.0.1 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.0.0 to 2.0.1 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.0.0 to 2.0.1</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Replace config/mimes.php</h2> - -<p>This config file has been updated to contain more mime types, please copy it to <kbd>application/config/mimes.php</kbd>.</p> - - -<h2>Step 3: Check for forms posting to default controller</h2> - -<p> - The default behavior for <kbd>form_open()</kbd> when called with no parameters used to be to post to the default controller, but it will now just leave an empty action="" meaning the form will submit to the current URL. - If submitting to the default controller was the expected behavior it will need to be changed from: -</p> - -<code>echo form_open(); //<form action="" method="post" accept-charset="utf-8"></code> - -<p>to use either a / or <kbd>base_url()</kbd>:</p> - -<code>echo form_open('/'); //<form action="http://example.com/index.php/" method="post" accept-charset="utf-8"><br/> -echo form_open(base_url()); //<form action="http://example.com/" method="post" accept-charset="utf-8"></code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_202.html b/user_guide/installation/upgrade_202.html deleted file mode 100644 index 7917f6854..000000000 --- a/user_guide/installation/upgrade_202.html +++ /dev/null @@ -1,97 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.0.1 to 2.0.2 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.0.1 to 2.0.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.0.1 to 2.0.2</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - - -<h2>Step 2: Remove loading calls for the Security Library</h2> - -<p>Security has been moved to the core and is now always loaded automatically. Make sure you remove any loading calls as they will result in PHP errors.</p> - - -<h2>Step 3: Move MY_Security</h2> - -<p>If you are overriding or extending the Security library, you will need to move it to <kbd>application/core</kbd>.</p> - -<p><samp>csrf_token_name</samp> and <samp>csrf_hash</samp> have changed to protected class properties. Please use <samp>security->get_csrf_hash()</samp> and <samp>security->get_csrf_token_name()</samp> to access those values.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html deleted file mode 100644 index 079d16e6f..000000000 --- a/user_guide/installation/upgrade_203.html +++ /dev/null @@ -1,121 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.0.2 to 2.0.3 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.0.2 to 2.0.3 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.0.2 to 2.0.3</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Update your main index.php file</h2> - -<p>If you are running a stock <dfn>index.php</dfn> file simply replace your version with the new one.</p> - -<p>If your <dfn>index.php</dfn> file has internal modifications, please add your modifications to the new file and use it.</p> - -<h2>Step 3: Replace config/user_agents.php</h2> - -<p>This config file has been updated to contain more user agent types, please copy it to <kbd>application/config/user_agents.php</kbd>.</p> - -<h2>Step 4: Change references of the EXT constant to ".php"</h2> -<p class="important"><strong>Note:</strong> The EXT Constant has been marked as deprecated, but has not been removed from the application. You are encouraged to make the changes sooner rather than later.</p> - -<h2>Step 5: Remove APPPATH.'third_party' from autoload.php</h2> - -<p>Open application/autoload.php, and look for the following:</p> - -<code>$autoload['packages'] = array(APPPATH.'third_party');</code> - -<p>If you have not chosen to load any additional packages, that line can be changed to:</p> -<code>$autoload['packages'] = array();</code> - -<p>Which should provide for nominal performance gains if not autoloading packages.</p> - -<h2>Update Sessions Database Tables</h2> - -<p>If you are using database sessions with the CI Session Library, please update your <samp>ci_sessions</samp> database table as follows:</p> - -<code> - CREATE INDEX last_activity_idx ON ci_sessions(last_activity); - ALTER TABLE ci_sessions MODIFY user_agent VARCHAR(120); -</code> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_210.html b/user_guide/installation/upgrade_210.html deleted file mode 100644 index 6d4f34106..000000000 --- a/user_guide/installation/upgrade_210.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.0.3 to 2.1.0 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.0.3 to 2.1.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.0.3 to 2.1.0</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Replace config/user_agents.php</h2> - -<p>This config file has been updated to contain more user agent types, please copy it to <kbd>application/config/user_agents.php</kbd>.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_211.html b/user_guide/installation/upgrade_211.html deleted file mode 100644 index 5b437ceb0..000000000 --- a/user_guide/installation/upgrade_211.html +++ /dev/null @@ -1,94 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.1.0 to 2.1.1 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.1.0 to 2.1.1 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.1.0 to 2.1.1</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -<h2>Step 2: Replace config/mimes.php</h2> - -<p>This config file has been updated to contain more user mime-types, please copy it to <kbd>application/config/mimes.php</kbd>.</p> - -<h2>Step 3: Update your IP address tables:</h2> - -<p>This upgrade adds support for IPv6 IP addresses. In order to store them, you need to enlarge your <var>ip_address</var> columns to 45 characters. For example, CodeIgniter's session table will need to change:</p> - -<code>ALTER TABLE ci_sessions CHANGE ip_address ip_address varchar(45) default '0' NOT NULL</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_212.html b/user_guide/installation/upgrade_212.html deleted file mode 100644 index c681761a7..000000000 --- a/user_guide/installation/upgrade_212.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.1.1 to 2.1.2 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.1.1 to 2.1.2 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.1.1 to 2.1.2</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_213.html b/user_guide/installation/upgrade_213.html deleted file mode 100644 index a71d09b8d..000000000 --- a/user_guide/installation/upgrade_213.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.1.2 to 2.1.3 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.1.2 to 2.1.3 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.1.2 to 2.1.3</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_214.html b/user_guide/installation/upgrade_214.html deleted file mode 100644 index ec7f6c2c1..000000000 --- a/user_guide/installation/upgrade_214.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.1.3 to 2.1.4 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.1.3 to 2.1.4 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.1.3 to 2.1.4</h1> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_220.html b/user_guide/installation/upgrade_220.html deleted file mode 100644 index 64c816d7f..000000000 --- a/user_guide/installation/upgrade_220.html +++ /dev/null @@ -1,86 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading from 2.1.4 to 2.2.0 : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from 2.1.4 to 2.2.0 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading from 2.1.4 to 2.2.0</h1> - -<p class="important"><strong>Note:</strong> The Encryption Class now requires the Mcrypt extension. If you were previously using the Encrypt Class without Mcrypt this is a breaking change, you must install the Mcrypt extension in order to upgrade. For information on installing Mcrypt please see the PHP <a href="http://php.net/manual/en/mcrypt.setup.php">documentation</a>.</p> - -<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> - -<h2>Step 1: Update your CodeIgniter files</h2> - -<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p> - -<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_b11.html b/user_guide/installation/upgrade_b11.html deleted file mode 100644 index d205a9502..000000000 --- a/user_guide/installation/upgrade_b11.html +++ /dev/null @@ -1,144 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from Beta 1.0 to Beta 1.1 -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading From Beta 1.0 to Beta 1.1</h1> - -<p>To upgrade to Beta 1.1 please perform the following steps:</p> - -<h2>Step 1: Replace your index file</h2> - -<p>Replace your main <kbd>index.php</kbd> file with the new index.php file. Note: If you have renamed your "system" folder you will need to edit this info in the new file.</p> - -<h2>Step 2: Relocate your config folder</h2> - -<p>This version of CodeIgniter now permits multiple sets of "applications" to all share a common set of backend files. In order to enable -each application to have its own configuration values, the <kbd>config</kbd> directory must now reside -inside of your <dfn>application</dfn> folder, so please move it there.</p> - - -<h2>Step 3: Replace directories</h2> - -<p>Replace the following directories with the new versions:</p> - -<ul> -<li>drivers</li> -<li>helpers</li> -<li>init</li> -<li>libraries</li> -<li>scaffolding</li> -</ul> - - -<h2>Step 4: Add the calendar language file</h2> - -<p>There is a new language file corresponding to the new calendaring class which must be added to your language folder. Add -the following item to your version: <dfn>language/english/calendar_lang.php</dfn></p> - - -<h2>Step 5: Edit your config file</h2> - -<p>The original <kbd>application/config/config.php</kbd> file has a typo in it Open the file and look for the items related to cookies:</p> - -<code>$conf['cookie_prefix'] = "";<br /> -$conf['cookie_domain'] = "";<br /> -$conf['cookie_path'] = "/";</code> - -<p>Change the array name from <kbd>$conf</kbd> to <kbd>$config</kbd>, like this:</p> - -<code>$config['cookie_prefix'] = "";<br /> -$config['cookie_domain'] = "";<br /> -$config['cookie_path'] = "/";</code> - -<p>Lastly, add the following new item to the config file (and edit the option if needed):</p> - -<code><br /> -/*<br /> -|------------------------------------------------<br /> -| URI PROTOCOL<br /> -|------------------------------------------------<br /> -|<br /> -| This item determines which server global <br /> -| should be used to retrieve the URI string. The <br /> -| default setting of "auto" works for most servers.<br /> -| If your links do not seem to work, try one of <br /> -| the other delicious flavors:<br /> -| <br /> -| 'auto' Default - auto detects<br /> -| 'path_info' Uses the PATH_INFO <br /> -| 'query_string' Uses the QUERY_STRING<br /> -*/<br /> -<br /> -$config['uri_protocol'] = "auto";</code> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html deleted file mode 100644 index aa436ff71..000000000 --- a/user_guide/installation/upgrading.html +++ /dev/null @@ -1,111 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Upgrading From a Previous Version : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Upgrading from a Previous Version -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Upgrading From a Previous Version</h1> - -<p>Please read the upgrade notes corresponding to the version you are upgrading from.</p> - -<ul> - <li><a href="upgrade_220.html">Upgrading from 2.1.4 to 2.2.0</a></li> - <li><a href="upgrade_214.html">Upgrading from 2.1.3 to 2.1.4</a></li> - <li><a href="upgrade_213.html">Upgrading from 2.1.2 to 2.1.3</a></li> - <li><a href="upgrade_212.html">Upgrading from 2.1.1 to 2.1.2</a></li> - <li><a href="upgrade_211.html">Upgrading from 2.1.0 to 2.1.1</a></li> - <li><a href="upgrade_210.html">Upgrading from 2.0.3 to 2.1.0</a></li> - <li><a href="upgrade_203.html">Upgrading from 2.0.2 to 2.0.3</a></li> - <li><a href="upgrade_202.html">Upgrading from 2.0.1 to 2.0.2</a></li> - <li><a href="upgrade_201.html">Upgrading from 2.0 to 2.0.1</a></li> - <li><a href="upgrade_200.html">Upgrading from 1.7.2 to 2.0</a></li> - <li><a href="upgrade_172.html">Upgrading from 1.7.1 to 1.7.2</a></li> - <li><a href="upgrade_171.html">Upgrading from 1.7.0 to 1.7.1</a></li> - <li><a href="upgrade_170.html">Upgrading from 1.6.3 to 1.7.0</a></li> - <li><a href="upgrade_163.html">Upgrading from 1.6.2 to 1.6.3</a></li> - <li><a href="upgrade_162.html">Upgrading from 1.6.1 to 1.6.2</a></li> - <li><a href="upgrade_161.html">Upgrading from 1.6.0 to 1.6.1</a></li> - <li><a href="upgrade_160.html">Upgrading from 1.5.4 to 1.6.0</a></li> - <li><a href="upgrade_154.html">Upgrading from 1.5.3 to 1.5.4</a></li> - <li><a href="upgrade_153.html">Upgrading from 1.5.2 to 1.5.3</a></li> - <li><a href="upgrade_152.html">Upgrading from 1.5.0 or 1.5.1 to 1.5.2</a></li> - <li><a href="upgrade_150.html">Upgrading from 1.4.1 to 1.5.0</a></li> - <li><a href="upgrade_141.html">Upgrading from 1.4.0 to 1.4.1</a></li> - <li><a href="upgrade_140.html">Upgrading from 1.3.3 to 1.4.0</a></li> - <li><a href="upgrade_133.html">Upgrading from 1.3.2 to 1.3.3</a></li> - <li><a href="upgrade_132.html">Upgrading from 1.3.1 to 1.3.2</a></li> - <li><a href="upgrade_131.html">Upgrading from 1.3 to 1.3.1</a></li> - <li><a href="upgrade_130.html">Upgrading from 1.2 to 1.3</a></li> - <li><a href="upgrade_120.html">Upgrading from 1.1 to 1.2</a></li> - <li><a href="upgrade_b11.html">Upgrading from Beta 1.0 to Beta 1.1</a></li> -</ul> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Installation Instructions</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="troubleshooting.html">Troubleshooting</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html deleted file mode 100644 index f7cf5e668..000000000 --- a/user_guide/libraries/benchmark.html +++ /dev/null @@ -1,198 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Benchmarking Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Benchmarking Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Benchmarking Class</h1> - -<p>CodeIgniter has a Benchmarking class that is always active, enabling the time difference between any -two marked points to be calculated.</p> - -<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p> - - -<p>In addition, the benchmark is always started the moment the framework is -invoked, and ended by the output class right before sending the final view to the browser, enabling a very accurate -timing of the entire system execution to be shown.</p> - - -<h3>Table of Contents</h3> - -<ul> -<li><a href="#using">Using the Benchmark Class</a></li> -<li><a href="#profiler">Profiling Your Benchmark Points</a></li> -<li><a href="#execution">Displaying Total Execution Time</a></li> -<li><a href="#memory">Displaying Memory Consumption</a></li> -</ul> - - - -<a name="using"></a> -<h2>Using the Benchmark Class</h2> - -<p>The Benchmark class can be used within your <a href="../general/controllers.html">controllers</a>, <a href="../general/views.html">views</a>, or your <a href="../general/models.html">models</a>. The process for usage is this:</p> - -<ol> -<li>Mark a start point</li> -<li>Mark an end point</li> -<li>Run the "elapsed time" function to view the results</li> -</ol> - -<p>Here's an example using real code:</p> - -<code>$this->benchmark->mark('code_start');<br /> -<br /> -// Some code happens here<br /> -<br /> -$this->benchmark->mark('code_end');<br /> -<br /> -echo $this->benchmark->elapsed_time('code_start', 'code_end');</code> - -<p class="important"><strong>Note:</strong> The words "code_start" and "code_end" are arbitrary. They are simply words used to set two markers. You can -use any words you want, and you can set multiple sets of markers. Consider this example:</p> - -<code>$this->benchmark->mark('dog');<br /> -<br /> -// Some code happens here<br /> -<br /> -$this->benchmark->mark('cat');<br /> -<br /> -// More code happens here<br /> -<br /> -$this->benchmark->mark('bird');<br /> -<br /> -echo $this->benchmark->elapsed_time('dog', 'cat');<br /> -echo $this->benchmark->elapsed_time('cat', 'bird');<br /> -echo $this->benchmark->elapsed_time('dog', 'bird');</code> - - -<a name="profiler"></a> -<h2>Profiling Your Benchmark Points</h2> - -<p>If you want your benchmark data to be available to the -<a href="../general/profiling.html">Profiler</a> all of your marked points must be set up in pairs, and -each mark point name must end with <kbd>_start</kbd> and <kbd>_end</kbd>. -Each pair of points must otherwise be named identically. Example:</p> - -<code> -$this->benchmark->mark('my_mark<kbd>_start</kbd>');<br /> -<br /> -// Some code happens here...<br /> -<br /> -$this->benchmark->mark('my_mark<kbd>_end</kbd>'); -<br /><br /> - -$this->benchmark->mark('another_mark<kbd>_start</kbd>');<br /> -<br /> -// Some more code happens here...<br /> -<br /> -$this->benchmark->mark('another_mark<kbd>_end</kbd>'); -</code> - -<p>Please read the <a href="../general/profiling.html">Profiler page</a> for more information.</p> - - -<a name="execution"></a> -<h2>Displaying Total Execution Time</h2> - -<p>If you would like to display the total elapsed time from the moment CodeIgniter starts to the moment the final output -is sent to the browser, simply place this in one of your view templates:</p> - -<code><?php echo $this->benchmark->elapsed_time();?></code> - -<p>You'll notice that it's the same function used in the examples above to calculate the time between two point, except you are -<strong>not</strong> using any parameters. When the parameters are absent, CodeIgniter does not stop the benchmark until right before the final -output is sent to the browser. It doesn't matter where you use the function call, the timer will continue to run until the very end.</p> - -<p>An alternate way to show your elapsed time in your view files is to use this pseudo-variable, if you prefer not to use the pure PHP:</p> -<code>{elapsed_time}</code> - -<p class="important"><strong>Note:</strong> If you want to benchmark anything within your controller -functions you must set your own start/end points.</p> - -<a name="memory"></a> -<h2>Displaying Memory Consumption</h2> - -<p>If your PHP installation is configured with --enable-memory-limit, you can display the amount of memory consumed by the entire -system using the following code in one of your view file:</p> - -<code><?php echo $this->benchmark->memory_usage();?></code> -<p>Note: This function can only be used in your view files. The consumption will reflect the total memory used by the entire app.</p> - -<p>An alternate way to show your memory usage in your view files is to use this pseudo-variable, if you prefer not to use the pure PHP:</p> -<code>{memory_usage}</code> - - - - -</div> -<!-- END CONTENT --> - - - -<div id="footer"> -<p> -Previous Topic: <a href="../doc_style/index.html">Writing Documentaion</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="calendar.html">Calendar Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/caching.html b/user_guide/libraries/caching.html deleted file mode 100644 index 47c2a4efe..000000000 --- a/user_guide/libraries/caching.html +++ /dev/null @@ -1,193 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Caching Driver : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="../general/drivers.html">Drivers</a> › -Caching Driver -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Caching Driver</h1> - -<p>CodeIgniter features wrappers around some of the most popular forms of fast and dynamic caching. All but file-based caching require specific server requirements, and a Fatal Exception will be thrown if server requirements are not met.</p> - -<h2>Table of Contents</h2> -<ul> - <li><a href="#example_usage" title="Example Usage">Example Usage</a></li> - <li><a href="#function_reference" title="Function Reference">Function Reference</a></li> -</ul> - -<h3>Available Drivers</h3> -<ul> - <li><a href="#apc" title="APC Cache">Alternative PHP Cache (APC) Caching</a></li> - <li><a href="#file" title="File Caching">File-based Caching</a></li> - <li><a href="#memcached" title="Memcached">Memcached Caching</a></li> - <li><a href="#dummy" title="Dummy Caching">Dummy Cache</a></li> -</ul> - -<h2 id="example_usage">Example Usage</h2> - -<p>The following example will load the cache driver, specify <a href="#apc" title="APC">APC</a> as the driver to use, and fall back to file-based caching if APC is not available in the hosting environment.</p> - -<code> -$this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));<br /> -<br /> -if ( ! $foo = $this->cache->get('foo'))<br /> -{<br /> - echo 'Saving to the cache!<br />';<br /> - $foo = 'foobarbaz!';<br /> -<br /> - // Save into the cache for 5 minutes<br /> - $this->cache->save('foo', $foo, 300);<br /> -}<br /> -<br /> -echo $foo; -</code> - -<h1 id="function_reference">Function Reference</h1> - -<h2>is_supported(<var>driver</var>['string'])</h2> - -<p>This function is automatically called when accessing drivers via <samp>$this->cache->get()</samp>. However, if the individual drivers are used, make sure to call this function to ensure the driver is supported in the hosting environment.</p> - -<code> -if ($this->cache->apc->is_supported())<br /> -{<br /> - if ($data = $this->cache->apc->get('my_cache'))<br /> - {<br /> - // do things.<br /> - }<br /> -} -</code> - -<h2>get(<var>id</var>['string'])</h2> - -<p>This function will attempt to fetch an item from the cache store. If the item does not exist, the function will return <samp>FALSE</samp>.</p> -<code>$foo = $this->cache->get('my_cached_item');</code> - -<h2>save(<var>id</var>['string'], <var>data</var>['mixed'], <var>ttl</var>['int'])</h2> - -<p>This function will save an item to the cache store. If saving fails, the function will return <samp>FALSE</samp>.</p> -<p>The optional third parameter (Time To Live) defaults to 60 seconds.</p> -<code>$this->cache->save('cache_item_id', 'data_to_cache');</code> - -<h2>delete(<var>id</var>['string'])</h2> - -<p>This function will delete a specific item from the cache store. If item deletion fails, the function will return <samp>FALSE</samp>.</p> -<code>$this->cache->delete('cache_item_id');</code> - -<h2>clean()</h2> - -<p>This function will 'clean' the entire cache. If the deletion of the cache files fails, the function will return <samp>FALSE</samp>.</p> - -<code>$this->cache->clean();</code> - -<h2>cache_info()</h2> - -<p>This function will return information on the entire cache.</p> - -<code>var_dump($this->cache->cache_info());</code> - -<h2>get_metadata(<var>id</var>['string'])</h2> - -<p>This function will return detailed information on a specific item in the cache.</p> - -<code>var_dump($this->cache->get_metadata('my_cached_item'));</code> - -<h1>Drivers</h1> - -<h2 id="apc">Alternative PHP Cache (APC) Caching</h2> - -<p>All of the functions listed above can be accessed without passing a specific adapter to the driver loader as follows:</p> -<code>$this->load->driver('cache');<br /> - $this->cache->apc->save('foo', 'bar', 10);</code> -<p>For more information on APC, please see <a href="http://php.net/apc">http://php.net/apc</a></p> - -<h2 id="file">File-based Caching</h2> - -<p>Unlike caching from the Output Class, the driver file-based caching allows for pieces of view files to be cached. Use this with care, and make sure to benchmark your application, as a point can come where disk I/O will negate positive gains by caching.</p> - -<p>All of the functions listed above can be accessed without passing a specific adapter to the driver loader as follows:</p> -<code>$this->load->driver('cache');<br /> - $this->cache->file->save('foo', 'bar', 10);</code> - -<h2 id="memcached">Memcached Caching</h2> - -<p>Multiple Memcached servers can be specified in the memcached.php configuration file, located in the <samp>application/config/</samp> directory. - -<p>All of the functions listed above can be accessed without passing a specific adapter to the driver loader as follows:</p> -<code>$this->load->driver('cache');<br /> - $this->cache->memcached->save('foo', 'bar', 10);</code> - -<p>For more information on Memcached, please see <a href="http://php.net/memcached">http://php.net/memcached</a></p> - -<h2 id="dummy">Dummy Cache</h2> - -<p>This is a caching backend that will always 'miss.' It stores no data, but lets you keep your caching code in place in environments that don't support your chosen cache.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="zip.html">Zip Encoding Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../database/index.html">Database Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html deleted file mode 100644 index f285e86ec..000000000 --- a/user_guide/libraries/calendar.html +++ /dev/null @@ -1,249 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Calendaring Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Calendaring Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - - - -<h1>Calendaring Class</h1> - -<p>The Calendar class enables you to dynamically create calendars. Your calendars can be formatted through the use of a calendar -template, allowing 100% control over every aspect of its design. In addition, you can pass data to your calendar cells.</p> - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Calendar class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('calendar');</code> -<p>Once loaded, the Calendar object will be available using: <dfn>$this->calendar</dfn></p> - - -<h2>Displaying a Calendar</h2> - -<p>Here is a very simple example showing how you can display a calendar:</p> - -<code>$this->load->library('calendar');<br /> -<br /> -echo $this->calendar->generate();</code> - -<p>The above code will generate a calendar for the current month/year based on your server time. -To show a calendar for a specific month and year you will pass this information to the calendar generating function:</p> - -<code>$this->load->library('calendar');<br /> -<br /> -echo $this->calendar->generate(<kbd>2006</kbd>, <kbd>6</kbd>);</code> - -<p>The above code will generate a calendar showing the month of June in 2006. The first parameter specifies the year, the second parameter specifies the month.</p> - -<h2>Passing Data to your Calendar Cells</h2> - -<p>To add data to your calendar cells involves creating an associative array in which the keys correspond to the days -you wish to populate and the array value contains the data. The array is passed to the third parameter of the calendar -generating function. Consider this example:</p> - -<code>$this->load->library('calendar');<br /> -<br /> -$data = array(<br /> - 3 => 'http://example.com/news/article/2006/03/',<br /> - 7 => 'http://example.com/news/article/2006/07/',<br /> - 13 => 'http://example.com/news/article/2006/13/',<br /> - 26 => 'http://example.com/news/article/2006/26/'<br /> - );<br /> -<br /> -echo $this->calendar->generate(<kbd>2006</kbd>, <kbd>6</kbd>, <var>$data</var>);</code> - -<p>Using the above example, day numbers 3, 7, 13, and 26 will become links pointing to the URLs you've provided.</p> - -<p class="important"><strong>Note:</strong> By default it is assumed that your array will contain links. -In the section that explains the calendar template below you'll see how you can customize -how data passed to your cells is handled so you can pass different types of information.</p> - - -<h2>Setting Display Preferences</h2> - -<p>There are seven preferences you can set to control various aspects of the calendar. Preferences are set by passing an -array of preferences in the second parameter of the loading function. Here is an example:</p> - - -<code> -$prefs = array (<br /> - 'start_day' => 'saturday',<br /> - 'month_type' => 'long',<br /> - 'day_type' => 'short'<br /> - );<br /> -<br /> -$this->load->library('calendar', $prefs);<br /> -<br /> -echo $this->calendar->generate();</code> - -<p>The above code would start the calendar on saturday, use the "long" month heading, and the "short" day names. More information -regarding preferences below.</p> - - - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr><tr> -<td class="td"><strong>template</strong></td><td class="td">None</td><td class="td">None</td><td class="td">A string containing your calendar template. See the template section below.</td> -</tr><tr> -<td class="td"><strong>local_time</strong></td><td class="td">time()</td><td class="td">None</td><td class="td">A Unix timestamp corresponding to the current time.</td> -</tr><tr> -<td class="td"><strong>start_day</strong></td><td class="td">sunday</td><td class="td">Any week day (sunday, monday, tuesday, etc.)</td><td class="td">Sets the day of the week the calendar should start on.</td> -</tr><tr> -<td class="td"><strong>month_type</strong></td><td class="td">long</td><td class="td">long, short</td><td class="td">Determines what version of the month name to use in the header. long = January, short = Jan.</td> -</tr><tr> -<td class="td"><strong>day_type</strong></td><td class="td">abr</td><td class="td">long, short, abr</td><td class="td">Determines what version of the weekday names to use in the column headers. long = Sunday, short = Sun, abr = Su.</td> -</tr><tr> -<td class="td"><strong>show_next_prev</strong></td><td class="td">FALSE</td><td class="td">TRUE/FALSE (boolean)</td><td class="td">Determines whether to display links allowing you to toggle to next/previous months. See information on this feature below.</td> -</tr><tr> -<td class="td"><strong>next_prev_url</strong></td><td class="td">None</td><td class="td">A URL</td><td class="td">Sets the basepath used in the next/previous calendar links.</td> -</tr> -</table> - - - -<h2>Showing Next/Previous Month Links</h2> - -<p>To allow your calendar to dynamically increment/decrement via the next/previous links requires that you set up your calendar -code similar to this example:</p> - - -<code>$prefs = array (<br /> - 'show_next_prev' => TRUE,<br /> - 'next_prev_url' => 'http://example.com/index.php/calendar/show/'<br /> - );<br /> -<br /> -$this->load->library('calendar', $prefs);<br /> -<br /> -echo $this->calendar->generate(<var>$this->uri->segment(3)</var>, <var>$this->uri->segment(4)</var>);</code> - -<p>You'll notice a few things about the above example:</p> - -<ul> -<li>You must set the "show_next_prev" to TRUE.</li> -<li>You must supply the URL to the controller containing your calendar in the "next_prev_url" preference.</li> -<li>You must supply the "year" and "month" to the calendar generating function via the URI segments where they appear (Note: The calendar class automatically adds the year/month to the base URL you provide.).</li> -</ul> - - - -<h2>Creating a Calendar Template</h2> - -<p>By creating a calendar template you have 100% control over the design of your calendar. Each component of your -calendar will be placed within a pair of pseudo-variables as shown here:</p> - - -<code> -$prefs['template'] = '<br /><br /> - <dfn>{table_open}</dfn><var><table border="0" cellpadding="0" cellspacing="0"></var><dfn>{/table_open}</dfn><br /> -<br /> - <dfn>{heading_row_start}</dfn><var><tr></var><dfn>{/heading_row_start}</dfn><br /> -<br /> - <dfn>{heading_previous_cell}</dfn><var><th><a href="</var><kbd>{previous_url}</kbd><var>">&lt;&lt;</a></th></var><dfn>{/heading_previous_cell}</dfn><br /> - <dfn>{heading_title_cell}</dfn><var><th colspan="</var><kbd>{colspan}</kbd><var>"></var><kbd>{heading}</kbd><var></th></var><dfn>{/heading_title_cell}</dfn><br /> - <dfn>{heading_next_cell}</dfn><var><th><a href="</var><kbd>{next_url}</kbd><var>">&gt;&gt;</a></th></var><dfn>{/heading_next_cell}</dfn><br /> -<br /> - <dfn>{heading_row_end}</dfn><var></tr></var><dfn>{/heading_row_end}</dfn><br /> -<br /> - <dfn>{week_row_start}</dfn><var><tr></var><dfn>{/week_row_start}</dfn><br /> - <dfn>{week_day_cell}</dfn><var><td></var><dfn>{week_day}</dfn><var></td></var><dfn>{/week_day_cell}</dfn><br /> - <dfn>{week_row_end}</dfn><var></tr></var><dfn>{/week_row_end}</dfn><br /> -<br /> - <dfn>{cal_row_start}</dfn><var><tr></var><dfn>{/cal_row_start}</dfn><br /> - <dfn>{cal_cell_start}</dfn><var><td></var><dfn>{/cal_cell_start}</dfn><br /> -<br /> - <dfn>{cal_cell_content}</dfn><var><a href="</var><kbd>{content}</kbd><var>"></var><kbd>{day}</kbd><var></a></var><dfn>{/cal_cell_content}</dfn><br /> - <dfn>{cal_cell_content_today}</dfn><var><div class="highlight"><a href="</var><kbd>{content}</kbd><var>"></var><kbd>{day}</kbd><var></a></div></var><dfn>{/cal_cell_content_today}</dfn><br /> -<br /> - <dfn>{cal_cell_no_content}</dfn><var></var><kbd>{day}</kbd><var></var><dfn>{/cal_cell_no_content}</dfn><br /> - <dfn>{cal_cell_no_content_today}</dfn><var><div class="highlight"></var><kbd>{day}</kbd><var></div></var><dfn>{/cal_cell_no_content_today}</dfn><br /> -<br /> - <dfn>{cal_cell_blank}</dfn><var>&nbsp;</var><dfn>{/cal_cell_blank}</dfn><br /> -<br /> - <dfn>{cal_cell_end}</dfn><var></td></var><dfn>{/cal_cell_end}</dfn><br /> - <dfn>{cal_row_end}</dfn><var></tr></var><dfn>{/cal_row_end}</dfn><br /> -<br /> - <dfn>{table_close}</dfn><var></table></var><dfn>{/table_close}</dfn><br /> -';<br /> -<br /> -$this->load->library('calendar', $prefs);<br /> -<br /> -echo $this->calendar->generate();</code> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="benchmark.html">Benchmark Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="cart.html">Cart Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html deleted file mode 100644 index 16e36d9ef..000000000 --- a/user_guide/libraries/cart.html +++ /dev/null @@ -1,346 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Shopping Cart Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Shopping Cart Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Shopping Cart Class</h1> - -<p>The Cart Class permits items to be added to a session that stays active while a user is browsing your site. -These items can be retrieved and displayed in a standard "shopping cart" format, allowing the user to update the quantity or remove items from the cart.</p> - -<p>Please note that the Cart Class ONLY provides the core "cart" functionality. It does not provide shipping, credit card authorization, or other processing components.</p> - - -<h2>Initializing the Shopping Cart Class</h2> - -<p><strong>Important:</strong> The Cart class utilizes CodeIgniter's -<a href="sessions.html">Session Class</a> to save the cart information to a database, so before using the Cart class you must set up a database table -as indicated in the <a href="sessions.html">Session Documentation</a> , and set the session preferences in your <kbd>application/config/config.php</kbd> file to utilize a database.</p> - -<p>To initialize the Shopping Cart Class in your controller constructor, use the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('cart');</code> -<p>Once loaded, the Cart object will be available using: <dfn>$this->cart</dfn></p> - -<p class="important"><strong>Note:</strong> The Cart Class will load and initialize the Session Class automatically, so unless you are using sessions elsewhere in your application, you do not need to load the Session class.</p> - -<h2>Adding an Item to The Cart</h2> - -<p>To add an item to the shopping cart, simply pass an array with the product information to the <dfn>$this->cart->insert()</dfn> function, as shown below:</p> - -<code> -$data = array(<br /> - 'id' => 'sku_123ABC',<br /> - 'qty' => 1,<br /> - 'price' => 39.95,<br /> - 'name' => 'T-Shirt',<br /> - 'options' => array('Size' => 'L', 'Color' => 'Red')<br /> - );<br /> -<br /> - -$this->cart->insert($data); - -</code> - -<p class="important"><strong>Important:</strong> The first four array indexes above (<dfn>id</dfn>, <dfn>qty</dfn>, <dfn>price</dfn>, and <dfn>name</dfn>) are <strong>required</strong>. -If you omit any of them the data will not be saved to the cart. The fifth index (<dfn>options</dfn>) is optional. -It is intended to be used in cases where your product has options associated with it. Use an array for options, as shown above.</p> - -<p>The five reserved indexes are:</p> - -<ul> -<li><strong>id</strong> - Each product in your store must have a unique identifier. Typically this will be an "sku" or other such identifier.</li> -<li><strong>qty</strong> - The quantity being purchased. -<li><strong>price</strong> - The price of the item. -<li><strong>name</strong> - The name of the item. -<li><strong>options</strong> - Any additional attributes that are needed to identify the product. These must be passed via an array. -</ul> - -<p>In addition to the five indexes above, there are two reserved words: <dfn>rowid</dfn> and <dfn>subtotal</dfn>. These are used internally by the Cart class, so -please do NOT use those words as index names when inserting data into the cart.</p> - -<p>Your array may contain additional data. Anything you include in your array will be stored in the session. However, it is best to standardize your data among all your products in order to make displaying the information in a table easier.</p> - -<p>The insert() method will return the $rowid if you successfully insert a single item.</p> - - -<h2>Adding Multiple Items to The Cart</h2> - -<p>By using a multi-dimensional array, as shown below, it is possible to add multiple products to the cart in one action. This is useful in cases where you wish to allow people to select from among several items on the same page.</p> - - -<code> -$data = array(<br /> - - array(<br /> - 'id' => 'sku_123ABC',<br /> - 'qty' => 1,<br /> - 'price' => 39.95,<br /> - 'name' => 'T-Shirt',<br /> - 'options' => array('Size' => 'L', 'Color' => 'Red')<br /> - ),<br /> - - array(<br /> - 'id' => 'sku_567ZYX',<br /> - 'qty' => 1,<br /> - 'price' => 9.95,<br /> - 'name' => 'Coffee Mug'<br /> - ),<br /> - - array(<br /> - 'id' => 'sku_965QRS',<br /> - 'qty' => 1,<br /> - 'price' => 29.95,<br /> - 'name' => 'Shot Glass'<br /> - )<br /> - - );<br /> -<br /> - -$this->cart->insert($data); - -</code> - - - - -<h2>Displaying the Cart</h2> - -<p>To display the cart you will create a <a href="../general/views.html">view file</a> with code similar to the one shown below.</p> - -<p>Please note that this example uses the <a href="../helpers/form_helper.html">form helper</a>.</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="55"> -<?php echo form_open('path/to/controller/update/function'); ?> - -<table cellpadding="6" cellspacing="1" style="width:100%" border="0"> - -<tr> - <th>QTY</th> - <th>Item Description</th> - <th style="text-align:right">Item Price</th> - <th style="text-align:right">Sub-Total</th> -</tr> - -<?php $i = 1; ?> - -<?php foreach ($this->cart->contents() as $items): ?> - - <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?> - - <tr> - <td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td> - <td> - <?php echo $items['name']; ?> - - <?php if ($this->cart->has_options($items['rowid']) == TRUE): ?> - - <p> - <?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?> - - <strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br /> - - <?php endforeach; ?> - </p> - - <?php endif; ?> - - </td> - <td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td> - <td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td> - </tr> - -<?php $i++; ?> - -<?php endforeach; ?> - -<tr> - <td colspan="2"> </td> - <td class="right"><strong>Total</strong></td> - <td class="right">$<?php echo $this->cart->format_number($this->cart->total()); ?></td> -</tr> - -</table> - -<p><?php echo form_submit('', 'Update your Cart'); ?></p> -</textarea> - - - - -<h2>Updating The Cart</h2> - -<p>To update the information in your cart, you must pass an array containing the <kbd>Row ID</kbd> and quantity to the <dfn>$this->cart->update()</dfn> function:</p> - -<p class="important"><strong>Note:</strong> If the quantity is set to zero, the item will be removed from the cart.</p> - -<code> -$data = array(<br /> - 'rowid' => 'b99ccdf16028f015540f341130b6d8ec',<br /> - 'qty' => 3<br /> - );<br /> -<br /> - -$this->cart->update($data); -<br /><br /> -// Or a multi-dimensional array<br /><br /> -$data = array(<br /> - - array(<br /> - 'rowid' => 'b99ccdf16028f015540f341130b6d8ec',<br /> - 'qty' => 3<br /> - ),<br /> - - array(<br /> - 'rowid' => 'xw82g9q3r495893iajdh473990rikw23',<br /> - 'qty' => 4<br /> - ),<br /> - - array(<br /> - 'rowid' => 'fh4kdkkkaoe30njgoe92rkdkkobec333',<br /> - 'qty' => 2<br /> - )<br /> - - );<br /> -<br /> - -$this->cart->update($data); - - - - -</code> - -<p><strong>What is a Row ID?</strong> The <kbd>row ID</kbd> is a unique identifier that is generated by the cart code when an item is added to the cart. The reason a -unique ID is created is so that identical products with different options can be managed by the cart.</p> - -<p>For example, let's say someone buys two identical t-shirts (same product ID), but in different sizes. The product ID (and other attributes) will be -identical for both sizes because it's the same shirt. The only difference will be the size. The cart must therefore have a means of identifying this -difference so that the two sizes of shirts can be managed independently. It does so by creating a unique "row ID" based on the product ID and any options associated with it.</p> - -<p>In nearly all cases, updating the cart will be something the user does via the "view cart" page, so as a developer, it is unlikely that you will ever have to concern yourself -with the "row ID", other then making sure your "view cart" page contains this information in a hidden form field, and making sure it gets passed to the update -function when the update form is submitted. Please examine the construction of the "view cart" page above for more information.</p> - - - -<p> <br /></p> - - -<h1>Function Reference</h1> - -<h2>$this->cart->insert();</h2> - -<p>Permits you to add items to the shopping cart, as outlined above.</p> - - -<h2>$this->cart->update();</h2> - -<p>Permits you to update items in the shopping cart, as outlined above.</p> - - -<h2>$this->cart->total();</h2> - -<p>Displays the total amount in the cart.</p> - - -<h2>$this->cart->total_items();</h2> - -<p>Displays the total number of items in the cart.</p> - - -<h2>$this->cart->contents();</h2> - -<p>Returns an array containing everything in the cart.</p> - - - -<h2>$this->cart->has_options(rowid);</h2> - -<p>Returns TRUE (boolean) if a particular row in the cart contains options. This function is designed to be used in a loop with <dfn>$this->cart->contents()</dfn>, since you must pass the <kbd>rowid</kbd> to this function, as shown in the <dfn>Displaying the Cart</dfn> example above.</p> - - -<h2>$this->cart->product_options(rowid);</h2> - -<p>Returns an array of options for a particular product. This function is designed to be used in a loop with <dfn>$this->cart->contents()</dfn>, since you must pass the <kbd>rowid</kbd> to this function, as shown in the <dfn>Displaying the Cart</dfn> example above.</p> - - - -<h2>$this->cart->destroy();</h2> - -<p>Permits you to destroy the cart. This function will likely be called when you are finished processing the customer's order.</p> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="calendar.html">Calendar Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="config.html">Config Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html deleted file mode 100644 index 03583b406..000000000 --- a/user_guide/libraries/config.html +++ /dev/null @@ -1,222 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Config Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Config Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Config Class</h1> - -<p>The Config class provides a means to retrieve configuration preferences. These preferences can -come from the default config file (<samp>application/config/config.php</samp>) or from your own custom config files.</p> - -<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p> - - -<h2>Anatomy of a Config File</h2> - -<p>By default, CodeIgniter has one primary config file, located at <samp>application/config/config.php</samp>. If you open the file using -your text editor you'll see that config items are stored in an array called <var>$config</var>.</p> - -<p>You can add your own config items to -this file, or if you prefer to keep your configuration items separate (assuming you even need config items), -simply create your own file and save it in <dfn>config</dfn> folder.</p> - -<p><strong>Note:</strong> If you do create your own config files use the same format as the primary one, storing your items in -an array called <var>$config</var>. CodeIgniter will intelligently manage these files so there will be no conflict even though -the array has the same name (assuming an array index is not named the same as another).</p> - -<h2>Loading a Config File</h2> - -<p><strong>Note:</strong> CodeIgniter automatically loads the primary config file (<samp>application/config/config.php</samp>), -so you will only need to load a config file if you have created your own.</p> - -<p>There are two ways to load a config file:</p> - -<ol><li><strong>Manual Loading</strong> - -<p>To load one of your custom config files you will use the following function within the <a href="../general/controllers.html">controller</a> that needs it:</p> - -<code>$this->config->load('<var>filename</var>');</code> - -<p>Where <var>filename</var> is the name of your config file, without the .php file extension.</p> - -<p>If you need to load multiple config files normally they will be merged into one master config array. Name collisions can occur, however, if -you have identically named array indexes in different config files. To avoid collisions you can set the second parameter to <kbd>TRUE</kbd> -and each config file will be stored in an array index corresponding to the name of the config file. Example:</p> - -<code> -// Stored in an array with this prototype: $this->config['blog_settings'] = $config<br /> -$this->config->load('<var>blog_settings</var>', <kbd>TRUE</kbd>);</code> - -<p>Please see the section entitled <dfn>Fetching Config Items</dfn> below to learn how to retrieve config items set this way.</p> - -<p>The third parameter allows you to suppress errors in the event that a config file does not exist:</p> - -<code>$this->config->load('<var>blog_settings</var>', <dfn>FALSE</dfn>, <kbd>TRUE</kbd>);</code> - -</li> -<li><strong>Auto-loading</strong> - -<p>If you find that you need a particular config file globally, you can have it loaded automatically by the system. To do this, -open the <strong>autoload.php</strong> file, located at <samp>application/config/autoload.php</samp>, and add your config file as -indicated in the file.</p> -</li> -</ol> - - -<h2>Fetching Config Items</h2> - -<p>To retrieve an item from your config file, use the following function:</p> - -<code>$this->config->item('<var>item name</var>');</code> - -<p>Where <var>item name</var> is the $config array index you want to retrieve. For example, to fetch your language choice you'll do this:</p> - -<code>$lang = $this->config->item('language');</code> - -<p>The function returns FALSE (boolean) if the item you are trying to fetch does not exist.</p> - -<p>If you are using the second parameter of the <kbd>$this->config->load</kbd> function in order to assign your config items to a specific index -you can retrieve it by specifying the index name in the second parameter of the <kbd>$this->config->item()</kbd> function. Example:</p> - -<code> -// Loads a config file named blog_settings.php and assigns it to an index named "blog_settings"<br /> -$this->config->load('<var>blog_settings</var>', <kbd>TRUE</kbd>);<br /><br /> - -// Retrieve a config item named site_name contained within the blog_settings array<br /> -$site_name = $this->config->item('<dfn>site_name</dfn>', '<var>blog_settings</var>');<br /><br /> - -// An alternate way to specify the same item:<br /> -$blog_config = $this->config->item('<var>blog_settings</var>');<br /> -$site_name = $blog_config['site_name'];</code> - -<h2>Setting a Config Item</h2> - -<p>If you would like to dynamically set a config item or change an existing one, you can do so using:</p> - -<code>$this->config->set_item('<var>item_name</var>', '<var>item_value</var>');</code> - -<p>Where <var>item_name</var> is the $config array index you want to change, and <var>item_value</var> is its value.</p> - -<a name="environments"></a> -<h2>Environments</h2> - -<p> - You may load different configuration files depending on the current environment. - The <kbd>ENVIRONMENT</kbd> constant is defined in index.php, and is described - in detail in the <a href="../general/environments.html">Handling Environments</a> - section. -</p> - -<p> - To create an environment-specific configuration file, - create or copy a configuration file in application/config/{ENVIRONMENT}/{FILENAME}.php -</p> - -<p>For example, to create a production-only config.php, you would:</p> - -<ol> - <li>Create the directory application/config/production/</li> - <li>Copy your existing config.php into the above directory</li> - <li>Edit application/config/production/config.php so it contains your production settings</li> -</ol> - -<p> - When you set the <kbd>ENVIRONMENT</kbd> constant to 'production', the settings - for your new production-only config.php will be loaded. -</p> - -<p>You can place the following configuration files in environment-specific folders:</p> - -<ul> -<li>Default CodeIgniter configuration files</li> -<li>Your own custom configuration files</li> -</ul> - -<p><strong>Note:</strong> CodeIgniter always tries to load the configuration files for the current environment first. If the file does not exist, the global config file (i.e., the one in <samp>application/config/</samp>) is loaded. This means you are not obligated to place <strong>all</strong> of your configuration files in an environment folder − only the files that change per environment.</p> - -<h2>Helper Functions</h2> - -<p>The config class has the following helper functions:</p> - -<h2>$this->config->site_url();</h2> -<p>This function retrieves the URL to your site, along with the "index" value you've specified in the config file.</p> - -<h2>$this->config->base_url();</h2> -<p>This function retrieves the URL to your site, plus an optional path such as to a stylesheet or image.</p> - -<p>The two functions above are normally accessed via the corresponding functions in the <a href="../helpers/url_helper.html">URL Helper.</a></p> - -<h2>$this->config->system_url();</h2> -<p>This function retrieves the URL to your <dfn>system folder</dfn>.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="calendar.html">Calendaring Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../database/index.html">Database Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html deleted file mode 100644 index 5ff8789ca..000000000 --- a/user_guide/libraries/email.html +++ /dev/null @@ -1,307 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Email Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Email Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Email Class</h1> - -<p>CodeIgniter's robust Email Class supports the following features:</p> - - -<ul> -<li>Multiple Protocols: Mail, Sendmail, and SMTP</li> -<li>Multiple recipients</li> -<li>CC and BCCs</li> -<li>HTML or Plaintext email</li> -<li>Attachments</li> -<li>Word wrapping</li> -<li>Priorities</li> -<li>BCC Batch Mode, enabling large email lists to be broken into small BCC batches.</li> -<li>Email Debugging tools</li> -</ul> - - -<h2>Sending Email</h2> - -<p>Sending email is not only simple, but you can configure it on the fly or set your preferences in a config file.</p> - -<p>Here is a basic example demonstrating how you might send email. Note: This example assumes you are sending the email from one of your -<a href="../general/controllers.html">controllers</a>.</p> - -<code>$this->load->library('email');<br /> -<br /> -$this->email->from('your@example.com', 'Your Name');<br /> -$this->email->to('someone@example.com'); <br /> -$this->email->cc('another@another-example.com'); <br /> -$this->email->bcc('them@their-example.com'); <br /> -<br /> -$this->email->subject('Email Test');<br /> -$this->email->message('Testing the email class.'); <br /> -<br /> -$this->email->send();<br /> -<br /> -echo $this->email->print_debugger();</code> - - - - -<h2>Setting Email Preferences</h2> - -<p>There are 17 different preferences available to tailor how your email messages are sent. You can either set them manually -as described here, or automatically via preferences stored in your config file, described below:</p> - -<p>Preferences are set by passing an array of preference values to the email <dfn>initialize</dfn> function. Here is an example of how you might set some preferences:</p> - -<code>$config['protocol'] = 'sendmail';<br /> -$config['mailpath'] = '/usr/sbin/sendmail';<br /> -$config['charset'] = 'iso-8859-1';<br /> -$config['wordwrap'] = TRUE;<br /> -<br /> -$this->email->initialize($config);</code> - -<p><strong>Note:</strong> Most of the preferences have default values that will be used if you do not set them.</p - -><h3>Setting Email Preferences in a Config File</h3> - -<p>If you prefer not to set preferences using the above method, you can instead put them into a config file. -Simply create a new file called the <var>email.php</var>, add the <var>$config</var> -array in that file. Then save the file at <var>config/email.php</var> and it will be used automatically. You -will NOT need to use the <dfn>$this->email->initialize()</dfn> function if you save your preferences in a config file.</p> - - - - -<h2>Email Preferences</h2> - -<p>The following is a list of all the preferences that can be set when sending email.</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr><tr> -<td class="td"><strong>useragent</strong></td><td class="td">CodeIgniter</td><td class="td">None</td><td class="td">The "user agent".</td> -</tr><tr> -<td class="td"><strong>protocol</strong></td><td class="td">mail</td><td class="td">mail, sendmail, or smtp</td><td class="td">The mail sending protocol.</td> -</tr><tr> -<td class="td"><strong>mailpath</strong></td><td class="td">/usr/sbin/sendmail</td><td class="td">None</td><td class="td">The server path to Sendmail.</td> -</tr><tr> -<td class="td"><strong>smtp_host</strong></td><td class="td">No Default</td><td class="td">None</td><td class="td">SMTP Server Address.</td> -</tr><tr> -<td class="td"><strong>smtp_user</strong></td><td class="td">No Default</td><td class="td">None</td><td class="td">SMTP Username.</td> -</tr><tr> -<td class="td"><strong>smtp_pass</strong></td><td class="td">No Default</td><td class="td">None</td><td class="td">SMTP Password.</td> -</tr><tr> -<td class="td"><strong>smtp_port</strong></td><td class="td">25</td><td class="td">None</td><td class="td">SMTP Port.</td> -</tr><tr> -<td class="td"><strong>smtp_timeout</strong></td><td class="td">5</td><td class="td">None</td><td class="td">SMTP Timeout (in seconds).</td> -</tr><tr> -<td class="td"><strong>wordwrap</strong></td><td class="td">TRUE</td><td class="td">TRUE or FALSE (boolean)</td><td class="td">Enable word-wrap.</td> -</tr><tr> -<td class="td"><strong>wrapchars</strong></td><td class="td">76</td><td class="td"> </td><td class="td">Character count to wrap at.</td> -</tr><tr> -<td class="td"><strong>mailtype</strong></td><td class="td">text</td><td class="td">text or html</td><td class="td">Type of mail. If you send HTML email you must send it as a complete web page. Make sure you don't have any relative links or relative image paths otherwise they will not work.</td> -</tr><tr> -<td class="td"><strong>charset</strong></td><td class="td">utf-8</td><td class="td"></td><td class="td">Character set (utf-8, iso-8859-1, etc.).</td> -</tr><tr> -<td class="td"><strong>validate</strong></td><td class="td">FALSE</td><td class="td">TRUE or FALSE (boolean)</td><td class="td">Whether to validate the email address.</td> -</tr><tr> -<td class="td"><strong>priority</strong></td><td class="td">3</td><td class="td">1, 2, 3, 4, 5</td><td class="td">Email Priority. 1 = highest. 5 = lowest. 3 = normal.</td> -</tr> -<tr> - <td class="td"><strong>crlf</strong></td> - <td class="td">\n</td> - <td class="td">"\r\n" or "\n" or "\r"</td> - <td class="td">Newline character. (Use "\r\n" to comply with RFC 822).</td> -</tr> -<tr> -<td class="td"><strong>newline</strong></td><td class="td">\n</td> -<td class="td">"\r\n" or "\n" or "\r"</td><td class="td">Newline character. (Use "\r\n" to comply with RFC 822).</td> -</tr><tr> -<td class="td"><strong>bcc_batch_mode</strong></td><td class="td">FALSE</td><td class="td">TRUE or FALSE (boolean)</td><td class="td">Enable BCC Batch Mode.</td> -</tr><tr> -<td class="td"><strong>bcc_batch_size</strong></td><td class="td">200</td><td class="td">None</td><td class="td">Number of emails in each BCC batch.</td> -</tr> -</table> - - -<h2>Email Function Reference</h2> - -<h3>$this->email->from()</h3> -<p>Sets the email address and name of the person sending the email:</p> -<code>$this->email->from('<var>you@example.com</var>', '<var>Your Name</var>');</code> - -<h3>$this->email->reply_to()</h3> -<p>Sets the reply-to address. If the information is not provided the information in the "from" function is used. Example:</p> -<code>$this->email->reply_to('<var>you@example.com</var>', '<var>Your Name</var>');</code> - - -<h3>$this->email->to()</h3> -<p>Sets the email address(s) of the recipient(s). Can be a single email, a comma-delimited list or an array:</p> - -<code>$this->email->to('<var>someone@example.com</var>');</code> -<code>$this->email->to('<var>one@example.com</var>, <var>two@example.com</var>, <var>three@example.com</var>');</code> - -<code>$list = array('<var>one@example.com</var>', '<var>two@example.com</var>', '<var>three@example.com</var>');<br /> -<br /> -$this->email->to(<var>$list</var>);</code> - -<h3>$this->email->cc()</h3> -<p>Sets the CC email address(s). Just like the "to", can be a single email, a comma-delimited list or an array.</p> - -<h3>$this->email->bcc()</h3> -<p>Sets the BCC email address(s). Just like the "to", can be a single email, a comma-delimited list or an array.</p> - - -<h3>$this->email->subject()</h3> -<p>Sets the email subject:</p> -<code>$this->email->subject('<var>This is my subject</var>');</code> - -<h3>$this->email->message()</h3> -<p>Sets the email message body:</p> -<code>$this->email->message('<var>This is my message</var>');</code> - -<h3>$this->email->set_alt_message()</h3> -<p>Sets the alternative email message body:</p> -<code>$this->email->set_alt_message('<var>This is the alternative message</var>');</code> - -<p>This is an optional message string which can be used if you send HTML formatted email. It lets you specify an alternative -message with no HTML formatting which is added to the header string for people who do not accept HTML email. -If you do not set your own message CodeIgniter will extract the message from your HTML email and strip the tags.</p> - - - -<h3>$this->email->clear()</h3> -<p>Initializes all the email variables to an empty state. This function is intended for use if you run the email sending function -in a loop, permitting the data to be reset between cycles.</p> -<code>foreach ($list as $name => $address)<br /> -{<br /> - $this->email->clear();<br /><br /> - - $this->email->to($address);<br /> - $this->email->from('your@example.com');<br /> - $this->email->subject('Here is your info '.$name);<br /> - $this->email->message('Hi '.$name.' Here is the info you requested.');<br /> - $this->email->send();<br /> -}</code> - -<p>If you set the parameter to TRUE any attachments will be cleared as well:</p> - -<code>$this->email->clear(TRUE);</code> - - -<h3>$this->email->send()</h3> -<p>The Email sending function. Returns boolean TRUE or FALSE based on success or failure, enabling it to be used -conditionally:</p> - -<code>if ( ! $this->email->send())<br /> -{<br /> - // Generate error<br /> -}</code> - - -<h3>$this->email->attach()</h3> -<p>Enables you to send an attachment. Put the file path/name in the first parameter. Note: Use a file path, not a URL. -For multiple attachments use the function multiple times. For example:</p> - -<code>$this->email->attach('/path/to/photo1.jpg');<br /> -$this->email->attach('/path/to/photo2.jpg');<br /> -$this->email->attach('/path/to/photo3.jpg');<br /> -<br /> -$this->email->send();</code> - - -<h3>$this->email->print_debugger()</h3> -<p>Returns a string containing any server messages, the email headers, and the email messsage. Useful for debugging.</p> - - -<h2>Overriding Word Wrapping</h2> - -<p>If you have word wrapping enabled (recommended to comply with RFC 822) and you have a very long link in your email it can -get wrapped too, causing it to become un-clickable by the person receiving it. CodeIgniter lets you manually override -word wrapping within part of your message like this:</p> - -<code>The text of your email that<br /> -gets wrapped normally.<br /> -<br /> -<var>{unwrap}</var>http://example.com/a_long_link_that_should_not_be_wrapped.html<var>{/unwrap}</var><br /> -<br /> -More text that will be<br /> -wrapped normally.</code> - -<p>Place the item you do not want word-wrapped between: <var>{unwrap}</var> <var>{/unwrap}</var></p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../database/index.html">Database Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="encryption.html">Encryption Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html deleted file mode 100644 index 6332b7e86..000000000 --- a/user_guide/libraries/encryption.html +++ /dev/null @@ -1,221 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Encryption Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Encryption Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Encryption Class</h1> - -<p>The Encryption Class provides two-way data encryption. It is encrypted using -the Mcrypt library. The Encryption Class requires the Mcrypt extension to run.</p> - - -<h2>Setting your Key</h2> - -<p>A <em>key</em> is a piece of information that controls the cryptographic process and permits an encrypted string to be decoded. -In fact, the key you chose will provide the <strong>only</strong> means to decode data that was encrypted with that key, -so not only must you choose the key carefully, you must never change it if you intend use it for persistent data.</p> - -<p>It goes without saying that you should guard your key carefully. -Should someone gain access to your key, the data will be easily decoded. If your server is not totally under your control -it's impossible to ensure key security so you may want to think carefully before using it for anything -that requires high security, like storing credit card numbers.</p> - -<p>To take maximum advantage of the encryption algorithm, your key should be 32 characters in length (128 bits). -The key should be as random a string as you can concoct, with numbers and uppercase and lowercase letters. -Your key should <strong>not</strong> be a simple text string. In order to be cryptographically secure it -needs to be as random as possible.</p> - -<p>Your key can be either stored in your <dfn>application/config/config.php</dfn>, or you can design your own -storage mechanism and pass the key dynamically when encoding/decoding.</p> - -<p>To save your key to your <dfn>application/config/config.php</dfn>, open the file and set:</p> -<code>$config['encryption_key'] = "YOUR KEY";</code> - - -<h2>Message Length</h2> - -<p>It's important for you to know that the encoded messages the encryption function generates will be approximately 2.6 times longer than the original -message. For example, if you encrypt the string "my super secret data", which is 21 characters in length, you'll end up -with an encoded string that is roughly 55 characters (we say "roughly" because the encoded string length increments in -64 bit clusters, so it's not exactly linear). Keep this information in mind when selecting your data storage mechanism. Cookies, -for example, can only hold 4K of information.</p> - - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Encryption class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('encrypt');</code> -<p>Once loaded, the Encrypt library object will be available using: <dfn>$this->encrypt</dfn></p> - - -<h2>$this->encrypt->encode()</h2> - -<p>Performs the data encryption and returns it as a string. Example:</p> -<code> -$msg = 'My secret message';<br /> -<br /> -$encrypted_string = $this->encrypt->encode($msg);</code> - -<p>You can optionally pass your encryption key via the second parameter if you don't want to use the one in your config file:</p> - -<code> -$msg = 'My secret message';<br /> -$key = 'super-secret-key';<br /> -<br /> -$encrypted_string = $this->encrypt->encode($msg, $key);</code> - - -<h2>$this->encrypt->decode()</h2> - -<p>Decrypts an encoded string. Example:</p> - -<code> -$encrypted_string = 'APANtByIGI1BpVXZTJgcsAG8GZl8pdwwa84';<br /> -<br /> -$plaintext_string = $this->encrypt->decode($encrypted_string);</code> - -<p>You can optionally pass your encryption key via the second parameter if you don't want to use the one in your config file:</p> - -<code> -$msg = 'My secret message';<br /> -$key = 'super-secret-key';<br /> -<br /> -$encrypted_string = $this->encrypt->decode($msg, $key);</code> - - -<h2>$this->encrypt->set_cipher();</h2> - -<p>Permits you to set an Mcrypt cipher. By default it uses <samp>MCRYPT_RIJNDAEL_256</samp>. Example:</p> -<code>$this->encrypt->set_cipher(MCRYPT_BLOWFISH);</code> -<p>Please visit php.net for a list of <a href="http://php.net/mcrypt">available ciphers</a>.</p> - -<p>If you'd like to manually test whether your server supports Mcrypt you can use:</p> -<code>echo ( ! function_exists('mcrypt_encrypt')) ? 'Nope' : 'Yup';</code> - - -<h2>$this->encrypt->set_mode();</h2> - -<p>Permits you to set an Mcrypt mode. By default it uses <samp>MCRYPT_MODE_CBC</samp>. Example:</p> -<code>$this->encrypt->set_mode(MCRYPT_MODE_CFB);</code> -<p>Please visit php.net for a list of <a href="http://php.net/mcrypt">available modes</a>.</p> - - -<h2>$this->encrypt->sha1();</h2> -<p>SHA1 encoding function. Provide a string and it will return a 160 bit one way hash. Note: SHA1, just like MD5 is non-decodable. Example:</p> -<code>$hash = $this->encrypt->sha1('Some string');</code> - -<p>Many PHP installations have SHA1 support by default so if all you need is to encode a hash it's simpler to use the native -function:</p> - -<code>$hash = sha1('Some string');</code> - -<p>If your server does not support SHA1 you can use the provided function.</p> - -<h2 id="legacy">$this->encrypt->encode_from_legacy(<kbd>$orig_data</kbd>, <kbd>$legacy_mode</kbd> = MCRYPT_MODE_ECB, <kbd>$key</kbd> = '');</h2> -<p>Enables you to re-encode data that was originally encrypted with CodeIgniter 1.x to be compatible with the Encryption library in CodeIgniter 2.x. It is only - necessary to use this method if you have encrypted data stored permanently such as in a file or database and are on a server that supports Mcrypt. "Light" use encryption - such as encrypted session data or transitory encrypted flashdata require no intervention on your part. However, existing encrypted Sessions will be - destroyed since data encrypted prior to 2.x will not be decoded.</p> - -<p class="important"><strong>Why only a method to re-encode the data instead of maintaining legacy methods for both encoding and decoding?</strong> The algorithms in - the Encryption library have improved in CodeIgniter 2.x both for performance and security, and we do not wish to encourage continued use of the older methods. - You can of course extend the Encryption library if you wish and replace the new methods with the old and retain seamless compatibility with CodeIgniter 1.x - encrypted data, but this a decision that a developer should make cautiously and deliberately, if at all.</p> - -<code>$new_data = $this->encrypt->encode_from_legacy(<kbd>$old_encrypted_string</kbd>);</code> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> - <th>Parameter</th> - <th>Default</th> - <th>Description</th> -</tr> -<tr> - <td class="td"><strong>$orig_data</strong></td> - <td class="td">n/a</td> - <td class="td">The original encrypted data from CodeIgniter 1.x's Encryption library</td> -</tr> -<tr> - <td class="td"><strong>$legacy_mode</strong></td> - <td class="td">MCRYPT_MODE_ECB</td> - <td class="td">The Mcrypt mode that was used to generate the original encrypted data. CodeIgniter 1.x's default was MCRYPT_MODE_ECB, and it will - assume that to be the case unless overridden by this parameter.</td> -</tr> -<tr> - <td class="td"><strong>$key</strong></td> - <td class="td">n/a</td> - <td class="td">The encryption key. This it typically specified in your config file as outlined above.</td> -</tr> -</table> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="email.html">Email Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="file_uploading.html">File Uploading Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html deleted file mode 100644 index 513d6506e..000000000 --- a/user_guide/libraries/file_uploading.html +++ /dev/null @@ -1,451 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>File Uploading Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -File Uploading Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>File Uploading Class</h1> - -<p>CodeIgniter's File Uploading Class permits files to be uploaded. You can set various -preferences, restricting the type and size of the files.</p> - - -<h2>The Process</h2> - -<p>Uploading a file involves the following general process:</p> - - -<ul> -<li>An upload form is displayed, allowing a user to select a file and upload it.</li> -<li>When the form is submitted, the file is uploaded to the destination you specify.</li> -<li>Along the way, the file is validated to make sure it is allowed to be uploaded based on the preferences you set.</li> -<li>Once uploaded, the user will be shown a success message.</li> -</ul> - -<p>To demonstrate this process here is brief tutorial. Afterward you'll find reference information.</p> - -<h2>Creating the Upload Form</h2> - - - -<p>Using a text editor, create a form called <dfn>upload_form.php</dfn>. In it, place this code and save it to your <samp>applications/views/</samp> -folder:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="23"> -<html> -<head> -<title>Upload Form</title> -</head> -<body> - -<?php echo $error;?> - -<?php echo form_open_multipart('upload/do_upload');?> - -<input type="file" name="userfile" size="20" /> - -<br /><br /> - -<input type="submit" value="upload" /> - -</form> - -</body> -</html></textarea> - -<p>You'll notice we are using a form helper to create the opening form tag. File uploads require a multipart form, so the helper -creates the proper syntax for you. You'll also notice we have an $error variable. This is so we can show error messages in the event -the user does something wrong.</p> - - -<h2>The Success Page</h2> - -<p>Using a text editor, create a form called <dfn>upload_success.php</dfn>. -In it, place this code and save it to your <samp>applications/views/</samp> folder:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="20"><html> -<head> -<title>Upload Form</title> -</head> -<body> - -<h3>Your file was successfully uploaded!</h3> - -<ul> -<?php foreach ($upload_data as $item => $value):?> -<li><?php echo $item;?>: <?php echo $value;?></li> -<?php endforeach; ?> -</ul> - -<p><?php echo anchor('upload', 'Upload Another File!'); ?></p> - -</body> -</html></textarea> - - -<h2>The Controller</h2> - -<p>Using a text editor, create a controller called <dfn>upload.php</dfn>. In it, place this code and save it to your <samp>applications/controllers/</samp> -folder:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="43"><?php - -class Upload extends CI_Controller { - - function __construct() - { - parent::__construct(); - $this->load->helper(array('form', 'url')); - } - - function index() - { - $this->load->view('upload_form', array('error' => ' ' )); - } - - function do_upload() - { - $config['upload_path'] = './uploads/'; - $config['allowed_types'] = 'gif|jpg|png'; - $config['max_size'] = '100'; - $config['max_width'] = '1024'; - $config['max_height'] = '768'; - - $this->load->library('upload', $config); - - if ( ! $this->upload->do_upload()) - { - $error = array('error' => $this->upload->display_errors()); - - $this->load->view('upload_form', $error); - } - else - { - $data = array('upload_data' => $this->upload->data()); - - $this->load->view('upload_success', $data); - } - } -} -?></textarea> - - -<h2>The Upload Folder</h2> - -<p>You'll need a destination folder for your uploaded images. Create a folder at the root of your CodeIgniter installation called -<dfn>uploads</dfn> and set its file permissions to 777.</p> - - -<h2>Try it!</h2> - -<p>To try your form, visit your site using a URL similar to this one:</p> - -<code>example.com/index.php/<var>upload</var>/</code> - -<p>You should see an upload form. Try uploading an image file (either a jpg, gif, or png). If the path in your -controller is correct it should work.</p> - - -<p> </p> - -<h1>Reference Guide</h1> - - -<h2>Initializing the Upload Class</h2> - -<p>Like most other classes in CodeIgniter, the Upload class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('upload');</code> -<p>Once the Upload class is loaded, the object will be available using: <dfn>$this->upload</dfn></p> - - -<h2>Setting Preferences</h2> - -<p>Similar to other libraries, you'll control what is allowed to be upload based on your preferences. In the controller you -built above you set the following preferences:</p> - -<code>$config['upload_path'] = './uploads/';<br /> -$config['allowed_types'] = 'gif|jpg|png';<br /> -$config['max_size'] = '100';<br /> -$config['max_width'] = '1024';<br /> -$config['max_height'] = '768';<br /> -<br /> -$this->load->library('upload', $config);<br /><br /> - -// Alternately you can set preferences by calling the initialize function. Useful if you auto-load the class:<br /> -$this->upload->initialize($config);</code> - -<p>The above preferences should be fairly self-explanatory. Below is a table describing all available preferences.</p> - - -<h2>Preferences</h2> - -<p>The following preferences are available. The default value indicates what will be used if you do not specify that preference.</p> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr> - -<tr> -<td class="td"><strong>upload_path</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">The path to the folder where the upload should be placed. The folder must be writable and the path can be absolute or relative.</td> -</tr> - -<tr> -<td class="td"><strong>allowed_types</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">The mime types corresponding to the types of files you allow to be uploaded. Usually the file extension can be used as the mime type. Separate multiple types with a pipe.</td> -</tr> - - -<tr> -<td class="td"><strong>file_name</strong></td> -<td class="td">None</td> -<td class="td">Desired file name</td> -<td class="td"> - <p>If set CodeIgniter will rename the uploaded file to this name. The extension provided in the file name must also be an allowed file type.</p> -</td> -</tr> - -<tr> -<td class="td"><strong>overwrite</strong></td> -<td class="td">FALSE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">If set to true, if a file with the same name as the one you are uploading exists, it will be overwritten. If set to false, a number will be appended to the filename if another with the same name exists.</td> -</tr> - - -<tr> -<td class="td"><strong>max_size</strong></td> -<td class="td">0</td> -<td class="td">None</td> -<td class="td">The maximum size (in kilobytes) that the file can be. Set to zero for no limit. Note: Most PHP installations have their own limit, as specified in the php.ini file. Usually 2 MB (or 2048 KB) by default.</td> -</tr> - -<tr> -<td class="td"><strong>max_width</strong></td> -<td class="td">0</td> -<td class="td">None</td> -<td class="td">The maximum width (in pixels) that the file can be. Set to zero for no limit.</td> -</tr> - -<tr> -<td class="td"><strong>max_height</strong></td> -<td class="td">0</td> -<td class="td">None</td> -<td class="td">The maximum height (in pixels) that the file can be. Set to zero for no limit.</td> -</tr> - -<tr> -<td class="td"><strong>max_filename</strong></td> -<td class="td">0</td> -<td class="td">None</td> -<td class="td">The maximum length that a file name can be. Set to zero for no limit.</td> -</tr> - -<tr> -<td class="td"><strong>encrypt_name</strong></td> -<td class="td">FALSE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">If set to TRUE the file name will be converted to a random encrypted string. This can be useful if you would like the file saved with a name that can not be discerned by the person uploading it.</td> -</tr> - -<tr> -<td class="td"><strong>remove_spaces</strong></td> -<td class="td">TRUE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">If set to TRUE, any spaces in the file name will be converted to underscores. This is recommended.</td> -</tr> -</table> - - -<h2>Setting preferences in a config file</h2> - -<p>If you prefer not to set preferences using the above method, you can instead put them into a config file. -Simply create a new file called the <var>upload.php</var>, add the <var>$config</var> -array in that file. Then save the file in: <var>config/upload.php</var> and it will be used automatically. You -will NOT need to use the <dfn>$this->upload->initialize</dfn> function if you save your preferences in a config file.</p> - - -<h2>Function Reference</h2> - -<p>The following functions are available</p> - - -<h2>$this->upload->do_upload()</h2> - -<p>Performs the upload based on the preferences you've set. Note: By default the upload routine expects the file to come from a form field -called <dfn>userfile</dfn>, and the form must be a "multipart type:</p> - -<code><form method="post" action="some_action" enctype="multipart/form-data" /></code> - -<p>If you would like to set your own field name simply pass its value to the <dfn>do_upload</dfn> function:</p> - -<code> -$field_name = "some_field_name";<br /> -$this->upload->do_upload($field_name)</code> - - -<h2>$this->upload->display_errors()</h2> - -<p>Retrieves any error messages if the <dfn>do_upload()</dfn> function returned false. The function does not echo automatically, it -returns the data so you can assign it however you need.</p> - -<h3>Formatting Errors</h3> -<p>By default the above function wraps any errors within <p> tags. You can set your own delimiters like this:</p> - -<code>$this->upload->display_errors('<var><p></var>', '<var></p></var>');</code> - -<h2>$this->upload->data()</h2> - -<p>This is a helper function that returns an array containing all of the data related to the file you uploaded. -Here is the array prototype:</p> - -<code>Array<br /> -(<br /> - [file_name] => mypic.jpg<br /> - [file_type] => image/jpeg<br /> - [file_path] => /path/to/your/upload/<br /> - [full_path] => /path/to/your/upload/jpg.jpg<br /> - [raw_name] => mypic<br /> - [orig_name] => mypic.jpg<br /> - [client_name] => mypic.jpg<br /> - [file_ext] => .jpg<br /> - [file_size] => 22.2<br /> - [is_image] => 1<br /> - [image_width] => 800<br /> - [image_height] => 600<br /> - [image_type] => jpeg<br /> - [image_size_str] => width="800" height="200"<br /> -)</code> - -<h3>Explanation</h3> - -<p>Here is an explanation of the above array items.</p> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr><th>Item</th><th>Description</th></tr> - -<tr><td class="td"><strong>file_name</strong></td> -<td class="td">The name of the file that was uploaded including the file extension.</td></tr> - -<tr><td class="td"><strong>file_type</strong></td> -<td class="td">The file's Mime type</td></tr> - -<tr><td class="td"><strong>file_path</strong></td> -<td class="td">The absolute server path to the file</td></tr> - -<tr><td class="td"><strong>full_path</strong></td> -<td class="td">The absolute server path including the file name</td></tr> - -<tr><td class="td"><strong>raw_name</strong></td> -<td class="td">The file name without the extension</td></tr> - -<tr><td class="td"><strong>orig_name</strong></td> -<td class="td">The original file name. This is only useful if you use the encrypted name option.</td></tr> - -<tr><td class="td"><strong>client_name</strong></td> -<td class="td">The file name as supplied by the client user agent, prior to any file name preparation or incrementing.</td></tr> - -<tr><td class="td"><strong>file_ext</strong></td> -<td class="td">The file extension with period</td></tr> - -<tr><td class="td"><strong>file_size</strong></td> -<td class="td">The file size in kilobytes</td></tr> - -<tr><td class="td"><strong>is_image</strong></td> -<td class="td">Whether the file is an image or not. 1 = image. 0 = not.</td></tr> - -<tr><td class="td"><strong>image_width</strong></td> -<td class="td">Image width.</td></tr> - -<tr><td class="td"><strong>image_height</strong></td> -<td class="td">Image height</td></tr> - -<tr><td class="td"><strong>image_type</strong></td> -<td class="td">Image type. Typically the file extension without the period.</td></tr> - -<tr><td class="td"><strong>image_size_str</strong></td> -<td class="td">A string containing the width and height. Useful to put into an image tag.</td></tr> - - -</table> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="encryption.html">Encryption Helper</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="form_validation.html">Form Validation Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html deleted file mode 100644 index a89418f96..000000000 --- a/user_guide/libraries/form_validation.html +++ /dev/null @@ -1,1250 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Form Validation : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Form Validation -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Form Validation</h1> - -<p>CodeIgniter provides a comprehensive form validation and data prepping class that helps minimize the amount of code you'll write.</p> - -<ul> -<li><a href="#overview">Overview</a></li> -<li><a href="#tutorial">Form Validation Tutorial</a> - - <ul> - <li><a href="#theform">The Form</a></li> - <li><a href="#thesuccesspage">The Success Page</a></li> - <li><a href="#thecontroller">The Controller</a></li> - <li><a href="#validationrules">Setting Validation Rules</a></li> - <li><a href="#validationrulesasarray">Setting Validation Rules Using an Array</a></li> - <li><a href="#cascadingrules">Cascading Rules</a></li> - <li><a href="#preppingdata">Prepping Data</a></li> - <li><a href="#repopulatingform">Re-populating the Form</a></li> - <li><a href="#callbacks">Callbacks</a></li> - <li><a href="#settingerrors">Setting Error Messages</a></li> - <li><a href="#errordelimiters">Changing the Error Delimiters</a></li> - <li><a href="#translatingfn">Translating Field Names</a></li> - <li><a href="#individualerrors">Showing Errors Individually</a></li> - <li><a href="#savingtoconfig">Saving Sets of Validation Rules to a Config File</a></li> - <li><a href="#arraysasfields">Using Arrays as Field Names</a></li> - </ul> -</li> -<li><a href="#rulereference">Rule Reference</a></li> -<li><a href="#preppingreference">Prepping Reference</a></li> -<li><a href="#functionreference">Function Reference</a></li> -<li><a href="#helperreference">Helper Reference</a></li> - -</ul> - - - - - - -<p> </p> - -<a name="overview"></a> -<h1>Overview</h1> - - -<p>Before explaining CodeIgniter's approach to data validation, let's describe the ideal scenario:</p> - -<ol> -<li>A form is displayed.</li> -<li>You fill it in and submit it.</li> -<li>If you submitted something invalid, or perhaps missed a required item, the form is redisplayed containing your data -along with an error message describing the problem.</li> -<li>This process continues until you have submitted a valid form.</li> -</ol> - -<p>On the receiving end, the script must:</p> - -<ol> -<li>Check for required data.</li> -<li>Verify that the data is of the correct type, and meets the correct criteria. For example, if a username is submitted -it must be validated to contain only permitted characters. It must be of a minimum length, -and not exceed a maximum length. The username can't be someone else's existing username, or perhaps even a reserved word. Etc.</li> -<li>Sanitize the data for security.</li> -<li>Pre-format the data if needed (Does the data need to be trimmed? HTML encoded? Etc.)</li> -<li>Prep the data for insertion in the database.</li> -</ol> - - -<p>Although there is nothing terribly complex about the above process, it usually requires a significant -amount of code, and to display error messages, various control structures are usually placed within the form HTML. -Form validation, while simple to create, is generally very messy and tedious to implement.</p> - -<p> </p> - - -<a name="tutorial"></a> -<h1>Form Validation Tutorial</h1> - -<p>What follows is a "hands on" tutorial for implementing CodeIgniters Form Validation.</p> - - -<p>In order to implement form validation you'll need three things:</p> - -<ol> -<li>A <a href="../general/views.html">View</a> file containing a form.</li> -<li>A View file containing a "success" message to be displayed upon successful submission.</li> -<li>A <a href="../general/controllers.html">controller</a> function to receive and process the submitted data.</li> -</ol> - -<p>Let's create those three things, using a member sign-up form as the example.</p> - - - -<a name="theform"></a> - -<h2>The Form</h2> - -<p>Using a text editor, create a form called <dfn>myform.php</dfn>. In it, place this code and save it to your <samp>applications/views/</samp> -folder:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="30"><html> -<head> -<title>My Form</title> -</head> -<body> - -<?php echo validation_errors(); ?> - -<?php echo form_open('form'); ?> - -<h5>Username</h5> -<input type="text" name="username" value="" size="50" /> - -<h5>Password</h5> -<input type="text" name="password" value="" size="50" /> - -<h5>Password Confirm</h5> -<input type="text" name="passconf" value="" size="50" /> - -<h5>Email Address</h5> -<input type="text" name="email" value="" size="50" /> - -<div><input type="submit" value="Submit" /></div> - -</form> - -</body> -</html> -</textarea> - - - - -<a name="thesuccesspage"></a> -<h2>The Success Page</h2> - - -<p>Using a text editor, create a form called <dfn>formsuccess.php</dfn>. In it, place this code and save it to your <samp>applications/views/</samp> -folder:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="14"> -<html> -<head> -<title>My Form</title> -</head> -<body> - -<h3>Your form was successfully submitted!</h3> - -<p><?php echo anchor('form', 'Try it again!'); ?></p> - -</body> -</html> -</textarea> - - - -<a name="thecontroller"></a> -<h2>The Controller</h2> - -<p>Using a text editor, create a controller called <dfn>form.php</dfn>. In it, place this code and save it to your <samp>applications/controllers/</samp> -folder:</p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="21"><?php - -class Form extends CI_Controller { - - function index() - { - $this->load->helper(array('form', 'url')); - - $this->load->library('form_validation'); - - if ($this->form_validation->run() == FALSE) - { - $this->load->view('myform'); - } - else - { - $this->load->view('formsuccess'); - } - } -} -?></textarea> - - -<h2>Try it!</h2> - -<p>To try your form, visit your site using a URL similar to this one:</p> - -<code>example.com/index.php/<var>form</var>/</code> - -<p><dfn>If you submit the form you should simply see the form reload. That's because you haven't set up any validation -rules yet.</dfn></p> - -<p><strong>Since you haven't told the Form Validation class to validate anything yet, it returns <kbd>FALSE</kbd> (boolean false) by default. The <samp>run()</samp> -function only returns <kbd>TRUE</kbd> if it has successfully applied your rules without any of them failing.</strong></p> - - -<h2>Explanation</h2> - -<p>You'll notice several things about the above pages:</p> - -<p>The <dfn>form</dfn> (myform.php) is a standard web form with a couple exceptions:</p> - -<ol> -<li>It uses a <dfn>form helper</dfn> to create the form opening. -Technically, this isn't necessary. You could create the form using standard HTML. However, the benefit of using the helper -is that it generates the action URL for you, based on the URL in your config file. This makes your application more portable in the event your URLs change.</li> - -<li>At the top of the form you'll notice the following function call: -<code><?php echo validation_errors(); ?></code> - -<p>This function will return any error messages sent back by the validator. If there are no messages it returns an empty string.</p> -</li> -</ol> - -<p>The <dfn>controller</dfn> (form.php) has one function: <dfn>index()</dfn>. This function initializes the validation class and -loads the <var>form helper</var> and <var>URL helper</var> used by your view files. It also <samp>runs</samp> -the validation routine. Based on -whether the validation was successful it either presents the form or the success page.</p> - - - - -<a name="validationrules"></a> - -<h2>Setting Validation Rules</h2> - -<p>CodeIgniter lets you set as many validation rules as you need for a given field, cascading them in order, and it even lets you prep and pre-process the field data -at the same time. To set validation rules you will use the <dfn>set_rules()</dfn> function:</p> - -<code>$this->form_validation->set_rules();</code> - -<p>The above function takes <strong>three</strong> parameters as input:</p> - -<ol> - <li>The field name - the exact name you've given the form field.</li> - <li>A "human" name for this field, which will be inserted into the error message. For example, if your field is named "user" you might give it a human name of "Username". <strong>Note:</strong> If you would like the field name to be stored in a language file, please see <a href="#translatingfn">Translating Field Names</a>.</li> - <li>The validation rules for this form field.</li> -</ol> - - -<p><br />Here is an example. In your <dfn>controller</dfn> (form.php), add this code just below the validation initialization function:</p> - -<code> -$this->form_validation->set_rules('username', 'Username', 'required');<br /> -$this->form_validation->set_rules('password', 'Password', 'required');<br /> -$this->form_validation->set_rules('passconf', 'Password Confirmation', 'required');<br /> -$this->form_validation->set_rules('email', 'Email', 'required');<br /> -</code> - -<p>Your controller should now look like this:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="28"><?php - -class Form extends CI_Controller { - - function index() - { - $this->load->helper(array('form', 'url')); - - $this->load->library('form_validation'); - - $this->form_validation->set_rules('username', 'Username', 'required'); - $this->form_validation->set_rules('password', 'Password', 'required'); - $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); - $this->form_validation->set_rules('email', 'Email', 'required'); - - if ($this->form_validation->run() == FALSE) - { - $this->load->view('myform'); - } - else - { - $this->load->view('formsuccess'); - } - } -} -?></textarea> - -<p><dfn>Now submit the form with the fields blank and you should see the error messages. -If you submit the form with all the fields populated you'll see your success page.</dfn></p> - -<p class="important"><strong>Note:</strong> The form fields are not yet being re-populated with the data when -there is an error. We'll get to that shortly.</p> - - - - -<a name="validationrulesasarray"></a> -<h2>Setting Rules Using an Array</h2> - -<p>Before moving on it should be noted that the rule setting function can be passed an array if you prefer to set all your rules in one action. -If you use this approach you must name your array keys as indicated:</p> - -<code> -$config = array(<br /> - array(<br /> - 'field' => 'username', <br /> - 'label' => 'Username', <br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'password', <br /> - 'label' => 'Password', <br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'passconf', <br /> - 'label' => 'Password Confirmation', <br /> - 'rules' => 'required'<br /> - ), <br /> - array(<br /> - 'field' => 'email', <br /> - 'label' => 'Email', <br /> - 'rules' => 'required'<br /> - )<br /> - );<br /> -<br /> -$this->form_validation->set_rules($config); -</code> - - - - - - -<a name="cascadingrules"></a> -<h2>Cascading Rules</h2> - -<p>CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules in the third parameter of rule setting function, like this:</p> - -<code> -$this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]');<br /> -$this->form_validation->set_rules('password', 'Password', 'required|matches[passconf]');<br /> -$this->form_validation->set_rules('passconf', 'Password Confirmation', 'required');<br /> -$this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]');<br /> -</code> - -<p>The above code sets the following rules:</p> - -<ol> -<li>The username field be no shorter than 5 characters and no longer than 12.</li> -<li>The password field must match the password confirmation field.</li> -<li>The email field must contain a valid email address.</li> -</ol> - -<p>Give it a try! Submit your form without the proper data and you'll see new error messages that correspond to your new rules. -There are numerous rules available which you can read about in the validation reference.</p> - - - -<a name="preppingdata"></a> -<h2>Prepping Data</h2> - -<p>In addition to the validation functions like the ones we used above, you can also prep your data in various ways. -For example, you can set up rules like this:</p> - -<code> -$this->form_validation->set_rules('username', 'Username', '<kbd>trim</kbd>|required|min_length[5]|max_length[12]|<kbd>xss_clean</kbd>');<br /> -$this->form_validation->set_rules('password', 'Password', '<kbd>trim</kbd>|required|matches[passconf]|<kbd>md5</kbd>');<br /> -$this->form_validation->set_rules('passconf', 'Password Confirmation', '<kbd>trim</kbd>|required');<br /> -$this->form_validation->set_rules('email', 'Email', '<kbd>trim</kbd>|required|valid_email');<br /> -</code> - - -<p>In the above example, we are "trimming" the fields, converting the password to MD5, and running the username through -the "xss_clean" function, which removes malicious data.</p> - -<p><strong>Any native PHP function that accepts one parameter can be used as a rule, like <dfn>htmlspecialchars</dfn>, -<dfn>trim</dfn>, <dfn>MD5</dfn>, etc.</strong></p> - -<p><strong>Note:</strong> You will generally want to use the prepping functions <strong>after</strong> -the validation rules so if there is an error, the original data will be shown in the form.</p> - - - - -<a name="repopulatingform"></a> -<h2>Re-populating the form</h2> - -<p>Thus far we have only been dealing with errors. It's time to repopulate the form field with the submitted data. CodeIgniter offers several helper functions -that permit you to do this. The one you will use most commonly is:</p> - -<code>set_value('field name')</code> - - -<p>Open your <dfn>myform.php</dfn> view file and update the <strong>value</strong> in each field using the <dfn>set_value()</dfn> function:</p> - -<p><strong>Don't forget to include each field name in the <dfn>set_value()</dfn> functions!</strong></p> - - -<textarea class="textarea" style="width:100%" cols="50" rows="30"> -<html> -<head> -<title>My Form</title> -</head> -<body> - -<?php echo validation_errors(); ?> - -<?php echo form_open('form'); ?> - -<h5>Username</h5> -<input type="text" name="username" value="<?php echo set_value('username'); ?>" size="50" /> - -<h5>Password</h5> -<input type="text" name="password" value="<?php echo set_value('password'); ?>" size="50" /> - -<h5>Password Confirm</h5> -<input type="text" name="passconf" value="<?php echo set_value('passconf'); ?>" size="50" /> - -<h5>Email Address</h5> -<input type="text" name="email" value="<?php echo set_value('email'); ?>" size="50" /> - -<div><input type="submit" value="Submit" /></div> - -</form> - -</body> -</html> -</textarea> - - -<p><dfn>Now reload your page and submit the form so that it triggers an error. Your form fields should now be re-populated</dfn></p> - -<p class="important"><strong>Note:</strong> The <a href="#functionreference">Function Reference</a> section below contains functions that -permit you to re-populate <select> menus, radio buttons, and checkboxes.</p> - - -<p><strong>Important Note:</strong> If you use an array as the name of a form field, you must supply it as an array to the function. Example:</p> - -<code><input type="text" name="<kbd>colors[]</kbd>" value="<?php echo set_value('<kbd>colors[]</kbd>'); ?>" size="50" /></code> - -<p>For more info please see the <a href="#arraysasfields">Using Arrays as Field Names</a> section below.</p> - - - - - -<a name="callbacks"></a> -<h2>Callbacks: Your own Validation Functions</h2> - -<p>The validation system supports callbacks to your own validation functions. This permits you to extend the validation class -to meet your needs. For example, if you need to run a database query to see if the user is choosing a unique username, you can -create a callback function that does that. Let's create a example of this.</p> - -<p>In your controller, change the "username" rule to this:</p> - -<code>$this->form_validation->set_rules('username', 'Username', '<kbd>callback_username_check</kbd>');</code> - -<p>Then add a new function called <dfn>username_check</dfn> to your controller. Here's how your controller should now look:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="40"><?php - -class Form extends CI_Controller { - - public function index() - { - $this->load->helper(array('form', 'url')); - - $this->load->library('form_validation'); - - $this->form_validation->set_rules('username', 'Username', 'callback_username_check'); - $this->form_validation->set_rules('password', 'Password', 'required'); - $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); - $this->form_validation->set_rules('email', 'Email', 'required|is_unique[users.email]'); - - if ($this->form_validation->run() == FALSE) - { - $this->load->view('myform'); - } - else - { - $this->load->view('formsuccess'); - } - } - - public function username_check($str) - { - if ($str == 'test') - { - $this->form_validation->set_message('username_check', 'The %s field can not be the word "test"'); - return FALSE; - } - else - { - return TRUE; - } - } - -} -?></textarea> - -<p><dfn>Reload your form and submit it with the word "test" as the username. You can see that the form field data was passed to your -callback function for you to process.</dfn></p> - -<p>To invoke a callback just put the function name in a rule, with "callback_" as the rule <strong>prefix</strong>. If you need -to receive an extra parameter in your callback function, just add it normally after the function name between square brackets, -as in: "callback_foo<strong>[bar]</strong>", then it will be passed as the second argument of your callback function.</p> - -<p><strong>Note:</strong> You can also process the form data that is passed to your callback and return it. If your callback returns anything other than a boolean TRUE/FALSE -it is assumed that the data is your newly processed form data.</p> - -<a name="settingerrors"></a> -<h2>Setting Error Messages</h2> - - -<p>All of the native error messages are located in the following language file: <dfn>language/english/form_validation_lang.php</dfn></p> - -<p>To set your own custom message you can either edit that file, or use the following function:</p> - -<code>$this->form_validation->set_message('<var>rule</var>', '<var>Error Message</var>');</code> - -<p>Where <var>rule</var> corresponds to the name of a particular rule, and <var>Error Message</var> is the text you would like displayed.</p> - -<p>If you include <dfn>%s</dfn> in your error string, it will be replaced with the "human" name you used for your field when you set your rules.</p> - -<p>In the "callback" example above, the error message was set by passing the name of the function:</p> - -<code>$this->form_validation->set_message('username_check')</code> - -<p>You can also override any error message found in the language file. For example, to change the message for the "required" rule you will do this:</p> - -<code>$this->form_validation->set_message('required', 'Your custom message here');</code> - - - -<a name="translatingfn"></a> -<h2>Translating Field Names</h2> - -<p>If you would like to store the "human" name you passed to the <dfn>set_rules()</dfn> function in a language file, and therefore make the name able to be translated, here's how:</p> - -<p>First, prefix your "human" name with <dfn>lang:</dfn>, as in this example:</p> - -<code> -$this->form_validation->set_rules('first_name', '<kbd>lang:</kbd>first_name', 'required');<br /> -</code> - -<p>Then, store the name in one of your language file arrays (without the prefix):</p> - -<code>$lang['first_name'] = 'First Name';</code> - -<p><strong>Note:</strong> If you store your array item in a language file that is not loaded automatically by CI, you'll need to remember to load it in your controller using:</p> - -<code>$this->lang->load('file_name');</code> - -<p>See the <a href="language.html">Language Class</a> page for more info regarding language files.</p> - - -<a name="errordelimiters"></a> -<h2>Changing the Error Delimiters</h2> - -<p>By default, the Form Validation class adds a paragraph tag (<p>) around each error message shown. You can either change these delimiters globally or -individually.</p> - -<ol> - -<li><strong>Changing delimiters Globally</strong> - -<p>To globally change the error delimiters, in your controller function, just after loading the Form Validation class, add this:</p> - -<code>$this->form_validation->set_error_delimiters('<kbd><div class="error"></kbd>', '<kbd></div></kbd>');</code> - -<p>In this example, we've switched to using div tags.</p> - -</li> - -<li><strong>Changing delimiters Individually</strong> - -<p>Each of the two error generating functions shown in this tutorial can be supplied their own delimiters as follows:</p> - -<code><?php echo form_error('field name', '<kbd><div class="error"></kbd>', '<kbd></div></kbd>'); ?></code> - -<p>Or:</p> - -<code><?php echo validation_errors('<kbd><div class="error"></kbd>', '<kbd></div></kbd>'); ?></code> - -</li> -</ol> - - - - -<a name="individualerrors"></a> -<h2>Showing Errors Individually</h2> - -<p>If you prefer to show an error message next to each form field, rather than as a list, you can use the <dfn>form_error()</dfn> function.</p> - -<p>Try it! Change your form so that it looks like this:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="18"> -<h5>Username</h5> -<?php echo form_error('username'); ?> -<input type="text" name="username" value="<?php echo set_value('username'); ?>" size="50" /> - -<h5>Password</h5> -<?php echo form_error('password'); ?> -<input type="text" name="password" value="<?php echo set_value('password'); ?>" size="50" /> - -<h5>Password Confirm</h5> -<?php echo form_error('passconf'); ?> -<input type="text" name="passconf" value="<?php echo set_value('passconf'); ?>" size="50" /> - -<h5>Email Address</h5> -<?php echo form_error('email'); ?> -<input type="text" name="email" value="<?php echo set_value('email'); ?>" size="50" /> -</textarea> - -<p>If there are no errors, nothing will be shown. If there is an error, the message will appear.</p> - -<p><strong>Important Note:</strong> If you use an array as the name of a form field, you must supply it as an array to the function. Example:</p> - -<code><?php echo form_error('<kbd>options[size]</kbd>'); ?><br /> -<input type="text" name="<kbd>options[size]</kbd>" value="<?php echo set_value("<kbd>options[size]</kbd>"); ?>" size="50" /> -</code> - -<p>For more info please see the <a href="#arraysasfields">Using Arrays as Field Names</a> section below.</p> - - - - -<p> </p> - - -<a name="savingtoconfig"></a> -<h1>Saving Sets of Validation Rules to a Config File</h1> - -<p>A nice feature of the Form Validation class is that it permits you to store all your validation rules for your entire application in a config file. You -can organize these rules into "groups". These groups can either be loaded automatically when a matching controller/function is called, or -you can manually call each set as needed.</p> - -<h3>How to save your rules</h3> - -<p>To store your validation rules, simply create a file named <kbd>form_validation.php</kbd> in your <dfn>application/config/</dfn> folder. -In that file you will place an array named <kbd>$config</kbd> with your rules. As shown earlier, the validation array will have this prototype:</p> - -<code> -$config = array(<br /> - array(<br /> - 'field' => 'username', <br /> - 'label' => 'Username', <br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'password', <br /> - 'label' => 'Password', <br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'passconf', <br /> - 'label' => 'Password Confirmation', <br /> - 'rules' => 'required'<br /> - ), <br /> - array(<br /> - 'field' => 'email', <br /> - 'label' => 'Email', <br /> - 'rules' => 'required'<br /> - )<br /> - );<br /> -</code> - -<p><dfn>Your validation rule file will be loaded automatically and used when you call the run() function.</dfn></p> - -<p class="important">Please note that you MUST name your array $config.</p> - -<h3>Creating Sets of Rules</h3> - -<p>In order to organize your rules into "sets" requires that you place them into "sub arrays". Consider the following example, showing two sets of rules. -We've arbitrarily called these two rules "signup" and "email". You can name your rules anything you want:</p> - - -<code>$config = array(<br /> - '<kbd>signup</kbd>' => array(<br /> - array(<br /> - 'field' => 'username',<br /> - 'label' => 'Username',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'password',<br /> - 'label' => 'Password',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'passconf',<br /> - 'label' => 'PasswordConfirmation',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'email',<br /> - 'label' => 'Email',<br /> - 'rules' => 'required'<br /> - )<br /> - ),<br /> - '<kbd>email</kbd>' => array(<br /> - array(<br /> - 'field' => 'emailaddress',<br /> - 'label' => 'EmailAddress',<br /> - 'rules' => 'required|valid_email'<br /> - ),<br /> - array(<br /> - 'field' => 'name',<br /> - 'label' => 'Name',<br /> - 'rules' => 'required|alpha'<br /> - ),<br /> - array(<br /> - 'field' => 'title',<br /> - 'label' => 'Title',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'message',<br /> - 'label' => 'MessageBody',<br /> - 'rules' => 'required'<br /> - )<br /> - ) <br /> - );<br /> -</code> - - -<h3>Calling a Specific Rule Group</h3> - -<p>In order to call a specific group you will pass its name to the <kbd>run()</kbd> function. For example, to call the <kbd>signup</kbd> rule you will do this:</p> - -<code> -if ($this->form_validation->run('<kbd>signup</kbd>') == FALSE)<br /> -{<br /> - $this->load->view('myform');<br /> -}<br /> -else<br /> -{<br /> - $this->load->view('formsuccess');<br /> -}<br /> -</code> - - - -<h3>Associating a Controller Function with a Rule Group</h3> - -<p>An alternate (and more automatic) method of calling a rule group is to name it according to the controller class/function you intend to use it with. For example, let's say you -have a controller named <kbd>Member</kbd> and a function named <kbd>signup</kbd>. Here's what your class might look like:</p> - -<code> -<?php<br /><br /> -class <kbd>Member</kbd> extends CI_Controller {<br /> -<br /> - function <kbd>signup</kbd>()<br /> - { <br /> - $this->load->library('form_validation');<br /> - <br /> - if ($this->form_validation->run() == FALSE)<br /> - {<br /> - $this->load->view('myform');<br /> - }<br /> - else<br /> - {<br /> - $this->load->view('formsuccess');<br /> - }<br /> - }<br /> -}<br /> -?></code> - -<p>In your validation config file, you will name your rule group <kbd>member/signup</kbd>:</p> - - -<code>$config = array(<br /> - '<kbd>member/signup</kbd>' => array(<br /> - array(<br /> - 'field' => 'username',<br /> - 'label' => 'Username',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'password',<br /> - 'label' => 'Password',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'passconf',<br /> - 'label' => 'PasswordConfirmation',<br /> - 'rules' => 'required'<br /> - ),<br /> - array(<br /> - 'field' => 'email',<br /> - 'label' => 'Email',<br /> - 'rules' => 'required'<br /> - )<br /> - )<br /> - );<br /> -</code> - -<p><dfn>When a rule group is named identically to a controller class/function it will be used automatically when the run() function is invoked from that class/function.</dfn></p> - -<p> </p> - - -<a name="arraysasfields"></a> -<h1>Using Arrays as Field Names</h1> - -<p>The Form Validation class supports the use of arrays as field names. Consider this example:</p> - -<code><input type="text" name="<kbd>options[]</kbd>" value="" size="50" /></code> - -<p>If you do use an array as a field name, you must use the EXACT array name in the <a href="#helperreference">Helper Functions</a> that require the field name, -and as your Validation Rule field name.</p> - -<p>For example, to set a rule for the above field you would use:</p> - -<code>$this->form_validation->set_rules('<kbd>options[]</kbd>', 'Options', 'required');</code> - -<p>Or, to show an error for the above field you would use:</p> - -<code><?php echo form_error('<kbd>options[]</kbd>'); ?></code> - -<p>Or to re-populate the field you would use:</p> - -<code><input type="text" name="<kbd>options[]</kbd>" value="<kbd><?php echo set_value('<kbd>options[]</kbd>'); ?></kbd>" size="50" /></code> - -<p>You can use multidimensional arrays as field names as well. For example:</p> - -<code><input type="text" name="<kbd>options[size]</kbd>" value="" size="50" /></code> - -<p>Or even:</p> - -<code><input type="text" name="<kbd>sports[nba][basketball]</kbd>" value="" size="50" /></code> - -<p>As with our first example, you must use the exact array name in the helper functions:</p> - -<code><?php echo form_error('<kbd>sports[nba][basketball]</kbd>'); ?></code> - -<p>If you are using checkboxes (or other fields) that have multiple options, don't forget to leave an empty bracket after each option, so that all selections will be added to the -POST array:</p> - -<code> -<input type="checkbox" name="<kbd>options[]</kbd>" value="red" /><br /> -<input type="checkbox" name="<kbd>options[]</kbd>" value="blue" /><br /> -<input type="checkbox" name="<kbd>options[]</kbd>" value="green" /> -</code> - -<p>Or if you use a multidimensional array:</p> - -<code> -<input type="checkbox" name="<kbd>options[color][]</kbd>" value="red" /><br /> -<input type="checkbox" name="<kbd>options[color][]</kbd>" value="blue" /><br /> -<input type="checkbox" name="<kbd>options[color][]</kbd>" value="green" /> -</code> - -<p>When you use a helper function you'll include the bracket as well:</p> - -<code><?php echo form_error('<kbd>options[color][]</kbd>'); ?></code> - - - - -<p> </p> - - -<a name="rulereference"></a> -<h1>Rule Reference</h1> - -<p>The following is a list of all the native rules that are available to use:</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> - <tr> - <th>Rule</th> - <th>Parameter</th> - <th>Description</th> - <th>Example</th> - </tr> - - <tr> - <td class="td"><strong>required</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element is empty.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>matches</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element does not match the one in the parameter.</td> - <td class="td">matches[form_item]</td> - </tr> - - <tr> - <td class="td"><strong>is_unique</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element is not unique to the table and field name in the parameter.</td> - <td class="td">is_unique[table.field]</td> - </tr> - - <tr> - <td class="td"><strong>min_length</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element is shorter then the parameter value.</td> - <td class="td">min_length[6]</td> - </tr> - - <tr> - <td class="td"><strong>max_length</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element is longer then the parameter value.</td> - <td class="td">max_length[12]</td> - </tr> - - <tr> - <td class="td"><strong>exact_length</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element is not exactly the parameter value.</td> - <td class="td">exact_length[8]</td> - </tr> - - <tr> - <td class="td"><strong>greater_than</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element is less than the parameter value or not numeric.</td> - <td class="td">greater_than[8]</td> - </tr> - - <tr> - <td class="td"><strong>less_than</strong></td> - <td class="td">Yes</td> - <td class="td">Returns FALSE if the form element is greater than the parameter value or not numeric.</td> - <td class="td">less_than[8]</td> - </tr> - - <tr> - <td class="td"><strong>alpha</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than alphabetical characters.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>alpha_numeric</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than alpha-numeric characters.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>alpha_dash</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>numeric</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than numeric characters.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>integer</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than an integer.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>decimal</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than a decimal number.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>is_natural</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>is_natural_no_zero</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>valid_email</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the form element does not contain a valid email address.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>valid_emails</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if any value provided in a comma separated list is not a valid email.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>valid_ip</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the supplied IP is not valid. Accepts an optional parameter of "IPv4" or "IPv6" to specify an IP format.</td> - <td class="td"> </td> - </tr> - - <tr> - <td class="td"><strong>valid_base64</strong></td> - <td class="td">No</td> - <td class="td">Returns FALSE if the supplied string contains anything other than valid Base64 characters.</td> - <td class="td"> </td> - </tr> - - -</table> - -<p><strong>Note:</strong> These rules can also be called as discrete functions. For example:</p> - -<code>$this->form_validation->required($string);</code> - -<p class="important"><strong>Note:</strong> You can also use any native PHP functions that permit one parameter.</p> - - - -<p> </p> - -<a name="preppingreference"></a> -<h1>Prepping Reference</h1> - -<p>The following is a list of all the prepping functions that are available to use:</p> - - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> - <tr> - <th>Name</th> - <th>Parameter</th> - <th>Description</th> - </tr><tr> - - <td class="td"><strong>xss_clean</strong></td> - <td class="td">No</td> - <td class="td">Runs the data through the XSS filtering function, described in the <a href="input.html">Input Class</a> page.</td> - </tr><tr> - - <td class="td"><strong>prep_for_form</strong></td> - <td class="td">No</td> - <td class="td">Converts special characters so that HTML data can be shown in a form field without breaking it.</td> - </tr><tr> - - <td class="td"><strong>prep_url</strong></td> - <td class="td">No</td> - <td class="td">Adds "http://" to URLs if missing.</td> - </tr><tr> - - <td class="td"><strong>strip_image_tags</strong></td> - <td class="td">No</td> - <td class="td">Strips the HTML from image tags leaving the raw URL.</td> - </tr><tr> - - <td class="td"><strong>encode_php_tags</strong></td> - <td class="td">No</td> - <td class="td">Converts PHP tags to entities.</td> - </tr> - -</table> - -<p class="important"><strong>Note:</strong> You can also use any native PHP functions that permit one parameter, -like <kbd>trim</kbd>, <kbd>htmlspecialchars</kbd>, <kbd>urldecode</kbd>, etc.</p> - - - - - - - -<p> </p> - -<a name="functionreference"></a> -<h1>Function Reference</h1> - -<p>The following functions are intended for use in your controller functions.</p> - -<h2>$this->form_validation->set_rules();</h2> - -<p>Permits you to set validation rules, as described in the tutorial sections above:</p> - -<ul> -<li><a href="#validationrules">Setting Validation Rules</a></li> -<li><a href="#savingtoconfig">Saving Groups of Validation Rules to a Config File</a></li> -</ul> - - -<h2>$this->form_validation->run();</h2> - -<p>Runs the validation routines. Returns boolean TRUE on success and FALSE on failure. You can optionally pass the name of the validation -group via the function, as described in: <a href="#savingtoconfig">Saving Groups of Validation Rules to a Config File</a>.</p> - - -<h2>$this->form_validation->set_message();</h2> - -<p>Permits you to set custom error messages. See <a href="#settingerrors">Setting Error Messages</a> above.</p> - - -<p> </p> - -<a name="helperreference"></a> -<h1>Helper Reference</h1> - -<p>The following helper functions are available for use in the view files containing your forms. Note that these are procedural functions, so they -<strong>do not</strong> require you to prepend them with $this->form_validation.</p> - -<h2>form_error()</h2> - -<p>Shows an individual error message associated with the field name supplied to the function. Example:</p> - -<code><?php echo form_error('username'); ?></code> - -<p>The error delimiters can be optionally specified. See the <a href="#errordelimiters">Changing the Error Delimiters</a> section above.</p> - - - -<h2>validation_errors()</h2> -<p>Shows all error messages as a string: Example:</p> - -<code><?php echo validation_errors(); ?></code> - -<p>The error delimiters can be optionally specified. See the <a href="#errordelimiters">Changing the Error Delimiters</a> section above.</p> - - - -<h2>set_value()</h2> - -<p>Permits you to set the value of an input form or textarea. You must supply the field name via the first parameter of the function. -The second (optional) parameter allows you to set a default value for the form. Example:</p> - -<code><input type="text" name="quantity" value="<dfn><?php echo set_value('quantity', '0'); ?></dfn>" size="50" /></code> - -<p>The above form will show "0" when loaded for the first time.</p> - -<h2>set_select()</h2> - -<p>If you use a <dfn><select></dfn> menu, this function permits you to display the menu item that was selected. The first parameter -must contain the name of the select menu, the second parameter must contain the value of -each item, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE).</p> - -<p>Example:</p> - -<code> -<select name="myselect"><br /> -<option value="one" <dfn><?php echo set_select('myselect', 'one', TRUE); ?></dfn> >One</option><br /> -<option value="two" <dfn><?php echo set_select('myselect', 'two'); ?></dfn> >Two</option><br /> -<option value="three" <dfn><?php echo set_select('myselect', 'three'); ?></dfn> >Three</option><br /> -</select> -</code> - - -<h2>set_checkbox()</h2> - -<p>Permits you to display a checkbox in the state it was submitted. The first parameter -must contain the name of the checkbox, the second parameter must contain its value, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE). Example:</p> - -<code><input type="checkbox" name="mycheck[]" value="1" <dfn><?php echo set_checkbox('mycheck[]', '1'); ?></dfn> /><br /> -<input type="checkbox" name="mycheck[]" value="2" <dfn><?php echo set_checkbox('mycheck[]', '2'); ?></dfn> /></code> - - -<h2>set_radio()</h2> - -<p>Permits you to display radio buttons in the state they were submitted. This function is identical to the <strong>set_checkbox()</strong> function above.</p> - -<code><input type="radio" name="myradio" value="1" <dfn><?php echo set_radio('myradio', '1', TRUE); ?></dfn> /><br /> -<input type="radio" name="myradio" value="2" <dfn><?php echo set_radio('myradio', '2'); ?></dfn> /></code> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="file_uploading.html">File Uploading Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="ftp.html">FTP Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html deleted file mode 100644 index 58a3f8d08..000000000 --- a/user_guide/libraries/ftp.html +++ /dev/null @@ -1,315 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>FTP Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -FTP Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>FTP Class</h1> - -<p>CodeIgniter's FTP Class permits files to be transfered to a remote server. Remote files can also be moved, renamed, -and deleted. The FTP class also includes a "mirroring" function that permits an entire local directory to be recreated remotely via FTP.</p> - -<p class="important"><strong>Note:</strong> SFTP and SSL FTP protocols are not supported, only standard FTP.</p> - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the FTP class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('ftp');</code> -<p>Once loaded, the FTP object will be available using: <dfn>$this->ftp</dfn></p> - - -<h2>Usage Examples</h2> - -<p>In this example a connection is opened to the FTP server, and a local file is read and uploaded in ASCII mode. The -file permissions are set to 755.</p> - -<code> -$this->load->library('ftp');<br /> -<br /> -$config['hostname'] = 'ftp.example.com';<br /> -$config['username'] = 'your-username';<br /> -$config['password'] = 'your-password';<br /> -$config['debug'] = TRUE;<br /> -<br /> -$this->ftp->connect($config);<br /> -<br /> -$this->ftp->upload('/local/path/to/myfile.html', '/public_html/myfile.html', 'ascii', 0775);<br /> -<br /> -$this->ftp->close(); - -</code> - - -<p>In this example a list of files is retrieved from the server.</p> - -<code> -$this->load->library('ftp');<br /> -<br /> -$config['hostname'] = 'ftp.example.com';<br /> -$config['username'] = 'your-username';<br /> -$config['password'] = 'your-password';<br /> -$config['debug'] = TRUE;<br /> -<br /> -$this->ftp->connect($config);<br /> -<br /> -$list = $this->ftp->list_files('/public_html/');<br /> -<br /> -print_r($list);<br /> -<br /> -$this->ftp->close(); -</code> - -<p>In this example a local directory is mirrored on the server.</p> - - -<code> -$this->load->library('ftp');<br /> -<br /> -$config['hostname'] = 'ftp.example.com';<br /> -$config['username'] = 'your-username';<br /> -$config['password'] = 'your-password';<br /> -$config['debug'] = TRUE;<br /> -<br /> -$this->ftp->connect($config);<br /> -<br /> -$this->ftp->mirror('/path/to/myfolder/', '/public_html/myfolder/');<br /> -<br /> -$this->ftp->close(); -</code> - - -<h1>Function Reference</h1> - -<h2>$this->ftp->connect()</h2> - -<p>Connects and logs into to the FTP server. Connection preferences are set by passing an array -to the function, or you can store them in a config file.</p> - - -<p>Here is an example showing how you set preferences manually:</p> - -<code> -$this->load->library('ftp');<br /> -<br /> -$config['hostname'] = 'ftp.example.com';<br /> -$config['username'] = 'your-username';<br /> -$config['password'] = 'your-password';<br /> -$config['port'] = 21;<br /> -$config['passive'] = FALSE;<br /> -$config['debug'] = TRUE;<br /> -<br /> -$this->ftp->connect($config);<br /> -</code> - -<h3>Setting FTP Preferences in a Config File</h3> - -<p>If you prefer you can store your FTP preferences in a config file. -Simply create a new file called the <var>ftp.php</var>, add the <var>$config</var> -array in that file. Then save the file at <var>config/ftp.php</var> and it will be used automatically.</p> - -<h3>Available connection options:</h3> - - -<ul> -<li><strong>hostname</strong> - the FTP hostname. Usually something like: <dfn>ftp.example.com</dfn></li> -<li><strong>username</strong> - the FTP username.</li> -<li><strong>password</strong> - the FTP password.</li> -<li><strong>port</strong> - The port number. Set to <dfn>21</dfn> by default.</li> -<li><strong>debug</strong> - <kbd>TRUE/FALSE</kbd> (boolean). Whether to enable debugging to display error messages.</li> -<li><strong>passive</strong> - <kbd>TRUE/FALSE</kbd> (boolean). Whether to use passive mode. Passive is set automatically by default.</li> -</ul> - - - -<h2>$this->ftp->upload()</h2> - -<p>Uploads a file to your server. You must supply the local path and the remote path, and you can optionally set the mode and permissions. -Example:</p> - - -<code>$this->ftp->upload('/local/path/to/myfile.html', '/public_html/myfile.html', 'ascii', 0775);</code> - -<p><strong>Mode options are:</strong> <kbd>ascii</kbd>, <kbd>binary</kbd>, and <kbd>auto</kbd> (the default). If -<kbd>auto</kbd> is used it will base the mode on the file extension of the source file.</p> - -<p>Permissions can be passed as an <kbd>octal</kbd> value in the fourth parameter.</p> - -<h2>$this->ftp->download()</h2> - -<p>Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode. -Example:</p> - -<code>$this->ftp->download('/public_html/myfile.html', '/local/path/to/myfile.html', 'ascii');</code> - -<p><strong>Mode options are:</strong> <kbd>ascii</kbd>, <kbd>binary</kbd>, and <kbd>auto</kbd> (the default). If -<kbd>auto</kbd> is used it will base the mode on the file extension of the source file.</p> - -<p>Returns FALSE if the download does not execute successfully (including if PHP does not have permission to write the local file)</p> - - -<h2>$this->ftp->rename()</h2> -<p>Permits you to rename a file. Supply the source file name/path and the new file name/path.</p> - -<code> -// Renames green.html to blue.html<br /> -$this->ftp->rename('/public_html/foo/green.html', '/public_html/foo/blue.html'); -</code> - -<h2>$this->ftp->move()</h2> -<p>Lets you move a file. Supply the source and destination paths:</p> - -<code> -// Moves blog.html from "joe" to "fred"<br /> -$this->ftp->move('/public_html/joe/blog.html', '/public_html/fred/blog.html'); -</code> - -<p>Note: if the destination file name is different the file will be renamed.</p> - - -<h2>$this->ftp->delete_file()</h2> -<p>Lets you delete a file. Supply the source path with the file name.</p> - -<code> -$this->ftp->delete_file('/public_html/joe/blog.html'); -</code> - - -<h2>$this->ftp->delete_dir()</h2> -<p>Lets you delete a directory and everything it contains. Supply the source path to the directory with a trailing slash.</p> - -<p class="important"><strong>Important</strong> Be VERY careful with this function. It will recursively delete -<b>everything</b> within the supplied path, including sub-folders and all files. Make absolutely sure your path is correct. -Try using the <kbd>list_files()</kbd> function first to verify that your path is correct.</p> - -<code> -$this->ftp->delete_dir('/public_html/path/to/folder/'); -</code> - - - -<h2>$this->ftp->list_files()</h2> -<p>Permits you to retrieve a list of files on your server returned as an <dfn>array</dfn>. You must supply -the path to the desired directory.</p> - -<code> -$list = $this->ftp->list_files('/public_html/');<br /> -<br /> -print_r($list); -</code> - - -<h2>$this->ftp->mirror()</h2> - -<p>Recursively reads a local folder and everything it contains (including sub-folders) and creates a -mirror via FTP based on it. Whatever the directory structure of the original file path will be recreated on the server. -You must supply a source path and a destination path:</p> - -<code> -$this->ftp->mirror('/path/to/myfolder/', '/public_html/myfolder/'); -</code> - - - -<h2>$this->ftp->mkdir()</h2> - -<p>Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash. -Permissions can be set by passed an <kbd>octal</kbd> value in the second parameter.</p> - -<code> -// Creates a folder named "bar"<br /> -$this->ftp->mkdir('/public_html/foo/bar/', DIR_WRITE_MODE); -</code> - - -<h2>$this->ftp->chmod()</h2> - -<p>Permits you to set file permissions. Supply the path to the file or folder you wish to alter permissions on:</p> - -<code> -// Chmod "bar" to 777<br /> -$this->ftp->chmod('/public_html/foo/bar/', DIR_WRITE_MODE); -</code> - - - - -<h2>$this->ftp->close();</h2> -<p>Closes the connection to your server. It's recommended that you use this when you are finished uploading.</p> - - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="form_validation.html">Form Validation Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="table.html">HTML Table Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html deleted file mode 100644 index b205ed74e..000000000 --- a/user_guide/libraries/image_lib.html +++ /dev/null @@ -1,667 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Image Manipulation Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Image Manipulation Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Image Manipulation Class</h1> - -<p>CodeIgniter's Image Manipulation class lets you perform the following actions:</p> - -<ul> -<li>Image Resizing</li> -<li>Thumbnail Creation</li> -<li>Image Cropping</li> -<li>Image Rotating</li> -<li>Image Watermarking</li> -</ul> - -<p>All three major image libraries are supported: GD/GD2, NetPBM, and ImageMagick</p> - -<p class="important"><strong>Note:</strong> Watermarking is only available using the GD/GD2 library. -In addition, even though other libraries are supported, GD is required in -order for the script to calculate the image properties. The image processing, however, will be performed with the -library you specify.</p> - - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the image class is initialized in your controller -using the <dfn>$this->load->library</dfn> function:</p> -<code>$this->load->library('image_lib');</code> - -<p>Once the library is loaded it will be ready for use. The image library object you will use to call all functions is: <dfn>$this->image_lib</dfn></p> - - -<h2>Processing an Image</h2> - -<p>Regardless of the type of processing you would like to perform (resizing, cropping, rotation, or watermarking), the general process is -identical. You will set some preferences corresponding to the action you intend to perform, then -call one of four available processing functions. For example, to create an image thumbnail you'll do this:</p> - -<code>$config['image_library'] = 'gd2';<br /> -$config['source_image'] = '/path/to/image/mypic.jpg';<br /> -$config['create_thumb'] = TRUE;<br /> -$config['maintain_ratio'] = TRUE;<br /> -$config['width'] = 75;<br /> -$config['height'] = 50;<br /> -<br /> -$this->load->library('image_lib', $config); -<br /> -<br /> -$this->image_lib->resize();</code> - -<p>The above code tells the <dfn>image_resize</dfn> function to look for an image called <em>mypic.jpg</em> -located in the <dfn>source_image</dfn> folder, then create a thumbnail that is 75 X 50 pixels using the GD2 <dfn>image_library</dfn>. -Since the <dfn>maintain_ratio</dfn> option is enabled, the thumb will be as close to the target <dfn>width</dfn> and -<dfn>height</dfn> as possible while preserving the original aspect ratio. The thumbnail will be called <em>mypic_thumb.jpg</em> -</p> - -<p class="important"><strong>Note:</strong> In order for the image class to be allowed to do any processing, the -folder containing the image files must have write permissions.</p> - -<p class="important"><strong>Note:</strong> Image processing can require a considerable amount of server memory for some operations. If you are experiencing out of memory errors while processing images you may need to limit their maximum size, and/or adjust PHP memory limits.</p> - -<h2>Processing Functions</h2> - -<p>There are four available processing functions:</p> - -<ul> -<li>$this->image_lib->resize()</li> -<li>$this->image_lib->crop()</li> -<li>$this->image_lib->rotate()</li> -<li>$this->image_lib->watermark()</li> -<li>$this->image_lib->clear()</li> -</ul> - -<p>These functions return boolean TRUE upon success and FALSE for failure. If they fail you can retrieve the -error message using this function:</p> - -<code>echo $this->image_lib->display_errors();</code> - -<p>A good practice is use the processing function conditionally, showing an error upon failure, like this:</p> - -<code>if ( ! $this->image_lib->resize())<br /> -{<br /> - echo $this->image_lib->display_errors();<br /> -}</code> - -<p>Note: You can optionally specify the HTML formatting to be applied to the errors, by submitting the opening/closing -tags in the function, like this:</p> - -<code>$this->image_lib->display_errors('<var><p></var>', '<var></p></var>');</code> - - -<h2>Preferences</h2> - -<p>The preferences described below allow you to tailor the image processing to suit your needs.</p> - -<p>Note that not all preferences are available for every -function. For example, the x/y axis preferences are only available for image cropping. Likewise, the width and height -preferences have no effect on cropping. The "availability" column indicates which functions support a given preference.</p> - -<p>Availability Legend:</p> - -<ul> -<li><var>R</var> - Image Resizing</li> -<li><var>C</var> - Image Cropping</li> -<li><var>X</var> - Image Rotation</li> -<li><var>W</var> - Image Watermarking</li> - -</ul> - - - - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -<th>Availability</th> -</tr> - -<tr> -<td class="td"><strong>image_library</strong></td> -<td class="td">GD2</td> -<td class="td">GD, GD2, ImageMagick, NetPBM</td> -<td class="td">Sets the image library to be used.</td> -<td class="td">R, C, X, W</td> -</tr> - -<tr> -<td class="td"><strong>library_path</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the server path to your ImageMagick or NetPBM library. If you use either of those libraries you must supply the path.</td> -<td class="td">R, C, X</td> -</tr> - -<tr> -<td class="td"><strong>source_image</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the source image name/path. The path must be a relative or absolute server path, not a URL.</td> -<td class="td">R, C, S, W</td> -</tr> - -<tr> -<td class="td"><strong>dynamic_output</strong></td> -<td class="td">FALSE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">Determines whether the new image file should be written to disk or generated dynamically. Note: If you choose the dynamic setting, only one image can be shown at a time, and it can't be positioned on the page. It simply outputs the raw image dynamically to your browser, along with image headers.</td> -<td class="td">R, C, X, W</td> -</tr> - - -<tr> -<td class="td"><strong>quality</strong></td> -<td class="td">90%</td> -<td class="td">1 - 100%</td> -<td class="td">Sets the quality of the image. The higher the quality the larger the file size.</td> -<td class="td">R, C, X, W</td> -</tr> - - -<tr> -<td class="td"><strong>new_image</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the destination image name/path. You'll use this preference when creating an image copy. The path must be a relative or absolute server path, not a URL.</td> -<td class="td">R, C, X, W</td> -</tr> - -<tr> -<td class="td"><strong>width</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the width you would like the image set to.</td> -<td class="td">R, C </td> -</tr> - -<tr> -<td class="td"><strong>height</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the height you would like the image set to.</td> -<td class="td">R, C </td> -</tr> - -<tr> -<td class="td"><strong>create_thumb</strong></td> -<td class="td">FALSE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">Tells the image processing function to create a thumb.</td> -<td class="td">R</td> -</tr> - -<tr> -<td class="td"><strong>thumb_marker</strong></td> -<td class="td">_thumb</td> -<td class="td">None</td> -<td class="td">Specifies the thumbnail indicator. It will be inserted just before the file extension, so mypic.jpg would become mypic_thumb.jpg</td> -<td class="td">R</td> -</tr> - -<tr> -<td class="td"><strong>maintain_ratio</strong></td> -<td class="td">TRUE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">Specifies whether to maintain the original aspect ratio when resizing or use hard values.</td> -<td class="td">R, C</td> -</tr> - - -<tr> -<td class="td"><strong>master_dim</strong></td> -<td class="td">auto</td> -<td class="td">auto, width, height</td> -<td class="td">Specifies what to use as the master axis when resizing or creating thumbs. For example, let's say you want to resize an image to 100 X 75 pixels. If the source image size does not allow perfect resizing to those dimensions, this setting determines which axis should be used as the hard value. "auto" sets the axis automatically based on whether the image is taller then wider, or vice versa.</td> -<td class="td">R</td> -</tr> - - - - -<tr> -<td class="td"><strong>rotation_angle</strong></td> -<td class="td">None</td> -<td class="td">90, 180, 270, vrt, hor</td> -<td class="td">Specifies the angle of rotation when rotating images. Note that PHP rotates counter-clockwise, so a 90 degree rotation to the right must be specified as 270.</td> -<td class="td">X</td> -</tr> - -<tr> -<td class="td"><strong>x_axis</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the X coordinate in pixels for image cropping. For example, a setting of 30 will crop an image 30 pixels from the left.</td> -<td class="td">C</td> -</tr> -<tr> -<td class="td"><strong>y_axis</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the Y coordinate in pixels for image cropping. For example, a setting of 30 will crop an image 30 pixels from the top.</td> -<td class="td">C</td> -</tr> - -</table> - - -<h2>Setting preferences in a config file</h2> - -<p>If you prefer not to set preferences using the above method, you can instead put them into a config file. -Simply create a new file called <var>image_lib.php</var>, add the <var>$config</var> -array in that file. Then save the file in: <var>config/image_lib.php</var> and it will be used automatically. You -will NOT need to use the <dfn>$this->image_lib->initialize</dfn> function if you save your preferences in a config file.</p> - - -<h2>$this->image_lib->resize()</h2> - -<p>The image resizing function lets you resize the original image, create a copy (with or without resizing), -or create a thumbnail image.</p> - -<p>For practical purposes there is no difference between creating a copy and creating -a thumbnail except a thumb will have the thumbnail marker as part of the name (ie, mypic_thumb.jpg).</p> - -<p>All preferences listed in the table above are available for this function except these three: rotation_angle, x_axis, and y_axis.</p> - -<h3>Creating a Thumbnail</h3> - -<p>The resizing function will create a thumbnail file (and preserve the original) if you set this preference to TRUE:</p> - -<code>$config['create_thumb'] = TRUE;</code> - -<p>This single preference determines whether a thumbnail is created or not.</p> - -<h3>Creating a Copy</h3> - -<p>The resizing function will create a copy of the image file (and preserve the original) if you set -a path and/or a new filename using this preference:</p> - -<code>$config['new_image'] = '/path/to/new_image.jpg';</code> - -<p>Notes regarding this preference:</p> -<ul> -<li>If only the new image name is specified it will be placed in the same folder as the original</li> -<li>If only the path is specified, the new image will be placed in the destination with the same name as the original.</li> -<li>If both the path and image name are specified it will placed in its own destination and given the new name.</li> -</ul> - - -<h3>Resizing the Original Image</h3> - -<p>If neither of the two preferences listed above (create_thumb, and new_image) are used, the resizing function will instead -target the original image for processing.</p> - - -<h2>$this->image_lib->crop()</h2> - -<p>The cropping function works nearly identically to the resizing function except it requires that you set -preferences for the X and Y axis (in pixels) specifying where to crop, like this:</p> - -<code>$config['x_axis'] = '100';<br /> -$config['y_axis'] = '40';</code> - -<p>All preferences listed in the table above are available for this function except these: rotation_angle, width, height, create_thumb, new_image.</p> - -<p>Here's an example showing how you might crop an image:</p> - -<code>$config['image_library'] = 'imagemagick';<br /> -$config['library_path'] = '/usr/X11R6/bin/';<br /> -$config['source_image'] = '/path/to/image/mypic.jpg';<br /> -$config['x_axis'] = '100';<br /> -$config['y_axis'] = '60';<br /> -<br /> -$this->image_lib->initialize($config); -<br /> -<br /> -if ( ! $this->image_lib->crop())<br /> -{<br /> - echo $this->image_lib->display_errors();<br /> -}</code> - - -<p>Note: Without a visual interface it is difficult to crop images, so this function is not very useful -unless you intend to build such an interface. That's exactly what we did using for the photo -gallery module in ExpressionEngine, the CMS we develop. We added a JavaScript UI that lets the cropping -area be selected.</p> - -<h2>$this->image_lib->rotate()</h2> - -<p>The image rotation function requires that the angle of rotation be set via its preference:</p> - -<code>$config['rotation_angle'] = '90';</code> - -<p>There are 5 rotation options:</p> - -<ol> -<li>90 - rotates counter-clockwise by 90 degrees.</li> -<li>180 - rotates counter-clockwise by 180 degrees.</li> -<li>270 - rotates counter-clockwise by 270 degrees.</li> -<li>hor - flips the image horizontally.</li> -<li>vrt - flips the image vertically.</li> -</ol> - -<p>Here's an example showing how you might rotate an image:</p> - -<code>$config['image_library'] = 'netpbm';<br /> -$config['library_path'] = '/usr/bin/';<br /> -$config['source_image'] = '/path/to/image/mypic.jpg';<br /> -$config['rotation_angle'] = 'hor';<br /> -<br /> -$this->image_lib->initialize($config); -<br /> -<br /> -if ( ! $this->image_lib->rotate())<br /> -{<br /> - echo $this->image_lib->display_errors();<br /> -}</code> - - - -<h2>$this->image_lib->clear()</h2> -<p>The clear function resets all of the values used when processing an image. You will want to call this if you are processing images in a loop.</p> -<p><code>$this->image_lib->clear();</code></p> -<p> </p> -<h1>Image Watermarking</h1> - -<p>The Watermarking feature requires the GD/GD2 library.</p> - - -<h2>Two Types of Watermarking</h2> - -<p>There are two types of watermarking that you can use:</p> - -<ul> -<li><strong>Text</strong>: The watermark message will be generating using text, either with a True Type font that you specify, or -using the native text output that the GD library supports. If you use the True Type version your GD installation -must be compiled with True Type support (most are, but not all).</li> - -<li><strong>Overlay</strong>: The watermark message will be generated by overlaying an image (usually a transparent PNG or GIF) -containing your watermark over the source image.</li> - -</ul> - - -<h2>Watermarking an Image</h2> - -<p>Just as with the other functions (resizing, cropping, and rotating) the general process for watermarking -involves setting the preferences corresponding to the action you intend to perform, then -calling the watermark function. Here is an example:</p> - -<code> -$config['source_image'] = '/path/to/image/mypic.jpg';<br /> -$config['wm_text'] = 'Copyright 2006 - John Doe';<br /> -$config['wm_type'] = 'text';<br /> -$config['wm_font_path'] = './system/fonts/texb.ttf';<br /> -$config['wm_font_size'] = '16';<br /> -$config['wm_font_color'] = 'ffffff';<br /> -$config['wm_vrt_alignment'] = 'bottom';<br /> -$config['wm_hor_alignment'] = 'center';<br /> -$config['wm_padding'] = '20';<br /> -<br /> -$this->image_lib->initialize($config); -<br /> -<br /> -$this->image_lib->watermark();</code> - - -<p>The above example will use a 16 pixel True Type font to create the text "Copyright 2006 - John Doe". The watermark -will be positioned at the bottom/center of the image, 20 pixels from the bottom of the image.</p> - -<p class="important"><strong>Note:</strong> In order for the image class to be allowed to do any processing, the image file must have "write" file permissions. For example, 777.</p> - - -<h2>Watermarking Preferences</h2> - -<p>This table shown the preferences that are available for both types of watermarking (text or overlay)</p> - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr> - -<tr> -<td class="td"><strong>wm_type</strong></td> -<td class="td">text</td> -<td class="td">text, overlay</td> -<td class="td">Sets the type of watermarking that should be used.</td> -</tr> - -<tr> -<td class="td"><strong>source_image</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">Sets the source image name/path. The path must be a relative or absolute server path, not a URL.</td> -</tr> - -<tr> -<td class="td"><strong>dynamic_output</strong></td> -<td class="td">FALSE</td> -<td class="td">TRUE/FALSE (boolean)</td> -<td class="td">Determines whether the new image file should be written to disk or generated dynamically. Note: If you choose the dynamic setting, only one image can be shown at a time, and it can't be positioned on the page. It simply outputs the raw image dynamically to your browser, along with image headers.</td> -</tr> - -<tr> -<td class="td"><strong>quality</strong></td> -<td class="td">90%</td> -<td class="td">1 - 100%</td> -<td class="td">Sets the quality of the image. The higher the quality the larger the file size.</td> -</tr> - -<tr> -<td class="td"><strong>padding</strong></td> -<td class="td">None</td> -<td class="td">A number</td> -<td class="td">The amount of padding, set in pixels, that will be applied to the watermark to set it away from the edge of your images.</td> -</tr> - -<tr> -<td class="td"><strong>wm_vrt_alignment</strong></td> -<td class="td">bottom</td> -<td class="td">top, middle, bottom</td> -<td class="td">Sets the vertical alignment for the watermark image.</td> -</tr> - -<tr> -<td class="td"><strong>wm_hor_alignment</strong></td> -<td class="td">center</td> -<td class="td">left, center, right</td> -<td class="td">Sets the horizontal alignment for the watermark image.</td> -</tr> - -<tr> -<td class="td"><strong>wm_hor_offset</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">You may specify a horizontal offset (in pixels) to apply to the watermark position. The offset normally moves the watermark to the right, except if you have your alignment set to "right" then your offset value will move the watermark toward the left of the image.</td> -</tr> - -<tr> -<td class="td"><strong>wm_vrt_offset</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">You may specify a vertical offset (in pixels) to apply to the watermark position. The offset normally moves the watermark down, except if you have your alignment set to "bottom" then your offset value will move the watermark toward the top of the image.</td> -</tr> - -</table> - - - -<h3>Text Preferences</h3> -<p>This table shown the preferences that are available for the text type of watermarking.</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr> - -<tr> -<td class="td"><strong>wm_text</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">The text you would like shown as the watermark. Typically this will be a copyright notice.</td> -</tr> - -<tr> -<td class="td"><strong>wm_font_path</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">The server path to the True Type Font you would like to use. If you do not use this option, the native GD font will be used.</td> -</tr> - -<tr> -<td class="td"><strong>wm_font_size</strong></td> -<td class="td">16</td> -<td class="td">None</td> -<td class="td">The size of the text. Note: If you are not using the True Type option above, the number is set using a range of 1 - 5. Otherwise, you can use any valid pixel size for the font you're using.</td> -</tr> - -<tr> -<td class="td"><strong>wm_font_color</strong></td> -<td class="td">ffffff</td> -<td class="td">None</td> -<td class="td">The font color, specified in hex. Note, you must use the full 6 character hex value (ie, 993300), rather than the three character abbreviated version (ie fff).</td> -</tr> - - -<tr> -<td class="td"><strong>wm_shadow_color</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">The color of the drop shadow, specified in hex. If you leave this blank a drop shadow will not be used. Note, you must use the full 6 character hex value (ie, 993300), rather than the three character abbreviated version (ie fff).</td> -</tr> - -<tr> -<td class="td"><strong>wm_shadow_distance</strong></td> -<td class="td">3</td> -<td class="td">None</td> -<td class="td">The distance (in pixels) from the font that the drop shadow should appear.</td> -</tr> - -</table> - - - - -<h3>Overlay Preferences</h3> -<p>This table shown the preferences that are available for the overlay type of watermarking.</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr> - -<tr> -<td class="td"><strong>wm_overlay_path</strong></td> -<td class="td">None</td> -<td class="td">None</td> -<td class="td">The server path to the image you wish to use as your watermark. Required only if you are using the overlay method.</td> -</tr> - -<tr> -<td class="td"><strong>wm_opacity</strong></td> -<td class="td">50</td> -<td class="td">1 - 100</td> -<td class="td">Image opacity. You may specify the opacity (i.e. transparency) of your watermark image. This allows the watermark to be faint and not completely obscure the details from the original image behind it. A 50% opacity is typical.</td> -</tr> - -<tr> -<td class="td"><strong>wm_x_transp</strong></td> -<td class="td">4</td> -<td class="td">A number</td> -<td class="td">If your watermark image is a PNG or GIF image, you may specify a color on the image to be "transparent". This setting (along with the next) will allow you to specify that color. This works by specifying the "X" and "Y" coordinate pixel (measured from the upper left) within the image that corresponds to a pixel representative of the color you want to be transparent.</td> -</tr> - -<tr> -<td class="td"><strong>wm_y_transp</strong></td> -<td class="td">4</td> -<td class="td">A number</td> -<td class="td">Along with the previous setting, this allows you to specify the coordinate to a pixel representative of the color you want to be transparent.</td> -</tr> -</table> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="table.html">HTML Table Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="input.html">Input Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html deleted file mode 100644 index a99378df4..000000000 --- a/user_guide/libraries/input.html +++ /dev/null @@ -1,295 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Input Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Input Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Input Class</h1> - -<p>The Input Class serves two purposes:</p> - -<ol> -<li>It pre-processes global input data for security.</li> -<li>It provides some helper functions for fetching input data and pre-processing it.</li> -</ol> - -<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p> - - -<h2>Security Filtering</h2> - -<p>The security filtering function is called automatically when a new <a href="../general/controllers.html">controller</a> is invoked. It does the following:</p> - -<ul> -<li>If $config['allow_get_array'] is FALSE(default is TRUE), destroys the global GET array.</li> -<li>Destroys all global variables in the event register_globals is turned on.</li> -<li>Filters the GET/POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters.</li> -<li>Provides XSS (Cross-site Scripting Hacks) filtering. This can be enabled globally, or upon request.</li> -<li>Standardizes newline characters to \n(In Windows \r\n)</li> -</ul> - - -<h2>XSS Filtering</h2> - -<p>The Input class has the ability to filter input automatically to prevent cross-site scripting attacks. If you want the filter to run automatically every time it encounters POST or COOKIE data you can enable it by opening your -<kbd>application/config/config.php</kbd> file and setting this:</p> - -<code>$config['global_xss_filtering'] = TRUE;</code> - -<p>Please refer to the <a href="security.html">Security class</a> documentation for information on using XSS Filtering in your application.</p> - - -<h2>Using POST, COOKIE, or SERVER Data</h2> - -<p>CodeIgniter comes with three helper functions that let you fetch POST, COOKIE or SERVER items. The main advantage of using the provided -functions rather than fetching an item directly ($_POST['something']) is that the functions will check to see if the item is set and -return false (boolean) if not. This lets you conveniently use data without having to test whether an item exists first. -In other words, normally you might do something like this:</p> - -<code> -if ( ! isset($_POST['something']))<br /> -{<br /> - $something = FALSE;<br /> -}<br /> -else<br /> -{<br /> - $something = $_POST['something'];<br /> -}</code> - -<p>With CodeIgniter's built in functions you can simply do this:</p> - -<code>$something = $this->input->post('something');</code> - -<p>The three functions are:</p> - -<ul> -<li>$this->input->post()</li> -<li>$this->input->cookie()</li> -<li>$this->input->server()</li> -</ul> - -<h2>$this->input->post()</h2> - -<p>The first parameter will contain the name of the POST item you are looking for:</p> - -<code>$this->input->post('some_data');</code> - -<p>The function returns FALSE (boolean) if the item you are attempting to retrieve does not exist.</p> - -<p>The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE;</p> - -<code>$this->input->post('some_data', TRUE);</code> - -<p>To return an array of all POST items call without any parameters.</p> -<p>To return all POST items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean;</p> -<p>The function returns FALSE (boolean) if there are no items in the POST.</p> - -<code> - $this->input->post(NULL, TRUE); // returns all POST items with XSS filter - <br /> - $this->input->post(); // returns all POST items without XSS filter -</code> - -<h2>$this->input->get()</h2> - -<p>This function is identical to the post function, only it fetches get data:</p> - -<code>$this->input->get('some_data', TRUE);</code> - -<p>To return an array of all GET items call without any parameters.</p> -<p>To return all GET items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean;</p> -<p>The function returns FALSE (boolean) if there are no items in the GET.</p> - -<code> - $this->input->get(NULL, TRUE); // returns all GET items with XSS filter - <br /> - $this->input->get(); // returns all GET items without XSS filtering -</code> - -<h2>$this->input->get_post()</h2> - -<p>This function will search through both the post and get streams for data, looking first in post, and then in get:</p> - -<code>$this->input->get_post('some_data', TRUE);</code> - -<h2>$this->input->cookie()</h2> - -<p>This function is identical to the post function, only it fetches cookie data:</p> - -<code>$this->input->cookie('some_data', TRUE);</code> - -<h2>$this->input->server()</h2> - -<p>This function is identical to the above functions, only it fetches server data:</p> - -<code>$this->input->server('some_data');</code> - - -<h2>$this->input->set_cookie()</h2> - -<p>Sets a cookie containing the values you specify. There are two ways to pass information to this function so that a cookie can be set: -Array Method, and Discrete Parameters:</p> - -<h4>Array Method</h4> - -<p>Using this method, an associative array is passed to the first parameter:</p> - -<code>$cookie = array(<br /> - 'name' => 'The Cookie Name',<br /> - 'value' => 'The Value',<br /> - 'expire' => '86500',<br /> - 'domain' => '.some-domain.com',<br /> - 'path' => '/',<br /> - 'prefix' => 'myprefix_',<br /> - 'secure' => TRUE<br /> -);<br /> -<br /> -$this->input->set_cookie($cookie); -</code> - -<p><strong>Notes:</strong></p> - -<p>Only the name and value are required. To delete a cookie set it with the expiration blank.</p> - -<p>The expiration is set in <strong>seconds</strong>, which will be added to the current time. Do not include the time, but rather only the -number of seconds from <em>now</em> that you wish the cookie to be valid. If the expiration is set to -zero the cookie will only last as long as the browser is open.</p> -<p>For site-wide cookies regardless of how your site is requested, add your URL to the <strong>domain</strong> starting with a period, like this: .your-domain.com</p> -<p>The path is usually not needed since the function sets a root path.</p> -<p>The prefix is only needed if you need to avoid name collisions with other identically named cookies for your server.</p> -<p>The secure boolean is only needed if you want to make it a secure cookie by setting it to TRUE.</p> - -<h4>Discrete Parameters</h4> - -<p>If you prefer, you can set the cookie by passing data using individual parameters:</p> - -<code>$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);</code> - -<h2>$this->input->cookie()</h2> - -<p>Lets you fetch a cookie. The first parameter will contain the name of the cookie you are looking for (including any prefixes):</p> - -<code>cookie('some_cookie');</code> - -<p>The function returns FALSE (boolean) if the item you are attempting to retrieve does not exist.</p> - -<p>The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE;</p> - -<p><code>cookie('some_cookie', TRUE);</code></p> - - -<h2>$this->input->ip_address()</h2> -<p>Returns the IP address for the current user. If the IP address is not valid, the function will return an IP of: 0.0.0.0</p> -<code>echo $this->input->ip_address();</code> - - -<h2>$this->input->valid_ip(<var>$ip</var>)</h2> - -<p>Takes an IP address as input and returns TRUE or FALSE (boolean) if it is valid or not. Note: The $this->input->ip_address() function above -validates the IP automatically.</p> - -<code>if ( ! $this->input->valid_ip($ip))<br /> -{<br /> - echo 'Not Valid';<br /> -}<br /> -else<br /> -{<br /> - echo 'Valid';<br /> -}</code> -<p>Accepts an optional second string parameter of "IPv4" or "IPv6" to specify an IP format. The default checks for both formats.</p> - -<h2>$this->input->user_agent()</h2> -<p>Returns the user agent (web browser) being used by the current user. Returns FALSE if it's not available.</p> -<code>echo $this->input->user_agent();</code> -<p>See the <a href="user_agent.html">User Agent Class</a> for methods which extract information from the user agent string.</p> - -<h2>$this->input->request_headers()</h2> -<p>Useful if running in a non-Apache environment where <a href="http://php.net/apache_request_headers">apache_request_headers()</a> will not be supported. Returns an array of headers.</p> - -<code>$headers = $this->input->request_headers();</code> - -<h2>$this->input->get_request_header();</h2> -<p>Returns a single member of the request headers array.</p> - -<code>$this->input->get_request_header('some-header', TRUE);</code> - - -<h2>$this->input->is_ajax_request()</h2> -<p>Checks to see if the <var>HTTP_X_REQUESTED_WITH</var> server header has been set, and returns a boolean response.</p> - - -<h2>$this->input->is_cli_request()</h2> -<p>Checks to see if the <var>STDIN</var> constant is set, which is a failsafe way to see if PHP is being run on the command line.</p> - -<code>$this->input->is_cli_request()</code> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="image_lib.html">Image Manipulation Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="loader.html">Loader Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html deleted file mode 100644 index 40f9af487..000000000 --- a/user_guide/libraries/javascript.html +++ /dev/null @@ -1,247 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<title>JavaScript Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="../general/drivers.html">Drivers</a> › -JavaScript Driver -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<p class="important"><strong>Note:</strong> This driver is experimental. Its feature set and implementation may change in future releases.</p><br> - -<h1>Javascript Class</h1> -<p>CodeIgniter provides a library to help you with certain common functions that you may want to use with Javascript. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.</p> -<h2>Initializing the Class</h2> -<p>To initialize the Javascript class manually in your controller constructor, use the <dfn>$this->load->library</dfn> function. Currently, the only available library is jQuery, which will automatically be loaded like this:</p> - -<code>$this->load->library('javascript');</code> - -<p>The Javascript class also accepts parameters, <dfn>js_library_driver (string) default 'jquery'</dfn> and <dfn>autoload (bool) default TRUE</dfn>. You may override the defaults if you wish by sending an associative array:</p> - -<code>$this->load->library('javascript', array('js_library_driver' => 'scripto', 'autoload' => FALSE));</code> - -<p>Again, presently only 'jquery' is available. You may wish to set <dfn>autoload</dfn> to FALSE, though, if you do not want the jQuery library to automatically include a script tag for the main jQuery script file. This is useful if you are loading it from a location outside of CodeIgniter, or already have the script tag in your markup.</p> - -<p>Once loaded, the jQuery library object will be available using: <dfn>$this->javascript</dfn></p> -<h2>Setup and Configuration</h2> -<h3>Set these variables in your view</h3> -<p>As a Javascript library, your files must be available to your application.</p> -<p>As Javascript is a client side language, the library must be able to write content into your final output. This generally means a view. You'll need to include the following variables in the <head> sections of your output.</p> -<p><code><?php echo $library_src;?><br /> -<?php echo $script_head;?> -</code></p> -<p>$library_src, is where the actual library file will be loaded, as well as any subsequent plugin script calls; $script_head is where specific events, functions and other commands will be rendered.</p> -<h3>Set the path to the librarys with config items</h3> -<p>There are some configuration items in Javascript library. These can either be set in application/config.php, within its own config/javascript.php file, or within any controller usings the set_item() function. </p> -<p>An image to be used as an "ajax loader", or progress indicator. Without one, the simple text message of "loading" will appear when Ajax calls need to be made.</p> -<p><code>$config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/';<br /> - $config['javascript_ajax_img'] = 'images/ajax-loader.gif';</code></p> -<p>If you keep your files in the same directories they were downloaded from, then you need not set this configuration items.</p> - -<h2>The jQuery Class</h2> - -<p>To initialize the jQuery class manually in your controller constructor, use the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('jquery');</code> - -<p>You may send an optional parameter to determine whether or not a script tag for the main jQuery file will be automatically included when loading the library. It will be created by default. To prevent this, load the library as follows:</p> - -<code>$this->load->library('jquery', FALSE);</code> - -<p>Once loaded, the jQuery library object will be available using: <dfn>$this->jquery</dfn></p> - -<h2>jQuery Events</h2> - -<p>Events are set using the following syntax.</p> - -<p><code>$this->jquery->event('element_path', code_to_run());</code></p> - -<p>In the above example:</p> - -<ul> - <li>"event" is any of blur, change, click, dblclick, error, focus, hover, keydown, keyup, load, mousedown, mouseup, mouseover, mouseup, resize, scroll, or unload.</li> - <li>"element_path" is any valid <a href="http://docs.jquery.com/Selectors">jQuery selector</a>. Due to jQuery's unique selector syntax, this is usually an element id, or CSS selector. For example "#notice_area" would effect <div id="notice_area">, and "#content a.notice" would effect all anchors with a class of "notice" in the div with id "content".</li> - <li>"code_to_run()" is script your write yourself, or an action such as an effect from the jQuery library below.</li> - </ul> - -<h2>Effects</h2> - -<p>The query library supports a powerful <a href="http://docs.jquery.com/Effects">Effects</a> repertoire. Before an effect can be used, it must be loaded:</p> - -<p><code>$this->jquery->effect([optional path] plugin name); -// for example -$this->jquery->effect('bounce'); -</code></p> - -<h3>hide() / show()</h3> - -<p>Each of this functions will affect the visibility of an item on your page. hide() will set an item invisible, show() will reveal it.</p> -<p><code>$this->jquery->hide(target, optional speed, optional extra information);<br /> - $this->jquery->show(target, optional speed, optional extra information);</code></p> - -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.</li> - <li>"extra information" is optional, and could include a callback, or other additional information.</li> -</ul> - -<h3>toggle()</h3> - -<p>toggle() will change the visibility of an item to the opposite of its current state, hiding visible elements, and revealing hidden ones.</p> -<p><code>$this->jquery->toggle(target);</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> -</ul> - -<h3>animate()</h3> - -<p><code> $this->jquery->animate(target, parameters, optional speed, optional extra information);</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"parameters" in jQuery would generally include a series of CSS properties that you wish to change.</li> - <li>"speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.</li> - <li>"extra information" is optional, and could include a callback, or other additional information.</li> -</ul> -<p>For a full summary, see <a href="http://docs.jquery.com/Effects/animate">http://docs.jquery.com/Effects/animate</a></p> -<p>Here is an example of an animate() called on a div with an id of "note", and triggered by a click using the jQuery library's click() event.</p> -<p><code> $params = array(<br /> - 'height' => 80,<br /> - 'width' => '50%',<br /> - 'marginLeft' => 125<br /> -);<br /> -$this->jquery->click('#trigger', $this->jquery->animate('#note', $params, normal));</code></p> - -<h3>fadeIn() / fadeOut()</h3> - -<p><code>$this->jquery->fadeIn(target, optional speed, optional extra information);<br /> - $this->jquery->fadeOut(target, optional speed, optional extra information);</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.</li> - <li>"extra information" is optional, and could include a callback, or other additional information.</li> -</ul> - -<h3>toggleClass()</h3> - -<p>This function will add or remove a CSS class to its target.</p> -<p><code>$this->jquery->toggleClass(target, class)</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"class" is any CSS classname. Note that this class must be defined and available in a CSS that is already loaded.</li> - </ul> - -<h3>fadeIn() / fadeOut()</h3> - -<p>These effects cause an element(s) to disappear or reappear over time.</p> -<p><code>$this->jquery->fadeIn(target, optional speed, optional extra information);<br /> - $this->jquery->fadeOut(target, optional speed, optional extra information);</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.</li> - <li>"extra information" is optional, and could include a callback, or other additional information.</li> -</ul> - -<h3>slideUp() / slideDown() / slideToggle()</h3> - -<p>These effects cause an element(s) to slide.</p> -<p><code>$this->jquery->slideUp(target, optional speed, optional extra information);<br /> - $this->jquery->slideDown(target, optional speed, optional extra information);<br /> -$this->jquery->slideToggle(target, optional speed, optional extra information);</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.</li> - <li>"extra information" is optional, and could include a callback, or other additional information.</li> -</ul> - -<h2>Plugins</h2> - -<p> - -<p>Some select jQuery plugins are made available using this library.</p> - -<h3>corner()</h3> -<p>Used to add distinct corners to page elements. For full details see <a href="http://www.malsup.com/jquery/corner/">http://www.malsup.com/jquery/corner/</a></p> -<p><code>$this->jquery->corner(target, corner_style);</code></p> -<ul> - <li>"target" will be any valid jQuery selector or selectors.</li> - <li>"corner_style" is optional, and can be set to any valid style such as round, sharp, bevel, bite, dog, etc. Individual corners can be set by following the style with a space and using "tl" (top left), "tr" (top right), "bl" (bottom left), or "br" (bottom right).</li> -</ul> -<p><code>$this->jquery->corner("#note", "cool tl br");</code></p> - -<h3>tablesorter()</h3> - -<p>description to come</p> - -<h3>modal()</h3> - -<p>description to come</p> - -<h3>calendar()</h3> - -<p>description to come</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../database/index.html">Database Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../helpers/array_helper.html">Array Helper</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html deleted file mode 100644 index b2473d9dd..000000000 --- a/user_guide/libraries/language.html +++ /dev/null @@ -1,137 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Language Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Language Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Language Class</h1> - -<p>The Language Class provides functions to retrieve language files and lines of text for purposes of internationalization.</p> - -<p>In your CodeIgniter system folder you'll find one called <dfn>language</dfn> containing sets of language files. You can create -your own language files as needed in order to display error and other messages in other languages.</p> - -<p>Language files are typically stored in your <dfn>system/language</dfn> directory. Alternately you can create a folder called <kbd>language</kbd> inside -your <kbd>application</kbd> folder and store them there. CodeIgniter will look first in your <dfn>application/language</dfn> -directory. If the directory does not exist or the specified language is not located there CI will instead look in your global -<dfn>system/language</dfn> folder.</p> - -<p class="important"><strong>Note:</strong> Each language should be stored in its own folder. For example, the English files are located at: -<dfn>system/language/english</dfn></p> - - - -<h2>Creating Language Files</h2> - -<p>Language files must be named with <kbd>_lang.php</kbd> as the file extension. For example, let's say you want to create a file -containing error messages. You might name it: <kbd>error_lang.php</kbd></p> - -<p>Within the file you will assign each line of text to an array called <var>$lang</var> with this prototype:</p> - -<code>$lang['language_key'] = "The actual message to be shown";</code> - -<p><strong>Note:</strong> It's a good practice to use a common prefix for all messages in a given file to avoid collisions with -similarly named items in other files. For example, if you are creating error messages you might prefix them with <var>error_</var></p> - -<code>$lang['<var>error</var>_email_missing'] = "You must submit an email address";<br /> -$lang['<var>error</var>_url_missing'] = "You must submit a URL";<br /> -$lang['<var>error</var>_username_missing'] = "You must submit a username";</code> - - -<h2>Loading A Language File</h2> - -<p>In order to fetch a line from a particular file you must load the file first. Loading a language file is done with the following code:</p> - -<code>$this->lang->load('<samp>filename</samp>', '<dfn>language</dfn>');</code> - -<p>Where <samp>filename</samp> is the name of the file you wish to load (without the file extension), and <dfn>language</dfn> -is the language set containing it (ie, english). If the second parameter is missing, the default language set in your -<kbd>application/config/config.php</kbd> file will be used.</p> - - -<h2>Fetching a Line of Text</h2> - -<p>Once your desired language file is loaded you can access any line of text using this function:</p> - -<code>$this->lang->line('<samp>language_key</samp>');</code> - -<p>Where <samp>language_key</samp> is the array key corresponding to the line you wish to show.</p> - -<p>Note: This function simply returns the line. It does not echo it for you.</p> - -<h3>Using language lines as form labels</h3> - -<p class="important">This feature has been deprecated from the language library and moved to the <kbd>lang()</kbd> function of the <a href="../helpers/language_helper.html">Language helper</a>.</p> - -<h2>Auto-loading Languages</h2> -<p>If you find that you need a particular language globally throughout your application, you can tell CodeIgniter to <a href="../general/autoloader.html">auto-load</a> it during system initialization. This is done by opening the application/config/autoload.php file and adding the language(s) to the autoload array.</p> -<p> </p> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="loader.html">Loader Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="output.html">Output Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html deleted file mode 100644 index c1209973f..000000000 --- a/user_guide/libraries/loader.html +++ /dev/null @@ -1,273 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Loader Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Loader Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Loader Class</h1> - -<p>Loader, as the name suggests, is used to load elements. These elements can be libraries (classes) <a href="../general/views.html">View files</a>, -<a href="../general/helpers.html">Helpers</a>, <a href="../general/models.html">Models</a>, or your own files.</p> - -<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p> - -<p>The following functions are available in this class:</p> - - -<h2>$this->load->library('<var>class_name</var>', <samp>$config</samp>, <kbd>'object name'</kbd>)</h2> - - -<p>This function is used to load core classes. Where <var>class_name</var> is the name of the class you want to load. -Note: We use the terms "class" and "library" interchangeably.</p> - -<p>For example, if you would like to send email with CodeIgniter, the first step is to load the email class within your controller:</p> - -<code>$this->load->library('email');</code> - -<p>Once loaded, the library will be ready for use, using <kbd>$this->email-></kbd><samp><em>some_function</em>()</samp>.</p> - -<p>Library files can be stored in subdirectories within the main "libraries" folder, or within your personal <dfn>application/libraries</dfn> folder. -To load a file located in a subdirectory, simply include the path, relative to the "libraries" folder. -For example, if you have file located at:</p> - -<code>libraries/flavors/chocolate.php</code> - -<p>You will load it using:</p> - -<code>$this->load->library('flavors/chocolate');</code> - -<p>You may nest the file in as many subdirectories as you want.</p> - -<p>Additionally, multiple libraries can be loaded at the same time by passing an array of libraries to the load function.</p> - -<code>$this->load->library(array('<var>email</var>', '<var>table</var>'));</code> - -<h3>Setting options</h3> - -<p>The second (optional) parameter allows you to optionally pass configuration setting. You will typically pass these as an array:</p> - -<code> -$config = array (<br /> - 'mailtype' => 'html',<br /> - 'charset' => 'utf-8,<br /> - 'priority' => '1'<br /> - );<br /> -<br /> -$this->load->library('email', $config);</code> - -<p>Config options can usually also be set via a config file. Each library is explained in detail in its own page, so please read the information regarding each one you would like to use.</p> - -<p>Please take note, when multiple libraries are supplied in an array for the first parameter, each will receive the same parameter information.</p> - -<h3>Assigning a Library to a different object name</h3> - -<p>If the third (optional) parameter is blank, the library will usually be assigned to an object with the same name as the library. For example, if the library is named <dfn>Session</dfn>, it -will be assigned to a variable named <dfn>$this->session</dfn>.</p> - -<p>If you prefer to set your own class names you can pass its value to the third parameter:</p> - -<code>$this->load->library('session', '', 'my_session');<br /><br /> - -// Session class is now accessed using:<br /><br /> - -$this->my_session - -</code> - -<p>Please take note, when multiple libraries are supplied in an array for the first parameter, this parameter is discarded.</p> - - -<h2>$this->load->view('<var>file_name</var>', <samp>$data</samp>, <kbd>true/false</kbd>)</h2> - -<p>This function is used to load your View files. If you haven't read the <a href="../general/views.html">Views</a> section of the -user guide it is recommended that you do since it shows you how this function is typically used.</p> - -<p>The first parameter is required. It is the name of the view file you would like to load. Note: The .php file extension does not need to be specified unless you use something other than <kbd>.php</kbd>.</p> - -<p>The second <strong>optional</strong> parameter can take -an associative array or an object as input, which it runs through the PHP <a href="http://www.php.net/extract">extract</a> function to -convert to variables that can be used in your view files. Again, read the <a href="../general/views.html">Views</a> page to learn -how this might be useful.</p> - -<p>The third <strong>optional</strong> parameter lets you change the behavior of the function so that it returns data as a string -rather than sending it to your browser. This can be useful if you want to process the data in some way. If you -set the parameter to <kbd>true</kbd> (boolean) it will return data. The default behavior is <kbd>false</kbd>, which sends it -to your browser. Remember to assign it to a variable if you want the data returned:</p> - -<code>$string = $this->load->view('<var>myfile</var>', '', <kbd>true</kbd>);</code> - - -<h2>$this->load->model('<var>Model_name</var>');</h2> -<p><code>$this->load->model('<var>Model_name</var>');</code></p> -<p>If your model is located in a sub-folder, include the relative path from your models folder. For example, if you have a model located at application/models/blog/queries.php you'll load it using:</p> -<p><code>$this->load->model('<var>blog/queries</var>');</code></p> -<p>If you would like your model assigned to a different object name you can specify it via the second parameter of the loading - function:</p> -<code> $this->load->model('<var>Model_name</var>', '<kbd>fubar</kbd>');<br /> -<br /> -$this-><kbd>fubar</kbd>->function();</code> -<h2>$this->load->database('<var>options</var>', <kbd>true/false</kbd>)</h2> -<p>This function lets you load the database class. The two parameters are <strong>optional</strong>. Please see the -<a href="../database/index.html">database</a> section for more info.</p> - - - - -<h2>$this->load->vars(<samp>$array</samp>)</h2> - -<p>This function takes an associative array as input and generates variables using the PHP <a href="http://www.php.net/extract">extract</a> function. -This function produces the same result as using the second parameter of the <dfn>$this->load->view()</dfn> function above. The reason you might -want to use this function independently is if you would like to set some global variables in the constructor of your controller -and have them become available in any view file loaded from any function. You can have multiple calls to this function. The data get cached -and merged into one array for conversion to variables. -</p> - - -<h2>$this->load->get_var(<samp>$key</samp>)</h2> - -<p>This function checks the associative array of variables available to your views. This is useful if for any reason a var is set in a library or another controller method using $this->load->vars(). -</p> - - -<h2>$this->load->helper('<var>file_name</var>')</h2> -<p>This function loads helper files, where <var>file_name</var> is the name of the file, without the <kbd>_helper.php</kbd> extension.</p> - - -<h2>$this->load->file('<var>filepath/filename</var>', <kbd>true/false</kbd>)</h2> -<p>This is a generic file loading function. Supply the filepath and name in the first parameter and it will open and read the file. -By default the data is sent to your browser, just like a View file, but if you set the second parameter to <kbd>true</kbd> (boolean) -it will instead return the data as a string.</p> - - -<h2>$this->load->language('<var>file_name</var>')</h2> -<p>This function is an alias of the <a href="language.html">language loading function</a>: $this->lang->load()</p> - -<h2>$this->load->config('<var>file_name</var>')</h2> -<p>This function is an alias of the <a href="config.html">config file loading function</a>: $this->config->load()</p> - - -<h2>Application "Packages"</h2> - -<p>An application package allows for the easy distribution of complete sets of resources in a single directory, complete with its own libraries, models, helpers, config, and language files. It is recommended that these packages be placed in the <dfn>application/third_party</dfn> folder. Below is a sample map of an package directory</p> - - -<h2>Sample Package "Foo Bar" Directory Map</h2> - -<p>The following is an example of a directory for an application package named "Foo Bar".</p> - -<code>/application/third_party/foo_bar<br /> -<br /> -config/<br /> -helpers/<br /> -language/<br /> -libraries/<br /> -models/<br /> -</code> - -<p>Whatever the purpose of the "Foo Bar" application package, it has its own config files, helpers, language files, libraries, and models. To use these resources in your controllers, you first need to tell the Loader that you are going to be loading resources from a package, by adding the package path.</p> - -<h3>$this->load->add_package_path()</h3> - -<p>Adding a package path instructs the Loader class to prepend a given path for subsequent requests for resources. As an example, the "Foo Bar" application package above has a library named <dfn>Foo_bar.php</dfn>. In our controller, we'd do the following:</p> - -<code>$this->load->add_package_path(<var>APPPATH</var>.'third_party/<var>foo_bar</var>/');<br /> -$this->load->library('foo_bar');</code> - -<h3>$this->load->remove_package_path()</h3> - -<p>When your controller is finished using resources from an application package, and particularly if you have other application packages you want to work with, you may wish to remove the package path so the Loader no longer looks in that folder for resources. To remove the last path added, simply call the method with no parameters.</p> - -<h3>$this->load->remove_package_path()</h3> - -<p>Or to remove a specific package path, specify the same path previously given to <kbd>add_package_path() for a package.</kbd>:</p> - -<code>$this->load->remove_package_path(<var>APPPATH</var>.'third_party/<var>foo_bar</var>/');</code> - -<h3>Package view files</h3> - -<p>By Default, package view files paths are set when <samp>add_package_path()</samp> is called. View paths are looped through, and once a match is encountered that view is loaded.</p> -<p>In this instance, it is possible for view naming collisions within packages to occur, and possibly the incorrect package being loaded. To ensure against this, set an optional second parameter of <var>FALSE</var> when calling <samp>add_package_path()</samp>.</p> - -<code> -$this->load->add_package_path(APPPATH.'my_app', TRUE);<br> -$this->load->view('my_app_index'); // Loads<br> -$this->load->view('welcome_message'); // Will not load the default welcome_message b/c the second param to add_package_path is TRUE<br> -<br> -// Reset things<br> -$this->load->remove_package_path(APPPATH.'my_app');<br> -<br> -// Again without the second parameter:<br> -$this->load->add_package_path(APPPATH.'my_app', TRUE);<br> -$this->load->view('my_app_index'); // Loads<br> -$this->load->view('welcome_message'); // Loads<br> -</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="input.html">Input Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="language.html">Language Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/migration.html b/user_guide/libraries/migration.html deleted file mode 100644 index dbda8d48b..000000000 --- a/user_guide/libraries/migration.html +++ /dev/null @@ -1,176 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Migration Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='CodeIgniter Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Migration Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Migration Class</h1> - -<p>Migrations are a convenient way for you to alter your database in a structured and organized manner. You could edit fragments of SQL by hand but you would then be responsible for telling other developers that they need to go and run them. You’d also have to keep track of which changes need to be run against the production machines next time you deploy.</p> - -<p>The database table <var>migration</var> tracks which migrations have already been run so all you have to do is update your application files and call <dfn>$this->migrate->current()</dfn> to work out which migrations should be run. The current version is found in <var>config/migration.php</var>.</p> - -<h2>Create a Migration</h2> - -<p>This will be the first migration for a new site which has a blog. All migrations go in the folder <var>application/migrations/</var> and have names such as: <kbd>001_add_blog.php</kbd>.</p> - -<pre> -defined('BASEPATH') OR exit('No direct script access allowed'); - -class Migration_Add_blog extends CI_Migration { - - public function up() - { - $this->dbforge->add_field(array( - 'blog_id' => array( - 'type' => 'INT', - 'constraint' => 5, - 'unsigned' => TRUE, - 'auto_increment' => TRUE - ), - 'blog_title' => array( - 'type' => 'VARCHAR', - 'constraint' => '100', - ), - 'blog_description' => array( - 'type' => 'TEXT', - 'null' => TRUE, - ), - )); - - $this->dbforge->create_table('blog'); - } - - public function down() - { - $this->dbforge->drop_table('blog'); - } -</pre> - -<p>Then in <var>application/config/migration.php</var> set <dfn>$config['migration_version'] = 1;</dfn>. - -<h2>Usage Example</h2> - -<p>In this example some simple code is placed in <var>application/controllers/migrate.php</var> to update the schema.</p> - -<pre> -$this->load->library('migration'); - -if ( ! $this->migration->current()) -{ - show_error($this->migration->error_string()); -} -</pre> - - -<h1>Function Reference</h1> - -<h2>$this->migration->current()</h2> - -<p>The current migration is whatever is set for <dfn>$config['migration_version']</dfn> in <var>application/config/migration.php</var>.</p> - - -<h2>$this->migration->latest()</h2> - -<p>This works much the same way as current() but instead of looking for the <dfn>$config['migration_version']</dfn> the Migration class will use the very newest migration found in the filesystem.</p> - -<h2>$this->migration->version()</h2> - -<p>Version can be used to roll back changes or step forwards programmatically to specific versions. It works just like current but ignores <dfn>$config['migration_version']</dfn>.</p> - -<pre> -$this->load->library('migration'); - -$this->migration->version(5); -</pre> - -<h2>Migration Preferences</h2> - -<p>The following is a list of all the config options for migrations.</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> -<th>Preference</th> -<th>Default Value</th> -<th>Options</th> -<th>Description</th> -</tr><tr> -<td class="td"><strong>migration_enabled</strong></td><td class="td">FALSE</td><td class="td">TRUE / FALSE</td><td class="td">Enable or disable migrations.</td> -</tr><tr> -<td class="td"><strong>migration_version</strong></td><td class="td">0</td><td class="td">None</td><td class="td">The current version your database should use.</td> -</tr><tr> -<td class="td"><strong>migration_path</strong></td><td class="td">APPPATH.'migrations/'</td><td class="td">None</td><td class="td">The path to your migrations folder.</td> -</tr> -</table> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="form_validation.html">Form Validation Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="table.html">HTML Table Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html deleted file mode 100644 index 4d92d4185..000000000 --- a/user_guide/libraries/output.html +++ /dev/null @@ -1,177 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Output Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Output Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Output Class</h1> - -<p>The Output class is a small class with one main function: To send the finalized web page to the requesting browser. It is -also responsible for <a href="../general/caching.html">caching</a> your web pages, if you use that feature.</p> - -<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p> - -<p>Under normal circumstances you won't even notice the Output class since it works transparently without your intervention. -For example, when you use the <a href="../libraries/loader.html">Loader</a> class to load a view file, it's automatically -passed to the Output class, which will be called automatically by CodeIgniter at the end of system execution. -It is possible, however, for you to manually intervene with the output if you need to, using either of the two following functions:</p> - -<h2>$this->output->set_output();</h2> - -<p>Permits you to manually set the final output string. Usage example:</p> - -<code>$this->output->set_output($data);</code> - -<p><strong>Important:</strong> If you do set your output manually, it must be the last thing done in the function you call it from. -For example, if you build a page in one of your controller functions, don't set the output until the end.</p> - - -<h2>$this->output->set_content_type();</h2> - -<p>Permits you to set the mime-type of your page so you can serve JSON data, JPEG's, XML, etc easily.</p> - -<code>$this->output<br/> - ->set_content_type('application/json')<br/> - ->set_output(json_encode(array('foo' => 'bar')));<br/> -<br/> -$this->output<br/> - ->set_content_type('jpeg') // You could also use ".jpeg" which will have the full stop removed before looking in config/mimes.php<br/> - ->set_output(file_get_contents('files/something.jpg'));</code> - -<p><strong>Important:</strong> Make sure any non-mime string you pass to this method exists in config/mimes.php or it will have no effect.</p> - - -<h2>$this->output->get_output();</h2> - -<p>Permits you to manually retrieve any output that has been sent for storage in the output class. Usage example:</p> -<code>$string = $this->output->get_output();</code> - -<p>Note that data will only be retrievable from this function if it has been previously sent to the output class by one of the -CodeIgniter functions like <var>$this->load->view()</var>.</p> - - -<h2>$this->output->append_output();</h2> - -<p>Appends data onto the output string. Usage example:</p> - -<code>$this->output->append_output($data);</code> - - - -<h2>$this->output->set_header();</h2> - -<p>Permits you to manually set server headers, which the output class will send for you when outputting the final rendered display. Example:</p> - -<code> -$this->output->set_header("HTTP/1.0 200 OK");<br /> -$this->output->set_header("HTTP/1.1 200 OK");<br /> -$this->output->set_header('Last-Modified: '.gmdate('D, d M Y H:i:s', $last_update).' GMT');<br /> -$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate");<br /> -$this->output->set_header("Cache-Control: post-check=0, pre-check=0");<br /> -$this->output->set_header("Pragma: no-cache"); </code> - - -<h2>$this->output->set_status_header(<var>code</var>, '<var>text</var>');</h2> - -<p>Permits you to manually set a server status header. Example:</p> - -<code>$this->output->set_status_header('401');<br /> -// Sets the header as: Unauthorized</code> - -<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">See here</a> for a full list of headers.</p> - -<h2>$this->output->enable_profiler();</h2> - -<p>Permits you to enable/disable the <a href="../general/profiling.html">Profiler</a>, which will display benchmark and other data -at the bottom of your pages for debugging and optimization purposes.</p> - -<p>To enable the profiler place the following function anywhere within your <a href="../general/controllers.html">Controller</a> functions:</p> -<code>$this->output->enable_profiler(TRUE);</code> - -<p>When enabled a report will be generated and inserted at the bottom of your pages.</p> - -<p>To disable the profiler you will use:</p> -<code>$this->output->enable_profiler(FALSE);</code> - -<h2>$this->output->set_profiler_sections();</h2> - -<p>Permits you to enable/disable specific sections of the Profiler when enabled. Please refer to the <a href="../general/profiling.html">Profiler</a> documentation for further information.</p> - -<h2>$this->output->cache();</h2> -<p>The CodeIgniter output library also controls caching. For more information, please see the <a href="../general/caching.html">caching documentation</a>.</p> - -<h2>Parsing Execution Variables</h2> - - <p>CodeIgniter will parse the pseudo-variables <var>{elapsed_time}</var> and <var>{memory_usage}</var> in your output by default. To disable this, set the <var>$parse_exec_vars</var> class property to <var>FALSE</var> in your controller. - - <code>$this->output->parse_exec_vars = FALSE;</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="language.html">Language Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="pagination.html">Pagination Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html deleted file mode 100644 index 2fe603274..000000000 --- a/user_guide/libraries/pagination.html +++ /dev/null @@ -1,233 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Pagination Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Pagination Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Pagination Class</h1> - -<p>CodeIgniter's Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.</p> - -<p>If you are not familiar with the term "pagination", it refers to links that allows you to navigate from page to page, like this:</p> - -<code><a href="#">« First</a> <a href="#"><</a> <a href="#">1</a> <a href="#">2</a> <b>3</b> <a href="#">4</a> <a href="#">5</a> <a href="#">></a> <a href="#">Last »</a></code> - -<h2>Example</h2> - -<p>Here is a simple example showing how to create pagination in one of your <a href="../general/controllers.html">controller</a> functions:</p> - -<code> -$this->load->library('pagination');<br /><br /> -$config['base_url'] = 'http://example.com/index.php/test/page/';<br /> -$config['total_rows'] = 200;<br /> -$config['per_page'] = 20; -<br /><br /> -$this->pagination->initialize($config); - -<br /><br /> -echo $this->pagination->create_links();</code> - -<h3>Notes:</h3> - -<p>The <var>$config</var> array contains your configuration variables. It is passed to the <dfn>$this->pagination->initialize</dfn> function as shown above. Although there are some twenty items you can configure, at -minimum you need the three shown. Here is a description of what those items represent:</p> - -<ul> - <li><strong>base_url</strong> This is the full URL to the controller class/function containing your pagination. In the example - above, it is pointing to a controller called "Test" and a function called "page". Keep in mind that you can - <a href="../general/routing.html">re-route your URI</a> if you need a different structure.</li> - <li><strong>total_rows</strong> This number represents the total rows in the result set you are creating pagination for. - Typically this number will be the total rows that your database query returned. - </li> - <li><strong>per_page</strong> The number of items you intend to show per page. In the above example, you would be showing 20 items per page.</li> -</ul> - -<p>The <var>create_links()</var> function returns an empty string when there is no pagination to show.</p> - - -<h3>Setting preferences in a config file</h3> - -<p>If you prefer not to set preferences using the above method, you can instead put them into a config file. -Simply create a new file called <var>pagination.php</var>, add the <var>$config</var> -array in that file. Then save the file in: <var>config/pagination.php</var> and it will be used automatically. You -will NOT need to use the <dfn>$this->pagination->initialize</dfn> function if you save your preferences in a config file.</p> - - -<h2>Customizing the Pagination</h2> - -<p>The following is a list of all the preferences you can pass to the initialization function to tailor the display.</p> - - -<h4>$config['uri_segment'] = 3;</h4> - -<p>The pagination function automatically determines which segment of your URI contains the page number. If you need -something different you can specify it.</p> - -<h4>$config['num_links'] = 2;</h4> - -<p>The number of "digit" links you would like before and after the selected page number. For example, the number 2 - will place two digits on either side, as in the example links at the very top of this page.</p> - -<h4>$config['use_page_numbers'] = TRUE;</h4> -<p>By default, the URI segment will use the starting index for the items you are paginating. If you prefer to show the the actual page number, set this to TRUE.</p> - -<h4>$config['page_query_string'] = TRUE;</h4> -<p>By default, the pagination library assume you are using <a href="../general/urls.html">URI Segments</a>, and constructs your links something like</p> -<p><code>http://example.com/index.php/test/page/20</code></p> -<p>If you have $config['enable_query_strings'] set to TRUE your links will automatically be re-written using Query Strings. This option can also be explictly set. Using $config['page_query_string'] set to TRUE, the pagination link will become.</p> -<p><code>http://example.com/index.php?c=test&m=page&per_page=20</code></p> -<p>Note that "per_page" is the default query string passed, however can be configured using $config['query_string_segment'] = 'your_string'</p> -<h2>Adding Enclosing Markup</h2> - -<p>If you would like to surround the entire pagination with some markup you can do it with these two prefs:</p> - -<h4>$config['full_tag_open'] = '<p>';</h4> -<p>The opening tag placed on the left side of the entire result.</p> - -<h4>$config['full_tag_close'] = '</p>';</h4> -<p>The closing tag placed on the right side of the entire result.</p> - - -<h2>Customizing the First Link</h2> - -<h4>$config['first_link'] = 'First';</h4> -<p>The text you would like shown in the "first" link on the left. If you do not want this link rendered, you can set its value to FALSE.</p> - -<h4>$config['first_tag_open'] = '<div>';</h4> -<p>The opening tag for the "first" link.</p> - -<h4>$config['first_tag_close'] = '</div>';</h4> -<p>The closing tag for the "first" link.</p> - -<h2>Customizing the Last Link</h2> - -<h4>$config['last_link'] = 'Last';</h4> -<p>The text you would like shown in the "last" link on the right. If you do not want this link rendered, you can set its value to FALSE.</p> - -<h4>$config['last_tag_open'] = '<div>';</h4> -<p>The opening tag for the "last" link.</p> - -<h4>$config['last_tag_close'] = '</div>';</h4> -<p>The closing tag for the "last" link.</p> - -<h2>Customizing the "Next" Link</h2> - -<h4>$config['next_link'] = '&gt;';</h4> -<p>The text you would like shown in the "next" page link. If you do not want this link rendered, you can set its value to FALSE.</p> - -<h4>$config['next_tag_open'] = '<div>';</h4> -<p>The opening tag for the "next" link.</p> - -<h4>$config['next_tag_close'] = '</div>';</h4> -<p>The closing tag for the "next" link.</p> - -<h2>Customizing the "Previous" Link</h2> - -<h4>$config['prev_link'] = '&lt;';</h4> -<p>The text you would like shown in the "previous" page link. If you do not want this link rendered, you can set its value to FALSE.</p> - -<h4>$config['prev_tag_open'] = '<div>';</h4> -<p>The opening tag for the "previous" link.</p> - -<h4>$config['prev_tag_close'] = '</div>';</h4> -<p>The closing tag for the "previous" link.</p> - -<h2>Customizing the "Current Page" Link</h2> - -<h4>$config['cur_tag_open'] = '<b>';</h4> -<p>The opening tag for the "current" link.</p> - -<h4>$config['cur_tag_close'] = '</b>';</h4> -<p>The closing tag for the "current" link.</p> - - -<h2>Customizing the "Digit" Link</h2> - -<h4>$config['num_tag_open'] = '<div>';</h4> -<p>The opening tag for the "digit" link.</p> - -<h4>$config['num_tag_close'] = '</div>';</h4> -<p>The closing tag for the "digit" link.</p> - -<h2>Hiding the Pages</h2> - -<p>If you wanted to not list the specific pages (for example, you only want "next" and "previous" links), you can suppress their rendering by adding:</p> - -<code> -$config['display_pages'] = FALSE; -</code> - - -<h2>Adding a class to every anchor</h2> - -<p>If you want to add a class attribute to every link rendered by the pagination class, you can set the config "anchor_class" equal to the classname you want.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="output.html">Output Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="sessions.html">Session Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html deleted file mode 100644 index 8ea6d09e1..000000000 --- a/user_guide/libraries/parser.html +++ /dev/null @@ -1,212 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Template Parser Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Template Parser Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - - - -<h1>Template Parser Class</h1> - -<p>The Template Parser Class enables you to parse pseudo-variables contained within your view files. It can parse simple -variables or variable tag pairs. If you've never used a template engine, pseudo-variables look like this:</p> - -<code><html><br /> -<head><br /> -<title><kbd>{blog_title}</kbd></title><br /> -</head><br /> -<body><br /> -<br /> -<h3><kbd>{blog_heading}</kbd></h3><br /> -<br /> -<kbd>{blog_entries}</kbd><br /> -<h5><kbd>{title}</kbd></h5><br /> -<p><kbd>{body}</kbd></p><br /> -<kbd>{/blog_entries}</kbd><br /> - -</body><br /> -</html></code> - -<p>These variables are not actual PHP variables, but rather plain text representations that allow you to eliminate -PHP from your templates (view files).</p> - -<p class="important"><strong>Note:</strong> CodeIgniter does <strong>not</strong> require you to use this class -since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if -they work with designers who they feel would find some confusion working with PHP.</p> - -<p><strong>Also Note:</strong> The Template Parser Class is <strong>not</strong> a -full-blown template parsing solution. We've kept it very lean on purpose in order to maintain maximum performance.</p> - - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Parser class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('parser');</code> -<p>Once loaded, the Parser library object will be available using: <dfn>$this->parser</dfn></p> - - -<p>The following functions are available in this library:</p> - -<h2>$this->parser->parse()</h2> - -<p>This method accepts a template name and data array as input, and it generates a parsed version. Example:</p> - -<code>$this->load->library('parser');<br /> -<br /> -$data = array(<br /> - 'blog_title' => 'My Blog Title',<br /> - 'blog_heading' => 'My Blog Heading'<br /> - );<br /> -<br /> -$this->parser->parse('blog_template', $data);</code> - -<p>The first parameter contains the name of the <a href="../general/views.html">view file</a> (in this example the file would be called blog_template.php), -and the second parameter contains an associative array of data to be replaced in the template. In the above example, the -template would contain two variables: {blog_title} and {blog_heading}</p> - -<p>There is no need to "echo" or do something with the data returned by <dfn>$this->parser->parse()</dfn>. It is automatically -passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can -pass TRUE (boolean) to the third parameter:</p> - -<code>$string = $this->parser->parse('blog_template', $data, TRUE);</code> - -<h2>$this->parser->parse_string()</h2> - -<p>This method works exactly like parse(), only accepts a string as the first parameter in place of a view file.</p> - - -<h2>Variable Pairs</h2> - -<p>The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be -repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:</p> - -<code><html><br /> -<head><br /> -<title><kbd>{blog_title}</kbd></title><br /> -</head><br /> -<body><br /> -<br /> -<h3><kbd>{blog_heading}</kbd></h3><br /> -<br /> -<kbd>{blog_entries}</kbd><br /> -<h5><kbd>{title}</kbd></h5><br /> -<p><kbd>{body}</kbd></p><br /> -<kbd>{/blog_entries}</kbd><br /> - -</body><br /> -</html></code> - -<p>In the above code you'll notice a pair of variables: <kbd>{blog_entries}</kbd> data... <kbd>{/blog_entries}</kbd>. -In a case like this, the entire chunk of data between these pairs would be repeated multiple times, corresponding -to the number of rows in a result.</p> - -<p>Parsing variable pairs is done using the identical code shown above to parse single variables, -except, you will add a multi-dimensional array corresponding to your variable pair data. -Consider this example:</p> - - -<code>$this->load->library('parser');<br /> -<br /> -$data = array(<br /> - 'blog_title' => 'My Blog Title',<br /> - 'blog_heading' => 'My Blog Heading',<br /> - 'blog_entries' => array(<br /> - array('title' => 'Title 1', 'body' => 'Body 1'),<br /> - array('title' => 'Title 2', 'body' => 'Body 2'),<br /> - array('title' => 'Title 3', 'body' => 'Body 3'),<br /> - array('title' => 'Title 4', 'body' => 'Body 4'),<br /> - array('title' => 'Title 5', 'body' => 'Body 5')<br /> - )<br /> - );<br /> -<br /> -$this->parser->parse('blog_template', $data);</code> - -<p>If your "pair" data is coming from a database result, which is already a multi-dimensional array, you can simply -use the database result_array() function:</p> - -<code> -$query = $this->db->query("SELECT * FROM blog");<br /> -<br /> -$this->load->library('parser');<br /> -<br /> -$data = array(<br /> - 'blog_title' => 'My Blog Title',<br /> - 'blog_heading' => 'My Blog Heading',<br /> - 'blog_entries' => $query->result_array()<br /> - );<br /> -<br /> -$this->parser->parse('blog_template', $data);</code> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="trackback.html">Trackback Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="typography.html">Typography</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html deleted file mode 100644 index 3ea2d8ff4..000000000 --- a/user_guide/libraries/security.html +++ /dev/null @@ -1,135 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Security Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Security Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Security Class</h1> - -<p>The Security Class contains methods that help you create a secure application, processing input data for security.</p> - -<h2>XSS Filtering</h2> - -<p>CodeIgniter comes with a Cross Site Scripting Hack prevention filter which can either run automatically to filter -all POST and COOKIE data that is encountered, or you can run it on a per item basis. By default it does <strong>not</strong> -run globally since it requires a bit of processing overhead, and since you may not need it in all cases.</p> - -<p>The XSS filter looks for commonly used techniques to trigger Javascript or other types of code that attempt to hijack cookies -or do other malicious things. If anything disallowed is encountered it is rendered safe by converting the data to character entities.</p> - -<p> -Note: This function should only be used to deal with data upon submission. It's not something that should be used for general runtime processing since it requires a fair amount of processing overhead.</p> - - -<p>To filter data through the XSS filter use this function:</p> - -<h2>$this->security->xss_clean()</h2> - -<p>Here is an usage example:</p> - -<code>$data = $this->security->xss_clean($data);</code> - -<p>If you want the filter to run automatically every time it encounters POST or COOKIE data you can enable it by opening your -<kbd>application/config/config.php</kbd> file and setting this:</p> - -<code>$config['global_xss_filtering'] = TRUE;</code> - -<p>Note: If you use the form validation class, it gives you the option of XSS filtering as well.</p> - -<p>An optional second parameter, <dfn>is_image</dfn>, allows this function to be used to test images for potential XSS attacks, useful for file upload security. When this second parameter is set to <dfn>TRUE</dfn>, instead of returning an altered string, the function returns TRUE if the image is safe, and FALSE if it contained potentially malicious information that a browser may attempt to execute.</p> - -<code>if ($this->security->xss_clean($file, TRUE) === FALSE)<br /> -{<br /> - // file failed the XSS test<br /> -}</code> - - -<h2>$this->security->sanitize_filename()</h2> - -<p>When accepting filenames from user input, it is best to sanitize them to prevent directory traversal and other security related issues. To do so, use the <dfn>sanitize_filename()</dfn> method of the Security class. Here is an example:</p> - -<code>$filename = $this->security->sanitize_filename($this->input->post('filename'));</code> - -<p>If it is acceptable for the user input to include relative paths, e.g. <kbd>file/in/some/approved/folder.txt</kbd>, you can set the second optional parameter, - <samp>$relative_path</samp> to TRUE.</p> - -<code>$filename = $this->security->sanitize_filename($this->input->post('filename'), TRUE);</code> - -<!-- @todo write docs for CSRF methods --> - -<h2>Cross-site request forgery (CSRF)</h2> - -<p>You can enable csrf protection by opening your <kbd>application/config/config.php</kbd> file and setting this:</p> -<code>$config['csrf_protection'] = TRUE;</code> - -<p>If you use the <a href="../helpers/form_helper.html">form helper</a> the <var>form_open()</var> function will automatically insert a hidden csrf field in your forms.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="pagination.html">Pagination Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="sessions.html">Session Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html deleted file mode 100644 index 39706eeea..000000000 --- a/user_guide/libraries/sessions.html +++ /dev/null @@ -1,343 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Session Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Session Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Session Class</h1> - -<p>The Session class permits you maintain a user's "state" and track their activity while they browse your site. -The Session class stores session information for each user as serialized (and optionally encrypted) data in a cookie. -It can also store the session data in a database table for added security, as this permits the session ID in the -user's cookie to be matched against the stored session ID. By default only the cookie is saved. If you choose to -use the database option you'll need to create the session table as indicated below. -</p> - -<p class="important"><strong>Note:</strong> The Session class does <strong>not</strong> utilize native PHP sessions. It -generates its own session data, offering more flexibility for developers.</p> - -<p class="important"><strong>Note:</strong> Even if you are not using encrypted sessions, you must set -an <a href="./encryption.html">encryption key</a> in your config file which is used to aid in preventing session data manipulation.</p> - -<p class="important"><strong>Note:</strong> The Session class relies on the Encryption class, so you must have Mcrypt extension installed</p> - -<h2>Initializing a Session</h2> - -<p>Sessions will typically run globally with each page load, so the session class must either be -<a href="../general/libraries.html">initialized</a> in your -<a href="../general/controllers.html">controller</a> constructors, or it can be -<a href="../general/autoloader.html">auto-loaded</a> by the system. -For the most part the session class will run unattended in the background, so simply initializing the class -will cause it to read, create, and update sessions.</p> - - -<p>To initialize the Session class manually in your controller constructor, use the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('session');</code> -<p>Once loaded, the Sessions library object will be available using: <dfn>$this->session</dfn></p> - - -<h2>How do Sessions work?</h2> - -<p>When a page is loaded, the session class will check to see if valid session data exists in the user's session cookie. -If sessions data does <strong>not</strong> exist (or if it has expired) a new session will be created and saved in the cookie. -If a session does exist, its information will be updated and the cookie will be updated. With each update, the session_id will be regenerated.</p> - -<p>It's important for you to understand that once initialized, the Session class runs automatically. There is nothing -you need to do to cause the above behavior to happen. You can, as you'll see below, work with session data or -even add your own data to a user's session, but the process of reading, writing, and updating a session is automatic.</p> - - -<h2>What is Session Data?</h2> - -<p>A <em>session</em>, as far as CodeIgniter is concerned, is simply an array containing the following information:</p> - -<ul> -<li>The user's unique Session ID (this is a statistically random string with very strong entropy, hashed with MD5 for portability, and regenerated (by default) every five minutes)</li> -<li>The user's IP Address</li> -<li>The user's User Agent data (the first 120 characters of the browser data string)</li> -<li>The "last activity" time stamp.</li> -</ul> - -<p>The above data is stored in a cookie as a serialized array with this prototype:</p> - -<code>[array]<br /> -(<br /> - 'session_id' => random hash,<br /> - 'ip_address' => 'string - user IP address',<br /> - 'user_agent' => 'string - user agent data',<br /> - 'last_activity' => timestamp<br /> -)</code> - -<p>If you have the encryption option enabled, the serialized array will be encrypted before being stored in the cookie, -making the data highly secure and impervious to being read or altered by someone. More info regarding encryption -can be <a href="encryption.html">found here</a>, although the Session class will take care of initializing -and encrypting the data automatically.</p> - -<p>Note: Session cookies are only updated every five minutes by default to reduce processor load. If you repeatedly reload a page -you'll notice that the "last activity" time only updates if five minutes or more has passed since the last time -the cookie was written. This time is configurable by changing the $config['sess_time_to_update'] line in your system/config/config.php file.</p> - -<h2>Retrieving Session Data</h2> - -<p>Any piece of information from the session array is available using the following function:</p> - -<code>$this->session->userdata('<samp>item</samp>');</code> - -<p>Where <samp>item</samp> is the array index corresponding to the item you wish to fetch. For example, to fetch the session ID you -will do this:</p> - -<code>$session_id = $this->session->userdata('<samp>session_id</samp>');</code> - -<p><strong>Note:</strong> The function returns FALSE (boolean) if the item you are trying to access does not exist.</p> - - -<h2>Adding Custom Session Data</h2> - -<p>A useful aspect of the session array is that you can add your own data to it and it will be stored in the user's cookie. -Why would you want to do this? Here's one example:</p> - -<p>Let's say a particular user logs into your site. Once authenticated, -you could add their username and email address to the session cookie, making that data globally available to you without -having to run a database query when you need it.</p> - -<p>To add your data to the session array involves passing an array containing your new data to this function:</p> - -<code>$this->session->set_userdata(<samp>$array</samp>);</code> - -<p>Where <samp>$array</samp> is an associative array containing your new data. Here's an example:</p> - - -<p><code>$newdata = array(<br /> - 'username' => 'johndoe',<br /> - 'email' => 'johndoe@some-site.com',<br /> - 'logged_in' => TRUE<br /> - );<br /> - <br /> - $this->session->set_userdata(<samp>$newdata</samp>);</code></p> -<p>If you want to add userdata one value at a time, set_userdata() also supports this syntax. </p> -<p><code>$this->session->set_userdata('some_name', 'some_value');</code></p> -<p class="important"><strong>Note:</strong> Cookies can only hold 4KB of data, so be careful not to exceed the capacity. The -encryption process in particular produces a longer data string than the original so keep careful track of how much data you are storing.</p> - -<h2>Retrieving All Session Data</h2> -<p>An array of all userdata can be retrieved as follows:</p> -<code>$this->session->all_userdata()</code> - -<p>And returns an associative array like the following:</p> - -<pre> -Array -( - [session_id] => 4a5a5dca22728fb0a84364eeb405b601 - [ip_address] => 127.0.0.1 - [user_agent] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; - [last_activity] => 1303142623 -) -</pre> - - -<h2>Removing Session Data</h2> -<p>Just as set_userdata() can be used to add information into a session, unset_userdata() can be used to remove it, by passing the session key. For example, if you wanted to remove 'some_name' from your session information: </p> -<p><code>$this->session->unset_userdata('some_name');</code></p> -<p>This function can also be passed an associative array of items to unset.</p> -<p><code>$array_items = array('username' => '', 'email' => '');<br /> -<br /> -$this->session->unset_userdata(<samp>$array_items</samp>);</code></p> -<h2>Flashdata</h2> -<p>CodeIgniter supports "flashdata", or session data that will only be available for the next server request, and are then automatically cleared. These can be very useful, and are typically used for informational or status messages (for example: "record 2 deleted").</p> -<p>Note: Flash variables are prefaced with "flash_" so avoid this prefix in your own session names.</p> -<p>To add flashdata:</p> -<p><code>$this->session->set_flashdata('item', 'value');</code></p> -<p>You can also pass an array to set_flashdata(), in the same manner as set_userdata(). </p> -<p>To read a flashdata variable:</p> -<p><code>$this->session->flashdata('item');</code></p> -<p>If you find that you need to preserve a flashdata variable through an additional request, you can do so using the keep_flashdata() function.</p> -<p><code>$this->session->keep_flashdata('item');</code></p> -<h2>Saving Session Data to a Database</h2> -<p>While the session data array stored in the user's cookie contains a Session ID, -unless you store session data in a database there is no way to validate it. For some applications that require little or no -security, session ID validation may not be needed, but if your application requires security, validation is mandatory. Otherwise, an old session -could be restored by a user modifying their cookies.</p> - -<p>When session data is available in a database, every time a valid session is found in the user's cookie, a database -query is performed to match it. If the session ID does not match, the session is destroyed. Session IDs can never -be updated, they can only be generated when a new session is created.</p> - - -<p>In order to store sessions, you must first create a database table for this purpose. Here is the basic -prototype (for MySQL) required by the session class:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -CREATE TABLE IF NOT EXISTS `ci_sessions` ( - session_id varchar(40) DEFAULT '0' NOT NULL, - ip_address varchar(45) DEFAULT '0' NOT NULL, - user_agent varchar(120) NOT NULL, - last_activity int(10) unsigned DEFAULT 0 NOT NULL, - user_data text NOT NULL, - PRIMARY KEY (session_id), - KEY `last_activity_idx` (`last_activity`) -); -</textarea> - -<p><strong>Note:</strong> By default the table is called <dfn>ci_sessions</dfn>, but you can name it anything you want -as long as you update the <kbd>application/config/config.php</kbd> file so that it contains the name you have chosen. -Once you have created your database table you can enable the database option in your config.php file as follows:</p> - -<code>$config['sess_use_database'] = TRUE;</code> - -<p>Once enabled, the Session class will store session data in the DB.</p> - -<p>Make sure you've specified the table name in your config file as well:</p> - -<code>$config['sess_table_name'] = 'ci_sessions';</code> - -<p class="important"><strong>Note:</strong> The Session class has built-in garbage collection which clears out expired sessions so you -do not need to write your own routine to do it.</p> - - -<h2>Destroying a Session </h2> -<p>To clear the current session: </p> -<code>$this->session->sess_destroy();</code> -<p class="important"><strong>Note:</strong> This function should be the last one called, and even flash variables will no longer be available. If you only want some items destroyed and not all, use <dfn>unset_userdata()</dfn>.</p> - - - -<h2>Session Preferences</h2> -<p>You'll find the following Session related preferences in your <kbd>application/config/config.php</kbd> file:</p> - - -<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder"> -<tr> - <th>Preference</th> - <th>Default</th> - <th>Options</th> - <th>Description</th> -</tr> -<tr> - <td class="td"><strong>sess_cookie_name</strong></td> - <td class="td">ci_session</td> - <td class="td">None</td> - <td class="td">The name you want the session cookie saved as.</td> -</tr> -<tr> - <td class="td"><strong>sess_expiration</strong></td> - <td class="td">7200</td> - <td class="td">None</td> - <td class="td">The number of seconds you would like the session to last. The default value is 2 hours (7200 seconds). If you would like a non-expiring session set the value to zero: 0</td> -</tr> -<tr> - <td class="td"><strong>sess_expire_on_close</strong></td> - <td class="td">FALSE</td> - <td class="td">TRUE/FALSE (boolean)</td> - <td class="td">Whether to cause the session to expire automatically when the browser window is closed.</td> -</tr> -<tr> - <td class="td"><strong>sess_encrypt_cookie</strong></td> - <td class="td">FALSE</td> - <td class="td">TRUE/FALSE (boolean)</td> - <td class="td">Whether to encrypt the session data.</td> -</tr> -<tr> - <td class="td"><strong>sess_use_database</strong></td> - <td class="td">FALSE</td> - <td class="td">TRUE/FALSE (boolean)</td> - <td class="td">Whether to save the session data to a database. You must create the table before enabling this option.</td> -</tr> -<tr> - <td class="td"><strong>sess_table_name</strong></td> - <td class="td">ci_sessions</td> - <td class="td">Any valid SQL table name</td> - <td class="td">The name of the session database table.</td> -</tr> -<tr> - <td class="td"><strong>sess_time_to_update</strong></td> - <td class="td">300</td> - <td class="td">Time in seconds</td> - <td class="td">This options controls how often the session class will regenerate itself and create a new session id.</td> -</tr> -<tr> - <td class="td"><strong>sess_match_ip</strong></td> - <td class="td">FALSE</td> - <td class="td">TRUE/FALSE (boolean)</td> - <td class="td">Whether to match the user's IP address when reading the session data. Note that some ISPs dynamically - changes the IP, so if you want a non-expiring session you will likely set this to FALSE.</td> -</tr> -<tr> - <td class="td"><strong>sess_match_useragent</strong></td> - <td class="td">TRUE</td> - <td class="td">TRUE/FALSE (boolean)</td> - <td class="td">Whether to match the User Agent when reading the session data.</td> -</tr> -</table> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="security.html">Security Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="trackback.html">Trackback Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html deleted file mode 100644 index 06af266a2..000000000 --- a/user_guide/libraries/table.html +++ /dev/null @@ -1,315 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<title>CodeIgniter User Guide : HTML Table Class</title> - -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -HTML Table Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>HTML Table Class</h1> - -<p>The Table Class provides functions that enable you to auto-generate HTML tables from arrays or database result sets.</p> - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Table class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('table');</code> -<p>Once loaded, the Table library object will be available using: <dfn>$this->table</dfn></p> - - -<h2>Examples</h2> - -<p>Here is an example showing how you can create a table from a multi-dimensional array. -Note that the first array index will become the table heading (or you can set your own headings using the -<dfn>set_heading()</dfn> function described in the function reference below).</p> - -<code> -$this->load->library('table');<br /> -<br /> -$data = array(<br /> - array('Name', 'Color', 'Size'),<br /> - array('Fred', 'Blue', 'Small'),<br /> - array('Mary', 'Red', 'Large'),<br /> - array('John', 'Green', 'Medium') <br /> - );<br /> -<br /> -echo $this->table->generate($data); -</code> - -<p>Here is an example of a table created from a database query result. The table class will automatically generate the -headings based on the table names (or you can set your own headings using the <dfn>set_heading()</dfn> function described -in the function reference below).</p> - -<code> -$this->load->library('table');<br /> -<br /> -$query = $this->db->query("SELECT * FROM my_table");<br /> -<br /> -echo $this->table->generate($query); -</code> - - -<p>Here is an example showing how you might create a table using discrete parameters:</p> - -<code> -$this->load->library('table');<br /> -<br /> -$this->table->set_heading('Name', 'Color', 'Size');<br /> -<br /> -$this->table->add_row('Fred', 'Blue', 'Small');<br /> -$this->table->add_row('Mary', 'Red', 'Large');<br /> -$this->table->add_row('John', 'Green', 'Medium');<br /> -<br /> -echo $this->table->generate(); -</code> - -<p>Here is the same example, except instead of individual parameters, arrays are used:</p> - -<code> -$this->load->library('table');<br /> -<br /> -$this->table->set_heading(array('Name', 'Color', 'Size'));<br /> -<br /> -$this->table->add_row(array('Fred', 'Blue', 'Small'));<br /> -$this->table->add_row(array('Mary', 'Red', 'Large'));<br /> -$this->table->add_row(array('John', 'Green', 'Medium'));<br /> -<br /> -echo $this->table->generate(); -</code> - - -<h2>Changing the Look of Your Table</h2> - -<p>The Table Class permits you to set a table template with which you can specify the design of your layout. Here is the template -prototype:</p> - -<code> -$tmpl = array (<br /> - 'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',<br /> -<br /> - 'heading_row_start' => '<tr>',<br /> - 'heading_row_end' => '</tr>',<br /> - 'heading_cell_start' => '<th>',<br /> - 'heading_cell_end' => '</th>',<br /> -<br /> - 'row_start' => '<tr>',<br /> - 'row_end' => '</tr>',<br /> - 'cell_start' => '<td>',<br /> - 'cell_end' => '</td>',<br /> -<br /> - 'row_alt_start' => '<tr>',<br /> - 'row_alt_end' => '</tr>',<br /> - 'cell_alt_start' => '<td>',<br /> - 'cell_alt_end' => '</td>',<br /> -<br /> - 'table_close' => '</table>'<br /> - );<br /> - -<br /> -$this->table->set_template($tmpl); -</code> - -<p class="important"><strong>Note:</strong> You'll notice there are two sets of "row" blocks in the template. These permit you to create alternating row colors or design elements that alternate with each -iteration of the row data.</p> - -<p>You are NOT required to submit a complete template. If you only need to change parts of the layout you can simply submit those elements. -In this example, only the table opening tag is being changed:</p> - -<code> -$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );<br /> - -<br /> -$this->table->set_template($tmpl); -</code> - -<br /> -<h1>Function Reference</h1> - -<h2>$this->table->generate()</h2> -<p>Returns a string containing the generated table. Accepts an optional parameter which can be an array or a database result object.</p> - -<h2>$this->table->set_caption()</h2> - -<p>Permits you to add a caption to the table.</p> - -<code>$this->table->set_caption('Colors');</code> - -<h2>$this->table->set_heading()</h2> - -<p>Permits you to set the table heading. You can submit an array or discrete params:</p> - -<code>$this->table->set_heading('Name', 'Color', 'Size');</code> -<code>$this->table->set_heading(array('Name', 'Color', 'Size'));</code> - -<h2>$this->table->add_row()</h2> - -<p>Permits you to add a row to your table. You can submit an array or discrete params:</p> - -<code>$this->table->add_row('Blue', 'Red', 'Green');</code> -<code>$this->table->add_row(array('Blue', 'Red', 'Green'));</code> - -<p>If you would like to set an individual cell's tag attributes, you can use an associative array for that cell. The associative key <dfn>'data'</dfn> defines the cell's data. Any other key => val pairs are added as <dfn>key='val'</dfn> attributes to the tag:</p> - -<code>$cell = array('data' => 'Blue', 'class' => 'highlight', 'colspan' => 2);<br /> -$this->table->add_row($cell, 'Red', 'Green');<br /> -<br /> -// generates<br /> -// <td class='highlight' colspan='2'>Blue</td><td>Red</td><td>Green</td> -</code> - -<h2>$this->table->make_columns()</h2> - -<p>This function takes a one-dimensional array as input and creates -a multi-dimensional array with a depth equal to the number of -columns desired. This allows a single array with many elements to be -displayed in a table that has a fixed column count. Consider this example:</p> - -<code> -$list = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve');<br /> -<br /> -$new_list = $this->table->make_columns($list, 3);<br /> -<br /> -$this->table->generate($new_list);<br /> -<br /> -// Generates a table with this prototype<br /> -<br /> -<table border="0" cellpadding="4" cellspacing="0"><br /> -<tr><br /> -<td>one</td><td>two</td><td>three</td><br /> -</tr><tr><br /> -<td>four</td><td>five</td><td>six</td><br /> -</tr><tr><br /> -<td>seven</td><td>eight</td><td>nine</td><br /> -</tr><tr><br /> -<td>ten</td><td>eleven</td><td>twelve</td></tr><br /> -</table></code> - - - -<h2>$this->table->set_template()</h2> - -<p>Permits you to set your template. You can submit a full or partial template.</p> - -<code> -$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );<br /> - -<br /> -$this->table->set_template($tmpl); -</code> - - -<h2>$this->table->set_empty()</h2> - -<p>Let's you set a default value for use in any table cells that are empty. You might, for example, set a non-breaking space:</p> - -<code> -$this->table->set_empty("&nbsp;"); -</code> - -<h2>$this->table->clear()</h2> - -<p>Lets you clear the table heading and row data. If you need to show multiple tables with different data you should -to call this function after each table has been generated to empty the previous table information. Example:</p> - -<code> -$this->load->library('table');<br /> -<br /> -$this->table->set_heading('Name', 'Color', 'Size');<br /> -$this->table->add_row('Fred', 'Blue', 'Small');<br /> -$this->table->add_row('Mary', 'Red', 'Large');<br /> -$this->table->add_row('John', 'Green', 'Medium');<br /> -<br /> -echo $this->table->generate();<br /> -<br /> -<kbd>$this->table->clear();</kbd><br /> -<br /> -$this->table->set_heading('Name', 'Day', 'Delivery');<br /> -$this->table->add_row('Fred', 'Wednesday', 'Express');<br /> -$this->table->add_row('Mary', 'Monday', 'Air');<br /> -$this->table->add_row('John', 'Saturday', 'Overnight');<br /> -<br /> -echo $this->table->generate(); -</code> - -<h2>$this->table->function</h2> - -<p>Allows you to specify a native PHP function or a valid function array object to be applied to all cell data.</p> - -<code>$this->load->library('table');<br /> -<br /> -$this->table->set_heading('Name', 'Color', 'Size');<br /> -$this->table->add_row('Fred', '<strong>Blue</strong>', 'Small');<br /> -<br /> -$this->table->function = 'htmlspecialchars';<br /> -echo $this->table->generate();<br /> -</code> - -<p>In the above example, all cell data would be ran through PHP's <dfn>htmlspecialchars()</dfn> function, resulting in:</p> - -<code><td>Fred</td><td>&lt;strong&gt;Blue&lt;/strong&gt;</td><td>Small</td></code> -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="ftp.html"> FTP Class</a> · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="image_lib.html">Image Manipulation Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html deleted file mode 100644 index a8e67bf51..000000000 --- a/user_guide/libraries/trackback.html +++ /dev/null @@ -1,246 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Trackback Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Trackback Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Trackback Class</h1> - -<p>The Trackback Class provides functions that enable you to send and receive Trackback data.</p> - - -<p>If you are not familiar with Trackbacks you'll find more information <a href="http://en.wikipedia.org/wiki/Trackback">here</a>.</p> - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Trackback class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('trackback');</code> -<p>Once loaded, the Trackback library object will be available using: <dfn>$this->trackback</dfn></p> - - -<h2>Sending Trackbacks</h2> - -<p>A Trackback can be sent from any of your controller functions using code similar to this example:</p> - -<code>$this->load->library('trackback');<br /> -<br /> -$tb_data = array(<br /> - 'ping_url' => 'http://example.com/trackback/456',<br /> - 'url' => 'http://www.my-example.com/blog/entry/123',<br /> - 'title' => 'The Title of My Entry',<br /> - 'excerpt' => 'The entry content.',<br /> - 'blog_name' => 'My Blog Name',<br /> - 'charset' => 'utf-8'<br /> - );<br /> -<br /> -if ( ! $this->trackback->send($tb_data))<br /> -{<br /> - echo $this->trackback->display_errors();<br /> -}<br /> -else<br /> -{<br /> - echo 'Trackback was sent!';<br /> -}</code> - -<p>Description of array data:</p> - -<ul> -<li><strong>ping_url</strong> - The URL of the site you are sending the Trackback to. You can send Trackbacks to multiple URLs by separating each URL with a comma.</li> -<li><strong>url</strong> - The URL to YOUR site where the weblog entry can be seen.</li> -<li><strong>title</strong> - The title of your weblog entry.</li> -<li><strong>excerpt</strong> - The content of your weblog entry. Note: the Trackback class will automatically send only the first 500 characters of your entry. It will also strip all HTML.</li> -<li><strong>blog_name</strong> - The name of your weblog.</li> -<li><strong>charset</strong> - The character encoding your weblog is written in. If omitted, UTF-8 will be used.</li> -</ul> - -<p>The Trackback sending function returns TRUE/FALSE (boolean) on success or failure. If it fails, you can retrieve the error message using:</p> - -<code>$this->trackback->display_errors();</code> - - -<h2>Receiving Trackbacks</h2> - -<p>Before you can receive Trackbacks you must create a weblog. If you don't have a blog yet there's no point in continuing.</p> - -<p>Receiving Trackbacks is a little more complex than sending them, only because you will need a database table in which to store them, -and you will need to validate the incoming trackback data. You are encouraged to implement a thorough validation process to -guard against spam and duplicate data. You may also want to limit the number of Trackbacks you allow from a particular IP within -a given span of time to further curtail spam. The process of receiving a Trackback is quite simple; -the validation is what takes most of the effort.</p> - -<h2>Your Ping URL</h2> - -<p>In order to accept Trackbacks you must display a Trackback URL next to each one of your weblog entries. This will be the URL -that people will use to send you Trackbacks (we will refer to this as your "Ping URL").</p> - -<p>Your Ping URL must point to a controller function where your Trackback receiving code is located, and the URL -must contain the ID number for each particular entry, so that when the Trackback is received you'll be -able to associate it with a particular entry.</p> - -<p>For example, if your controller class is called <dfn>Trackback</dfn>, and the receiving function is called <dfn>receive</dfn>, your -Ping URLs will look something like this:</p> - -<code>http://example.com/index.php/trackback/receive/<samp>entry_id</samp></code> - -<p>Where <samp>entry_id</samp> represents the individual ID number for each of your entries.</p> - - -<h2>Creating a Trackback Table</h2> - -<p>Before you can receive Trackbacks you must create a table in which to store them. Here is a basic prototype for such a table:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="13"> -CREATE TABLE trackbacks ( - tb_id int(10) unsigned NOT NULL auto_increment, - entry_id int(10) unsigned NOT NULL default 0, - url varchar(200) NOT NULL, - title varchar(100) NOT NULL, - excerpt text NOT NULL, - blog_name varchar(100) NOT NULL, - tb_date int(10) NOT NULL, - ip_address varchar(16) NOT NULL, - PRIMARY KEY `tb_id` (`tb_id`), - KEY `entry_id` (`entry_id`) -);</textarea> - - -<p>The Trackback specification only requires four pieces of information to be sent in a Trackback (url, title, excerpt, blog_name), -but to make the data more useful we've added a few more fields in the above table schema (date, IP address, etc.).</p> - -<h2>Processing a Trackback</h2> - -<p>Here is an example showing how you will receive and process a Trackback. The following -code is intended for use within the controller function where you expect to receive Trackbacks.</p> - -<code>$this->load->library('trackback');<br /> -$this->load->database();<br /> -<br /> -if ($this->uri->segment(3) == FALSE)<br /> -{<br /> - $this->trackback->send_error("Unable to determine the entry ID");<br /> -}<br /> -<br /> -if ( ! $this->trackback->receive())<br /> -{<br /> - $this->trackback->send_error("The Trackback did not contain valid data");<br /> -}<br /> -<br /> -$data = array(<br /> - 'tb_id' => '',<br /> - 'entry_id' => $this->uri->segment(3),<br /> - 'url' => $this->trackback->data('url'),<br /> - 'title' => $this->trackback->data('title'),<br /> - 'excerpt' => $this->trackback->data('excerpt'),<br /> - 'blog_name' => $this->trackback->data('blog_name'),<br /> - 'tb_date' => time(),<br /> - 'ip_address' => $this->input->ip_address()<br /> - );<br /> -<br /> -$sql = $this->db->insert_string('trackbacks', $data);<br /> -$this->db->query($sql);<br /> -<br /> -$this->trackback->send_success();</code> - -<h4>Notes:</h4> - -<p>The entry ID number is expected in the third segment of your URL. This is based on the URI example we gave earlier:</p> - -<code>http://example.com/index.php/trackback/receive/<samp>entry_id</samp></code> - -<p>Notice the entry_id is in the third URI segment, which you can retrieve using:</p> - -<code>$this->uri->segment(3);</code> - -<p>In our Trackback receiving code above, if the third segment is missing, we will issue an error. Without a valid entry ID, there's no -reason to continue.</p> - -<p>The <dfn>$this->trackback->receive()</dfn> function is simply a validation function that looks at the incoming data -and makes sure it contains the four pieces of data that are required (url, title, excerpt, blog_name). -It returns TRUE on success and FALSE on failure. If it fails you will issue an error message.</p> - -<p>The incoming Trackback data can be retrieved using this function:</p> - -<code>$this->trackback->data('<var>item</var>')</code> - -<p>Where <var>item</var> represents one of these four pieces of info: url, title, excerpt, or blog_name</p> - -<p>If the Trackback data is successfully received, you will issue a success message using:</p> - -<code>$this->trackback->send_success();</code> - -<p class="important"><strong>Note:</strong> The above code contains no data validation, which you are encouraged to add.</p> - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="sessions.html">Session Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="parser.html">Template Parser Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/typography.html b/user_guide/libraries/typography.html deleted file mode 100644 index 9c6abb0aa..000000000 --- a/user_guide/libraries/typography.html +++ /dev/null @@ -1,160 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Typography Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Typography Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Typography Class</h1> - -<p>The Typography Class provides functions that help you format text.</p> - - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Typography class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('typography');</code> -<p>Once loaded, the Typography library object will be available using: <dfn>$this->typography</dfn></p> - - -<h2>auto_typography()</h2> - -<p>Formats text so that it is semantically and typographically correct HTML. Takes a string as input and returns it with -the following formatting:</p> - -<ul> -<li>Surrounds paragraphs within <p></p> (looks for double line breaks to identify paragraphs).</li> -<li>Single line breaks are converted to <br />, except those that appear within <pre> tags.</li> -<li>Block level elements, like <div> tags, are not wrapped within paragraphs, but their contained text is if it contains paragraphs.</li> -<li>Quotes are converted to correctly facing curly quote entities, except those that appear within tags.</li> -<li>Apostrophes are converted to curly apostrophe entities.</li> -<li>Double dashes (either like -- this or like--this) are converted to em—dashes.</li> -<li>Three consecutive periods either preceding or following a word are converted to ellipsis…</li> -<li>Double spaces following sentences are converted to non-breaking spaces to mimic double spacing.</li> -</ul> - -<p>Usage example:</p> - -<code>$string = $this->typography->auto_typography($string);</code> - -<h3>Parameters</h3> - -<p>There is one optional parameters that determines whether the parser should reduce more then two consecutive line breaks down to two. Use boolean <kbd>TRUE</kbd> or <kbd>FALSE</kbd>.</p> - -<p>By default the parser does not reduce line breaks. In other words, if no parameters are submitted, it is the same as doing this:</p> - -<code>$string = $this->typography->auto_typography($string, <kbd>FALSE</kbd>);</code> - - -<p class="important"><strong>Note:</strong> Typographic formatting can be processor intensive, particularly if you have a lot of content being formatted. -If you choose to use this function you may want to consider -<a href="../general/caching.html">caching</a> your pages.</p> - - - -<h2>format_characters()</h2> - -<p>This function is similar to the <dfn>auto_typography</dfn> function above, except that it only does character conversion:</p> - -<ul> -<li>Quotes are converted to correctly facing curly quote entities, except those that appear within tags.</li> -<li>Apostrophes are converted to curly apostrophe entities.</li> -<li>Double dashes (either like -- this or like--this) are converted to em—dashes.</li> -<li>Three consecutive periods either preceding or following a word are converted to ellipsis…</li> -<li>Double spaces following sentences are converted to non-breaking spaces to mimic double spacing.</li> -</ul> - -<p>Usage example:</p> - -<code>$string = $this->typography->format_characters($string);</code> - - -<h2>nl2br_except_pre()</h2> - -<p>Converts newlines to <br /> tags unless they appear within <pre> tags. -This function is identical to the native PHP <dfn>nl2br()</dfn> function, except that it ignores <pre> tags.</p> - -<p>Usage example:</p> - -<code>$string = $this->typography->nl2br_except_pre($string);</code> - -<h2>protect_braced_quotes</h2> - -<p>When using the Typography library in conjunction with the Template Parser library it can often be desirable to protect single - and double quotes within curly braces. To enable this, set the <kbd>protect_braced_quotes</kbd> class property to <samp>TRUE</samp>.</p> - -<p>Usage example:</p> - -<code>$this->load->library('typography');<br /> -$this->typography->protect_braced_quotes = TRUE; -</code> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="parser.html">Template Parser</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="unit_testing.html">Unit Testing Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html deleted file mode 100644 index f54239b43..000000000 --- a/user_guide/libraries/unit_testing.html +++ /dev/null @@ -1,226 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Unit Testing Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Unit Testing Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Unit Testing Class</h1> - -<p>Unit testing is an approach to software development in which tests are written for each function in your application. -If you are not familiar with the concept you might do a little googling on the subject.</p> - -<p>CodeIgniter's Unit Test class is quite simple, consisting of an evaluation function and two result functions. -It's not intended to be a full-blown test suite but rather a simple mechanism to evaluate your code -to determine if it is producing the correct data type and result. -</p> - - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the Unit Test class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('unit_test');</code> -<p>Once loaded, the Unit Test object will be available using: <dfn>$this->unit</dfn></p> - - -<h2>Running Tests</h2> - -<p>Running a test involves supplying a test and an expected result to the following function:</p> - -<h2>$this->unit->run( <var>test</var>, <var>expected result</var>, '<var>test name</var>', '<var>notes</var>');</h2> - -<p>Where <var>test</var> is the result of the code you wish to test, <var>expected result</var> is the data type you expect, -<var>test name</var> is an optional name you can give your test, and <var>notes</var> are optional notes. Example:</p> - -<code>$test = 1 + 1;<br /> -<br /> -$expected_result = 2;<br /> -<br /> -$test_name = 'Adds one plus one';<br /> -<br /> -$this->unit->run($test, $expected_result, $test_name);</code> - -<p>The expected result you supply can either be a literal match, or a data type match. Here's an example of a literal:</p> - -<code>$this->unit->run('Foo', 'Foo');</code> - -<p>Here is an example of a data type match:</p> - -<code>$this->unit->run('Foo', 'is_string');</code> - -<p>Notice the use of "is_string" in the second parameter? This tells the function to evaluate whether your test is producing a string -as the result. Here is a list of allowed comparison types:</p> - -<ul> -<li>is_object</li> -<li>is_string</li> -<li>is_bool</li> -<li>is_true</li> -<li>is_false</li> -<li>is_int</li> -<li>is_numeric</li> -<li>is_float</li> -<li>is_double</li> -<li>is_array</li> -<li>is_null</li> -</ul> - - -<h2>Generating Reports</h2> - -<p>You can either display results after each test, or your can run several tests and generate a report at the end. -To show a report directly simply echo or return the <var>run</var> function:</p> - -<code>echo $this->unit->run($test, $expected_result);</code> - -<p>To run a full report of all tests, use this:</p> - -<code>echo $this->unit->report();</code> - -<p>The report will be formatted in an HTML table for viewing. If you prefer the raw data you can retrieve an array using:</p> - -<code>echo $this->unit->result();</code> - - -<h2>Strict Mode</h2> - -<p>By default the unit test class evaluates literal matches loosely. Consider this example:</p> - -<code>$this->unit->run(1, TRUE);</code> - -<p>The test is evaluating an integer, but the expected result is a boolean. PHP, however, due to it's loose data-typing -will evaluate the above code as TRUE using a normal equality test:</p> - -<code>if (1 == TRUE) echo 'This evaluates as true';</code> - -<p>If you prefer, you can put the unit test class in to strict mode, which will compare the data type as well as the value:</p> - -<code>if (1 === TRUE) echo 'This evaluates as FALSE';</code> - -<p>To enable strict mode use this:</p> - -<code>$this->unit->use_strict(TRUE);</code> - -<h2>Enabling/Disabling Unit Testing</h2> - -<p>If you would like to leave some testing in place in your scripts, but not have it run unless you need it, you can disable -unit testing using:</p> - -<code>$this->unit->active(FALSE)</code> - -<h2>Unit Test Display</h2> - -<p>When your unit test results display, the following items show by default:</p> - -<ul> - <li>Test Name (test_name)</li> - <li>Test Datatype (test_datatype)</li> - <li>Expected Datatype (res_datatype)</li> - <li>Result (result)</li> - <li>File Name (file)</li> - <li>Line Number (line)</li> - <li>Any notes you entered for the test (notes)</li> -</ul> - -You can customize which of these items get displayed by using <kbd>$this->unit->set_items()</kbd>. For example, if you only wanted the test name and the result displayed:</p> - -<h3>Customizing displayed tests</h3> - -<code> - $this->unit->set_test_items(array('test_name', 'result')); -</code> - -<h3>Creating a Template</h3> - -<p>If you would like your test results formatted differently then the default you can set your own template. Here is an -example of a simple template. Note the required pseudo-variables:</p> - -<code> -$str = '<br /> -<table border="0" cellpadding="4" cellspacing="1"><br /> - <kbd>{rows}</kbd><br /> - <tr><br /> - <td><kbd>{item}</kbd></td><br /> - <td><kbd>{result}</kbd></td><br /> - </tr><br /> - <kbd>{/rows}</kbd><br /> -</table>';<br /> -<br /> -$this->unit->set_template($str); -</code> - -<p class="important"><strong>Note:</strong> Your template must be declared <strong>before</strong> running the unit test process.</p> - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="typography.html">Typography Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="uri.html">URI Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html deleted file mode 100644 index be49a4dcf..000000000 --- a/user_guide/libraries/uri.html +++ /dev/null @@ -1,252 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>URI Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -URI Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>URI Class</h1> - -<p>The URI Class provides functions that help you retrieve information from your URI strings. If you use URI routing, you can -also retrieve information about the re-routed segments.</p> - -<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p> - -<h2>$this->uri->segment(<var>n</var>)</h2> - -<p>Permits you to retrieve a specific segment. Where <var>n</var> is the segment number you wish to retrieve. -Segments are numbered from left to right. For example, if your full URL is this:</p> - -<code>http://example.com/index.php/news/local/metro/crime_is_up</code> - -<p>The segment numbers would be this:</p> - -<ol> -<li>news</li> -<li>local</li> -<li>metro</li> -<li>crime_is_up</li> -</ol> - -<p>By default the function returns FALSE (boolean) if the segment does not exist. There is an optional second parameter that -permits you to set your own default value if the segment is missing. -For example, this would tell the function to return the number zero in the event of failure:</p> - -<code>$product_id = $this->uri->segment(3, 0);</code> - -<p>It helps avoid having to write code like this:</p> - -<code>if ($this->uri->segment(3) === FALSE)<br /> -{<br /> - $product_id = 0;<br /> -}<br /> -else<br /> -{<br /> - $product_id = $this->uri->segment(3);<br /> -}<br /> -</code> - -<h2>$this->uri->rsegment(<var>n</var>)</h2> - -<p>This function is identical to the previous one, except that it lets you retrieve a specific segment from your -re-routed URI in the event you are using CodeIgniter's <a href="../general/routing.html">URI Routing</a> feature.</p> - - -<h2>$this->uri->slash_segment(<var>n</var>)</h2> - -<p>This function is almost identical to <dfn>$this->uri->segment()</dfn>, except it adds a trailing and/or leading slash based on the second -parameter. If the parameter is not used, a trailing slash added. Examples:</p> - -<code>$this->uri->slash_segment(<var>3</var>);<br /> -$this->uri->slash_segment(<var>3</var>, 'leading');<br /> -$this->uri->slash_segment(<var>3</var>, 'both');</code> - -<p>Returns:</p> - -<ol> -<li>segment/</li> -<li>/segment</li> -<li>/segment/</li> -</ol> - - -<h2>$this->uri->slash_rsegment(<var>n</var>)</h2> - -<p>This function is identical to the previous one, except that it lets you add slashes a specific segment from your -re-routed URI in the event you are using CodeIgniter's <a href="../general/routing.html">URI Routing</a> feature.</p> - - - -<h2>$this->uri->uri_to_assoc(<var>n</var>)</h2> - -<p>This function lets you turn URI segments into and associative array of key/value pairs. Consider this URI:</p> - -<code>index.php/user/search/name/joe/location/UK/gender/male</code> - -<p>Using this function you can turn the URI into an associative array with this prototype:</p> - -<code>[array]<br /> -(<br /> - 'name' => 'joe'<br /> - 'location' => 'UK'<br /> - 'gender' => 'male'<br /> -)</code> - -<p>The first parameter of the function lets you set an offset. By default it is set to <kbd>3</kbd> since your -URI will normally contain a controller/function in the first and second segments. Example:</p> - -<code> -$array = $this->uri->uri_to_assoc(3);<br /> -<br /> -echo $array['name']; -</code> - - -<p>The second parameter lets you set default key names, so that the array returned by the function will always contain expected indexes, even if missing from the URI. Example:</p> - -<code> -$default = array('name', 'gender', 'location', 'type', 'sort');<br /> -<br /> -$array = $this->uri->uri_to_assoc(3, $default);</code> - -<p>If the URI does not contain a value in your default, an array index will be set to that name, with a value of FALSE.</p> - -<p>Lastly, if a corresponding value is not found for a given key (if there is an odd number of URI segments) the value will be set to FALSE (boolean).</p> - - -<h2>$this->uri->ruri_to_assoc(<var>n</var>)</h2> - -<p>This function is identical to the previous one, except that it creates an associative array using the -re-routed URI in the event you are using CodeIgniter's <a href="../general/routing.html">URI Routing</a> feature.</p> - - -<h2>$this->uri->assoc_to_uri()</h2> - -<p>Takes an associative array as input and generates a URI string from it. The array keys will be included in the string. Example:</p> - -<code>$array = array('product' => 'shoes', 'size' => 'large', 'color' => 'red');<br /> -<br /> -$str = $this->uri->assoc_to_uri($array);<br /> -<br /> -// Produces: product/shoes/size/large/color/red -</code> - - -<h2>$this->uri->uri_string()</h2> - -<p>Returns a string with the complete URI. For example, if this is your full URL:</p> - -<code>http://example.com/index.php/news/local/345</code> - -<p>The function would return this:</p> - -<code>news/local/345</code> - - -<h2>$this->uri->ruri_string()</h2> - -<p>This function is identical to the previous one, except that it returns the -re-routed URI in the event you are using CodeIgniter's <a href="../general/routing.html">URI Routing</a> feature.</p> - - - -<h2>$this->uri->total_segments()</h2> - -<p>Returns the total number of segments.</p> - - -<h2>$this->uri->total_rsegments()</h2> - -<p>This function is identical to the previous one, except that it returns the total number of segments in your -re-routed URI in the event you are using CodeIgniter's <a href="../general/routing.html">URI Routing</a> feature.</p> - - - -<h2>$this->uri->segment_array()</h2> - -<p>Returns an array containing the URI segments. For example:</p> - -<code> -$segs = $this->uri->segment_array();<br /> -<br /> -foreach ($segs as $segment)<br /> -{<br /> - echo $segment;<br /> - echo '<br />';<br /> -}</code> - -<h2>$this->uri->rsegment_array()</h2> - -<p>This function is identical to the previous one, except that it returns the array of segments in your -re-routed URI in the event you are using CodeIgniter's <a href="../general/routing.html">URI Routing</a> feature.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="unit_testing.html">Unit Testing Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="user_agent.html">User Agent Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html deleted file mode 100644 index 33ec6b45e..000000000 --- a/user_guide/libraries/user_agent.html +++ /dev/null @@ -1,226 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>User Agent Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -User Agent Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>User Agent Class</h1> - -<p>The User Agent Class provides functions that help identify information about the browser, mobile device, or robot visiting your site. -In addition you can get referrer information as well as language and supported character-set information.</p> - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the User Agent class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('user_agent');</code> -<p>Once loaded, the object will be available using: <dfn>$this->agent</dfn></p> - -<h2>User Agent Definitions</h2> - -<p>The user agent name definitions are located in a config file located at: <dfn>application/config/user_agents.php</dfn>. You may add items to the -various user agent arrays if needed.</p> - -<h2>Example</h2> - -<p>When the User Agent class is initialized it will attempt to determine whether the user agent browsing your site is -a web browser, a mobile device, or a robot. It will also gather the platform information if it is available.</p> - - -<code> -$this->load->library('user_agent');<br /> -<br /> -if ($this->agent->is_browser())<br /> -{<br /> - $agent = $this->agent->browser().' '.$this->agent->version();<br /> -}<br /> -elseif ($this->agent->is_robot())<br /> -{<br /> - $agent = $this->agent->robot();<br /> -}<br /> -elseif ($this->agent->is_mobile())<br /> -{<br /> - $agent = $this->agent->mobile();<br /> -}<br /> -else<br /> -{<br /> - $agent = 'Unidentified User Agent';<br /> -}<br /> -<br /> -echo $agent;<br /> -<br /> -echo $this->agent->platform(); // Platform info (Windows, Linux, Mac, etc.) -</code> - - -<h1>Function Reference</h1> - - -<h2>$this->agent->is_browser()</h2> -<p>Returns TRUE/FALSE (boolean) if the user agent is a known web browser.</p> - -<code> if ($this->agent->is_browser('Safari'))<br /> -{<br /> - echo 'You are using Safari.';<br /> -}<br /> -else if ($this->agent->is_browser())<br /> -{<br /> - echo 'You are using a browser.';<br /> -}</code> - -<p class="important"><strong>Note:</strong> The string "Safari" in this example is an array key in the list of browser definitions. -You can find this list in <dfn>application/config/user_agents.php</dfn> if you want to add new browsers or change the stings.</p> - -<h2>$this->agent->is_mobile()</h2> -<p>Returns TRUE/FALSE (boolean) if the user agent is a known mobile device.</p> - -<code> if ($this->agent->is_mobile('iphone'))<br /> -{<br /> - $this->load->view('iphone/home');<br /> -}<br /> -else if ($this->agent->is_mobile())<br /> -{<br /> - $this->load->view('mobile/home');<br /> -}<br/> -else<br /> -{<br /> - $this->load->view('web/home');<br /> -}</code> - -<h2>$this->agent->is_robot()</h2> -<p>Returns TRUE/FALSE (boolean) if the user agent is a known robot.</p> - -<p class="important"><strong>Note:</strong> The user agent library only contains the most common robot -definitions. It is not a complete list of bots. There are hundreds of them so searching for each one would not be -very efficient. If you find that some bots that commonly visit your site are missing from the list you can add them to your -<dfn>application/config/user_agents.php</dfn> file.</p> - -<h2>$this->agent->is_referral()</h2> -<p>Returns TRUE/FALSE (boolean) if the user agent was referred from another site.</p> - - -<h2>$this->agent->browser()</h2> -<p>Returns a string containing the name of the web browser viewing your site.</p> - -<h2>$this->agent->version()</h2> -<p>Returns a string containing the version number of the web browser viewing your site.</p> - -<h2>$this->agent->mobile()</h2> -<p>Returns a string containing the name of the mobile device viewing your site.</p> - -<h2>$this->agent->robot()</h2> -<p>Returns a string containing the name of the robot viewing your site.</p> - -<h2>$this->agent->platform()</h2> -<p>Returns a string containing the platform viewing your site (Linux, Windows, OS X, etc.).</p> - -<h2>$this->agent->referrer()</h2> -<p>The referrer, if the user agent was referred from another site. Typically you'll test for this as follows:</p> - -<code> if ($this->agent->is_referral())<br /> -{<br /> - echo $this->agent->referrer();<br /> -}</code> - - -<h2>$this->agent->agent_string()</h2> -<p>Returns a string containing the full user agent string. Typically it will be something like this:</p> - -<code>Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.4) Gecko/20060613 Camino/1.0.2</code> - - -<h2>$this->agent->accept_lang()</h2> -<p>Lets you determine if the user agent accepts a particular language. Example:</p> - -<code>if ($this->agent->accept_lang('en'))<br /> -{<br /> - echo 'You accept English!';<br /> -}</code> - -<p class="important"><strong>Note:</strong> This function is not typically very reliable -since some browsers do not provide language info, and even among those that do, it is not always accurate. </p> - - - -<h2>$this->agent->accept_charset()</h2> -<p>Lets you determine if the user agent accepts a particular character set. Example:</p> - -<code>if ($this->agent->accept_charset('utf-8'))<br /> -{<br /> - echo 'You browser supports UTF-8!';<br /> -}</code> - -<p class="important"><strong>Note:</strong> This function is not typically very reliable -since some browsers do not provide character-set info, and even among those that do, it is not always accurate. </p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="uri.html">URI Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="xmlrpc.html">XML-RPC Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html deleted file mode 100644 index 72b210297..000000000 --- a/user_guide/libraries/xmlrpc.html +++ /dev/null @@ -1,519 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>XML-RPC and XML-RPC Server Classes : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -XML-RPC and XML-RPC Server Classes -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>XML-RPC and XML-RPC Server Classes</h1> - - -<p>CodeIgniter's XML-RPC classes permit you to send requests to another server, or set up -your own XML-RPC server to receive requests.</p> - - -<h2>What is XML-RPC?</h2> - -<p>Quite simply it is a way for two computers to communicate over the internet using XML. -One computer, which we will call the <dfn>client</dfn>, sends an XML-RPC <strong>request</strong> to -another computer, which we will call the <dfn>server</dfn>. Once the server receives and processes the request it -will send back a <strong>response</strong> to the client.</p> - -<p>For example, using the MetaWeblog API, an XML-RPC Client (usually a desktop publishing tool) will -send a request to an XML-RPC Server running on your site. This request might be a new weblog entry -being sent for publication, or it could be a request for an existing entry for editing. - -When the XML-RPC Server receives this request it will examine it to determine which class/method should be called to process the request. -Once processed, the server will then send back a response message.</p> - -<p>For detailed specifications, you can visit the <a href="http://www.xmlrpc.com/">XML-RPC</a> site.</p> - -<h2>Initializing the Class</h2> - -<p>Like most other classes in CodeIgniter, the XML-RPC and XML-RPCS classes are initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<p>To load the XML-RPC class you will use:</p> -<code>$this->load->library('xmlrpc');</code> -<p>Once loaded, the xml-rpc library object will be available using: <dfn>$this->xmlrpc</dfn></p> - -<p>To load the XML-RPC Server class you will use:</p> -<code> -$this->load->library('xmlrpc');<br /> -$this->load->library('xmlrpcs'); -</code> -<p>Once loaded, the xml-rpcs library object will be available using: <dfn>$this->xmlrpcs</dfn></p> - -<p class="important"><strong>Note:</strong> When using the XML-RPC Server class you must load BOTH the XML-RPC class and the XML-RPC Server class.</p> - - - -<h2>Sending XML-RPC Requests</h2> - -<p>To send a request to an XML-RPC server you must specify the following information:</p> - -<ul> -<li>The URL of the server</li> -<li>The method on the server you wish to call</li> -<li>The <em>request</em> data (explained below).</li> -</ul> - -<p>Here is a basic example that sends a simple Weblogs.com ping to the <a href="http://pingomatic.com/">Ping-o-Matic</a></p> - - -<code>$this->load->library('xmlrpc');<br /> -<br /> -$this->xmlrpc->server('http://rpc.pingomatic.com/', 80);<br /> -$this->xmlrpc->method('weblogUpdates.ping');<br /> - -<br /> -$request = array('My Photoblog', 'http://www.my-site.com/photoblog/');<br /> -$this->xmlrpc->request($request);<br /> -<br /> -if ( ! $this->xmlrpc->send_request())<br /> -{<br /> - echo $this->xmlrpc->display_error();<br /> -}</code> - -<h3>Explanation</h3> - -<p>The above code initializes the XML-RPC class, sets the server URL and method to be called (weblogUpdates.ping). The -request (in this case, the title and URL of your site) is placed into an array for transportation, and -compiled using the request() function. -Lastly, the full request is sent. If the <dfn>send_request()</dfn> method returns false we will display the error message -sent back from the XML-RPC Server.</p> - -<h2>Anatomy of a Request</h2> - -<p>An XML-RPC <dfn>request</dfn> is simply the data you are sending to the XML-RPC server. Each piece of data in a request -is referred to as a <dfn>request parameter</dfn>. The above example has two parameters: -The URL and title of your site. When the XML-RPC server receives your request, it will look for parameters it requires.</p> - -<p>Request parameters must be placed into an array for transportation, and each parameter can be one -of seven data types (strings, numbers, dates, etc.). If your parameters are something other than strings -you will have to include the data type in the request array.</p> - -<p>Here is an example of a simple array with three parameters:</p> - -<code>$request = array('John', 'Doe', 'www.some-site.com');<br /> -$this->xmlrpc->request($request);</code> - -<p>If you use data types other than strings, or if you have several different data types, you will place -each parameter into its own array, with the data type in the second position:</p> - -<code> -$request = array (<br /> - array('John', 'string'),<br /> - array('Doe', 'string'),<br /> - array(FALSE, 'boolean'),<br /> - array(12345, 'int')<br /> - ); -<br /> -$this->xmlrpc->request($request);</code> - -The <a href="#datatypes">Data Types</a> section below has a full list of data types. - - - -<h2>Creating an XML-RPC Server</h2> - -<p>An XML-RPC Server acts as a traffic cop of sorts, waiting for incoming requests and redirecting them to the -appropriate functions for processing.</p> - -<p>To create your own XML-RPC server involves initializing the XML-RPC Server class in your controller where you expect the incoming -request to appear, then setting up an array with mapping instructions so that incoming requests can be sent to the appropriate -class and method for processing.</p> - -<p>Here is an example to illustrate:</p> - -<code> -$this->load->library('xmlrpc');<br /> -$this->load->library('xmlrpcs');<br /> -<br /> -$config['functions']['<var>new_post</var>'] = array('function' => '<dfn>My_blog.new_entry</dfn>'),<br /> -$config['functions']['<var>update_post</var>'] = array('function' => '<dfn>My_blog.update_entry</dfn>');<br /> -$config['object'] = $this;<br /> -<br /> -$this->xmlrpcs->initialize($config);<br /> -$this->xmlrpcs->serve();</code> - -<p>The above example contains an array specifying two method requests that the Server allows. -The allowed methods are on the left side of the array. When either of those are received, they will be mapped to the class and method on the right.</p> - -<p>The '<var>object</var>' key is a special key that you pass an instantiated class object with, which is necessary when the method you are mapping to is not - part of the CodeIgniter super object.</p> - -<p>In other words, if an XML-RPC Client sends a request for the <var>new_post</var> method, your -server will load the <dfn>My_blog</dfn> class and call the <dfn>new_entry</dfn> function. -If the request is for the <var>update_post</var> method, your -server will load the <dfn>My_blog</dfn> class and call the <dfn>update_entry</dfn> function.</p> - -<p>The function names in the above example are arbitrary. You'll decide what they should be called on your server, -or if you are using standardized APIs, like the Blogger or MetaWeblog API, you'll use their function names.</p> - -<p>There are two additional configuration keys you may make use of when initializing the server class: <var>debug</var> can be set to TRUE in order to enable debugging, and <var>xss_clean</var> may be set to FALSE to prevent sending data through the Security library's xss_clean function. - -<h2>Processing Server Requests</h2> - -<p>When the XML-RPC Server receives a request and loads the class/method for processing, it will pass -an object to that method containing the data sent by the client.</p> - -<p>Using the above example, if the <var>new_post</var> method is requested, the server will expect a class -to exist with this prototype:</p> - -<code>class <kbd>My_blog</kbd> extends CI_Controller {<br /> -<br /> - function <kbd>new_post</kbd>(<var>$request</var>)<br /> - {<br /> - <br /> - }<br /> -} -</code> - -<p>The <var>$request</var> variable is an object compiled by the Server, which contains the data sent by the XML-RPC Client. -Using this object you will have access to the <em>request parameters</em> enabling you to process the request. When -you are done you will send a <dfn>Response</dfn> back to the Client.</p> - -<p>Below is a real-world example, using the Blogger API. One of the methods in the Blogger API is <dfn>getUserInfo()</dfn>. -Using this method, an XML-RPC Client can send the Server a username and password, in return the Server sends -back information about that particular user (nickname, user ID, email address, etc.). Here is how the processing -function might look:</p> - - -<code>class <kbd>My_blog</kbd> extends CI_Controller {<br /> -<br /> - function <kbd>getUserInfo</kbd>(<var>$request</var>)<br /> - {<br /> - - $username = 'smitty';<br /> - $password = 'secretsmittypass';<br /><br /> - - $this->load->library('xmlrpc');<br /> - <br /> - $parameters = $request->output_parameters();<br /> - <br /> - if ($parameters['1'] != $username AND $parameters['2'] != $password)<br /> - {<br /> - return $this->xmlrpc->send_error_message('100', 'Invalid Access');<br /> - }<br /> - <br /> - $response = array(array('nickname' => array('Smitty','string'),<br /> - 'userid' => array('99','string'),<br /> - 'url' => array('http://yoursite.com','string'),<br /> - 'email' => array('jsmith@yoursite.com','string'),<br /> - 'lastname' => array('Smith','string'),<br /> - 'firstname' => array('John','string')<br /> - ),<br /> - 'struct');<br /> -<br /> - return $this->xmlrpc->send_response($response);<br /> - }<br /> -} -</code> - -<h3>Notes:</h3> -<p>The <dfn>output_parameters()</dfn> function retrieves an indexed array corresponding to the request parameters sent by the client. -In the above example, the output parameters will be the username and password.</p> - -<p>If the username and password sent by the client were not valid, and error message is returned using <dfn>send_error_message()</dfn>.</p> - -<p>If the operation was successful, the client will be sent back a response array containing the user's info.</p> - - -<h2>Formatting a Response</h2> - -<p>Similar to <em>Requests</em>, <em>Responses</em> must be formatted as an array. However, unlike requests, a response is an array -<strong>that contains a single item</strong>. This item can be an array with several additional arrays, but there -can be only one primary array index. In other words, the basic prototype is this:</p> - -<code>$response = array('Response data', 'array');</code> - -<p>Responses, however, usually contain multiple pieces of information. In order to accomplish this we must put the response into its own -array so that the primary array continues to contain a single piece of data. Here's an example showing how this might be accomplished:</p> - -<code> -$response = array (<br /> - array(<br /> - 'first_name' => array('John', 'string'),<br /> - 'last_name' => array('Doe', 'string'),<br /> - 'member_id' => array(123435, 'int'),<br /> - 'todo_list' => array(array('clean house', 'call mom', 'water plants'), 'array'),<br /> - ),<br /> - 'struct'<br /> - ); -</code> - -<p class="important">Notice that the above array is formatted as a <dfn>struct</dfn>. This is the most common data type for responses.</p> - -<p>As with Requests, a response can be one of the seven data types listed in the <a href="#datatypes">Data Types</a> section.</p> - - -<h2>Sending an Error Response</h2> - -<p>If you need to send the client an error response you will use the following:</p> - -<code>return $this->xmlrpc->send_error_message('123', 'Requested data not available');</code> - -<p>The first parameter is the error number while the second parameter is the error message.</p> - - - - - - -<h2>Creating Your Own Client and Server</h2> - -<p>To help you understand everything we've covered thus far, let's create a couple controllers that act as -XML-RPC Client and Server. You'll use the Client to send a request to the Server and receive a response.</p> - -<h3>The Client</h3> - -<p>Using a text editor, create a controller called <dfn>xmlrpc_client.php</dfn>. -In it, place this code and save it to your <samp>applications/controllers/</samp> folder:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="32"><?php - -class Xmlrpc_client extends CI_Controller { - - function index() - { - $this->load->helper('url'); - $server_url = site_url('xmlrpc_server'); - - $this->load->library('xmlrpc'); - - $this->xmlrpc->server($server_url, 80); - $this->xmlrpc->method('Greetings'); - - $request = array('How is it going?'); - $this->xmlrpc->request($request); - - if ( ! $this->xmlrpc->send_request()) - { - echo $this->xmlrpc->display_error(); - } - else - { - echo '<pre>'; - print_r($this->xmlrpc->display_response()); - echo '</pre>'; - } - } -} -?></textarea> - -<p>Note: In the above code we are using a "url helper". You can find more information in the <a href="../general/helpers.html">Helpers Functions</a> page.</p> - -<h3>The Server</h3> - -<p>Using a text editor, create a controller called <dfn>xmlrpc_server.php</dfn>. -In it, place this code and save it to your <samp>applications/controllers/</samp> folder:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="30"><?php - -class Xmlrpc_server extends CI_Controller { - - function index() - { - $this->load->library('xmlrpc'); - $this->load->library('xmlrpcs'); - - $config['functions']['Greetings'] = array('function' => 'Xmlrpc_server.process'); - - $this->xmlrpcs->initialize($config); - $this->xmlrpcs->serve(); - } - - - function process($request) - { - $parameters = $request->output_parameters(); - - $response = array( - array( - 'you_said' => $parameters['0'], - 'i_respond' => 'Not bad at all.'), - 'struct'); - - return $this->xmlrpc->send_response($response); - } -} -?></textarea> - -<h3>Try it!</h3> - -<p>Now visit the your site using a URL similar to this:</p> -<code>example.com/index.php/<var>xmlrpc_client</var>/</code> - -<p>You should now see the message you sent to the server, and its response back to you.</p> - -<p>The client you created sends a message ("How's is going?") to the server, along with a request for the "Greetings" method. -The Server receives the request and maps it to the "process" function, where a response is sent back.</p> - -<h2>Using Associative Arrays In a Request Parameter</h2> - -<p>If you wish to use an associative array in your method parameters you will need to use a struct datatype:</p> - -<code>$request = array(<br /> - array(<br /> - // Param 0<br /> - array(<br /> - 'name'=>'John'<br /> - ),<br /> - 'struct'<br /> - ),<br /> - array(<br /> - // Param 1<br /> - array(<br /> - 'size'=>'large',<br /> - 'shape'=>'round'<br /> - ),<br /> - 'struct'<br /> - )<br /> - );<br /> - $this->xmlrpc->request($request);</code> - -<p>You can retrieve the associative array when processing the request in the Server.</p> - -<code>$parameters = $request->output_parameters();<br /> - $name = $parameters['0']['name'];<br /> - $size = $parameters['1']['size'];<br /> - $size = $parameters['1']['shape']; </code> - -<h1>XML-RPC Function Reference</h1> - -<h2>$this->xmlrpc->server()</h2> -<p>Sets the URL and port number of the server to which a request is to be sent:</p> -<code>$this->xmlrpc->server('http://www.sometimes.com/pings.php', 80);</code> - -<h2>$this->xmlrpc->timeout()</h2> -<p>Set a time out period (in seconds) after which the request will be canceled:</p> -<code>$this->xmlrpc->timeout(6);</code> - -<h2>$this->xmlrpc->method()</h2> -<p>Sets the method that will be requested from the XML-RPC server:</p> -<code>$this->xmlrpc->method('<var>method</var>');</code> - -<p>Where <var>method</var> is the name of the method.</p> - -<h2>$this->xmlrpc->request()</h2> -<p>Takes an array of data and builds request to be sent to XML-RPC server:</p> -<code>$request = array(array('My Photoblog', 'string'), 'http://www.yoursite.com/photoblog/');<br /> -$this->xmlrpc->request($request);</code> - -<h2>$this->xmlrpc->send_request()</h2> -<p>The request sending function. Returns boolean TRUE or FALSE based on success for failure, enabling it to be used conditionally.</p> - -<h2>$this->xmlrpc->set_debug(TRUE);</h2> -<p>Enables debugging, which will display a variety of information and error data helpful during development.</p> - - -<h2>$this->xmlrpc->display_error()</h2> -<p>Returns an error message as a string if your request failed for some reason.</p> -<code>echo $this->xmlrpc->display_error();</code> - -<h2>$this->xmlrpc->display_response()</h2> -<p>Returns the response from the remote server once request is received. The response will typically be an associative array.</p> -<code>$this->xmlrpc->display_response();</code> - -<h2>$this->xmlrpc->send_error_message()</h2> -<p>This function lets you send an error message from your server to the client. First parameter is the error number while the second parameter -is the error message.</p> -<code>return $this->xmlrpc->send_error_message('123', 'Requested data not available');</code> - -<h2>$this->xmlrpc->send_response()</h2> -<p>Lets you send the response from your server to the client. An array of valid data values must be sent with this method.</p> -<code>$response = array(<br /> - array(<br /> - 'flerror' => array(FALSE, 'boolean'),<br /> - 'message' => "Thanks for the ping!"<br /> - )<br /> - 'struct');<br /> -return $this->xmlrpc->send_response($response);</code> - - -<a name="datatypes"></a> -<h2>Data Types</h2> - -<p>According to the <a href="http://www.xmlrpc.com/spec">XML-RPC spec</a> there are seven types -of values that you can send via XML-RPC:</p> - -<ul> -<li><em>int</em> or <em>i4</em></li> -<li><em>boolean</em></li> -<li><em>string</em></li> -<li><em>double</em></li> -<li><em>dateTime.iso8601</em></li> -<li><em>base64</em></li> -<li><em>struct</em> (contains array of values)</li> -<li><em>array</em> (contains array of values)</li> -</ul> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="user_agent.html">User Agent Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="zip.html">Zip Encoding Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html deleted file mode 100644 index 6d9b63a3c..000000000 --- a/user_guide/libraries/zip.html +++ /dev/null @@ -1,288 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Zip Encoding Class : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Zip Encoding Class -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Zip Encoding Class</h1> -<p>CodeIgniter's Zip Encoding Class classes permit you to create Zip archives. Archives can be downloaded to your -desktop or saved to a directory.</p> - - -<h2>Initializing the Class</h2> -<p>Like most other classes in CodeIgniter, the Zip class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p> - -<code>$this->load->library('zip');</code> -<p>Once loaded, the Zip library object will be available using: <dfn>$this->zip</dfn></p> - - -<h2>Usage Example</h2> - -<p>This example demonstrates how to compress a file, save it to a folder on your server, and download it to your desktop.</p> - -<code> -$name = 'mydata1.txt';<br /> -$data = 'A Data String!';<br /> -<br /> -$this->zip->add_data($name, $data);<br /> -<br /> -// Write the zip file to a folder on your server. Name it "my_backup.zip"<br /> -$this->zip->archive('/path/to/directory/my_backup.zip'); -<br /><br /> - // Download the file to your desktop. Name it "my_backup.zip"<br /> -$this->zip->download('my_backup.zip'); -</code> - -<h1>Function Reference</h1> - -<h2>$this->zip->add_data()</h2> - -<p>Permits you to add data to the Zip archive. The first parameter must contain the name you would like -given to the file, the second parameter must contain the file data as a string:</p> - -<code> -$name = 'my_bio.txt';<br /> -$data = 'I was born in an elevator...';<br /> -<br /> -$this->zip->add_data($name, $data); -</code> - -<p>You are allowed multiple calls to this function in order to -add several files to your archive. Example:</p> - -<code> -$name = 'mydata1.txt';<br /> -$data = 'A Data String!';<br /> -$this->zip->add_data($name, $data);<br /> -<br /> -$name = 'mydata2.txt';<br /> -$data = 'Another Data String!';<br /> -$this->zip->add_data($name, $data);<br /> -</code> - -<p>Or you can pass multiple files using an array:</p> - -<code> -$data = array(<br /> - 'mydata1.txt' => 'A Data String!',<br /> - 'mydata2.txt' => 'Another Data String!'<br /> - );<br /> -<br /> -$this->zip->add_data($data);<br /> -<br /> -$this->zip->download('my_backup.zip'); -</code> - -<p>If you would like your compressed data organized into sub-folders, include the path as part of the filename:</p> - -<code> -$name = '<kbd>personal/</kbd>my_bio.txt';<br /> -$data = 'I was born in an elevator...';<br /> -<br /> -$this->zip->add_data($name, $data); -</code> - -<p>The above example will place <dfn>my_bio.txt</dfn> inside a folder called <kbd>personal</kbd>.</p> - - -<h2>$this->zip->add_dir()</h2> - -<p>Permits you to add a directory. Usually this function is unnecessary since you can place your data into folders when -using <dfn>$this->zip->add_data()</dfn>, but if you would like to create an empty folder you can do so. Example:</p> - -<code>$this->zip->add_dir('myfolder'); // Creates a folder called "myfolder"</code> - - - -<h2>$this->zip->read_file()</h2> - -<p>Permits you to compress a file that already exists somewhere on your server. Supply a file path and the zip class will -read it and add it to the archive:</p> - -<code> -$path = '/path/to/photo.jpg';<br /><br /> -$this->zip->read_file($path); -<br /><br /> - // Download the file to your desktop. Name it "my_backup.zip"<br /> -$this->zip->download('my_backup.zip'); -</code> - -<p>If you would like the Zip archive to maintain the directory structure of the file in it, pass <kbd>TRUE</kbd> (boolean) in the -second parameter. Example:</p> - - -<code> -$path = '/path/to/photo.jpg';<br /><br /> -$this->zip->read_file($path, <kbd>TRUE</kbd>); -<br /><br /> - // Download the file to your desktop. Name it "my_backup.zip"<br /> -$this->zip->download('my_backup.zip'); -</code> - -<p>In the above example, <dfn>photo.jpg</dfn> will be placed inside two folders: <kbd>path/to/</kbd></p> - - - -<h2>$this->zip->read_dir()</h2> - -<p>Permits you to compress a folder (and its contents) that already exists somewhere on your server. Supply a file path to the -directory and the zip class will recursively read it and recreate it as a Zip archive. All files contained within the -supplied path will be encoded, as will any sub-folders contained within it. Example:</p> - -<code> -$path = '/path/to/your/directory/';<br /><br /> -$this->zip->read_dir($path); -<br /><br /> - // Download the file to your desktop. Name it "my_backup.zip"<br /> -$this->zip->download('my_backup.zip'); -</code> - -<p>By default the Zip archive will place all directories listed in the first parameter inside the zip. If you want the tree preceding the target folder to be ignored -you can pass <kbd>FALSE</kbd> (boolean) in the second parameter. Example:</p> - -<code> -$path = '/path/to/your/directory/';<br /><br /> -$this->zip->read_dir($path, FALSE); -</code> - -<p>This will create a ZIP with the folder "directory" inside, then all sub-folders stored correctly inside that, but will not include the folders <samp>/path/to/your</samp>.</p> - - - - -<h2>$this->zip->archive()</h2> - -<p>Writes the Zip-encoded file to a directory on your server. Submit a valid server path ending in the file name. Make sure the -directory is writable (666 or 777 is usually OK). Example:</p> - -<code>$this->zip->archive('/path/to/folder/myarchive.zip'); // Creates a file named myarchive.zip</code> - - -<h2>$this->zip->download()</h2> - -<p>Causes the Zip file to be downloaded from your server. The function must be passed the name you would like the zip file called. -Example:</p> - -<code>$this->zip->download('latest_stuff.zip'); // File will be named "latest_stuff.zip"</code> - -<p class="important"><strong>Note:</strong> Do not display any data in the controller in which you call this function since it sends various server headers -that cause the download to happen and the file to be treated as binary.</p> - - -<h2>$this->zip->get_zip()</h2> - -<p>Returns the Zip-compressed file data. Generally you will not need this function unless you want to do something unique with the data. -Example:</p> - -<code> -$name = 'my_bio.txt';<br /> -$data = 'I was born in an elevator...';<br /> -<br /> -$this->zip->add_data($name, $data);<br /><br /> - -$zip_file = $this->zip->get_zip(); -</code> - - -<h2>$this->zip->clear_data()</h2> - -<p>The Zip class caches your zip data so that it doesn't need to recompile the Zip archive for each function you use above. -If, however, you need to create multiple Zips, each with different data, you can clear the cache between calls. Example:</p> - -<code> -$name = 'my_bio.txt';<br /> -$data = 'I was born in an elevator...';<br /> -<br /> -$this->zip->add_data($name, $data);<br /> -$zip_file = $this->zip->get_zip();<br /> -<br /> -<kbd>$this->zip->clear_data();</kbd> -<br /><br /> - -$name = 'photo.jpg';<br /> -$this->zip->read_file("/path/to/photo.jpg"); // Read the file's contents<br /> -<br /><br /> -$this->zip->download('myphotos.zip'); -</code> - - - - - - - - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="xmlrpc.html"> XML-RPC Class</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="caching.html">Caching Class</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/license.html b/user_guide/license.html deleted file mode 100644 index 47f9e35b1..000000000 --- a/user_guide/license.html +++ /dev/null @@ -1,107 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter License Agreement : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='userguide.css' /> - -<script type="text/javascript" src="nav/nav.js"></script> -<script type="text/javascript" src="nav/prototype.lite.js"></script> -<script type="text/javascript" src="nav/moo.fx.js"></script> -<script type="text/javascript" src="nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('null');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="index.html">User Guide Home</a> › -License Agreement -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - - - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>CodeIgniter License Agreement</h1> - -<p>Copyright (c) 2008 - 2014, EllisLab, Inc.<br /> -All rights reserved.</p> - -<p>This license is a legal agreement between you and EllisLab Inc. for the use of CodeIgniter Software (the "Software"). By obtaining the Software you agree to comply with the terms and conditions of this license.</p> - -<h2>Permitted Use</h2> -<p>You are permitted to use, copy, modify, and distribute the Software and its documentation, with or without modification, for any purpose, provided that the following conditions are met:</p> - -<ol> -<li>A copy of this license agreement must be included with the distribution.</li> -<li>Redistributions of source code must retain the above copyright notice in all source code files.</li> -<li>Redistributions in binary form must reproduce the above copyright notice in the documentation and/or other materials provided with the distribution.</li> -<li>Any files that have been modified must carry notices stating the nature of the change and the names of those who changed them.</li> -<li>Products derived from the Software must include an acknowledgment that they are derived from CodeIgniter in their documentation and/or other materials provided with the distribution.</li> -<li>Products derived from the Software may not be called "CodeIgniter", nor may "CodeIgniter" appear in their name, without prior written permission from EllisLab, Inc.</li> -</ol> - -<h2>Indemnity</h2> -<p>You agree to indemnify and hold harmless the authors of the Software and any contributors for any direct, indirect, incidental, or consequential third-party claims, actions or suits, as well as any related expenses, liabilities, damages, settlements or fees arising from your use or misuse of the Software, or a violation of any terms of this license.</p> - -<h2>Disclaimer of Warranty</h2> -<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.</p> - -<h2>Limitations of Liability</h2> -<p>YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.</p> - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="general/requirements.html">Server Requirements</a> - · -<a href="#top">Top of Page</a> · -<a href="index.html">User Guide Home</a> · -Next Topic: <a href="changelog.html">Change Log</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/nav/hacks.txt b/user_guide/nav/hacks.txt deleted file mode 100644 index 8c17f008a..000000000 --- a/user_guide/nav/hacks.txt +++ /dev/null @@ -1,10 +0,0 @@ -I did the following hack in moo.fx.js: - -At line 79 in the toggle: function() function, I added: - -document.getElementById('nav').style.display = 'block'; - --- Rick Ellis - - -Also removed fx.Opacity and fx.Height from moo.fx.js -- Pascal
\ No newline at end of file diff --git a/user_guide/nav/moo.fx.js b/user_guide/nav/moo.fx.js deleted file mode 100755 index 256371d19..000000000 --- a/user_guide/nav/moo.fx.js +++ /dev/null @@ -1,83 +0,0 @@ -/* -moo.fx, simple effects library built with prototype.js (http://prototype.conio.net). -by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE. -for more info (http://moofx.mad4milk.net). -10/24/2005 -v(1.0.2) -*/ - -//base -var fx = new Object(); -fx.Base = function(){}; -fx.Base.prototype = { - setOptions: function(options) { - this.options = { - duration: 500, - onComplete: '' - } - Object.extend(this.options, options || {}); - }, - - go: function() { - this.duration = this.options.duration; - this.startTime = (new Date).getTime(); - this.timer = setInterval (this.step.bind(this), 13); - }, - - step: function() { - var time = (new Date).getTime(); - var Tpos = (time - this.startTime) / (this.duration); - if (time >= this.duration+this.startTime) { - this.now = this.to; - clearInterval (this.timer); - this.timer = null; - if (this.options.onComplete) setTimeout(this.options.onComplete.bind(this), 10); - } - else { - this.now = ((-Math.cos(Tpos*Math.PI)/2) + 0.5) * (this.to-this.from) + this.from; - //this time-position, sinoidal transition thing is from script.aculo.us - } - this.increase(); - }, - - custom: function(from, to) { - if (this.timer != null) return; - this.from = from; - this.to = to; - this.go(); - }, - - hide: function() { - this.now = 0; - this.increase(); - }, - - clearTimer: function() { - clearInterval(this.timer); - this.timer = null; - } -} - -//stretchers -fx.Layout = Class.create(); -fx.Layout.prototype = Object.extend(new fx.Base(), { - initialize: function(el, options) { - this.el = $(el); - this.el.style.overflow = "hidden"; - this.el.iniWidth = this.el.offsetWidth; - this.el.iniHeight = this.el.offsetHeight; - this.setOptions(options); - } -}); - -fx.Height = Class.create(); -Object.extend(Object.extend(fx.Height.prototype, fx.Layout.prototype), { - increase: function() { - this.el.style.height = this.now + "px"; - }, - - toggle: function() { - if (this.el.offsetHeight > 0) this.custom(this.el.offsetHeight, 0); - else this.custom(0, this.el.scrollHeight); - } -}); diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js deleted file mode 100644 index b9b6e0943..000000000 --- a/user_guide/nav/nav.js +++ /dev/null @@ -1,156 +0,0 @@ -function create_menu(basepath) -{ - var base = (basepath == 'null') ? '' : basepath; - - document.write( - '<table cellpadding="0" cellspaceing="0" border="0" style="width:98%"><tr>' + - '<td class="td" valign="top">' + - - '<ul>' + - '<li><a href="'+base+'index.html">User Guide Home</a></li>' + - '<li><a href="'+base+'toc.html">Table of Contents Page</a></li>' + - '</ul>' + - - '<h3>Basic Info</h3>' + - '<ul>' + - '<li><a href="'+base+'general/requirements.html">Server Requirements</a></li>' + - '<li><a href="'+base+'license.html">License Agreement</a></li>' + - '<li><a href="'+base+'changelog.html">Change Log</a></li>' + - '<li><a href="'+base+'general/credits.html">Credits</a></li>' + - '</ul>' + - - '<h3>Installation</h3>' + - '<ul>' + - '<li><a href="'+base+'installation/downloads.html">Downloading CodeIgniter</a></li>' + - '<li><a href="'+base+'installation/index.html">Installation Instructions</a></li>' + - '<li><a href="'+base+'installation/upgrading.html">Upgrading from a Previous Version</a></li>' + - '<li><a href="'+base+'installation/troubleshooting.html">Troubleshooting</a></li>' + - '</ul>' + - - '<h3>Introduction</h3>' + - '<ul>' + - '<li><a href="'+base+'overview/getting_started.html">Getting Started</a></li>' + - '<li><a href="'+base+'overview/at_a_glance.html">CodeIgniter at a Glance</a></li>' + - '<li><a href="'+base+'overview/cheatsheets.html">CodeIgniter Cheatsheets</a></li>' + - '<li><a href="'+base+'overview/features.html">Supported Features</a></li>' + - '<li><a href="'+base+'overview/appflow.html">Application Flow Chart</a></li>' + - '<li><a href="'+base+'overview/mvc.html">Model-View-Controller</a></li>' + - '<li><a href="'+base+'overview/goals.html">Architectural Goals</a></li>' + - '</ul>' + - - '<h3>Tutorial</h3>' + - '<ul>' + - '<li><a href="'+base+'tutorial/index.html">Introduction</a></li>' + - '<li><a href="'+base+'tutorial/static_pages.html">Static pages</a></li>' + - '<li><a href="'+base+'tutorial/news_section.html">News section</a></li>' + - '<li><a href="'+base+'tutorial/create_news_items.html">Create news items</a></li>' + - '<li><a href="'+base+'tutorial/conclusion.html">Conclusion</a></li>' + - '</ul>' + - - '</td><td class="td_sep" valign="top">' + - - '<h3>General Topics</h3>' + - '<ul>' + - '<li><a href="'+base+'general/urls.html">CodeIgniter URLs</a></li>' + - '<li><a href="'+base+'general/controllers.html">Controllers</a></li>' + - '<li><a href="'+base+'general/reserved_names.html">Reserved Names</a></li>' + - '<li><a href="'+base+'general/views.html">Views</a></li>' + - '<li><a href="'+base+'general/models.html">Models</a></li>' + - '<li><a href="'+base+'general/helpers.html">Helpers</a></li>' + - '<li><a href="'+base+'general/libraries.html">Using CodeIgniter Libraries</a></li>' + - '<li><a href="'+base+'general/creating_libraries.html">Creating Your Own Libraries</a></li>' + - '<li><a href="'+base+'general/drivers.html">Using CodeIgniter Drivers</a></li>' + - '<li><a href="'+base+'general/creating_drivers.html">Creating Your Own Drivers</a></li>' + - '<li><a href="'+base+'general/core_classes.html">Creating Core Classes</a></li>' + - '<li><a href="'+base+'general/hooks.html">Hooks - Extending the Core</a></li>' + - '<li><a href="'+base+'general/autoloader.html">Auto-loading Resources</a></li>' + - '<li><a href="'+base+'general/common_functions.html">Common Functions</a></li>' + - '<li><a href="'+base+'general/routing.html">URI Routing</a></li>' + - '<li><a href="'+base+'general/errors.html">Error Handling</a></li>' + - '<li><a href="'+base+'general/caching.html">Caching</a></li>' + - '<li><a href="'+base+'general/profiling.html">Profiling Your Application</a></li>' + - '<li><a href="'+base+'general/cli.html">Running via the CLI</a></li>' + - '<li><a href="'+base+'general/managing_apps.html">Managing Applications</a></li>' + - '<li><a href="'+base+'general/environments.html">Handling Multiple Environments</a></li>' + - '<li><a href="'+base+'general/alternative_php.html">Alternative PHP Syntax</a></li>' + - '<li><a href="'+base+'general/security.html">Security</a></li>' + - '<li><a href="'+base+'general/styleguide.html">PHP Style Guide</a></li>' + - '<li><a href="'+base+'doc_style/index.html">Writing Documentation</a></li>' + - '</ul>' + - - '<h3>Additional Resources</h3>' + - '<ul>' + - '<li><a href="http://codeigniter.com/forums/">Community Forums</a></li>' + - '<li><a href="http://codeigniter.com/wiki/">Community Wiki</a></li>' + - '</ul>' + - - '</td><td class="td_sep" valign="top">' + - - '<h3>Class Reference</h3>' + - '<ul>' + - '<li><a href="'+base+'libraries/benchmark.html">Benchmarking Class</a></li>' + - '<li><a href="'+base+'libraries/calendar.html">Calendar Class</a></li>' + - '<li><a href="'+base+'libraries/cart.html">Cart Class</a></li>' + - '<li><a href="'+base+'libraries/config.html">Config Class</a></li>' + - '<li><a href="'+base+'libraries/email.html">Email Class</a></li>' + - '<li><a href="'+base+'libraries/encryption.html">Encryption Class</a></li>' + - '<li><a href="'+base+'libraries/file_uploading.html">File Uploading Class</a></li>' + - '<li><a href="'+base+'libraries/form_validation.html">Form Validation Class</a></li>' + - '<li><a href="'+base+'libraries/ftp.html">FTP Class</a></li>' + - '<li><a href="'+base+'libraries/table.html">HTML Table Class</a></li>' + - '<li><a href="'+base+'libraries/image_lib.html">Image Manipulation Class</a></li>' + - '<li><a href="'+base+'libraries/input.html">Input Class</a></li>' + - '<li><a href="'+base+'libraries/javascript.html">Javascript Class</a></li>' + - '<li><a href="'+base+'libraries/loader.html">Loader Class</a></li>' + - '<li><a href="'+base+'libraries/language.html">Language Class</a></li>' + - '<li><a href="'+base+'libraries/migration.html">Migration Class</a></li>' + - '<li><a href="'+base+'libraries/output.html">Output Class</a></li>' + - '<li><a href="'+base+'libraries/pagination.html">Pagination Class</a></li>' + - '<li><a href="'+base+'libraries/security.html">Security Class</a></li>' + - '<li><a href="'+base+'libraries/sessions.html">Session Class</a></li>' + - '<li><a href="'+base+'libraries/trackback.html">Trackback Class</a></li>' + - '<li><a href="'+base+'libraries/parser.html">Template Parser Class</a></li>' + - '<li><a href="'+base+'libraries/typography.html">Typography Class</a></li>' + - '<li><a href="'+base+'libraries/unit_testing.html">Unit Testing Class</a></li>' + - '<li><a href="'+base+'libraries/uri.html">URI Class</a></li>' + - '<li><a href="'+base+'libraries/user_agent.html">User Agent Class</a></li>' + - '<li><a href="'+base+'libraries/xmlrpc.html">XML-RPC Class</a></li>' + - '<li><a href="'+base+'libraries/zip.html">Zip Encoding Class</a></li>' + - '</ul>' + - - '</td><td class="td_sep" valign="top">' + - - '<h3>Driver Reference</h3>' + - '<ul>' + - '<li><a href="'+base+'libraries/caching.html">Caching Class</a></li>' + - '<li><a href="'+base+'database/index.html">Database Class</a></li>' + - '<li><a href="'+base+'libraries/javascript.html">Javascript Class</a></li>' + - '</ul>' + - - '<h3>Helper Reference</h3>' + - '<ul>' + - '<li><a href="'+base+'helpers/array_helper.html">Array Helper</a></li>' + - '<li><a href="'+base+'helpers/captcha_helper.html">CAPTCHA Helper</a></li>' + - '<li><a href="'+base+'helpers/cookie_helper.html">Cookie Helper</a></li>' + - '<li><a href="'+base+'helpers/date_helper.html">Date Helper</a></li>' + - '<li><a href="'+base+'helpers/directory_helper.html">Directory Helper</a></li>' + - '<li><a href="'+base+'helpers/download_helper.html">Download Helper</a></li>' + - '<li><a href="'+base+'helpers/email_helper.html">Email Helper</a></li>' + - '<li><a href="'+base+'helpers/file_helper.html">File Helper</a></li>' + - '<li><a href="'+base+'helpers/form_helper.html">Form Helper</a></li>' + - '<li><a href="'+base+'helpers/html_helper.html">HTML Helper</a></li>' + - '<li><a href="'+base+'helpers/inflector_helper.html">Inflector Helper</a></li>' + - '<li><a href="'+base+'helpers/language_helper.html">Language Helper</a></li>' + - '<li><a href="'+base+'helpers/number_helper.html">Number Helper</a></li>' + - '<li><a href="'+base+'helpers/path_helper.html">Path Helper</a></li>' + - '<li><a href="'+base+'helpers/security_helper.html">Security Helper</a></li>' + - '<li><a href="'+base+'helpers/smiley_helper.html">Smiley Helper</a></li>' + - '<li><a href="'+base+'helpers/string_helper.html">String Helper</a></li>' + - '<li><a href="'+base+'helpers/text_helper.html">Text Helper</a></li>' + - '<li><a href="'+base+'helpers/typography_helper.html">Typography Helper</a></li>' + - '<li><a href="'+base+'helpers/url_helper.html">URL Helper</a></li>' + - '<li><a href="'+base+'helpers/xml_helper.html">XML Helper</a></li>' + - '</ul>' + - - '</td></tr></table>'); -}
\ No newline at end of file diff --git a/user_guide/nav/prototype.lite.js b/user_guide/nav/prototype.lite.js deleted file mode 100755 index e6c362279..000000000 --- a/user_guide/nav/prototype.lite.js +++ /dev/null @@ -1,127 +0,0 @@ -/* Prototype JavaScript framework - * (c) 2005 Sam Stephenson <sam@conio.net> - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - - -//note: this is a stripped down version of prototype, to be used with moo.fx by mad4milk (http://moofx.mad4milk.net). - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Function.prototype.bind = function(object) { - var __method = this; - return function() { - return __method.apply(object, arguments); - } -} - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -//------------------------- - -document.getElementsByClassName = function(className) { - var children = document.getElementsByTagName('*') || document.all; - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - var classNames = child.className.split(' '); - for (var j = 0; j < classNames.length; j++) { - if (classNames[j] == className) { - elements.push(child); - break; - } - } - } - - return elements; -} - -//------------------------- - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - hasClassName: function(element, className) { - element = $(element); - if (!element) - return; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] == className) - return true; - } - return false; - }, - - addClassName: function(element, className) { - element = $(element); - Element.removeClassName(element, className); - element.className += ' ' + className; - }, - - removeClassName: function(element, className) { - element = $(element); - if (!element) - return; - var newClassName = ''; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] != className) { - if (i > 0) - newClassName += ' '; - newClassName += a[i]; - } - } - element.className = newClassName; - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - } -});
\ No newline at end of file diff --git a/user_guide/nav/user_guide_menu.js b/user_guide/nav/user_guide_menu.js deleted file mode 100644 index ce5d0776c..000000000 --- a/user_guide/nav/user_guide_menu.js +++ /dev/null @@ -1,4 +0,0 @@ -window.onload = function() { - myHeight = new fx.Height('nav', {duration: 400}); - myHeight.hide(); -}
\ No newline at end of file diff --git a/user_guide/overview/appflow.html b/user_guide/overview/appflow.html deleted file mode 100644 index 117b87b93..000000000 --- a/user_guide/overview/appflow.html +++ /dev/null @@ -1,95 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Application Flow Chart : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Appflow -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Application Flow Chart</h1> - -<p>The following graphic illustrates how data flows throughout the system:</p> - -<div><img src="../images/appflowchart.gif" width="769" height="212" alt="CodeIgniter application flow"></div> - - -<ol> -<li>The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.</li> -<li>The Router examines the HTTP request to determine what should be done with it.</li> -<li>If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.</li> -<li>Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security.</li> -<li>The Controller loads the model, core libraries, helpers, and any other resources needed to process the specific request.</li> -<li>The finalized View is rendered then sent to the web browser to be seen. If caching is enabled, the view is cached first so -that on subsequent requests it can be served.</li> -</ol> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="features.html">CodeIgniter Features</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="mvc.html">Model-View-Controller</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/at_a_glance.html b/user_guide/overview/at_a_glance.html deleted file mode 100644 index 3d490c56c..000000000 --- a/user_guide/overview/at_a_glance.html +++ /dev/null @@ -1,162 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter at a Glance : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -What is CodeIgniter? -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>CodeIgniter at a Glance</h1> - - -<h2>CodeIgniter is an Application Framework</h2> - -<p>CodeIgniter is a toolkit for people who build web applications using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code -from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and -logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by -minimizing the amount of code needed for a given task.</p> - -<h2>CodeIgniter is Free</h2> -<p>CodeIgniter is licensed under an Apache/BSD-style open source license so you can use it however you please. -For more information please read the <a href="../license.html">license agreement</a>.</p> - -<h2>CodeIgniter is Light Weight</h2> -<p>Truly light weight. The core system requires only a few very small libraries. This is in stark contrast to many frameworks that require significantly more resources. -Additional libraries are loaded dynamically upon request, based on your needs for a given process, so the base system -is very lean and quite fast. -</p> - -<h2>CodeIgniter is Fast</h2> -<p>Really fast. We challenge you to find a framework that has better performance than CodeIgniter.</p> - - -<h2>CodeIgniter Uses M-V-C</h2> -<p>CodeIgniter uses the Model-View-Controller approach, which allows great separation between logic and presentation. -This is particularly good for projects in which designers are working with your template files, as the code these file contain will be minimized. We describe MVC in more detail on its own page.</p> - -<h2>CodeIgniter Generates Clean URLs</h2> -<p>The URLs generated by CodeIgniter are clean and search-engine friendly. Rather than using the standard "query string" -approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a segment-based approach:</p> - -<code>example.com/<var>news</var>/<dfn>article</dfn>/<samp>345</samp></code> - -<p>Note: By default the index.php file is included in the URL but it can be removed using a simple .htaccess file.</p> - -<h2>CodeIgniter Packs a Punch</h2> -<p>CodeIgniter comes with full-range of libraries that enable the most commonly needed web development tasks, -like accessing a database, sending email, validating form data, maintaining sessions, manipulating images, working with XML-RPC data and -much more.</p> - -<h2>CodeIgniter is Extensible</h2> -<p>The system can be easily extended through the use of your own libraries, helpers, or through class extensions or system hooks.</p> - - -<h2>CodeIgniter Does Not Require a Template Engine</h2> -<p>Although CodeIgniter <em>does</em> come with a simple template parser that can be optionally used, it does not force you to use one. - -Template engines simply can not match the performance of native PHP, and the syntax that must be learned to use a template -engine is usually only marginally easier than learning the basics of PHP. Consider this block of PHP code:</p> - -<code><ul><br /> -<br /> -<?php foreach ($addressbook as $name):?><br /> -<br /> -<li><?=$name?></li><br /> -<br /> -<?php endforeach; ?><br /> -<br /> -</ul></code> - -<p>Contrast this with the pseudo-code used by a template engine:</p> - -<code><ul><br /> -<br /> -{foreach from=$addressbook item="name"}<br /> -<br /> -<li>{$name}</li><br /> -<br /> -{/foreach}<br /> -<br /> -</ul></code> - -<p>Yes, the template engine example is a bit cleaner, but it comes at the price of performance, as the pseudo-code must be converted -back into PHP to run. Since one of our goals is <em>maximum performance</em>, we opted to not require the use of a template engine.</p> - - -<h2>CodeIgniter is Thoroughly Documented</h2> -<p>Programmers love to code and hate to write documentation. We're no different, of course, but -since documentation is <strong>as important</strong> as the code itself, -we are committed to doing it. Our source code is extremely clean and well commented as well.</p> - - -<h2>CodeIgniter has a Friendly Community of Users</h2> - -<p>Our growing community of users can be seen actively participating in our <a href="http://codeigniter.com/forums/">Community Forums</a>.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="getting_started.html">Getting Started</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="cheatsheets.html">CodeIgniter Cheatsheets</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/cheatsheets.html b/user_guide/overview/cheatsheets.html deleted file mode 100644 index 15758f982..000000000 --- a/user_guide/overview/cheatsheets.html +++ /dev/null @@ -1,83 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Cheatsheets : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -CodeIgniter Cheatsheets -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>CodeIgniter Cheatsheets</h1> - -<h2>Library Reference</h2> - -<div><a href="../images/codeigniter_1.7.1_library_reference.pdf"><img src="../images/codeigniter_1.7.1_library_reference.png" width="600" height="195" border="0" alt="CodeIgniter Library Reference" /></a></div> - -<h2>Helpers Reference</h2> -<div><a href="../images/codeigniter_1.7.1_helper_reference.pdf"><img src="../images/codeigniter_1.7.1_helper_reference.png" width="600" height="196" border="0" alt="CodeIgniter Library Reference" /></a></div> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="at_a_glance.html">CodeIgniter at a Glance</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="features.html">CodeIgniter Features</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/features.html b/user_guide/overview/features.html deleted file mode 100644 index c767d34ba..000000000 --- a/user_guide/overview/features.html +++ /dev/null @@ -1,118 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Features -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>CodeIgniter Features</h1> - -<p>Features in and of themselves are a very poor way to judge an application since they tell you nothing -about the user experience, or how intuitively or intelligently it is designed. Features -don't reveal anything about the quality of the code, or the performance, or the attention to detail, or security practices. -The only way to really judge an app is to try it and get to know the code. <a href="../installation/">Installing</a> -CodeIgniter is child's play so we encourage you to do just that. In the mean time here's a list of CodeIgniter's main features.</p> - -<ul> -<li>Model-View-Controller Based System</li> -<li>Extremely Light Weight</li> -<li>Full Featured database classes with support for several platforms.</li> -<li>Active Record Database Support</li> -<li>Form and Data Validation</li> -<li>Security and XSS Filtering</li> -<li>Session Management</li> -<li>Email Sending Class. Supports Attachments, HTML/Text email, multiple protocols (sendmail, SMTP, and Mail) and more.</li> -<li>Image Manipulation Library (cropping, resizing, rotating, etc.). Supports GD, ImageMagick, and NetPBM</li> -<li>File Uploading Class</li> -<li>FTP Class</li> -<li>Localization</li> -<li>Pagination</li> -<li>Data Encryption</li> -<li>Benchmarking</li> -<li>Full Page Caching</li> -<li>Error Logging</li> -<li>Application Profiling</li> -<li>Calendaring Class</li> -<li>User Agent Class</li> -<li>Zip Encoding Class</li> -<li>Template Engine Class</li> -<li>Trackback Class</li> -<li>XML-RPC Library</li> -<li>Unit Testing Class</li> -<li>Search-engine Friendly URLs</li> -<li>Flexible URI Routing</li> -<li>Support for Hooks and Class Extensions</li> -<li>Large library of "helper" functions</li> -</ul> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="cheatsheets.html">CodeIgniter Cheatsheets</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="appflow.html">Application Flow Chart</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/getting_started.html b/user_guide/overview/getting_started.html deleted file mode 100644 index be65a26f3..000000000 --- a/user_guide/overview/getting_started.html +++ /dev/null @@ -1,92 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Getting Started With CodeIgniter : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Getting Started -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>Getting Started With CodeIgniter</h1> - -<p>Any software application requires some effort to learn. We've done our best to minimize the learning -curve while making the process as enjoyable as possible. -</p> - -<p>The first step is to <a href="../installation/index.html">install</a> CodeIgniter, then read -all the topics in the <strong>Introduction</strong> section of the Table of Contents.</p> - -<p>Next, read each of the <strong>General Topics</strong> pages in order. -Each topic builds on the previous one, and includes code examples that you are encouraged to try.</p> - -<p>Once you understand the basics you'll be ready to explore the <strong>Class Reference</strong> and -<strong>Helper Reference</strong> pages to learn to utilize the native libraries and helper files.</p> - -<p>Feel free to take advantage of our <a href="http://codeigniter.com/forums/">Community Forums</a> -if you have questions or problems, and -our <a href="http://codeigniter.com/wiki/">Wiki</a> to see code examples posted by other users.</p> - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="at_a_glance.html">CodeIgniter At a Glance</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/goals.html b/user_guide/overview/goals.html deleted file mode 100644 index b9ba7cb15..000000000 --- a/user_guide/overview/goals.html +++ /dev/null @@ -1,98 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Design and Architectural Goals : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Goals -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - - -<h2>Design and Architectural Goals</h2> - -<p>Our goal for CodeIgniter is <dfn>maximum performance, capability, and flexibility in the smallest, lightest possible package</dfn>.</p> - -<p>To meet this goal we are committed to benchmarking, re-factoring, and simplifying at every step of the development process, -rejecting anything that doesn't further the stated objective.</p> - -<p>From a technical and architectural standpoint, CodeIgniter was created with the following objectives:</p> - -<ul> -<li><strong>Dynamic Instantiation.</strong> In CodeIgniter, components are loaded and routines executed only when requested, rather than globally. No assumptions are made by the system regarding what may be needed beyond the minimal core resources, so the system is very light-weight by default. The events, as triggered by the HTTP request, and the controllers and views you design will determine what is invoked.</li> -<li><strong>Loose Coupling.</strong> Coupling is the degree to which components of a system rely on each other. The less components depend on each other the more reusable and flexible the system becomes. Our goal was a very loosely coupled system.</li> -<li><strong>Component Singularity.</strong> Singularity is the degree to which components have a narrowly focused purpose. In CodeIgniter, each class and its functions are highly autonomous in order to allow maximum usefulness.</li> -</ul> - -<p>CodeIgniter is a dynamically instantiated, loosely coupled system with high component singularity. It strives for simplicity, flexibility, and high performance in a small footprint package.</p> - - - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="mvc.html">Model-View-Controller</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="./getting_started.html">Getting Started</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/index.html b/user_guide/overview/index.html deleted file mode 100644 index c49cf3d43..000000000 --- a/user_guide/overview/index.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Overview : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Introduction -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - -<h1>CodeIgniter Overview</h1> - -<p>The following pages describe the broad concepts behind CodeIgniter:</p> - - <ul> - <li><a href="at_a_glance.html">CodeIgniter at a Glance</a></li> - <li><a href="features.html">Supported Features</a></li> - <li><a href="appflow.html">Application Flow Chart</a></li> - <li><a href="mvc.html">Introduction to the Model-View-Controller</a></li> - <li><a href="goals.html">Design and Architectural Goals</a></li> - <li><a href="package.html">Package Description</a></li> - </ul> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p><a href="#top">Top of Page</a> · <a href="../index.html">User Guide Home</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/overview/mvc.html b/user_guide/overview/mvc.html deleted file mode 100644 index ac6c4cb12..000000000 --- a/user_guide/overview/mvc.html +++ /dev/null @@ -1,100 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Model-View-Controller : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -MVC -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Model-View-Controller</h1> - -<p>CodeIgniter is based on the Model-View-Controller development pattern. - -MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.</p> - -<ul> -<li>The <strong>Model</strong> represents your data structures. Typically your model classes will contain functions that help you -retrieve, insert, and update information in your database.</li> -<li>The <strong>View</strong> is the information that is being presented to a user. A View will normally be a web page, but -in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of "page".</li> -<li>The <strong>Controller</strong> serves as an <em>intermediary</em> between the Model, the View, -and any other resources needed to process the HTTP request and generate a web page.</li> - -</ul> - -<p>CodeIgniter has a fairly loose approach to MVC since Models are not required. -If you don't need the added separation, or find that maintaining models requires more complexity than you -want, you can ignore them and build your application minimally using Controllers and Views. CodeIgniter also -enables you to incorporate your own existing scripts, or even develop core libraries for the system, - enabling you to work in a way that makes the most sense to you.</p> - - - - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="appflow.html">Application Flow Chart</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="goals.html">Architectural Goals</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/toc.html b/user_guide/toc.html deleted file mode 100644 index 1ab78cf89..000000000 --- a/user_guide/toc.html +++ /dev/null @@ -1,229 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Table of Contents : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='userguide.css' /> - -<script type="text/javascript" src="nav/nav.js"></script> -<script type="text/javascript" src="nav/prototype.lite.js"></script> -<script type="text/javascript" src="nav/moo.fx.js"></script> -<script type="text/javascript" src="nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('null');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> - -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="index.html">User Guide Home</a> › -Table of Contents -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Table of Contents</h1> - -<table cellpadding="0" cellspacing="10" border="0" width="100%"> -<tr> -<td valign="top" width="25%"> - -<h3>Basic Info</h3> -<ul> - <li><a href="./general/requirements.html">Server Requirements</a></li> - <li><a href="license.html">License Agreement</a></li> - <li><a href="changelog.html">Change Log</a></li> - <li><a href="./general/credits.html">Credits</a></li> -</ul> - -<h3>Installation</h3> -<ul> - <li><a href="./installation/downloads.html">Downloading CodeIgniter </a></li> - <li><a href="./installation/index.html">Installation Instructions</a></li> - <li><a href="./installation/upgrading.html">Upgrading from a Previous Version</a></li> - <li><a href="./installation/troubleshooting.html">Troubleshooting</a></li> -</ul> - -<h3>Introduction</h3> -<ul> - <li><a href="./overview/getting_started.html">Getting Started</a></li> - <li><a href="./overview/at_a_glance.html">CodeIgniter at a Glance</a></li> - <li><a href="./overview/cheatsheets.html">CodeIgniter Cheatsheets</a></li> - <li><a href="./overview/features.html">Supported Features</a></li> - <li><a href="./overview/appflow.html">Application Flow Chart</a></li> - <li><a href="./overview/mvc.html">Model-View-Controller</a></li> - <li><a href="./overview/goals.html">Architectural Goals</a></li> -</ul> - -<h3>Tutorial</h3> -<ul> - <li><a href="./tutorial/index.html">Introduction</a></li> - <li><a href="./tutorial/static_pages.html">Static pages</a></li> - <li><a href="./tutorial/news_section.html">News section</a></li> - <li><a href="./tutorial/create_news_items.html">Create news items</a></li> - <li><a href="./tutorial/conclusion.html">Conclusion</a></li> -</ul> - -</td> -<td valign="top" width="25%"> - -<h3>General Topics</h3> -<ul> - <li><a href="./general/urls.html">CodeIgniter URLs</a></li> - <li><a href="./general/controllers.html">Controllers</a></li> - <li><a href="./general/reserved_names.html">Reserved Names</a></li> - <li><a href="./general/views.html">Views</a></li> - <li><a href="./general/models.html">Models</a></li> - <li><a href="./general/helpers.html">Helpers</a></li> - <li><a href="./general/libraries.html">Using CodeIgniter Libraries</a></li> - <li><a href="./general/creating_libraries.html">Creating Your Own Libraries</a></li> - <li><a href="./general/drivers.html">Using CodeIgniter Drivers</a></li> - <li><a href="./general/creating_drivers.html">Creating Your Own Drivers</a></li> - <li><a href="./general/core_classes.html">Creating Core Classes</a></li> - <li><a href="./general/hooks.html">Hooks - Extending the Core</a></li> - <li><a href="./general/autoloader.html">Auto-loading Resources</a></li> - <li><a href="./general/common_functions.html">Common Functions</a></li> - <li><a href="./general/routing.html">URI Routing</a></li> - <li><a href="./general/errors.html">Error Handling</a></li> - <li><a href="./general/caching.html">Caching</a></li> - <li><a href="./general/profiling.html">Profiling Your Application</a></li> - <li><a href="./general/cli.html">Running via the CLI</a></li> - <li><a href="./general/managing_apps.html">Managing Applications</a></li> - <li><a href="./general/environments.html">Handling Multiple Environments</a></li> - <li><a href="./general/alternative_php.html">Alternative PHP Syntax</a></li> - <li><a href="./general/security.html">Security</a></li> - <li><a href="./general/styleguide.html">PHP Style Guide</a></li> - <li><a href="./doc_style/index.html">Writing Documentation</a></li> -</ul> - -<h3>Additional Resources</h3> - -<ul> -<li><a href="http://codeigniter.com/forums/">Community Forums</a></li> -<li><a href="http://codeigniter.com/wiki/">Community Wiki</a></li> -</ul> - -</td> -<td valign="top" width="25%"> - -<h3>Class Reference</h3> -<ul> -<li><a href="./libraries/benchmark.html">Benchmarking Class</a></li> -<li><a href="./libraries/calendar.html">Calendar Class</a></li> -<li><a href="./libraries/cart.html">Cart Class</a></li> -<li><a href="./libraries/config.html">Config Class</a></li> -<li><a href="./libraries/email.html">Email Class</a></li> -<li><a href="./libraries/encryption.html">Encryption Class</a></li> -<li><a href="./libraries/file_uploading.html">File Uploading Class</a></li> -<li><a href="./libraries/form_validation.html">Form Validation Class</a></li> -<li><a href="./libraries/ftp.html">FTP Class</a></li> -<li><a href="./libraries/table.html">HTML Table Class</a></li> -<li><a href="./libraries/image_lib.html">Image Manipulation Class</a></li> -<li><a href="./libraries/input.html">Input Class</a></li> -<li><a href="./libraries/javascript.html">Javascript Class</a></li> -<li><a href="./libraries/loader.html">Loader Class</a></li> -<li><a href="./libraries/language.html">Language Class</a></li> -<li><a href="./libraries/migration.html">Migration Class</a></li> -<li><a href="./libraries/output.html">Output Class</a></li> -<li><a href="./libraries/pagination.html">Pagination Class</a></li> -<li><a href="./libraries/security.html">Security Class</a></li> -<li><a href="./libraries/sessions.html">Session Class</a></li> -<li><a href="./libraries/trackback.html">Trackback Class</a></li> -<li><a href="./libraries/parser.html">Template Parser Class</a></li> -<li><a href="./libraries/typography.html">Typography Class</a></li> -<li><a href="./libraries/unit_testing.html">Unit Testing Class</a></li> -<li><a href="./libraries/uri.html">URI Class</a></li> -<li><a href="./libraries/user_agent.html">User Agent Class</a></li> -<li><a href="./libraries/xmlrpc.html">XML-RPC Class</a></li> -<li><a href="./libraries/zip.html">Zip Encoding Class</a></li> -</ul> - - -</td> -<td valign="top" width="25%"> - -<h3>Driver Reference</h3> -<ul> -<li><a href="./libraries/caching.html">Caching Class</a></li> -<li><a href="./database/index.html">Database Class</a></li> -<li><a href="./libraries/javascript.html">Javascript Class</a></li> -</ul> - -<h3>Helper Reference</h3> -<ul> -<li><a href="./helpers/array_helper.html">Array Helper</a></li> -<li><a href="./helpers/captcha_helper.html">CAPTCHA Helper</a></li> -<li><a href="./helpers/cookie_helper.html">Cookie Helper</a></li> -<li><a href="./helpers/date_helper.html">Date Helper</a></li> -<li><a href="./helpers/directory_helper.html">Directory Helper</a></li> -<li><a href="./helpers/download_helper.html">Download Helper</a></li> -<li><a href="./helpers/email_helper.html">Email Helper</a></li> -<li><a href="./helpers/file_helper.html">File Helper</a></li> -<li><a href="./helpers/form_helper.html">Form Helper</a></li> -<li><a href="./helpers/html_helper.html">HTML Helper</a></li> -<li><a href="./helpers/inflector_helper.html">Inflector Helper</a></li> -<li><a href="./helpers/language_helper.html">Language Helper</a></li> -<li><a href="./helpers/number_helper.html">Number Helper</a></li> -<li><a href="./helpers/path_helper.html">Path Helper</a></li> -<li><a href="./helpers/security_helper.html">Security Helper</a></li> -<li><a href="./helpers/smiley_helper.html">Smiley Helper</a></li> -<li><a href="./helpers/string_helper.html">String Helper</a></li> -<li><a href="./helpers/text_helper.html">Text Helper</a></li> -<li><a href="./helpers/typography_helper.html">Typography Helper</a></li> -<li><a href="./helpers/url_helper.html">URL Helper</a></li> -<li><a href="./helpers/xml_helper.html">XML Helper</a></li> -</ul> - - - - -</td> -</tr> -</table> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p><a href="#top">Top of Page</a></p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/tutorial/conclusion.html b/user_guide/tutorial/conclusion.html deleted file mode 100644 index 359323444..000000000 --- a/user_guide/tutorial/conclusion.html +++ /dev/null @@ -1,91 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Tutorial</a> › -Conclusion -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Tutorial - Conclusion</h1> - -<p>This tutorial did not cover all of the things you might expect of a full-fledged content management system, but it introduced you to the more important topics of routing, writing controllers, and models. We hope this tutorial gave you an insight into some of CodeIgniter's basic design patterns, which you can expand upon.</p> - -<p>Now that you've completed this tutorial, we recommend you check out the rest of the documentation. CodeIgniter is often praised because of its comprehensive documentation. Use this to your advantage and read the "Introduction" and "General Topics" sections thoroughly. You should read the class and helper references when needed.</p> - -<p>Every intermediate PHP programmer should be able to get the hang of CodeIgniter within a few days.</p> - -<p>If you still have questions about the framework or your own CodeIgniter code, you can:</p> -<ul> - <li>Check out our <a href="http://codeigniter.com/forums">forums</a></li> - <li>Visit our <a href="http://codeigniter.com/wiki/IRC">IRC chatroom</a></li> - <li>Explore the <a href="http://codeigniter.com/wiki/">Wiki</a></li> -</ul> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="create_news_items.html">Create news items</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="../general/urls.html">CodeIgniter URLs</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/tutorial/create_news_items.html b/user_guide/tutorial/create_news_items.html deleted file mode 100644 index d7527da2b..000000000 --- a/user_guide/tutorial/create_news_items.html +++ /dev/null @@ -1,179 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Tutorial</a> › -Create news items -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Tutorial - Create news items</h1> - -<p>You now know how you can read data from a database using CodeIgnite, but you haven't written any information to the database yet. In this section you'll expand your news controller and model created earlier to include this functionality.</p> - -<h2>Create a form</h2> - -<p>To input data into the database you need to create a form where you can input the information to be stored. This means you'll be needing a form with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at <dfn>application/views/news/create.php</dfn>.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="16"> -<h2>Create a news item</h2> - -<?php echo validation_errors(); ?> - -<?php echo form_open('news/create') ?> - - <label for="title">Title</label> - <input type="input" name="title" /><br /> - - <label for="text">Text</label> - <textarea name="text"></textarea><br /> - - <input type="submit" name="submit" value="Create news item" /> - -</form> -</textarea> - -<p>There are only two things here that probably look unfamiliar to you: the <dfn>form_open()</dfn> function and the <dfn>validation_errors()</dfn> function.</p> - -<p>The first function is provided by the <a href="../helpers/form_helper.html">form helper</a> and renders the form element and adds extra functionality, like adding a hidden <a href="../libraries/security.html">CSFR prevention field</a>. The latter is used to report errors related to form validation.</p> - -<p>Go back to your news controller. You're going to do two things here, check whether the form was submitted and whether the submitted data passed the validation rules. You'll use the <a href="../libraries/form_validation.html">form validation</a> library to do this.</p> - -<pre> -public function create() -{ - $this->load->helper('form'); - $this->load->library('form_validation'); - - $data['title'] = 'Create a news item'; - - $this->form_validation->set_rules('title', 'Title', 'required'); - $this->form_validation->set_rules('text', 'text', 'required'); - - if ($this->form_validation->run() === FALSE) - { - $this->load->view('templates/header', $data); - $this->load->view('news/create'); - $this->load->view('templates/footer'); - - } - else - { - $this->news_model->set_news(); - $this->load->view('news/success'); - } -} -</pre> - -<p>The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the form validation are set. The <var>set_rules()</var> method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required.</p> - -<p>CodeIgniter has a powerful form validation library as demonstrated above. You can read <a href="../libraries/form_validation.html">more about this library here</a>.</p> - -<p>Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it was submitted <strong>and</strong> passed all the rules, the model is called. After this, a view is loaded to display a success message. Create a view at <dfn>application/view/news/success.php</dfn> and write a success message.</p> - -<h2>Model</h2> - -<p>The only thing that remains is writing a method that writes the data to the database. You'll use the Active Record class to insert the information and use the input library to get the posted data. Open up the model created earlier and add the following:</p> - -<pre> -public function set_news() -{ - $this->load->helper('url'); - - $slug = url_title($this->input->post('title'), 'dash', TRUE); - - $data = array( - 'title' => $this->input->post('title'), - 'slug' => $slug, - 'text' => $this->input->post('text') - ); - - return $this->db->insert('news', $data); -} -</pre> - -<p>This new method takes care of inserting the news item into the database. The third line contains a new function, <dfn>url_title()</dfn>. This function - provided by the <a href="../helpers/url_helper.html">URL helper</a> - strips down the string you pass it, replacing all spaces by dashes (-) and makes sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs.</p> - -<p>Let's continue with preparing the record that is going to be inserted later, inside the <var>$data</var> array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, namely the <dfn>post()</dfn> method from the <a href="../libraries/input.html">input library</a>. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input library is loaded by default. At last, you insert our <var>$data</var> array into our database.</p> - -<h2>Routing</h2> - -<p>Before you can start adding news items into your CodeIgniter application you have to add an extra rule to <dfn>config/routes.php</dfn> file. Make sure your file contains the following. This makes sure CodeIgniter sees 'create' as a method instead of a news item's slug.</p> - -<pre> -$route['news/create'] = 'news/create'; -$route['news/(:any)'] = 'news/view/$1'; -$route['news'] = 'news'; -$route['(:any)'] = 'pages/view/$1'; -$route['default_controller'] = 'pages/view'; -</pre> - -<p>Now point your browser to your local development environment where you installed CodeIgniter and add <dfn>index.php/news/create</dfn> to the URL. Congratulations, you just created your first CodeIgniter application! Add some news and check out the different pages you made.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="news_section.html">News section</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="conclusion.html">Conclusion</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/tutorial/hard_coded_pages.html b/user_guide/tutorial/hard_coded_pages.html deleted file mode 100644 index 378947db2..000000000 --- a/user_guide/tutorial/hard_coded_pages.html +++ /dev/null @@ -1,158 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -Features -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Tutorial - Hard coded pages</h1> - -<p>The first thing we're going to do is setting up a controller to handle our hard coded pages. A controller is a class with a collection of methods that represent the different actions you can perform on a certain object. In our case, we want to be able to view a page.</p> - -<p class="important"><strong>Note:</strong> This tutorial assumes you've downloaded CodeIgniter and installed the framework in your development environment.</p> - -<p>Create a file at <dfn>application/controllers/pages.php</dfn> with the following code.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="9"> -<?php -class Pages extends CI_Controller { - - public function view($page = 'home') - { - - } -} -</textarea> - -<p>If you're familiar with PHP classes you see that we create a Pages class with a view method that accepts one parameter, <var>$page</var>. Another interesting observation is that the Pages class is extending the CI_Controller class. This means that the new Pages class can access the methods and variables defined in the CI_Controller class. When you look at this class in <dfn>system/core/controller.php</dfn> you can see this class is doing something really important; assigning an instance from the CodeIgniter super object to the <var>$this</var> object. In most of your code, <var>$this</var> is the object you will use to interact with the framework.</p> - -<p>Now we've created our first method, it is time to do some basic templating. For this tutorial, we will be creating two views to acts as our footer and header. Let's create our header at <dfn>application/views/templates/header.php</dfn> and ad the following code.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="8"> -<html> -<head> - <title><?php echo $title ?> - CodeIgniter 2 Tutorial</title> -</head> -<body> - <h1>CodeIgniter 2 Tutorial</h1> - -</textarea> - -<p>Our header doesn't do anything exciting. It contains the basic HTML code that we will want to display before loading the main view. You can also see that we echo the <var>$title</var> variable, which we didn't define. We will set this variable in the Pages controller a bit later. Let's go ahead and create a footer at <dfn>application/views/templates/footer.php</dfn> that includes the following code.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="4"> -<strong>© 2011</strong> -</body> -</html> -</textarea> - -<h2>Adding logic to the controller</h2> - -<p>Now we've set up the basics so we can finally do some real programming. Earlier we set up our controller with a view method. Because we don't want to write a separate method for every page, we made the view method accept one parameter, the name of the page. These hard coded pages will be located in <dfn>application/views/pages/</dfn>. Create two files in this directory named <dfn>home.php</dfn> and <dfn>about.php</dfn> and put in some HTML content.</p> - -<p>In order to load these pages we'll have to check whether these page actually exists. When the page does exist, we load the view for that pages, including the header and footer and display it to the user. If it doesn't, we show a "404 Page not found" error.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="16"> -public function view($page = 'home') -{ - - if ( ! file_exists('application/views/pages/' . $page . EXT)) - { - show_404(); - } - - $data['title'] = ucfirst($page); - - $this->load->view('templates/header', $data); - $this->load->view('pages/'.$page); - $this->load->view('templates/footer'); -} -</textarea> - -<p>The first thing we do is checking whether the page we're looking for does actually exist. We use PHP's native file_exists() to do this check and pass the path where the file is supposed to be. Next is the function show_404(), a CodeIgniter function that renders the default error page and sets the appropriate HTTP headers.</p> - -<p>In the header template you saw we were using the <var>$title</var> variable to customize our page title. This is where we define the title, but instead of assigning the value to a variable, we assign it to the title element in the <var>$data</var> array. The last thing we need to do is loading the views in the order we want them to be displayed. We also pass the <var>$data</var> array to the header view to make its elements available in the header view file.<p> - -<h2>Routing</h2> - -<p>Actually, our controller is already functioning. Point your browser to <dfn>index.php/pages/view</dfn> to see your homepage. When you visit <dfn>index.php/pages/view/about</dfn> you will see the about page, again including your header and footer. Now we're going to get rid of the pages/view part in our URI. As you may have seen, CodeIgniter does its routing by the class, method and parameter, separated by slashes.</p> - -<p>Open the routing file located at <dfn>application/config/routes.php</dfn> and add the following two lines. Remove all other code that sets any element in the <var>$route</var> array.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="3"> -$route['(:any)'] = 'pages/view/$1'; -$route['default_controller'] = 'pages/view'; -</textarea> - -<p>CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. These routes are stored in the <var>$route</var> array where the keys represent the incoming request and the value the path to the method, as described above.</p> - -<p>The first rule in our <var>$routes</var> array matches every request - using the wildcard operator <dfn>(:any)</dfn> - and passes the value to the view method of the pages class we created earlier. The default controller route makes sure every request to the root goes to the view method as well, which has the first parameter set to 'home' by default.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="cheatsheets.html">CodeIgniter Cheatsheets</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="appflow.html">Application Flow Chart</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/tutorial/index.html b/user_guide/tutorial/index.html deleted file mode 100644 index 72d53cdaf..000000000 --- a/user_guide/tutorial/index.html +++ /dev/null @@ -1,101 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Tutorial</a> › -Introduction -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Tutorial − Introduction</h1> - -<p>This tutorial is intended to introduce you to the CodeIgniter framework and the basic principles of MVC architecture. It will show you how a basic CodeIgniter application is constructed in step-by-step fashion.</p> - -<p>In this tutorial, you will be creating a <strong>basic news application</strong>. You will begin by writing the code that can load static pages. Next, you will create a news section that reads news items from a database. Finally, you'll add a form to create news items in the database.</p> - -<p>This tutorial will primarily focus on:</p> -<ul> -<li>Model-View-Controller basics</li> -<li>Routing basics</li> -<li>Form validation</li> -<li>Performing basic database queries using "Active Record"</li> -</ul> - -<p>The entire tutorial is split up over several pages, each explaining a small part of the functionality of the CodeIgniter framework. You'll go through the following pages:</p> -<ul> -<li>Introduction, this page, which gives you an overview of what to expect.</li> -<li><a href="static_pages.html">Static pages</a>, which will teach you the basics of controllers, views and routing.</li> -<li><a href="news_section.html">News section</a>, where you'll start using models and will be doing some basic database operations.</li> -<li><a href="create_news_items.html">Create news items</a>, which will introduce more advanced database operations and form validation.</li> -<li><a href="conclusion.html">Conclusion</a>, which will give you some pointers on further reading and other resources.</li> -</ul> - -<p>Enjoy your exploration of the CodeIgniter framework.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="../overview/goals.html">Goals</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="static_pages.html">Static pages</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/tutorial/news_section.html b/user_guide/tutorial/news_section.html deleted file mode 100644 index e6b98a388..000000000 --- a/user_guide/tutorial/news_section.html +++ /dev/null @@ -1,230 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Tutorial</a> › -News section -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Tutorial − News section</h1> - -<p>In the last section, we went over some basic concepts of the framework by writing a class that includes static pages. We cleaned up the URI by adding custom routing rules. Now it's time to introduce dynamic content and start using a database.</p> - -<h2>Setting up your model</h2> - -<p>Instead of writing database operations right in the controller, queries should be placed in a model, so they can easily be reused later. Models are the place where you retrieve, insert, and update information in your database or other data stores. They represent your data.</p> - -<p>Open up the <dfn>application/models</dfn> directory and create a new file called <dfn>news_model.php</dfn> and add the following code. Make sure you've configured your database properly as described <a href="../database/configuration.html">here</a>.</p> - -<pre> -<?php -class News_model extends CI_Model { - - public function __construct() - { - $this->load->database(); - } -} -</pre> - -<p>This code looks similar to the controller code that was used earlier. It creates a new model by extending CI_Model and loads the database library. This will make the database class available through the <var>$this->db</var> object.</p> - -<p>Before querying the database, a database schema has to be created. Connect to your database and run the SQL command below. Also add some seed records.</p> - -<pre> -CREATE TABLE news ( - id int(11) NOT NULL AUTO_INCREMENT, - title varchar(128) NOT NULL, - slug varchar(128) NOT NULL, - text text NOT NULL, - PRIMARY KEY (id), - KEY slug (slug) -); -</pre> - -<p>Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — <a href="../database/active_record.html">Active Record</a> — is used. This makes it possible to write your 'queries' once and make them work on <a href="../general/requirements.html">all supported database systems</a>. Add the following code to your model.</p> - -<pre> -public function get_news($slug = FALSE) -{ - if ($slug === FALSE) - { - $query = $this->db->get('news'); - return $query->result_array(); - } - - $query = $this->db->get_where('news', array('slug' => $slug)); - return $query->row_array(); -} -</pre> - -<p>With this code you can perform two different queries. You can get all news records, or get a news item by its <a href="#" title="a URL friendly version of a string">slug</a>. You might have noticed that the <var>$slug</var> variable wasn't sanitized before running the query; Active Record does this for you.</p> - -<h2>Display the news</h2> - -<p>Now that the queries are written, the model should be tied to the views that are going to display the news items to the user. This could be done in our pages controller created earlier, but for the sake of clarity, a new "news" controller is defined. Create the new controller at <dfn>application/controllers/news.php</dfn>.</p> - -<pre> -<?php -class News extends CI_Controller { - - public function __construct() - { - parent::__construct(); - $this->load->model('news_model'); - } - - public function index() - { - $data['news'] = $this->news_model->get_news(); - } - - public function view($slug) - { - $data['news'] = $this->news_model->get_news($slug); - } -} -</pre> - -<p>Looking at the code, you may see some similarity with the files we created earlier. First, the "__construct" method: it calls the constructor of its parent class (<dfn>CI_Controller</dfn>) and loads the model, so it can be used in all other methods in this controller.</p> - -<p>Next, there are two methods to view all news items and one for a specific news item. You can see that the <var>$slug</var> variable is passed to the model's method in the second method. The model is using this slug to identify the news item to be returned.</p> - -<p>Now the data is retrieved by the controller through our model, but nothing is displayed yet. The next thing to do is passing this data to the views.</p> - -<pre> -public function index() -{ - $data['news'] = $this->news_model->get_news(); - $data['title'] = 'News archive'; - - $this->load->view('templates/header', $data); - $this->load->view('news/index', $data); - $this->load->view('templates/footer'); -} -</pre> - -<p>The code above gets all news records from the model and assigns it to a variable. The value for the title is also assigned to the <var>$data['title']</var> element and all data is passed to the views. You now need to create a view to render the news items. Create <dfn>application/views/news/index.php</dfn> and add the next piece of code.</p> - -<pre> -<?php foreach ($news as $news_item): ?> - - <h2><?php echo $news_item['title'] ?></h2> - <div class="main"> - <?php echo $news_item['text'] ?> - </div> - <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p> - -<?php endforeach ?> -</pre> - -<p>Here, each news item is looped and displayed to the user. You can see we wrote our template in PHP mixed with HTML. If you prefer to use a template language, you can use CodeIgniter's <a href="../libraries/parser.html">Template Parser</a> class or a third party parser.</p> - -<p>The news overview page is now done, but a page to display individual news items is still absent. The model created earlier is made in such way that it can easily be used for this functionality. You only need to add some code to the controller and create a new view. Go back to the news controller and add the following lines to the file.</p> - -<pre> -public function view($slug) -{ - $data['news_item'] = $this->news_model->get_news($slug); - - if (empty($data['news_item'])) - { - show_404(); - } - - $data['title'] = $data['news_item']['title']; - - $this->load->view('templates/header', $data); - $this->load->view('news/view', $data); - $this->load->view('templates/footer'); -} -</pre> - -<p>Instead of calling the <var>get_news()</var> method without a parameter, the <var>$slug</var> variable is passed, so it will return the specific news item. The only things left to do is create the corresponding view at <dfn>application/views/news/view.php</dfn>. Put the following code in this file.</p> - -<pre> -<?php -echo '<h2>'.$news_item['title'].'</h2>'; -echo $news_item['text']; -</pre> - -<h2>Routing</h2> -<p>Because of the wildcard routing rule created earlier, you need need an extra route to view the controller that you just made. Modify your routing file (<dfn>application/config/routes.php</dfn>) so it looks as follows. This makes sure the requests reaches the news controller instead of going directly to the pages controller. The first line routes URI's with a slug to the view method in the news controller.</p> - -<pre> -$route['news/(:any)'] = 'news/view/$1'; -$route['news'] = 'news'; -$route['(:any)'] = 'pages/view/$1'; -$route['default_controller'] = 'pages/view'; -</pre> - -<p>Point your browser to your document root, followed by <dfn>index.php/news</dfn> and watch your news page.</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="static_pages.html">Static pages</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="create_news_items.html">Create news items</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html deleted file mode 100644 index ca17380ca..000000000 --- a/user_guide/tutorial/static_pages.html +++ /dev/null @@ -1,206 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>CodeIgniter Features : CodeIgniter User Guide</title> - -<style type='text/css' media='all'>@import url('../userguide.css');</style> -<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> - -<script type="text/javascript" src="../nav/nav.js"></script> -<script type="text/javascript" src="../nav/prototype.lite.js"></script> -<script type="text/javascript" src="../nav/moo.fx.js"></script> -<script type="text/javascript" src="../nav/user_guide_menu.js"></script> - -<meta http-equiv='expires' content='-1' /> -<meta http-equiv= 'pragma' content='no-cache' /> -<meta name='robots' content='all' /> -<meta name='author' content='ExpressionEngine Dev Team' /> -<meta name='description' content='CodeIgniter User Guide' /> - -</head> -<body> - -<!-- START NAVIGATION --> -<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> -<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> -<div id="masthead"> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td><h1>CodeIgniter User Guide Version 2.2.0</h1></td> -<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> -</tr> -</table> -</div> -<!-- END NAVIGATION --> - - -<!-- START BREADCRUMB --> -<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> -<tr> -<td id="breadcrumb"> -<a href="http://codeigniter.com/">CodeIgniter Home</a> › -<a href="../index.html">User Guide Home</a> › -<a href="index.html">Tutorial</a> › -Static pages -</td> -<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="ellislab.com/codeigniter/user-guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> -</tr> -</table> -<!-- END BREADCRUMB --> - -<br clear="all" /> - - -<!-- START CONTENT --> -<div id="content"> - - -<h1>Tutorial − Static pages</h1> - -<p class="important"><strong>Note:</strong> This tutorial assumes you've downloaded CodeIgniter and <a href="../installation/index.html">installed the framework</a> in your development environment.</p> - -<p>The first thing you're going to do is set up a <strong>controller</strong> to handle static pages. -A controller is simply a class that helps delegate work. It is the glue of your -web application.</p> - -<p>For example, when a call is made to: <code>http://example.com/news/latest/10</code> We might imagine -that there is a controller named "news". The method being called on news -would be "latest". The news method's job could be to grab 10 -news items, and render them on the page. Very often in MVC, you'll see URL -patterns that match: <code>http://example.com/[controller-class]/[controller-method]/[arguments]</code> -As URL schemes become more complex, this may change. But for now, this is all we will need to know.</p> - -<p>Create a file at <dfn>application/controllers/pages.php</dfn> with the following code.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="10"> -<?php - -class Pages extends CI_Controller { - - public function view($page = 'home') - { - - } -} -</textarea> - -<p>You have created a class named "pages", with a view method that accepts one argument named <var>$page</var>. -The pages class is extending the CI_Controller class. -This means that the new pages class can access the methods and variables defined in the CI_Controller class -(<dfn>system/core/Controller.php</dfn>).</p> - -<p>The <strong>controller is what will become the center of every request</strong> to your web application. -In very technical CodeIgniter discussions, it may be referred to as the <em>super object</em>. -Like any php class, you refer to it within your controllers as <var>$this</var>. -Referring to <var>$this</var> is how you will load libraries, views, and generally -command the framework.</p> - -<p>Now you've created your first method, it's time to make some basic page templates. -We will be creating two "views" (page templates) that act as our page footer and header.</p> - -<p>Create the header at <dfn>application/views/templates/header.php</dfn> and add the following code.</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="8"> -<html> -<head> - <title><?php echo $title ?> - CodeIgniter 2 Tutorial</title> -</head> -<body> - <h1>CodeIgniter 2 Tutorial</h1> - -</textarea> - -<p>The header contains the basic HTML code that you'll want to display before loading the main view, together with a heading. -It will also output the <var>$title</var> variable, which we'll define later in the controller. -Now create a footer at <dfn>application/views/templates/footer.php</dfn> that includes the following code:</p> - -<textarea class="textarea" style="width:100%" cols="50" rows="4"> -<strong>&copy; 2011</strong> -</body> -</html> -</textarea> - -<h2>Adding logic to the controller</h2> - -<p>Earlier you set up a controller with a view() method. The method accepts one parameter, which is the name of the page to be loaded. -The static page templates will be located in the <dfn>application/views/pages/</dfn> directory.</p> - -<p>In that directory, create two files named <dfn>home.php</dfn> and <dfn>about.php</dfn>. -Within those files, type some text − anything you'd like − and save them. -If you like to be particularly un-original, try "Hello World!".</p> - -<p>In order to load those pages, you'll have to check whether the requested page actually exists:</p> - -<pre> -public function view($page = 'home') -{ - - if ( ! file_exists(APPPATH.'/views/pages/'.$page.'.php')) - { - // Whoops, we don't have a page for that! - show_404(); - } - - $data['title'] = ucfirst($page); // Capitalize the first letter - - $this->load->view('templates/header', $data); - $this->load->view('pages/'.$page, $data); - $this->load->view('templates/footer', $data); - -} -</pre> - -<p>Now, when the page does exist, it is loaded, including the header and footer, and displayed to the user. If the page doesn't exist, a "404 Page not found" error is shown.</p> - -<p>The first line in this method checks whether the page actually exists. PHP's native <var>file_exists()</var> function is used to check whether the file is where it's expected to be. <var>show_404()</var> is a built-in CodeIgniter function that renders the default error page.</p> - -<p>In the header template, the <var>$title</var> variable was used to customize the page title. The value of title is defined in this method, but instead of assigning the value to a variable, it is assigned to the title element in the <var>$data</var> array.</p> - -<p>The last thing that has to be done is loading the views in the order they should be displayed. -The second parameter in the <var>view()</var> method is used to pass values to the view. Each value in the <var>$data</var> array is assigned to a variable with the name of its key. So the value of <var>$data['title']</var> in the controller is equivalent to $title in the view.<p> - -<h2>Routing</h2> - -<p>The controller is now functioning! Point your browser to <dfn>[your-site-url]index.php/pages/view</dfn> to see your page. When you visit <dfn>index.php/pages/view/about</dfn> you'll see the about page, again including the header and footer.</p> - -<p>Using custom routing rules, you have the power to map any URI to any controller and method, and break free from the normal convention: -<code>http://example.com/[controller-class]/[controller-method]/[arguments]</code></p> - -<p>Let's do that. Open the routing file located at <dfn>application/config/routes.php</dfn> and add the following two lines. Remove all other code that sets any element in the <var>$route</var> array.</p> - -<pre> -$route['default_controller'] = 'pages/view'; -$route['(:any)'] = 'pages/view/$1'; -</pre> - -<p>CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. Each rule is a regular expression -(left-side) mapped to a controller and method name separated by slashes (right-side). -When a request comes in, CodeIgniter looks for the first match, and calls the appropriate controller and method, possibly with arguments.</p> - -<p>More information about routing can be found in the URI Routing <a href="../general/routing.html">documentation</a>.</p> - -<p>Here, the second rule in the <var>$routes</var> array matches <strong>any</strong> request using the wildcard string <dfn>(:any)</dfn>. -and passes the parameter to the view() method of the pages class.</p> - -<p>Now visit <dfn>index.php/about</dfn>. Did it get routed correctly to the <var>view()</var> method -in the pages controller? Awesome!</p> - -</div> -<!-- END CONTENT --> - - -<div id="footer"> -<p> -Previous Topic: <a href="index.html">Introduction</a> - · -<a href="#top">Top of Page</a> · -<a href="../index.html">User Guide Home</a> · -Next Topic: <a href="news_section.html">News section</a> -</p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2014 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> -</div> - -</body> -</html>
\ No newline at end of file diff --git a/user_guide/userguide.css b/user_guide/userguide.css deleted file mode 100644 index f93ff0d75..000000000 --- a/user_guide/userguide.css +++ /dev/null @@ -1,415 +0,0 @@ -body { - margin: 0; - padding: 0; - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - font-size: 14px; - color: #333; - background-color: #fff; -} - -a { - color: #0134c5; - background-color: transparent; - text-decoration: none; - font-weight: normal; - outline-style: none; -} -a:visited { - color: #0134c5; - background-color: transparent; - text-decoration: none; - outline-style: none; -} -a:hover { - color: #000; - text-decoration: none; - background-color: transparent; - outline-style: none; -} - -#breadcrumb { - float: left; - background-color: transparent; - margin: 10px 0 0 42px; - padding: 0; - font-size: 10px; - color: #666; -} -#breadcrumb_right { - float: right; - width: 175px; - background-color: transparent; - padding: 8px 8px 3px 0; - text-align: right; - font-size: 10px; - color: #666; -} -#nav { - background-color: #494949; - margin: 0; - padding: 0; -} -#nav2 { - background: #fff url(images/nav_bg_darker.jpg) repeat-x left top; - padding: 0 310px 0 0; - margin: 0; - text-align: right; -} -#nav_inner { - background-color: transparent; - padding: 8px 12px 0 20px; - margin: 0; - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - font-size: 11px; -} - -#nav_inner h3 { - font-size: 12px; - color: #fff; - margin: 0; - padding: 0; -} - -#nav_inner .td_sep { - background: transparent url(images/nav_separator_darker.jpg) repeat-y left top; - width: 25%; - padding: 0 0 0 20px; -} -#nav_inner .td { - width: 25%; -} -#nav_inner p { - color: #eee; - background-color: transparent; - padding:0; - margin: 0 0 10px 0; -} -#nav_inner ul { - list-style-image: url(images/arrow.gif); - padding: 0 0 0 18px; - margin: 8px 0 12px 0; -} -#nav_inner li { - padding: 0; - margin: 0 0 4px 0; -} - -#nav_inner a { - color: #eee; - background-color: transparent; - text-decoration: none; - font-weight: normal; - outline-style: none; -} - -#nav_inner a:visited { - color: #eee; - background-color: transparent; - text-decoration: none; - outline-style: none; -} - -#nav_inner a:hover { - color: #ccc; - text-decoration: none; - background-color: transparent; - outline-style: none; -} - -#masthead { - margin: 0 40px 0 35px; - padding: 0 0 0 6px; - border-bottom: 1px solid #999; -} - -#masthead h1 { -background-color: transparent; -color: #e13300; -font-size: 18px; -font-weight: normal; -margin: 0; -padding: 0 0 6px 0; -} - -#searchbox { - background-color: transparent; - padding: 6px 40px 0 0; - text-align: right; - font-size: 10px; - color: #666; -} - -#img_welcome { - border-bottom: 1px solid #D0D0D0; - margin: 0 40px 0 40px; - padding: 0; - text-align: center; -} - -#content { - margin: 20px 40px 0 40px; - padding: 0; -} - -#content p { - margin: 12px 20px 12px 0; -} - -#content h1 { -color: #e13300; -border-bottom: 1px solid #666; -background-color: transparent; -font-weight: normal; -font-size: 24px; -margin: 0 0 20px 0; -padding: 3px 0 7px 3px; -} - -#content h2 { - background-color: transparent; - border-bottom: 1px solid #999; - color: #000; - font-size: 18px; - font-weight: bold; - margin: 28px 0 16px 0; - padding: 5px 0 6px 0; -} - -#content h3 { - background-color: transparent; - color: #333; - font-size: 16px; - font-weight: bold; - margin: 16px 0 15px 0; - padding: 0 0 0 0; -} - -#content h4 { - background-color: transparent; - color: #444; - font-size: 14px; - font-weight: bold; - margin: 22px 0 0 0; - padding: 0 0 0 0; -} - -#content img { - margin: auto; - padding: 0; -} - -#content code { - font-family: Monaco, Verdana, Sans-serif; - font-size: 12px; - background-color: #f9f9f9; - border: 1px solid #D0D0D0; - color: #002166; - display: block; - margin: 14px 0 14px 0; - padding: 12px 10px 12px 10px; -} - -#content pre { - font-family: Monaco, Verdana, Sans-serif; - font-size: 12px; - background-color: #f9f9f9; - border: 1px solid #D0D0D0; - color: #002166; - display: block; - margin: 14px 0 14px 0; - padding: 12px 10px 12px 10px; -} - -#content .path { - background-color: #EBF3EC; - border: 1px solid #99BC99; - color: #005702; - text-align: center; - margin: 0 0 14px 0; - padding: 5px 10px 5px 8px; -} - -#content dfn { - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - color: #00620C; - font-weight: bold; - font-style: normal; -} -#content var { - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - color: #8F5B00; - font-weight: bold; - font-style: normal; -} -#content samp { - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - color: #480091; - font-weight: bold; - font-style: normal; -} -#content kbd { - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - color: #A70000; - font-weight: bold; - font-style: normal; -} - -#content ul { - list-style-image: url(images/arrow.gif); - margin: 10px 0 12px 0; -} - -li.reactor { - list-style-image: url(images/reactor-bullet.png); -} -#content li { - margin-bottom: 9px; -} - -#content li p { - margin-left: 0; - margin-right: 0; -} - -#content .tableborder { - border: 1px solid #999; -} -#content th { - font-weight: bold; - text-align: left; - font-size: 12px; - background-color: #666; - color: #fff; - padding: 4px; -} - -#content .td { - font-weight: normal; - font-size: 12px; - padding: 6px; - background-color: #f3f3f3; -} - -#content .tdpackage { - font-weight: normal; - font-size: 12px; -} - -#content .important { - background: #FBE6F2; - border: 1px solid #D893A1; - color: #333; - margin: 10px 0 5px 0; - padding: 10px; -} - -#content .important p { - margin: 6px 0 8px 0; - padding: 0; -} - -#content .important .leftpad { - margin: 6px 0 8px 0; - padding-left: 20px; -} - -#content .critical { - background: #FBE6F2; - border: 1px solid #E68F8F; - color: #333; - margin: 10px 0 5px 0; - padding: 10px; -} - -#content .critical p { - margin: 5px 0 6px 0; - padding: 0; -} - - -#footer { -background-color: transparent; -font-size: 10px; -padding: 16px 0 15px 0; -margin: 20px 0 0 0; -text-align: center; -} - -#footer p { - font-size: 10px; - color: #999; - text-align: center; -} -#footer address { - font-style: normal; -} - -.center { - text-align: center; -} - -img { - padding:0; - border: 0; - margin: 0; -} - -.nopad { - padding:0; - border: 0; - margin: 0; -} - - -form { - margin: 0; - padding: 0; -} - -.input { - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - font-size: 11px; - color: #333; - border: 1px solid #B3B4BD; - width: 100%; - font-size: 11px; - height: 1.5em; - padding: 0; - margin: 0; -} - -.textarea { - font-family: Lucida Grande, Verdana, Geneva, Sans-serif; - font-size: 14px; - color: #143270; - background-color: #f9f9f9; - border: 1px solid #B3B4BD; - width: 100%; - padding: 6px; - margin: 0; -} - -.select { - background-color: #fff; - font-size: 11px; - font-weight: normal; - color: #333; - padding: 0; - margin: 0 0 3px 0; -} - -.checkbox { - background-color: transparent; - padding: 0; - border: 0; -} - -.submit { - background-color: #000; - color: #fff; - font-weight: normal; - font-size: 10px; - border: 1px solid #fff; - margin: 0; - padding: 1px 5px 2px 5px; -}
\ No newline at end of file |