Index: trunk/tools/wikiportrait/pages/licenses_nl.php |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +<h2>Kies een licentie</h2>
|
| 3 | +
|
| 4 | +<h3>Wat is een licentie?</h3>
|
| 5 | +<p>Een licentie is, in algemene zin, een tekst waarin de maker van een creatief werk aangeeft wat er met dat werk mag worden gedaan en wat niet. Een fotograaf kan bijvoorbeeld aan een krant een foto hebben verkocht en daarbij als licentievoorwaarde aangegeven hebben dat die foto mag worden gebruikt bij één bepaald artikel en niet mag worden hergebruikt voor andere artikelen.</p>
|
| 6 | +
|
| 7 | +<h3>Licenties op Wikipedia</h3>
|
| 8 | +<p>Wikipedia is een vrije encyclopedie, en maakt daarom ook gebruik van vrije licenties voor afbeeldingen. Een vrije licentie betekent dat de afbeeldingen zonder veel beperkingen door anderen gebruikt mogen worden. Een licentie voor media op Wikipedia moet in ieder geval toestemming geven voor verspreiding, wijziging en commercieel gebruik. De meest gebruikelijke licenties bij Wikipedia zijn de GFDL, CC-BY-SA en CC-BY. Een combinatie van deze is ook mogelijk. Hieronder worden deze licenties kort toegelicht.Van belang is dat het gebruiken van een vrije licentie geen afbreuk doet aan de morele rechten van de auteur. Bij CC-BY-SA en CC-BY is dit expliciet in de licentietekst vermeld.</p>
|
| 9 | +
|
| 10 | +<h3>Licenties</h3> |
| 11 | +<div class="license">
|
| 12 | + <h4><a href="http://creativecommons.org/licenses/by/2.5/deed.nl">Creative Commons Naamsvermelding (CC-BY)</a></h4>
|
| 13 | + <img src="images/icon_creativecommons.gif" alt="Creative Commons"/>
|
| 14 | + <img src="images/icon_ccby.png" alt="CCBY" />
|
| 15 | + <p>De CC-BY-licentie ('BY' staat voor attribution, dus naamsvermelding) staat het kopiëren, verspreiden en bewerken toe mits correcte vermelding van de auteur plaatsvindt. Bij hergebruik/verspreiding van de afbeelding moet verwezen worden naar de tekst van de licentie.
|
| 16 | + </p>
|
| 17 | +</div> <!-- license CC-BY --> |
| 18 | + |
| 19 | +<div class="license">
|
| 20 | + <h4><a href="http://creativecommons.org/licenses/by-sa/2.5/deed.nl">Creative Commons Naamsvermelding-GelijkDelen (CC-BY-SA)</a></h4>
|
| 21 | + <img src="images/icon_creativecommons.gif" alt="Creative Commons"/>
|
| 22 | + <img src="images/icon_ccby.png" alt="CCBY" />
|
| 23 | + <img src="images/icon_ccsa.png" alt="CCSA" />
|
| 24 | + <p>De CC-BY-SA-licentie ('BY' staat voor attribution, dus naamsvermelding, 'SA' voor ShareAlike/GelijkDelen) lijkt erg op de GFDL. Ook bij CC-BY-SA mag de afbeelding gekopieerd, verspreid en bewerkt worden mits correcte vermelding van de auteur plaatsvindt. Bij CC-BY-SA moet, net als bij GFDL, de gekopiëerde/bewerkte afbeelding onder dezelfde vrije licentie (CC-BY-SA) blijven. Een verschil met GFDL is dat bij CC-BY-SA niet de volledige licentietekst vermeld hoeft te worden. Een verwijzing naar de licentietekst is voldoende.
|
| 25 | + </p>
|
| 26 | +</div> <!-- license CC-BY-SA --> |
| 27 | +
|
| 28 | +<div class="license">
|
| 29 | + <h4><a href="http://nl.wikisource.org/wiki/Nederlandstalige_tekst_van_de_GNU-licentie_voor_vrije_documentatie">GNU-licentie voor vrije documentatie (GFDL)</a></h4>
|
| 30 | + <img src="images/icon_gnu.png" alt="GNU head" />
|
| 31 | + <p>De GNU-licentie voor vrije documentatie, afgekort met GFDL, is de standaardlicentie op Wikipedia. Kortweg houdt de GFDL in dat de afbeelding gekopieerd, verspreid en bewerkt mag worden, mits correcte vermelding van de auteur plaatsvindt. De GFDL is een zogenaamde copyleft-licentie: alles wat mensen veranderen aan de afbeelding moet ook weer onder de GFDL worden vrijgeven. Een nadeel (of voordeel, het is maar net hoe je het bekijkt) van de GFDL is dat de complete licentietekst bij elke afbeelding moet worden meegeleverd. Dat is geen probleem op het internet, waar een link volstaat, maar op druk betekent dit dat je naast de afbeelding een stuk of vijf pagina's tekst moet meeleveren. </p>
|
| 32 | +</div> <!-- license GFDL --> |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/pages/licenses_nl.php |
___________________________________________________________________ |
Name: svn:executable |
1 | 33 | + * |
Index: trunk/tools/wikiportrait/pages/welcome_disclaimer_nl.php |
— | — | @@ -0,0 +1,19 @@ |
| 2 | + <p> |
| 3 | + <script type="text/javascript"> |
| 4 | + document.write('<a href="' + GE_URL + 'pers.php">Klik hier voor persinformatie</a>'); |
| 5 | + </script> |
| 6 | + </p> |
| 7 | + |
| 8 | + <p> |
| 9 | + <sup>*</sup>Garantie voor plaatsing van uw foto is er niet. De vrijwilligers van Wikipedia besluiten |
| 10 | + of uw foto daadwerkelijk wordt geplaatst. Foto's worden alleen geaccepteerd als ze worden geupload onder |
| 11 | + een van de vrije licenties die op het uploadformulier zijn aangegeven. |
| 12 | + </p> |
| 13 | + |
| 14 | + <hr /> |
| 15 | + |
| 16 | + <small> |
| 17 | + Het vertonen van de bovenstaande portretten betekent niet dat de afgebeelde personen het gebruik van Wikipedia aanprijzen, ze dienen slechts ter illustratie.
+
+ Foto's en licenties: Maggie Jumps / CC-BY (Brad Pitt), NASA / PD (Walt Disney), Alan Light / CC-BY (Sean Connery, Eddie Van Halen), Paul Blank / CC-BY-SA (Dolf Janssen, Jack van Gelder), Sander Spek / PD (Femke Halsema), Martijn Kleingeerts / CC-BY (Jan Smit, Jacqueline Govaert), Jacco de Boer / CC-BY-SA (Jan Peter Balkenende), Diane Krauss / CC-BY-SA (Thomas Dekker), Elke Wetzig / CC-BY-SA (Leon de Winter), Tom Ordelman / CC-BY-SA (Simon Vinkenoog), Thms / CC-BY (Brace, Albert Verlinde), Elise van Rosmalen / CC-BY-SA (Oscar van Dillen), Valerie S. Guffey / PD (Halle Berry), Rita Molnár / CC-BY-SA (Nicole Kidman), U.S. Department of State / PD (Condoleezza Rice), William Rutten (Lange Frans), Metju & Liftarn / CC-BY-SA (silhouet) |
| 18 | + </small> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/pages/uploadform_nl.php |
— | — | @@ -0,0 +1,104 @@ |
| 2 | +<h2>Upload een afbeelding</h2> |
| 3 | + |
| 4 | +<div class="info"> |
| 5 | + <script type="text/javascript"> |
| 6 | + document.write('<img src="' + GE_URL + 'images/question_mark.png" alt="" />'); |
| 7 | + </script> |
| 8 | + <h3>Aan welke voorwaarden moet mijn foto voldoen?</h3> |
| 9 | + <p> |
| 10 | + Lees eerst deze voorwaarden door. Als uw foto voldoet aan alle eisen klik dan op 'Upload mijn foto' |
| 11 | + </p> |
| 12 | + <ul> |
| 13 | + <li>U moet uw werkelijke naam en e-mail adres opgeven.</li> |
| 14 | + <li>Deze moeten controleerbaar een relatie hebben met de foto, of met de manager van de persoon op de foto.</li> |
| 15 | + <li>Er wordt gecontroleerd of u rechthebbende kan zijn van de foto.</li> |
| 16 | + <li>Uw foto moet minimaal een resolutie hebben van 640x480 pixels</li> |
| 17 | + </ul> |
| 18 | + <p> |
| 19 | + <strong>Let op:</strong> Inzendingen zonder vermelding van de fotograaf en van de rechthebbende, of inzendingen die |
| 20 | + van zoekmachines als Google e.d. zijn afgehaald worden <strong>niet</strong> in behandeling genomen! |
| 21 | + </p> |
| 22 | + |
| 23 | + <button id="toggleUpload">Upload mijn foto</button> |
| 24 | +</div> |
| 25 | + |
| 26 | +<div id="uploadbox" class="jshide"> <!-- might be something IE-specific ? -->
|
| 27 | + <form name="upload" id="upload" method="post" enctype="multipart/form-data" action=""> |
| 28 | + <div class="item">
|
| 29 | + <label for="file">Bestand dat u wilt uploaden</label>
|
| 30 | + <input type="file" name="file" id="file" size="40" /> |
| 31 | + </div> |
| 32 | + |
| 33 | + <div class="item">
|
| 34 | + <label for="title">Wie staat er op de foto</label>
|
| 35 | + <input type="text" name="title" id="title" size="40" value="" />
|
| 36 | + </div> |
| 37 | + |
| 38 | + <div class="item">
|
| 39 | + <label for="source">Rechthebbende en/of auteur van de foto</label>
|
| 40 | + <input type="text" name="source" id="source" size="40" value="" />
|
| 41 | + </div> |
| 42 | + |
| 43 | + <div class="item">
|
| 44 | + <label for="name">Uw naam</label> |
| 45 | + <input type="text" name="name" id="name" size="40" value="" /> |
| 46 | + </div> |
| 47 | + |
| 48 | + <div class="item">
|
| 49 | + <label for="email">E-mail</label> |
| 50 | + <input type="text" name="email" id="email" size="40" value="" /><br /> |
| 51 | + <p><em>Dit moet een officieel adres zijn van u of uw agentschap, geen Hotmail, Gmail, Yahoo, e.d. adressen aub</em></p> |
| 52 | + </div> |
| 53 | + |
| 54 | + <div class="item">
|
| 55 | + <label for="data">Datum van foto (optioneel)</label>
|
| 56 | + <input type="text" name="date" id="date" size="40" value="" />
|
| 57 | + </div> |
| 58 | + |
| 59 | + <div class="item">
|
| 60 | + <label for="description">Beschrijving van de foto (optioneel)</label>
|
| 61 | + <textarea name="description" id="description" rows="6" cols="80"></textarea>
|
| 62 | + </div> |
| 63 | + |
| 64 | + <div class="item">
|
| 65 | + <label for="license">Licentie</label> |
| 66 | + <select name="license" id="license">
|
| 67 | + <option value="ccby-gfdl" style="font-weight:bold;">Multi-licentie Creative Commons Naamsvermelding / GFDL (aanbevolen)</option> <!-- Multi-license CC-BY / GFDL --> |
| 68 | + <!-- |
| 69 | + <option value="ccbysa-gfdl">Multi-licentie Creative Commons Naamsvermelding-GelijkDelen / GFDL</option> |
| 70 | + <option value="gfdl">GNU Licentie voor Vrije Documentatie (GFDL)</option>
|
| 71 | + <option value="ccby">Creative Commons Naamsvermelding</option>
|
| 72 | + <option value="ccbysa">Creative Commons Naamsvermelding-Gelijkdelen</option>
|
| 73 | + <option value="pd">Publiek Domein</option> |
| 74 | + --> |
| 75 | + |
| 76 | + </select>
|
| 77 | + <em><a href="javascript:popUp(GE_WIZARD + '?question=licenses')">Wat is een licentie?</a></em> |
| 78 | + </div> |
| 79 | + |
| 80 | + <div class="item"> |
| 81 | + <label for="uploadDisclaimer">Voorwaarden</label>
|
| 82 | + <textarea name="uploadDisclaimer" id="uploadDescription" rows="6" cols="80">Door het uploaden van dit materiaal en het klikken op de knop 'Upload foto' verklaart u dat u de rechthebbende eigenaar bent van het materiaal. Door dit materiaal te uploaden geeft u toestemming voor het gebruik van het materiaal onder de condities van de door u geselecteerde licentie(s), deze condities variëren per licentie maar houden in ieder geval in dat het materiaal verspreid, bewerkt en commercieel gebruikt mag worden door eenieder. Voor de specifieke extra condities per licentie verwijzen u naar de bijbehorende licentieteksten. U kunt op het vrijgeven van deze rechten na het akkoord gaan met deze voorwaarden niet meer terugkomen. De Wikimedia Foundation en haar chapters (waaronder de Vereniging Wikimedia Nederland) zijn op geen enkele wijze aansprakelijk voor misbruik van het materiaal of aanspraak op het materiaal door derden. De eventuele geportretteerden hebben geen bezwaar tegen publicatie onder genoemde licenties. Ook mijn eventuele opdrachtgever geeft toestemming.</textarea> |
| 83 | + </div> |
| 84 | + |
| 85 | + <div class="item">
|
| 86 | + <label for="disclaimerAgree">Ik ga akkoord met de bovengenoemde voorwaarden. <br />Mijn toestemming wordt automatisch gemaild naar info-nl at wikimedia dot org.</label> |
| 87 | + <input type="checkbox" name="disclaimerAgree" id="disclaimerAgree" /> |
| 88 | + </div> |
| 89 | + |
| 90 | + <br style="clear:both;" /> |
| 91 | + |
| 92 | + <button type="submit" id="btnUpload" name="btnUpload">Upload mijn foto</button> |
| 93 | + |
| 94 | + <div id="loading" class="imgbox jshide"> |
| 95 | + <script type="text/javascript"> |
| 96 | + document.write('<img src="' + GE_URL + 'images/loading.gif" alt="Loading..." />'); |
| 97 | + document.write('<p>' + messages.WAIT_FOR_UPLOAD + '</p>'); |
| 98 | + </script> |
| 99 | + </div> |
| 100 | +
|
| 101 | + </form> <!-- we upload using javascript, so disable this --> |
| 102 | + |
| 103 | +</div> <!-- #upload --> |
| 104 | +
|
| 105 | +<br style="clear:both;" /> |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/pages/uploadform_nl.php |
___________________________________________________________________ |
Name: svn:executable |
1 | 106 | + * |
Index: trunk/tools/wikiportrait/pages/welcome_nl.php |
— | — | @@ -0,0 +1,33 @@ |
| 2 | + <table style="margin-top: 20px;"> |
| 3 | + <tr> |
| 4 | + <td valign="top" style="padding-right:20px;"> |
| 5 | + <p> |
| 6 | + Staat er op <a href="http://nl.wikipedia.org">Wikipedia</a> een artikel zonder portretfoto? |
| 7 | + En heeft u een foto die bij een artikel zou passen? |
| 8 | + Stel dan uw foto hier ter beschikking en de vrijwilligers van Wikipedia doen de rest. |
| 9 | + </p> |
| 10 | + |
| 11 | + <p> |
| 12 | + <script type="text/javascript"> |
| 13 | + document.write('<img class="thumb" src="' + GE_URL + '/images/commons_logo.png" alt="Wikimedia Commons" />'); |
| 14 | + </script> |
| 15 | + Als u veel foto's heeft, of bijvoorbeeld foto's met andere onderwerpen dan beroemdheden |
| 16 | + overweegt u dan uw foto's onder te brengen bij <a href="http://commons.wikimedia.org/wiki/Commons:Welkom"> |
| 17 | + Wikimedia Commons</a>, de centrale mediadatabank van Wikipedia. |
| 18 | + </p> |
| 19 | + |
| 20 | + <br class="clear" /> |
| 21 | + |
| 22 | + <p> |
| 23 | + Klik hieronder om te beginnen. Binnenkort staat ook úw foto op Wikipedia.<sup>*</sup> |
| 24 | + </p> |
| 25 | + </td> |
| 26 | + <td> |
| 27 | + <script type="text/javascript"> |
| 28 | + document.write('<a href="' + GE_WIZARD + '?question=first">'); |
| 29 | + document.write('<img src="' + GE_URL + '/images/home_advertisement.jpg" alt="Advertentie" />'); |
| 30 | + document.write('</a>'); |
| 31 | + </script> |
| 32 | + </td> |
| 33 | + </tr> |
| 34 | + </table> |
Index: trunk/tools/wikiportrait/pages/press_nl.php |
— | — | @@ -0,0 +1,26 @@ |
| 2 | + <p> |
| 3 | + <a href="http://nl.wikimedia.org/wiki/Werkgroep_vrije_media/Persbericht">Persbericht over wikiportret, 5 mei 2008.</a> |
| 4 | + </p> |
| 5 | + |
| 6 | + <p> |
| 7 | + Download hier de advertentie voor plaatsing in uw blad / krant / tijdschrift / website |
| 8 | + </p> |
| 9 | + |
| 10 | + <ul> |
| 11 | + <script type="text/javascript"> |
| 12 | + var images = [ |
| 13 | + ["wikiportret_advertentie_150dpi.jpg", "Advertentie op 150 dpi (JPG)"], |
| 14 | + ["wikiportret_advertentie_72dpi.jpg", "Advertentie op 72 DPI (JPG, voor het internet)"], |
| 15 | + ["wikiportret_advertentie_150dpi_zwartwit.jpg", "Advertentie op 150 dpi zwart/wit (JPG)"], |
| 16 | + ["wikiportret_advertentie_cmyk.pdf","Advertentie als CMYK PDF (voor drukwerk)"] |
| 17 | + ]; |
| 18 | + |
| 19 | + for (var i in images) { |
| 20 | + document.write('<li><a href="' + GE_URL + '/pers/media/' + images[i][0] + '">' + images[i][1] + '</a></li>'); |
| 21 | + } |
| 22 | + </script> |
| 23 | + </ul> |
| 24 | + |
| 25 | + <p> |
| 26 | + Voor vragen: neem contact op met Hay Kranen (06 - 14 95 13 08), secretaris van <a href="http://www.wmnl.nl">Wikimedia Nederland</a> |
| 27 | + </p> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/pers.php |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +<?php |
| 3 | + include '_header.php'; |
| 4 | +?> |
| 5 | + <div id="questions"> |
| 6 | + <?php show_page('press'); ?> |
| 7 | + </div> <!-- /questions --> |
| 8 | +<?php |
| 9 | + include '_footer.php'; |
| 10 | +?> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/_footer.php |
— | — | @@ -0,0 +1,14 @@ |
| 2 | + <div id="footer">
|
| 3 | + <p>
|
| 4 | + The upload-wizard is programmed by <a href="http://nl.wikipedia.org/wiki/Gebruiker:Husky">Husky</a> and
|
| 5 | + released under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>.
|
| 6 | + Concept by the members <a href="http://nl.wikimedia.org/wiki/Werkgroep_vrije_media">Werkgroep Vrije Media</a>
|
| 7 | + (Workgroup Free Media) of the <a href="http://nl.wikimedia.org">Dutch chapter</a> of the Wikimedia Foundation.
|
| 8 | + The questions and explanations are written by <a href="http://nl.wikipedia.org/wiki/Gebruiker:Fruggo">Fruggo</a>
|
| 9 | + and multi-licensed under both the <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a> and
|
| 10 | + <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons BY-SA 2.5</a>.
|
| 11 | + </p>
|
| 12 | + </div>
|
| 13 | + </div> <!-- /wrapper --> |
| 14 | + </body>
|
| 15 | +</html> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/doc/gpl.txt |
— | — | @@ -0,0 +1,225 @@ |
| 2 | +GNU GENERAL PUBLIC LICENSE |
| 3 | + |
| 4 | +Version 3, 29 June 2007 |
| 5 | + |
| 6 | +Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/> |
| 7 | + |
| 8 | +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. |
| 9 | +Preamble |
| 10 | + |
| 11 | +The GNU General Public License is a free, copyleft license for software and other kinds of works. |
| 12 | + |
| 13 | +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. |
| 14 | + |
| 15 | +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. |
| 16 | + |
| 17 | +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. |
| 18 | + |
| 19 | +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. |
| 20 | + |
| 21 | +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. |
| 22 | + |
| 23 | +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. |
| 24 | + |
| 25 | +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. |
| 26 | + |
| 27 | +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. |
| 28 | + |
| 29 | +The precise terms and conditions for copying, distribution and modification follow. |
| 30 | +TERMS AND CONDITIONS |
| 31 | +0. Definitions. |
| 32 | + |
| 33 | +“This License” refers to version 3 of the GNU General Public License. |
| 34 | + |
| 35 | +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. |
| 36 | + |
| 37 | +“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. |
| 38 | + |
| 39 | +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. |
| 40 | + |
| 41 | +A “covered work” means either the unmodified Program or a work based on the Program. |
| 42 | + |
| 43 | +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. |
| 44 | + |
| 45 | +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. |
| 46 | + |
| 47 | +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. |
| 48 | +1. Source Code. |
| 49 | + |
| 50 | +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. |
| 51 | + |
| 52 | +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. |
| 53 | + |
| 54 | +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. |
| 55 | + |
| 56 | +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. |
| 57 | + |
| 58 | +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. |
| 59 | + |
| 60 | +The Corresponding Source for a work in source code form is that same work. |
| 61 | +2. Basic Permissions. |
| 62 | + |
| 63 | +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. |
| 64 | + |
| 65 | +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. |
| 66 | + |
| 67 | +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. |
| 68 | +3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
| 69 | + |
| 70 | +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. |
| 71 | + |
| 72 | +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. |
| 73 | +4. Conveying Verbatim Copies. |
| 74 | + |
| 75 | +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. |
| 76 | + |
| 77 | +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. |
| 78 | +5. Conveying Modified Source Versions. |
| 79 | + |
| 80 | +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: |
| 81 | + |
| 82 | + * a) The work must carry prominent notices stating that you modified it, and giving a relevant date. |
| 83 | + * 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”. |
| 84 | + * 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. |
| 85 | + * 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. |
| 86 | + |
| 87 | +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. |
| 88 | +6. Conveying Non-Source Forms. |
| 89 | + |
| 90 | +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: |
| 91 | + |
| 92 | + * 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. |
| 93 | + * 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. |
| 94 | + * 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. |
| 95 | + * 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. |
| 96 | + * 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. |
| 97 | + |
| 98 | +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. |
| 99 | + |
| 100 | +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. |
| 101 | + |
| 102 | +“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. |
| 103 | + |
| 104 | +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). |
| 105 | + |
| 106 | +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. |
| 107 | + |
| 108 | +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. |
| 109 | +7. Additional Terms. |
| 110 | + |
| 111 | +“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. |
| 112 | + |
| 113 | +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. |
| 114 | + |
| 115 | +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: |
| 116 | + |
| 117 | + * a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or |
| 118 | + * 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 |
| 119 | + * 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 |
| 120 | + * d) Limiting the use for publicity purposes of names of licensors or authors of the material; or |
| 121 | + * e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or |
| 122 | + * 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. |
| 123 | + |
| 124 | +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. |
| 125 | + |
| 126 | +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. |
| 127 | + |
| 128 | +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. |
| 129 | +8. Termination. |
| 130 | + |
| 131 | +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). |
| 132 | + |
| 133 | +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. |
| 134 | + |
| 135 | +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. |
| 136 | + |
| 137 | +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. |
| 138 | +9. Acceptance Not Required for Having Copies. |
| 139 | + |
| 140 | +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. |
| 141 | +10. Automatic Licensing of Downstream Recipients. |
| 142 | + |
| 143 | +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. |
| 144 | + |
| 145 | +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. |
| 146 | + |
| 147 | +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. |
| 148 | +11. Patents. |
| 149 | + |
| 150 | +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”. |
| 151 | + |
| 152 | +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. |
| 153 | + |
| 154 | +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. |
| 155 | + |
| 156 | +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. |
| 157 | + |
| 158 | +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. |
| 159 | + |
| 160 | +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. |
| 161 | + |
| 162 | +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. |
| 163 | + |
| 164 | +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. |
| 165 | +12. No Surrender of Others' Freedom. |
| 166 | + |
| 167 | +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. |
| 168 | +13. Use with the GNU Affero General Public License. |
| 169 | + |
| 170 | +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. |
| 171 | +14. Revised Versions of this License. |
| 172 | + |
| 173 | +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. |
| 174 | + |
| 175 | +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. |
| 176 | + |
| 177 | +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. |
| 178 | + |
| 179 | +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. |
| 180 | +15. Disclaimer of Warranty. |
| 181 | + |
| 182 | +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. |
| 183 | +16. Limitation of Liability. |
| 184 | + |
| 185 | +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. |
| 186 | +17. Interpretation of Sections 15 and 16. |
| 187 | + |
| 188 | +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. |
| 189 | + |
| 190 | +END OF TERMS AND CONDITIONS |
| 191 | +How to Apply These Terms to Your New Programs |
| 192 | + |
| 193 | +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. |
| 194 | + |
| 195 | +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. |
| 196 | + |
| 197 | + <one line to give the program's name and a brief idea of what it does.> |
| 198 | + Copyright (C) <year> <name of author> |
| 199 | + |
| 200 | + This program is free software: you can redistribute it and/or modify |
| 201 | + it under the terms of the GNU General Public License as published by |
| 202 | + the Free Software Foundation, either version 3 of the License, or |
| 203 | + (at your option) any later version. |
| 204 | + |
| 205 | + This program is distributed in the hope that it will be useful, |
| 206 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 207 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 208 | + GNU General Public License for more details. |
| 209 | + |
| 210 | + You should have received a copy of the GNU General Public License |
| 211 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 212 | + |
| 213 | +Also add information on how to contact you by electronic and paper mail. |
| 214 | + |
| 215 | +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: |
| 216 | + |
| 217 | + <program> Copyright (C) <year> <name of author> |
| 218 | + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| 219 | + This is free software, and you are welcome to redistribute it |
| 220 | + under certain conditions; type `show c' for details. |
| 221 | + |
| 222 | +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. |
| 223 | + |
| 224 | +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. |
| 225 | + |
| 226 | +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. |
Index: trunk/tools/wikiportrait/doc/db.sql |
— | — | @@ -0,0 +1,147 @@ |
| 2 | +-- phpMyAdmin SQL Dump |
| 3 | +-- version 2.11.9.4 |
| 4 | +-- http://www.phpmyadmin.net |
| 5 | +-- |
| 6 | +-- Host: mysql.vrijemedia.org |
| 7 | +-- Generation Time: Nov 08, 2009 at 01:35 AM |
| 8 | +-- Server version: 5.0.67 |
| 9 | +-- PHP Version: 5.2.9 |
| 10 | + |
| 11 | +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
| 12 | + |
| 13 | +-- |
| 14 | +-- Database: `uploadwizard` |
| 15 | +-- |
| 16 | + |
| 17 | +-- -------------------------------------------------------- |
| 18 | + |
| 19 | +-- |
| 20 | +-- Table structure for table `images` |
| 21 | +-- |
| 22 | + |
| 23 | +CREATE TABLE IF NOT EXISTS `images` ( |
| 24 | + `id` int(11) NOT NULL auto_increment, |
| 25 | + `title` varchar(255) NOT NULL default '', |
| 26 | + `source` varchar(255) NOT NULL, |
| 27 | + `name` varchar(255) NOT NULL, |
| 28 | + `email` varchar(255) NOT NULL, |
| 29 | + `ip` varchar(255) NOT NULL, |
| 30 | + `date` varchar(255) NOT NULL, |
| 31 | + `license` varchar(255) NOT NULL, |
| 32 | + `description` text NOT NULL, |
| 33 | + `filename` text NOT NULL, |
| 34 | + `timestamp` varchar(255) NOT NULL default '', |
| 35 | + PRIMARY KEY (`id`) |
| 36 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=760 ; |
| 37 | + |
| 38 | +-- -------------------------------------------------------- |
| 39 | + |
| 40 | +-- |
| 41 | +-- Table structure for table `messages` |
| 42 | +-- |
| 43 | + |
| 44 | +CREATE TABLE IF NOT EXISTS `messages` ( |
| 45 | + `id` int(11) NOT NULL auto_increment, |
| 46 | + `language` varchar(3) NOT NULL, |
| 47 | + `constant` varchar(255) NOT NULL, |
| 48 | + `message` text NOT NULL, |
| 49 | + `explanation` text NOT NULL, |
| 50 | + PRIMARY KEY (`id`) |
| 51 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=95 ; |
| 52 | + |
| 53 | +-- |
| 54 | +-- Dumping data for table `messages` |
| 55 | +-- |
| 56 | + |
| 57 | +INSERT INTO `messages` (`id`, `language`, `constant`, `message`, `explanation`) VALUES |
| 58 | +(1, 'nl', 'WELCOME_MESSAGE', 'Welkom bij de uploadwizard. Deze wizard zal u helpen bij het maken van een keuze voor een licentie.', ''), |
| 59 | +(2, 'nl', 'CLICK_TO_BEGIN', 'Klik hier om te beginnen', ''), |
| 60 | +(3, 'nl', 'YES', 'Ja', ''), |
| 61 | +(4, 'nl', 'NO', 'Nee', ''), |
| 62 | +(5, 'nl', 'EMAIL_PERMISSION', 'info-nl@wikimedia.org', ''), |
| 63 | +(6, 'nl', 'DO_NOT_UPLOAD', 'Niet uploaden', ''), |
| 64 | +(7, 'nl', 'UPLOAD_PD', 'Uploaden als publiek domein', ''), |
| 65 | +(8, 'nl', 'UPLOAD_LICENSE', 'Uploaden onder een van de <a href="?question=licenses">aangegeven licenties</a>.', ''), |
| 66 | +(9, 'nl', 'UPLOAD_LICENSE_EMAIL', '1. Uploaden onder een van de <a href="javascript:popUp(GE_WIZARD + ''?question=licenses'')">aangegeven licenties</a> <br />2. Toestemming wordt via gemaild naar de vrijwilligers van Wikipedia.', 'Om er zeker van te zijn dat er later geen problemen ontstaan met betrekking tot de auteursrechten, is het belangrijk om de toestemming goed vast te leggen. Via deze website wordt uw toestemming doorgestuurd naar de vrijwilligers van Wikipedia. De toestemming wordt dan opgeslagen in de (digitale) "kluis", en is dan voor een beperkt aantal Wikipedia-medewerkers zichtbaar. '), |
| 67 | +(76, 'nl', 'EMPTY_VALUE', 'Deze waardes zijn niet ingevuld: ', ''), |
| 68 | +(77, 'nl', 'INVALID_EMAIL', 'U heeft een ongeldig e-mail adres ingevuld', ''), |
| 69 | +(10, 'nl', 'SUBJECT_PROTECTED', 'Is het hoofdonderwerp van de foto mogelijk auteursrechtelijk beschermd? \r\n (Bijvoorbeeld: hoes van CD of DVD, logo, reclamebord)', 'Als u een foto maakt, heeft u zelf de auteursrechten van die foto. Als u echter een foto maakt van iets anders, waarop ook auteursrechten rusten, dan mag u uw foto toch niet vrij verspreiden. Dat kan bijvoorbeeld zo zijn bij foto''s van een CD-hoes, DVD-hoes, logo, reclamebord of (film)poster. Het uploaden van uw foto betekent dan dat u de auteursrechten schendt op die CD-hoes enz.'), |
| 70 | +(15, 'nl', 'CREATOR_PERMISSION', 'Geeft de maker toestemming voor onbeperkte verspreiding, bewerking en commercieel gebruik van de foto?', 'De auteursrechten van de foto liggen normaal gesproken bij degene die de foto gemaakt heeft. De maker moet daarom toestemming geven om de foto onbeperkt te gebruiken. \r\n\r\n''Onbeperkt'' betekent dat anderen zonder toestemming van de maker de foto mogen gebruiken, zonder dat zij aan de maker hoeven te melden dat ze de foto gebruiken. Wel moet de ander de maker als auteur noemen (tenzij de maker aangegeven heeft dat dat niet nodig is). ''Onbeperkt'' betekent dus ook dat de foto voor een commercieel doel gebruikt kan worden, bijvoorbeeld in een tijdschrift, website of reclamefolder.'), |
| 71 | +(16, 'nl', 'WORK_IN_EMPLOYMENT', 'Heeft u de foto gemaakt in opdracht van een ander?', 'Als een ander u opdracht heeft gegeven om foto(''s) te maken, dan heeft die ander (ook) auteursrechten op de foto. Dat kan bijvoorbeeld uw werkgever zijn, of de organisatie of persoon waar u (freelance) een opdracht doet. Als u een foto maakt in opdracht van uw werkgever, dan heeft uw werkgever (bijna) altijd auteursrechten op de foto. Als u de foto heeft gemaakt voor een andere opdrachtgever, dan ligt het eraan wat u afgesproken heeft over de auteursrechten. Als de auteursrechten (deels) bij uw werkgever/opdrachtgever liggen, mag u de foto niet zomaar uploaden, ook al heeft u de foto zelf gemaakt. '), |
| 72 | +(13, 'nl', 'OWN_WORK', 'Heeft u de foto zelf gemaakt?', ''), |
| 73 | +(14, 'nl', 'CREATOR_PD', 'Is de maker meer dan 70 jaar geleden overleden?', 'De auteursrechten van de foto liggen normaal gesproken bij degene die de foto gemaakt heeft. Deze auteursrechten verlopen na verloop van tijd. De foto komt dan in het "publieke domein" (public domain) terecht. Hoe lang dat duurt verschilt van land tot land. Omdat Wikipedia een internationaal project is gaan we uit van de strengste wetgeving: de maker van de foto moet meer dan 70 jaar geleden overleden zijn voordat de foto vrij te gebruiken is.'), |
| 74 | +(17, 'nl', 'OWN_PERMISSION', 'Geeft u toestemming voor onbeperkte verspreiding, bewerking en commercieel gebruik van de foto?', '''Onbeperkt'' betekent dat anderen zonder uw toestemming uw foto mogen gebruiken, zonder dat zij aan u hoeven te melden dat ze de foto gebruiken. Wel moet de ander u als auteur noemen (tenzij u zelf aangegeven hebt dat dat niet nodig is). ''Onbeperkt'' betekent dus ook dat uw foto voor een commercieel doel gebruikt kan worden, bijvoorbeeld in een tijdschrift, website of reclamefolder.'), |
| 75 | +(18, 'nl', 'EMPLOYER_PERMISSION', 'Geeft de opdrachtgever toestemming voor onbeperkte verspreiding, bewerking en commercieel gebruik van de foto?', 'Als u de foto in opdracht van een ander hebt gemaakt, heeft u toestemming van die ander nodig om de foto te uploaden. Dit kunt u van tevoren hebben afgesproken (u heeft dan met de opdrachtgever afgesproken dat de auteursrechten volledig bij u liggen, en niet bij de opdrachtgever), maar u kunt ook achteraf toestemming vragen.\r\n\r\n''Onbeperkt'' betekent dat anderen zonder toestemming van de opdrachtgever uw foto mogen gebruiken, zonder dat zij aan u of de opdrachtgever hoeven te melden dat ze de foto gebruiken. Wel moet de ander u en/of de opdrachtgever als auteur noemen (tenzij u en de opdrachtgever aangegeven hebben dat dat niet nodig is). ''Onbeperkt'' betekent dus ook dat de foto voor een commercieel doel gebruikt kan worden, bijvoorbeeld in een tijdschrift, website of reclamefolder.'), |
| 76 | +(78, 'nl', 'INVALID_EMAIL_PROVIDER', 'U maakt gebruik van een e-mail provider die niet is toegestaan: ', ''), |
| 77 | +(19, 'nl', 'ADVICE_WIZARD', 'Het advies van de uploadwizard is:', ''), |
| 78 | +(20, 'nl', 'START_AGAIN', 'Terug naar het begin', ''), |
| 79 | +(21, 'nl', 'TITLE', 'Wikiportret - Stel uw foto''s ter beschikking', ''), |
| 80 | +(22, 'nl', 'EXPLANATION', 'Uitleg\r\n', ''), |
| 81 | +(23, 'nl', 'UPLOAD_LINK', 'Upload uw foto', ''), |
| 82 | +(25, 'en', 'WELCOME_MESSAGE', 'Welcome to the uploadwizard. This wizard will help you making a choice for a license.', ''), |
| 83 | +(26, 'en', 'CLICK_TO_BEGIN', 'Click here to start', ''), |
| 84 | +(27, 'en', 'YES', 'Yes', ''), |
| 85 | +(28, 'en', 'NO', 'No', ''), |
| 86 | +(29, 'en', 'EMAIL_PERMISSION', 'permissions@wikimedia.org', ''), |
| 87 | +(30, 'en', 'DO_NOT_UPLOAD', 'Don''t upload', ''), |
| 88 | +(31, 'en', 'UPLOAD_PD', 'Upload as public domain', ''), |
| 89 | +(32, 'en', 'UPLOAD_LICENSE', 'Upload onder one of the <a href="?question=licenses">recommended licenses</a>.', ''), |
| 90 | +(33, 'en', 'UPLOAD_LICENSE_EMAIL', '1. Upload onder one of the <a href="?question=licenses">recommended licenses</a>.<br />\r\n2. Permission (including the name of the image and your name) to <a href="mailto:permissions@wikimedia.org">info-nl@wikimedia.org</a>', 'Om er zeker van te zijn dat er later geen problemen ontstaan met betrekking tot de auteursrechten, is het belangrijk om de toestemming goed vast te leggen. Dit doe je door de toestemming (een e-mail van degene die toestemming moet geven of een ingescande overeenkomst waarin de toestemming verleend wordt) te mailen naar info-nl@wikimedia.org. De toestemming wordt dan opgeslagen in de (digitale) "kluis", en is dan voor een beperkt aantal Wikimedia-medewerkers zichtbaar. '), |
| 91 | +(34, 'en', 'SUBJECT_PROTECTED', 'Is the main subject of the photograph possibly protected by copyright? (For example: cover of a cd or dvd, logo, advertisement)', 'Als je een foto maakt, heb je zelf de auteursrechten van die foto. Als je echter een foto maakt van iets anders, waarop ook auteursrechten rusten, dan mag je jouw foto toch niet vrij verspreiden. Dat kan bijvoorbeeld zo zijn bij foto''s van een CD-hoes, DVD-hoes, logo, reclamebord of (film)poster. Het uploaden van jouw foto betekent dan dat je de auteursrechten schendt op die CD-hoes enz.'), |
| 92 | +(35, 'en', 'CREATOR_PERMISSION', 'Does the creator give permission for unlimited distribution, modification and commercial use of the image?', 'De auteursrechten van de afbeelding liggen normaalgesproken bij degene die de afbeelding gemaakt heeft. De maker moet daarom toestemming geven om de afbeelding onbeperkt te gebruiken. \r\n\r\n''Onbeperkt'' betekent dat anderen zonder toestemming van de maker de afbeelding mogen gebruiken, zonder dat zij aan de maker hoeven te melden dat ze de afbeelding gebruiken. Wel moet de ander de maker als auteur noemen (tenzij de maker aangegeven heeft dat dat niet nodig is). ''Onbeperkt'' betekent dus ook dat de afbeelding voor een commercieel doel gebruikt kan worden, bijvoorbeeld in een tijdschrift, website of reclamefolder.\r\n'), |
| 93 | +(36, 'en', 'WORK_IN_EMPLOYMENT', 'Did you make the image by the order of somebody else?', 'Als een ander jou opdracht heeft gegeven om afbeelding(en) te maken, dan heeft die ander (ook) auteursrechten op de afbeelding. Dat kan bijvoorbeeld jouw werkgever zijn, of de organisatie of persoon waar je (freelance) een opdracht doet. Als je een afbeelding maakt in opdracht van jouw werkgever, dan heeft jouw werkgever (bijna) altijd auteursrechten op de afbeelding. Als je de afbeelding hebt gemaakt voor een andere opdrachtgever, dan ligt het eraan wat je afgesproken hebt over de auteursrechten. Als de auteursrechten (deels) bij jouw werkgever/opdrachtgever liggen, mag je de afbeelding niet zomaar uploaden, ook al heb je de afbeelding zelf gemaakt. '), |
| 94 | +(37, 'en', 'OWN_WORK', 'Did you make the image yourself?', ''), |
| 95 | +(38, 'en', 'CREATOR_PD', 'Has the creator died more than 70 years ago?', 'De auteursrechten van de afbeelding liggen normaalgesproken bij degene die de afbeelding gemaakt heeft. Deze auteursrechten verlopen na verloop van tijd. De afbeelding komt dan in het "publieke domein" (public domain) terecht. Hoe lang dat duurt verschilt van land tot land. Omdat Wikipedia een internationaal project is gaan we uit van de strengste wetgeving: de maker van de afbeelding moet meer dan 70 jaar geleden overleden zijn voordat de afbeelding vrij te gebruiken is.'), |
| 96 | +(39, 'en', 'OWN_PERMISSION', 'Do you give permission for unlimited distribution, modification and commercial use of the image?', '''Onbeperkt'' betekent dat anderen zonder jouw toestemming jouw afbeelding mogen gebruiken, zonder dat zij aan jou hoeven te melden dat ze de afbeelding gebruiken. Wel moet de ander jou als auteur noemen (tenzij je zelf aangegeven hebt dat dat niet nodig is). ''Onbeperkt'' betekent dus ook dat jouw afbeelding voor een commercieel doel gebruikt kan worden, bijvoorbeeld in een tijdschrift, website of reclamefolder.'), |
| 97 | +(40, 'en', 'EMPLOYER_PERMISSION', 'Does the creator give permission for unlimited distribution, modification and commercial use of the image?', 'Als je de afbeelding in opdracht van een ander hebt gemaakt, heb je toestemming van die ander nodig om de afbeelding te uploaden. Dit kun je vantevoren hebben afgesproken (je hebt dan met de opdrachtgever afgesproken dat de auteursrechten volledig bij jou liggen, en niet bij de opdrachtgever), maar je kunt ook achteraf toestemming vragen.\r\n\r\n''Onbeperkt'' betekent dat anderen zonder toestemming van de opdrachtgever jouw afbeelding mogen gebruiken, zonder dat zij aan jou of de opdrachtgever hoeven te melden dat ze de afbeelding gebruiken. Wel moet de ander jou en/of de opdrachtgever als auteur noemen (tenzij jij en de opdrachtgever aangegeven hebben dat dat niet nodig is). ''Onbeperkt'' betekent dus ook dat de afbeelding voor een commercieel doel gebruikt kan worden, bijvoorbeeld in een tijdschrift, website of reclamefolder.\r\n'), |
| 98 | +(41, 'en', 'ADVICE_WIZARD', 'The advice of the uploadwizard is:', ''), |
| 99 | +(42, 'en', 'START_AGAIN', 'Back to the start', ''), |
| 100 | +(43, 'en', 'TITLE', 'Wikiportrait - Make your photographs available', ''), |
| 101 | +(44, 'en', 'EXPLANATION', 'Explanation\r\n', ''), |
| 102 | +(45, 'en', 'UPLOAD_LINK', 'Upload your image', ''), |
| 103 | +(46, 'nl', 'PHOTO_UPLOADED', 'Deze foto is succesvol geupload:', ''), |
| 104 | +(47, 'nl', 'MAIL_SENT', 'De volgende e-mail is verzonden:', ''), |
| 105 | +(48, 'nl', 'THANKS_UPLOAD', 'Bedankt voor uw upload!', ''), |
| 106 | +(49, 'nl', 'UPLOAD_ANOTHER_IMAGE', 'Upload nog een bestand.', ''), |
| 107 | +(50, 'nl', 'LICENSE_EMAIL', 'Ik, (uw naam)....., wonende ....... te ........ stel deze afbeelding(en) van ........., gemaakt op ........ ter beschikking onder een multi-licentie, dat wil zeggen onder zowel de GFDL als Creative Commons CC-BY-SA (http://creativecommons.org/licenses/by-sa/2.5/) licentie. Ik ben de maker van deze foto''s en/of beschik over de auteursrechten. De eventuele geportretteerden hebben geen bezwaar tegen publicatie onder genoemde licenties. Ook mijn eventuele opdrachtgever geeft toestemming. Mijn naam dient altijd als rechthebbende bij de foto''s te worden vermeld, zoals de GFDL en de Creative Commons licenties voorschrijven".', ''), |
| 108 | +(51, 'en', 'UNKNOWN_ERROR', 'An unknown error has occured, try it again.', ''), |
| 109 | +(52, 'nl', 'UNKNOWN_ERROR', 'Er is een onbekende fout opgetreden. Probeer het nogmaals.', ''), |
| 110 | +(53, 'nl', 'UPLOAD_FAILED', 'Fout bij het uploaden', ''), |
| 111 | +(54, 'en', 'UPLOAD_FAILED', 'Upload failed', ''), |
| 112 | +(55, 'en', 'UPLOAD_SUCCESSFUL', 'Upload successful', ''), |
| 113 | +(56, 'nl', 'UPLOAD_SUCCESSFUL', 'Uploaden geslaagd', ''), |
| 114 | +(75, 'en', 'WAIT_FOR_UPLOAD', 'One moment please, your image is being uploaded. This can take several minutes, depending on the size of your image.', ''), |
| 115 | +(79, 'nl', 'DISCLAIMER_NOT_AGREED', 'U bent niet akkoord gegaan met de voorwaarden (het vinkje boven de ''Upload mijn foto'' knop)', ''), |
| 116 | +(72, 'nl', 'TRY_AGAIN_LATER', 'Probeer het later nog eens.', ''), |
| 117 | +(73, 'en', 'TRY_AGAIN_LATER', 'Try again later.', ''), |
| 118 | +(74, 'nl', 'WAIT_FOR_UPLOAD', 'Een moment geduld, uw afbeelding wordt geupload. Dit kan enkele minuten duren, afhankelijk van de grootte van uw afbeelding.', ''), |
| 119 | +(57, 'nl', 'CHOOSE_LANGUAGE', 'Kies een taal', ''), |
| 120 | +(58, 'en', 'CHOOSE_LANGUAGE', 'Choose language', ''), |
| 121 | +(59, 'nl', 'GO_BACK_CHANGE_VALUES', 'Ga terug en verander de waardes', ''), |
| 122 | +(60, 'en', 'GO_BACK_CHANGE_VALUES', 'Go back and change the values', ''), |
| 123 | +(61, 'nl', 'FORM_TITLE', 'Titel', ''), |
| 124 | +(62, 'nl', 'FORM_SOURCE', 'Bron / auteur', ''), |
| 125 | +(63, 'nl', 'FORM_DISCLAIMER_AGREE', 'Akkoord met voorwaarden', ''), |
| 126 | +(64, 'nl', 'UPLOAD_ANOTHER_IMAGE_WARNING', 'Nota bene: deze optie alleen gebruiken als het volgende bestand wat u wilt uploaden dezelfde licentievoorwaarden heeft als uw vorige afbeelding! Als u dit niet zeker weet, ga dan terug naar het begin en doe de uploadwizard overnieuw!', ''), |
| 127 | +(65, 'en', 'UPLOAD_ANOTHER_IMAGE_WARNING', 'Attention: only this option when the next image you want to upload has the same licensing conditions as your previous image! If you are not sure, start the uploadwizard again.', ''), |
| 128 | +(66, 'nl', 'FORM_NAME', 'Uw naam', ''), |
| 129 | +(67, 'nl', 'FORM_EMAIL', 'E-mail', ''), |
| 130 | +(68, 'en', 'FORM_NAME', 'Your name', ''), |
| 131 | +(69, 'en', 'FORM_EMAIL', 'E-mail', ''), |
| 132 | +(70, 'nl', 'UPLOAD_SUCCESSFUL_MESSAGE', 'Uw afbeelding is succesvol geupload. Uw e-mail met foto is gestuurd naar de vrijwilligers van Wikimedia. Een van hen zal u een e-mail bericht sturen op het opgegeven adres, om te controleren of u werkelijk degene bent die rechthebbende is van de foto. Na ontvangst van uw bevestiging zal de foto op de Wikimedia projecten worden neergezet. Ook daarvan zal u bericht ontvangen.', ''), |
| 133 | +(71, 'en', 'UPLOAD_SUCCESSFUL_MESSAGE', 'Your upload was successful. Your e-mail with photograph has been sent to the volunteers of Wikimedia. One of them will send an e-mail to the adress you provided, to make sure that you are truely the right owner of the photograph. After you have given an ''ok'' the photo will appear on the Wikimedia projects. You will recieve an e-mail about that as well.', ''), |
| 134 | +(80, 'nl', 'INVALID_FILETYPE', 'Het bestand wat u probeert up te loaden is geen geldige afbeelding: wij accepteren alleen .jpeg, .jpg, .png en .gif bestanden', ''), |
| 135 | +(81, 'nl', 'ACTION_GOOD', 'Cool! Genereer een bevestingstekst om te mailen vanaf OTRS', ''), |
| 136 | +(82, 'nl', 'ACTION_GOOGLE', 'Komt van Google, automatische afwijzing naar de uploader', ''), |
| 137 | +(83, 'nl', 'ACTION_BAD_QUALITY', 'Slechte kwaliteit, automatische afwijzing naar uploader', ''), |
| 138 | +(84, 'nl', 'ACTION_INVALID_EMAIL', 'E-mail adres onwaarschijnlijk, automatische afwijzing naar uploader', ''), |
| 139 | +(85, 'nl', 'RATE_THIS_IMAGE', 'Beoordeel deze afbeelding', ''), |
| 140 | +(86, 'nl', 'ACTION_FOR_IMAGE', 'Wat doen we daar mee?', ''), |
| 141 | +(87, 'nl', 'IMAGE_ACTION_DONE', 'Deze afbeelding is al behandeld!', ''), |
| 142 | +(88, 'nl', 'RESPONSE_ACTION_GOOGLE', 'Bedankt voor de moeite een afbeelding toe te voegen via wikiportret.nl. De afbeelding die u heeft toegevoegd is volgens mij niet vrij (het is niet uw werk of de afbeelding is niet vrijgegeven door de auteur). Ik zal de afbeelding dus ook niet aan Wikipedia toevoegen. Mocht u toch toestemming hebben de afbeelding toe te voegen, reageer dan op deze mail, eventueel met meer informatie over de afbeelding. Ik zal de afbeelding dan opnieuw beoordelen.', ''), |
| 143 | +(92, 'nl', 'RESPONSE_HEADER', 'Geachte %s,\r\n\r\n', ''), |
| 144 | +(89, 'nl', 'RESPONSE_DISCLAIMER', 'VOORBEHOUD: Wikipedia is het werk van vrijwilligers die werken zonder formeel kader. Dit bericht is verzonden door een ervaren vrijwilliger van de Nederlandstalige Wikipedia uit eigen naam en naar best vermogen. Er is geen enkele garantie over juistheid van deze informatie. De schrijver van dit bericht kan officieel niet namens de Wikimedia Foundation en/of haar projecten spreken.', ''), |
| 145 | +(90, 'nl', 'RESPONSE_ACTION_INVALID_EMAIL', 'Hartelijk dank voor uw upload van uw foto. Het is ons echter niet duidelijk of u de betreffende foto door u zelf is gemaakt, of dat u er de rechten van bezit. Wij kunnen alleen foto''s accepteren waar u ook de rechten op bezit. Daarnaast accepteren wij geen e-mails van ''gratis'' adressen (zoals onder andere Yahoo, Hotmail en Gmail), omdat deze fraudegevoelig zijn. Mocht u wel de rechthebbende zijn van deze foto, stuurt u dan nogmaals de foto vanaf een officieel adres.', ''), |
| 146 | +(91, 'nl', 'RESPONSE_FOOTER', '\r\n\r\nMet vriendelijke groet,\r\nhet Wikiportret contactpunt\r\n\r\n', ''), |
| 147 | +(93, 'nl', 'RESPONSE_ACTION_BAD_QUALITY', 'Hartelijk dank voor uw upload van uw foto. Helaas is de foto die u geupload heeft van een erg slechte kwaliteit en daarom niet bruikbaar: mocht u echter nog andere afbeeldingen in uw bezit hebben die wel geschikt zijn voor Wikiportret, wordt u van harte uitgenodigd om deze als vervanging op te sturen.', ''), |
| 148 | +(94, 'nl', 'RESPONSE_ACTION_CONFIRMATION', 'Iemand heeft een foto van %s upgeload op http://www.wikiportret.nl, een project van Wikimedia Nederland. Wij willen graag van u weten of u de rechthebbende van deze foto bent en of u ook akkoord gaat met de voorwaarden. Deze voorwaarden houden in dat u de foto heeft vrijgegeven onder de licentie CC-BY/GFDL; de licentievoorwaarden zijn ondermeer dat u akkoord gaat dat deze foto bewerkt, verspreid en eventueel commercieel gebruikt mag worden.\r\n\r\nAls u hiermee akkoord gaat reageer dan op deze e-mail met ''Ja, ik ga akkoord met de voorwaarden''. Mocht u *niet* degene zijn die de foto heeft geupload, laat ons dat dan ook weten. Zodra wij uw bevestiging hebben ontvangen zullen wij de foto plaatsen bij het relevante artikel en u daarvan op de hoogte stellen.', ''); |
Index: trunk/tools/wikiportrait/doc/readme.txt |
— | — | @@ -0,0 +1,38 @@ |
| 2 | +Wikiportrait - upload, tag and manage uploads of media with a free license, specific for Wikimedia projects |
| 3 | +Copyright (C) 2008-2009 Hay Kranen (hay@bykr.org) / [[User:Husky]] |
| 4 | +Originally developed for Wikimedia Nederland: <http://nl.wikimedia.org> |
| 5 | + |
| 6 | +For more information: |
| 7 | +* http://www.wikiportrait.org |
| 8 | +* http://www.wikiportret.nl |
| 9 | +* http://meta.wikimedia.org/wiki/Wikiportrait |
| 10 | + |
| 11 | +== License == |
| 12 | + |
| 13 | +This program is free software: you can redistribute it and/or modify |
| 14 | +it under the terms of the GNU General Public License as published by |
| 15 | +the Free Software Foundation, either version 3 of the License, or |
| 16 | +(at your option) any later version. |
| 17 | + |
| 18 | +This program is distributed in the hope that it will be useful, |
| 19 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | +GNU General Public License for more details. |
| 22 | + |
| 23 | +You should have received a copy of the GNU General Public License |
| 24 | +along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 25 | + |
| 26 | +See doc/gpl.txt for the full GPLv3 license |
| 27 | + |
| 28 | +== Contributions == |
| 29 | +This software includes (pieces of) the following programs: |
| 30 | + |
| 31 | +* TimThumb script created by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks |
| 32 | + http://code.google.com/p/timthumb/ |
| 33 | + released under the MIT License: http://www.opensource.org/licenses/mit-license.php |
| 34 | + |
| 35 | +* jQuery JavaScript Library v1.3.2 |
| 36 | + http://jquery.com/ |
| 37 | + Copyright (c) 2009 John Resig |
| 38 | + Dual licensed under the MIT and GPL licenses. |
| 39 | + http://docs.jquery.com/License |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/images/dummyupload.jpg |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/dummyupload.jpg |
___________________________________________________________________ |
Name: svn:mime-type |
1 | 40 | + application/octet-stream |
Name: svn:executable |
2 | 41 | + * |
Index: trunk/tools/wikiportrait/images/bg_btn_hover.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/bg_btn_hover.png |
___________________________________________________________________ |
Name: svn:mime-type |
3 | 42 | + application/octet-stream |
Name: svn:executable |
4 | 43 | + * |
Index: trunk/tools/wikiportrait/images/loading.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/loading.gif |
___________________________________________________________________ |
Name: svn:mime-type |
5 | 44 | + application/octet-stream |
Index: trunk/tools/wikiportrait/images/wp_logo_nl.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/wp_logo_nl.png |
___________________________________________________________________ |
Name: svn:mime-type |
6 | 45 | + application/octet-stream |
Name: svn:executable |
7 | 46 | + * |
Index: trunk/tools/wikiportrait/images/icon_gnu.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/icon_gnu.png |
___________________________________________________________________ |
Name: svn:mime-type |
8 | 47 | + application/octet-stream |
Name: svn:executable |
9 | 48 | + * |
Index: trunk/tools/wikiportrait/images/bg_caution.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/bg_caution.png |
___________________________________________________________________ |
Name: svn:mime-type |
10 | 49 | + application/octet-stream |
Name: svn:executable |
11 | 50 | + * |
Index: trunk/tools/wikiportrait/images/background.jpg |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/background.jpg |
___________________________________________________________________ |
Name: svn:mime-type |
12 | 51 | + application/octet-stream |
Name: svn:executable |
13 | 52 | + * |
Index: trunk/tools/wikiportrait/images/home_advertisement.jpg |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/home_advertisement.jpg |
___________________________________________________________________ |
Name: svn:mime-type |
14 | 53 | + application/octet-stream |
Index: trunk/tools/wikiportrait/images/question_mark.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/question_mark.png |
___________________________________________________________________ |
Name: svn:mime-type |
15 | 54 | + application/octet-stream |
Index: trunk/tools/wikiportrait/images/icon_ccsa.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/icon_ccsa.png |
___________________________________________________________________ |
Name: svn:mime-type |
16 | 55 | + application/octet-stream |
Name: svn:executable |
17 | 56 | + * |
Index: trunk/tools/wikiportrait/images/logo_en.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/logo_en.png |
___________________________________________________________________ |
Name: svn:mime-type |
18 | 57 | + application/octet-stream |
Index: trunk/tools/wikiportrait/images/bg_action.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/bg_action.png |
___________________________________________________________________ |
Name: svn:mime-type |
19 | 58 | + application/octet-stream |
Name: svn:executable |
20 | 59 | + * |
Index: trunk/tools/wikiportrait/images/icon_creativecommons.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/icon_creativecommons.gif |
___________________________________________________________________ |
Name: svn:mime-type |
21 | 60 | + application/octet-stream |
Name: svn:executable |
22 | 61 | + * |
Index: trunk/tools/wikiportrait/images/wp_logo_en.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/wp_logo_en.png |
___________________________________________________________________ |
Name: svn:mime-type |
23 | 62 | + application/octet-stream |
Name: svn:executable |
24 | 63 | + * |
Index: trunk/tools/wikiportrait/images/icon_ccby.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/icon_ccby.png |
___________________________________________________________________ |
Name: svn:mime-type |
25 | 64 | + application/octet-stream |
Name: svn:executable |
26 | 65 | + * |
Index: trunk/tools/wikiportrait/images/logo_nl.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/logo_nl.png |
___________________________________________________________________ |
Name: svn:mime-type |
27 | 66 | + application/octet-stream |
Index: trunk/tools/wikiportrait/images/bg_explanation.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/bg_explanation.png |
___________________________________________________________________ |
Name: svn:mime-type |
28 | 67 | + application/octet-stream |
Name: svn:executable |
29 | 68 | + * |
Index: trunk/tools/wikiportrait/images/commons_logo.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/commons_logo.png |
___________________________________________________________________ |
Name: svn:mime-type |
30 | 69 | + application/octet-stream |
Index: trunk/tools/wikiportrait/images/bg_btn.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/tools/wikiportrait/images/bg_btn.png |
___________________________________________________________________ |
Name: svn:mime-type |
31 | 70 | + application/octet-stream |
Name: svn:executable |
32 | 71 | + * |
Index: trunk/tools/wikiportrait/javascript/lib_formvalidation.js |
— | — | @@ -0,0 +1,105 @@ |
| 2 | +// This library is used for form validaton |
| 3 | +function FormValidation(form) { |
| 4 | + // public variables |
| 5 | + var result = {} |
| 6 | + result.validated = false; |
| 7 | + result.error = ''; |
| 8 | + |
| 9 | + function hasRequiredValues(requiredValues) { |
| 10 | + var emptyValues = []; |
| 11 | + |
| 12 | + for (var i in requiredValues) { |
| 13 | + var requiredValue = requiredValues[i]; |
| 14 | + if (form[requiredValue].value == "") { |
| 15 | + // form empty, add to the list |
| 16 | + emptyValues.push(requiredValue); |
| 17 | + } else { |
| 18 | + // remove any classes if available |
| 19 | + $("#" + requiredValue).removeClass("warning"); |
| 20 | + } |
| 21 | + } |
| 22 | + |
| 23 | + if (emptyValues.length > 0) { // there are empty values |
| 24 | + // first generate the error string |
| 25 | + for (var i in emptyValues) { |
| 26 | + // Get the correct name for this field from the <label> assigned to it |
| 27 | + result.error += $("label[for=" + emptyValues[i] + "]").text() + ", "; |
| 28 | + |
| 29 | + // also light up the specific fields |
| 30 | + $("#" + emptyValues[i]).addClass("warning"); |
| 31 | + } |
| 32 | + // we cut off the last 2 characters from the string to prevent the ', ' at the end of the string |
| 33 | + result.error = messages.EMPTY_VALUE + result.error.substr(0, (result.error.length - 2)); |
| 34 | + return false; |
| 35 | + } else { |
| 36 | + // no empty values, so this form has all the required values |
| 37 | + return true; |
| 38 | + } |
| 39 | + } |
| 40 | + |
| 41 | + function hasValidEmail() { |
| 42 | + var emailRegEx =/^[\w][\w\.\-]*@(?:[a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,4}$/ |
| 43 | + |
| 44 | + if (form.email.value.search(emailRegEx) == -1) { |
| 45 | + // email not valid, change the error message |
| 46 | + result.error = messages.INVALID_EMAIL; |
| 47 | + $("#email").addClass("warning"); |
| 48 | + return false; |
| 49 | + } else { |
| 50 | + $("#email").removeClass("warning"); |
| 51 | + return true; |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | + function hasGoodEmailProvider(providers) { |
| 56 | + // searches the email string for any occurences of unwanted e-mail providers (e.g. hotmail, yahoo, gmail) |
| 57 | + for (var i in providers) { |
| 58 | + var provider = providers[i]; |
| 59 | + if (form.email.value.toLowerCase().indexOf(provider) != -1) { |
| 60 | + // bad email provider |
| 61 | + result.error = messages.INVALID_EMAIL_PROVIDER + provider; |
| 62 | + $("#email").addClass("warning"); |
| 63 | + return false; |
| 64 | + } |
| 65 | + } |
| 66 | + $("#email").removeClass("warning"); |
| 67 | + return true; |
| 68 | + } |
| 69 | + |
| 70 | + function hasCheckedDisclaimer() { |
| 71 | + if (form. disclaimerAgree.checked) { |
| 72 | + $("#disclaimerAgreeBox").removeClass("warning"); |
| 73 | + return true; |
| 74 | + } else { |
| 75 | + result.error = messages.DISCLAIMER_NOT_AGREED; |
| 76 | + $("#disclaimerAgreeBox").addClass("warning"); |
| 77 | + return false; |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + function hasValidFiletype(filetypes) { |
| 82 | + for (var i in filetypes) { |
| 83 | + var filetype = filetypes[i]; |
| 84 | + if (form.file.value.toLowerCase().indexOf(filetype) != -1) { |
| 85 | + $("#file").removeClass("warning"); |
| 86 | + return true; |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + // no valid filetypes found |
| 91 | + result.error = messages.INVALID_FILETYPE; |
| 92 | + $("#file").addClass("warning"); |
| 93 | + return false; |
| 94 | + } |
| 95 | +
|
| 96 | + // The whole routine |
| 97 | + if (hasRequiredValues(["file", "title", "source", "name", "email"]) == false) return result; |
| 98 | + if (hasValidEmail() == false) return result; |
| 99 | + if (hasGoodEmailProvider(['hotmail.com', 'gmail.com', 'yahoo.com', 'live.com', 'live.nl', 'yahoo.ca', 'msn.com']) == false) return result; |
| 100 | + if (hasCheckedDisclaimer() == false) return result; |
| 101 | + if (hasValidFiletype(['.png', '.jpg', '.jpeg', '.gif']) == false) return result; |
| 102 | + |
| 103 | + // all checks passed, upload the photograph |
| 104 | + result.validated = true; |
| 105 | + return result; |
| 106 | +} |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/javascript/jquery.js |
— | — | @@ -0,0 +1,19 @@ |
| 2 | +/* |
| 3 | + * jQuery JavaScript Library v1.3.2 |
| 4 | + * http://jquery.com/ |
| 5 | + * |
| 6 | + * Copyright (c) 2009 John Resig |
| 7 | + * Dual licensed under the MIT and GPL licenses. |
| 8 | + * http://docs.jquery.com/License |
| 9 | + * |
| 10 | + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) |
| 11 | + * Revision: 6246 |
| 12 | + */ |
| 13 | +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); |
| 14 | +/* |
| 15 | + * Sizzle CSS Selector Engine - v0.9.3 |
| 16 | + * Copyright 2009, The Dojo Foundation |
| 17 | + * Released under the MIT, BSD, and GPL Licenses. |
| 18 | + * More information: http://sizzlejs.com/ |
| 19 | + */ |
| 20 | +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="https://www.mediawiki.org/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/javascript/jquery.js |
___________________________________________________________________ |
Name: svn:executable |
1 | 21 | + * |
Index: trunk/tools/wikiportrait/javascript/lib_js.js |
— | — | @@ -0,0 +1,59 @@ |
| 2 | +// This is the main library used for the website |
| 3 | +
|
| 4 | +$(document).ready(function() { |
| 5 | + $(".jshide").hide(); |
| 6 | + |
| 7 | + $('#goback').click(function() { |
| 8 | + history.go(-1); |
| 9 | + }); |
| 10 | + |
| 11 | + $("#btnUpload").click(function() { |
| 12 | + var validate = FormValidation(document.upload); |
| 13 | + |
| 14 | + // We validate the form first to see if there is any invalid content |
| 15 | + if (validate.validated) { |
| 16 | + // Form is validated correctly |
| 17 | + // hide the submit button and upload stuff |
| 18 | + $(this).fadeOut(); |
| 19 | + $('#loading').fadeIn(); |
| 20 | + document.upload.submit(); // and submit the form |
| 21 | + } else { |
| 22 | + // An error occured, display error message of some kind, if the box already exists put the error in there |
| 23 | + if (document.getElementById('uploadwarning')) { |
| 24 | + // box already exists, change just the warning |
| 25 | + $("#uploadwarning > p").html(validate.error); |
| 26 | + } else { |
| 27 | + // Make a new box |
| 28 | + var errorBox = '<div class="warning" id="uploadwarning"><p>' + validate.error + '</p></div>'; |
| 29 | + $("#upload").prepend(errorBox); |
| 30 | + } |
| 31 | + |
| 32 | + // Do some cool effect |
| 33 | + $("#uploadwarning").fadeIn(); |
| 34 | + |
| 35 | + // Scroll the screen to that place |
| 36 | + var warningPosition = $("#uploadwarning").offset() |
| 37 | + window.scrollTo(0, warningPosition.top - 50); |
| 38 | + |
| 39 | + return false; // do not execute the normal execution of the button (upload the form) |
| 40 | + } |
| 41 | + }); |
| 42 | +
|
| 43 | + $('#toggleexp').click( function() { |
| 44 | + // Slide the explanation down with extra text
|
| 45 | + $('#explanation').slideToggle("medium");
|
| 46 | + this.blur();
|
| 47 | + }); |
| 48 | + |
| 49 | + $('#toggleUpload').click(function() { |
| 50 | + // The upload form is only displayed after clicking the 'I've read the rules' button |
| 51 | + $('#uploadbox').slideDown("medium"); |
| 52 | + $(this).fadeOut(); |
| 53 | + });
|
| 54 | +});
|
| 55 | +
|
| 56 | +function popUp(URL) {
|
| 57 | + day = new Date();
|
| 58 | + id = day.getTime();
|
| 59 | + eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=640,height=480,left = 320,top = 272');");
|
| 60 | +} |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/javascript/lib_js.js |
___________________________________________________________________ |
Name: svn:executable |
1 | 61 | + * |
Index: trunk/tools/wikiportrait/wizard.php |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +<?php |
| 3 | + include '_header.php'; |
| 4 | +?> |
| 5 | + <div id="questions">
|
| 6 | + <?php show_wizard(); ?>
|
| 7 | + </div> |
| 8 | +<?php |
| 9 | + include '_footer.php'; |
| 10 | +?> |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/wizard.php |
___________________________________________________________________ |
Name: svn:executable |
1 | 11 | + * |
Index: trunk/tools/wikiportrait/style.css |
— | — | @@ -0,0 +1,160 @@ |
| 2 | +body {
|
| 3 | + font: x-small sans-serif;
|
| 4 | + background: #f9f9f9 url(images/background.jpg) 0 0 no-repeat;
|
| 5 | + color: black;
|
| 6 | + margin: 0;
|
| 7 | + padding: 0;
|
| 8 | +}
|
| 9 | + |
| 10 | +a:hover { color: red; } |
| 11 | +img { border: 0; } |
| 12 | +ul li { font-size: 1.2em; } |
| 13 | +.jsonly { display: none; } |
| 14 | + |
| 15 | + |
| 16 | +.item, label, input, textarea, select, .item p { |
| 17 | + float: left; |
| 18 | +} |
| 19 | + |
| 20 | +.item { |
| 21 | + clear: both; |
| 22 | + margin-bottom: 25px; |
| 23 | +} |
| 24 | + |
| 25 | +label { |
| 26 | + vertical-align: middle; |
| 27 | + width: 300px; |
| 28 | +} |
| 29 | + |
| 30 | +img.thumb { |
| 31 | + float: left; |
| 32 | + margin: 0 10px 10px 0; |
| 33 | +} |
| 34 | +
|
| 35 | +/* scale back up to a sane default */
|
| 36 | +#wrapper {
|
| 37 | + font-size: 127%;
|
| 38 | + width: 100%;
|
| 39 | + margin-top: 2em;
|
| 40 | + padding: 0;
|
| 41 | +}
|
| 42 | +
|
| 43 | +#header, #questions, #footer { margin-left: 160px; }
|
| 44 | +
|
| 45 | +#header h1 { font-size: 188%; border-bottom: 1px solid #aaa; }
|
| 46 | +#header a { text-decoration: none; }
|
| 47 | +
|
| 48 | +#questions {
|
| 49 | + margin-right: 1em;
|
| 50 | + border: 1px solid #aaa;
|
| 51 | + background: white;
|
| 52 | + padding: 1em;
|
| 53 | + padding-top: 0;
|
| 54 | +}
|
| 55 | +
|
| 56 | + #questions p { font-size: 125%; }
|
| 57 | + #questions p.error {
|
| 58 | + color: red;
|
| 59 | + font-weight: bold;
|
| 60 | + } |
| 61 | +
|
| 62 | + #questions p.mail {
|
| 63 | + background: #ccc;
|
| 64 | + margin-left: 15px;
|
| 65 | + padding: 10px;
|
| 66 | + border: 1px solid black;
|
| 67 | + } |
| 68 | + |
| 69 | + #questions div.warning, #questions div.info { |
| 70 | + background: #fcc; |
| 71 | + padding: 0px 10px; |
| 72 | + border: 1px solid black; |
| 73 | + margin-bottom: 20px; |
| 74 | + } |
| 75 | + |
| 76 | + #questions div.info { |
| 77 | + background: #ddf; |
| 78 | + } |
| 79 | + |
| 80 | + #questions div.info img { |
| 81 | + float: left; |
| 82 | + margin: 10px 15px 15px 0px; |
| 83 | + } |
| 84 | + |
| 85 | + #questions div.info ul { |
| 86 | + margin-left: 50px; |
| 87 | + } |
| 88 | + |
| 89 | + #questions div.info button { |
| 90 | + margin-bottom: 15px; |
| 91 | + } |
| 92 | +
|
| 93 | + #questions a.question, #questions div.action, #questions div.caution, #questions div.imgbox {
|
| 94 | + font-size: 155%;
|
| 95 | + border: 2px solid #ccc;
|
| 96 | + display: block;
|
| 97 | + height: 40px;
|
| 98 | + background: url('images/bg_btn.png') repeat-x;
|
| 99 | + text-decoration: none;
|
| 100 | + padding: 10px 0 0 10px;
|
| 101 | + }
|
| 102 | +
|
| 103 | + #questions a.question:hover {
|
| 104 | + background: url('images/bg_btn_hover.png');
|
| 105 | + }
|
| 106 | +
|
| 107 | + #questions div.action, #questions div.caution, #questions div.imgbox {
|
| 108 | + margin-bottom: 1em;
|
| 109 | + color: #333;
|
| 110 | + height: 75px;
|
| 111 | + }
|
| 112 | +
|
| 113 | + #questions div.action { background-image: url('images/bg_action.png'); }
|
| 114 | + #questions div.caution { background-image: url('images/bg_caution.png'); } |
| 115 | + |
| 116 | + #questions div.imgbox { |
| 117 | + margin-top: 1em; |
| 118 | + font-size: 100%; |
| 119 | + } |
| 120 | +
|
| 121 | + #questions big {
|
| 122 | + display: block;
|
| 123 | + font-size: 155%;
|
| 124 | + padding-bottom: 15px;
|
| 125 | + }
|
| 126 | +
|
| 127 | + #expwrap {
|
| 128 | + margin-bottom: 1em;
|
| 129 | + background-image: url('images/bg_explanation.png');
|
| 130 | + padding: 1em;
|
| 131 | + border: 1px solid #aaa;
|
| 132 | + }
|
| 133 | +
|
| 134 | + #expwrap a {
|
| 135 | + text-decoration: none;
|
| 136 | + font-size: 110%;
|
| 137 | + }
|
| 138 | +
|
| 139 | + #expwrap p {
|
| 140 | + font-size: 110%;
|
| 141 | + padding: 0;
|
| 142 | + margin: 0;
|
| 143 | + }
|
| 144 | +
|
| 145 | + div.license {
|
| 146 | + padding: 0 1em;
|
| 147 | + border: 1px solid #909090;
|
| 148 | + background: #eee;
|
| 149 | + margin-bottom: 1em;
|
| 150 | + }
|
| 151 | +
|
| 152 | + div.license img { float: left; margin-right: 0.5em; }
|
| 153 | +
|
| 154 | +#footer {
|
| 155 | + background-color: white;
|
| 156 | + border-top: 1px solid #fabd23;
|
| 157 | + border-bottom: 1px solid #fabd23;
|
| 158 | + margin: 1em 0 1em 0;
|
| 159 | + text-align: center;
|
| 160 | + font-size: 90%;
|
| 161 | +} |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/style.css |
___________________________________________________________________ |
Name: svn:executable |
1 | 162 | + * |
Index: trunk/tools/wikiportrait/admin/index.php |
— | — | @@ -0,0 +1,95 @@ |
| 2 | +<?php |
| 3 | + include '../inc/common.php'; |
| 4 | + |
| 5 | + $admin_tasks = array( |
| 6 | + "good" => ___("ACTION_GOOD"), |
| 7 | + "google" => ___("ACTION_GOOGLE"), |
| 8 | + "bad_quality" => ___("ACTION_BAD_QUALITY"), |
| 9 | + "invalid_email" => ___("ACTION_INVALID_EMAIL"), |
| 10 | + "not_relevant" => ___("ACTION_NOT_RELEVANT") |
| 11 | + ); |
| 12 | + |
| 13 | + $id = $_GET['id']; |
| 14 | + $secret = $_GET['secret']; |
| 15 | + $action = $_GET['action']; |
| 16 | + |
| 17 | + if(!$id || !$secret) { |
| 18 | + // bail("No id or secret given"); |
| 19 | + } |
| 20 | + |
| 21 | + // Look up the id and see if it matches with the secret |
| 22 | + $image = $db->select(TB_IMAGES, $id); |
| 23 | + if(!$image) bail("id not found"); |
| 24 | + |
| 25 | + // Security precaution |
| 26 | + unset($image['email']); |
| 27 | + |
| 28 | +/* |
| 29 | + $image_secret = md5(GE_SECRET.$image['id'].$image['timestamp']); |
| 30 | + |
| 31 | + if($image_secret != $secret) bail("Secret not correct"); |
| 32 | + */ |
| 33 | + |
| 34 | +?> |
| 35 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| 36 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
|
| 37 | + <head> |
| 38 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 39 | + <title>Wikiportret admin</title> |
| 40 | + <style type="text/css"> |
| 41 | + #wrapper { width: 960px; } |
| 42 | + .clear { clear:both; } |
| 43 | + img { float: left; } |
| 44 | + .warning { color: red; text-decoration:underline; } |
| 45 | + #data { |
| 46 | + float:right; |
| 47 | + } |
| 48 | + #data li { margin-bottom: 10px; } |
| 49 | + #data strong { |
| 50 | + display: block; |
| 51 | + } |
| 52 | + </style> |
| 53 | + </head> |
| 54 | + <body> |
| 55 | + <div id="wrapper"> |
| 56 | + <?php |
| 57 | + if($action) : |
| 58 | + ?> |
| 59 | + <textarea cols="80" rows="40"><?php echo admin_action($action); ?></textarea> |
| 60 | + <?php |
| 61 | + else: |
| 62 | + ?> |
| 63 | + <h1><?php __("RATE_THIS_IMAGE"); ?></h1> |
| 64 | + |
| 65 | + <?php if($image['action'] != null) echo '<h2 class="warning">'.___("IMAGE_ACTION_DONE").'</h2>'; ?> |
| 66 | + |
| 67 | + <a href="<?php echo GE_URL.'uploads/'.$image['filename']; ?>"> |
| 68 | + <img src="<?php timthumb(GE_URL.'uploads/'.$image['filename'], 640, 480); ?>" alt="<?php echo $image['title']; ?>" /> |
| 69 | + </a> |
| 70 | + <ul id="data"> |
| 71 | + <?php |
| 72 | + foreach($image as $key=>$value) { |
| 73 | + echo "<li><strong>$key</strong><span>$value</span></li>"; |
| 74 | + } |
| 75 | + ?> |
| 76 | + </ul> |
| 77 | + |
| 78 | + <br class="clear" /> |
| 79 | + |
| 80 | + <h2><?php __("ACTION_FOR_IMAGE"); ?> |
| 81 | + <ul id="tasks"> |
| 82 | + <?php |
| 83 | + if($image['action'] == null) { |
| 84 | + foreach($admin_tasks as $task=>$text) { |
| 85 | + $url = GE_URL."admin/index.php?id=$id&secret=$secret&action=$task"; |
| 86 | + echo '<li><a href="'.$url.'">'.$text.'</a></li>'; |
| 87 | + } |
| 88 | + } |
| 89 | + ?> |
| 90 | + </ul> |
| 91 | + <?php |
| 92 | + endif; |
| 93 | + ?> |
| 94 | + </div> |
| 95 | + </body> |
| 96 | +</html> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/inc/lib-db.php |
— | — | @@ -0,0 +1,139 @@ |
| 2 | +<?php |
| 3 | +Class db { |
| 4 | + private $db = false; |
| 5 | + public $last_query = ''; |
| 6 | + public $num_rows; |
| 7 | + public $last_insert_id; |
| 8 | + public $last_error; |
| 9 | + private $stripslashes = false; |
| 10 | + |
| 11 | + function db($host, $user, $pass, $database) { |
| 12 | + $this->host = $host; |
| 13 | + $this->user = $user; |
| 14 | + $this->pass = $pass; |
| 15 | + $this->database = $database; |
| 16 | + $this->debug = 1; |
| 17 | + $this->connect(); |
| 18 | + } |
| 19 | + |
| 20 | + function select_db($database = false) { |
| 21 | + // only change if a new database is given |
| 22 | + if ($database) $this->database = $database; |
| 23 | + @mysql_select_db($this->database, $this->db) or $this->bail("The database ".$this->database." could not be found. "); |
| 24 | + } |
| 25 | + |
| 26 | + function connect() { |
| 27 | + @$this->db = mysql_connect($this->host, $this->user, $this->pass) or $this->bail("Could not connect to database!"); |
| 28 | + $this->select_db(); |
| 29 | + return $db; |
| 30 | + } |
| 31 | + |
| 32 | + function query($sql) { |
| 33 | + $this->last_query = $sql; |
| 34 | + @$result = mysql_query($sql); |
| 35 | + if($result) { |
| 36 | + // TODO |
| 37 | + // This is a little risky, because the insert_id() function is |
| 38 | + // run every time a query is done, while it should only happen with INSERT |
| 39 | + // queries |
| 40 | + $this->last_insert_id = @mysql_insert_id($this->db); |
| 41 | + return $result; |
| 42 | + } else { |
| 43 | + $this->last_error = @mysql_error(); |
| 44 | + $this->bail(); |
| 45 | + } |
| 46 | + } |
| 47 | + |
| 48 | + function last_query() { |
| 49 | + return $this->last_query; |
| 50 | + } |
| 51 | + |
| 52 | + function where($where) { |
| 53 | + // User can either pass the $where clausule as an array |
| 54 | + // like array("id" => 5, "text" => "foo"); or as a digit |
| 55 | + // in the last case, we assume its an id |
| 56 | + if(is_array($where)) { |
| 57 | + $sql = " WHERE "; |
| 58 | + $i = 0; |
| 59 | + foreach($where as $key=>$value) { |
| 60 | + $sql .= "`".$this->escape($key)."` = '".$this->escape($value)."'"; |
| 61 | + if($i < count($where)-1) $sql .= " AND "; |
| 62 | + $i++; |
| 63 | + } |
| 64 | + $sql .= ";"; |
| 65 | + } else if ($where != false) { |
| 66 | + $sql = "WHERE `id`='".$this->escape($where)."' LIMIT 1;"; |
| 67 | + } |
| 68 | + return $sql; |
| 69 | + } |
| 70 | + |
| 71 | + function select($table, $where = false) { |
| 72 | + $sql = "SELECT * FROM `".$this->escape($table)."`"; |
| 73 | + |
| 74 | + // Add WHERE clause if needed |
| 75 | + if ($where) $sql .= $this->where($where); |
| 76 | + |
| 77 | + $result = $this->query($sql); |
| 78 | + return $this->convert_to_array($result); |
| 79 | + } |
| 80 | + |
| 81 | + function num_rows() { |
| 82 | + // returns number of returned rows from the last query |
| 83 | + return $this->num_rows; |
| 84 | + } |
| 85 | + |
| 86 | + function delete($table, $where) { |
| 87 | + $sql = "DELETE FROM `$table`"; |
| 88 | + $sql .= $this->where($where); |
| 89 | + return $this->query($sql, false); |
| 90 | + } |
| 91 | + |
| 92 | + function insert($table, $array) { |
| 93 | + // Loop through the $values array to add keys and values |
| 94 | + $i =0; |
| 95 | + $max = count($array) - 1; |
| 96 | + foreach($array as $key=>$value) { |
| 97 | + $insert .= "`".$this->escape($key)."`"; |
| 98 | + if ($i < $max) $insert .= ","; |
| 99 | + $values .= "'".$this->escape($value)."'"; |
| 100 | + if ($i < $max) $values .= ","; |
| 101 | + $i++; |
| 102 | + } |
| 103 | + |
| 104 | + // Finally make the sql statement and query it |
| 105 | + $sql = "INSERT INTO `$table` ($insert) VALUES ($values);"; |
| 106 | + return $this->query($sql, false); |
| 107 | + } |
| 108 | + |
| 109 | + function convert_to_array($mysql_result) { |
| 110 | + if(!$mysql_result) return false; |
| 111 | + |
| 112 | + // If this result only has one row, simply return that (default setting) |
| 113 | + if (mysql_num_rows($mysql_result) == 1) { |
| 114 | + return mysql_fetch_array($mysql_result, MYSQL_ASSOC); |
| 115 | + } else { |
| 116 | + $array = array(); |
| 117 | + while($row = mysql_fetch_array($mysql_result, MYSQL_ASSOC)) { |
| 118 | + // Stupid PHP with its slashes |
| 119 | + if(($this->stripslashes) && get_magic_quotes_gpc()) $row = stripslashes_deep($row); |
| 120 | + $array[] = $row; |
| 121 | + } |
| 122 | + return $array; |
| 123 | + } |
| 124 | + } |
| 125 | + |
| 126 | + function escape($value) { |
| 127 | + // Strips slashes and escapes possibile scary characters |
| 128 | + if(get_magic_quotes_gpc()) { |
| 129 | + $value = stripslashes($value); |
| 130 | + } |
| 131 | + return mysql_real_escape_string($value, $this->db); |
| 132 | + } |
| 133 | + |
| 134 | + function bail($msg) { |
| 135 | + // die with a message |
| 136 | + if($this->debug > 0) $msg .= "<br>Mysql_error: ".$this->last_error."<br>Last query:".$this->last_query; |
| 137 | + die($msg); |
| 138 | + } |
| 139 | +} // Class db |
| 140 | +?> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/inc/timthumb.php |
— | — | @@ -0,0 +1,392 @@ |
| 2 | +<?php |
| 3 | +// TimThumb script created by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks |
| 4 | +// http://code.google.com/p/timthumb/ |
| 5 | + |
| 6 | +// MIT License: http://www.opensource.org/licenses/mit-license.php |
| 7 | + |
| 8 | +/* Parameters allowed: */ |
| 9 | + |
| 10 | +// w: width |
| 11 | +// h: height |
| 12 | +// zc: zoom crop (0 or 1) |
| 13 | +// q: quality (default is 75 and max is 100) |
| 14 | + |
| 15 | +// HTML example: <img src="/scripts/timthumb.php?src=/images/whatever.jpg&w=150&h=200&zc=1" alt="" /> |
| 16 | + |
| 17 | +error_reporting(E_ALL); |
| 18 | + |
| 19 | +if(!isset($_REQUEST["src"])) { |
| 20 | + die("no image specified"); |
| 21 | +} |
| 22 | + |
| 23 | +// clean params before use |
| 24 | +$src = clean_source( $_REQUEST[ "src" ] ); |
| 25 | + |
| 26 | +// set document root |
| 27 | +$doc_root = get_document_root($src); |
| 28 | + |
| 29 | +// get path to image on file system |
| 30 | +$src = $doc_root . '/' . $src; |
| 31 | + |
| 32 | +$new_width = preg_replace( "/[^0-9]+/", "", get_request( 'w', 100 ) ); |
| 33 | +$new_height = preg_replace( "/[^0-9]+/", "", get_request( 'h', 100 ) ); |
| 34 | +$zoom_crop = preg_replace( "/[^0-9]+/", "", get_request( 'zc', 1 ) ); |
| 35 | +$quality = preg_replace( "/[^0-9]+/", "", get_request( '9', 80 ) ); |
| 36 | + |
| 37 | +// set path to cache directory (default is ./cache) |
| 38 | +// this can be changed to a different location |
| 39 | +$cache_dir = '../cache'; |
| 40 | + |
| 41 | +// get mime type of src |
| 42 | +$mime_type = mime_type($src); |
| 43 | + |
| 44 | +// check to see if this image is in the cache already |
| 45 | +//check_cache($cache_dir, $mime_type); |
| 46 | + |
| 47 | +// make sure that the src is gif/jpg/png |
| 48 | +if(!valid_src_mime_type($mime_type)) { |
| 49 | + die("Invalid src mime type: $mime_type"); |
| 50 | +} |
| 51 | + |
| 52 | +// check to see if GD function exist |
| 53 | +if(!function_exists('imagecreatetruecolor')) { |
| 54 | + die("GD Library Error: imagecreatetruecolor does not exist"); |
| 55 | +} |
| 56 | + |
| 57 | +if(strlen($src) && file_exists($src)) { |
| 58 | + |
| 59 | + // open the existing image |
| 60 | + $image = open_image($mime_type, $src); |
| 61 | + if($image === false) { |
| 62 | + die('Unable to open image : ' . $src); |
| 63 | + } |
| 64 | + |
| 65 | + // Get original width and height |
| 66 | + $width = imagesx($image); |
| 67 | + $height = imagesy($image); |
| 68 | + |
| 69 | + // don't allow new width or height to be greater than the original |
| 70 | + if( $new_width > $width ) { |
| 71 | + $new_width = $width; |
| 72 | + } |
| 73 | + if( $new_height > $height ) { |
| 74 | + $new_height = $height; |
| 75 | + } |
| 76 | + |
| 77 | + // generate new w/h if not provided |
| 78 | + if( $new_width && !$new_height ) { |
| 79 | + |
| 80 | + $new_height = $height * ( $new_width / $width ); |
| 81 | + |
| 82 | + } elseif($new_height && !$new_width) { |
| 83 | + |
| 84 | + $new_width = $width * ( $new_height / $height ); |
| 85 | + |
| 86 | + } elseif(!$new_width && !$new_height) { |
| 87 | + |
| 88 | + $new_width = $width; |
| 89 | + $new_height = $height; |
| 90 | + |
| 91 | + } |
| 92 | + |
| 93 | + // create a new true color image |
| 94 | + $canvas = imagecreatetruecolor( $new_width, $new_height ); |
| 95 | + |
| 96 | + if( $zoom_crop ) { |
| 97 | + |
| 98 | + $src_x = $src_y = 0; |
| 99 | + $src_w = $width; |
| 100 | + $src_h = $height; |
| 101 | + |
| 102 | + $cmp_x = $width / $new_width; |
| 103 | + $cmp_y = $height / $new_height; |
| 104 | + |
| 105 | + // calculate x or y coordinate and width or height of source |
| 106 | + |
| 107 | + if ( $cmp_x > $cmp_y ) { |
| 108 | + |
| 109 | + $src_w = round( ( $width / $cmp_x * $cmp_y ) ); |
| 110 | + $src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 ); |
| 111 | + |
| 112 | + } elseif ( $cmp_y > $cmp_x ) { |
| 113 | + |
| 114 | + $src_h = round( ( $height / $cmp_y * $cmp_x ) ); |
| 115 | + $src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ); |
| 116 | + |
| 117 | + } |
| 118 | + |
| 119 | + imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h ); |
| 120 | + |
| 121 | + } else { |
| 122 | + |
| 123 | + // copy and resize part of an image with resampling |
| 124 | + imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); |
| 125 | + |
| 126 | + } |
| 127 | + |
| 128 | + // output image to browser based on mime type |
| 129 | + show_image( $mime_type, $canvas, $quality, $cache_dir ); |
| 130 | + |
| 131 | + // remove image from memory |
| 132 | + imagedestroy( $canvas ); |
| 133 | + |
| 134 | +} else { |
| 135 | + |
| 136 | + if(strlen($src)) { |
| 137 | + die($src . ' not found.'); |
| 138 | + } else { |
| 139 | + die('no source specified.'); |
| 140 | + } |
| 141 | + |
| 142 | +} |
| 143 | + |
| 144 | +function show_image( $mime_type, $image_resized, $quality, $cache_dir ) { |
| 145 | + |
| 146 | + // check to see if we can write to the cache directory |
| 147 | + $is_writable = 0; |
| 148 | + $cache_file_name = $cache_dir . '/' . get_cache_file(); |
| 149 | + |
| 150 | + if(touch($cache_file_name)) { |
| 151 | + |
| 152 | + // give 666 permissions so that the developer |
| 153 | + // can overwrite web server user |
| 154 | + chmod($cache_file_name, 0666); |
| 155 | + $is_writable = 1; |
| 156 | + |
| 157 | + } else { |
| 158 | + |
| 159 | + $cache_file_name = NULL; |
| 160 | + header('Content-type: ' . $mime_type); |
| 161 | + |
| 162 | + } |
| 163 | + |
| 164 | + if(stristr($mime_type, 'gif')) { |
| 165 | + |
| 166 | + imagegif($image_resized, $cache_file_name); |
| 167 | + |
| 168 | + } elseif(stristr($mime_type, 'jpeg')) { |
| 169 | + |
| 170 | + imagejpeg($image_resized, $cache_file_name, $quality); |
| 171 | + |
| 172 | + } elseif(stristr($mime_type, 'png')) { |
| 173 | + |
| 174 | + $quality = floor($quality * 0.09); |
| 175 | + imagepng($image_resized, $cache_file_name, $quality); |
| 176 | + |
| 177 | + } |
| 178 | + |
| 179 | + if($is_writable) { |
| 180 | + show_cache_file( $cache_dir, $mime_type ); |
| 181 | + } |
| 182 | + |
| 183 | + die(); |
| 184 | + |
| 185 | +} |
| 186 | + |
| 187 | +function get_request( $property, $default = 0 ) { |
| 188 | + |
| 189 | + if( isset($_REQUEST[$property]) ) { |
| 190 | + return $_REQUEST[$property]; |
| 191 | + } else { |
| 192 | + return $default; |
| 193 | + } |
| 194 | + |
| 195 | +} |
| 196 | + |
| 197 | +function open_image($mime_type, $src) { |
| 198 | + |
| 199 | + if(stristr($mime_type, 'gif')) { |
| 200 | + |
| 201 | + $image = imagecreatefromgif($src); |
| 202 | + |
| 203 | + } elseif(stristr($mime_type, 'jpeg')) { |
| 204 | + |
| 205 | + @ini_set('gd.jpeg_ignore_warning', 1); |
| 206 | + $image = imagecreatefromjpeg($src); |
| 207 | + |
| 208 | + } elseif( stristr($mime_type, 'png')) { |
| 209 | + |
| 210 | + $image = imagecreatefrompng($src); |
| 211 | + |
| 212 | + } |
| 213 | + |
| 214 | + return $image; |
| 215 | + |
| 216 | +} |
| 217 | + |
| 218 | +function mime_type($file) { |
| 219 | + |
| 220 | + $os = strtolower(php_uname()); |
| 221 | + $mime_type = ''; |
| 222 | + |
| 223 | + // use PECL fileinfo to determine mime type |
| 224 | + if( function_exists('finfo_open')) { |
| 225 | + $finfo = finfo_open(FILEINFO_MIME); |
| 226 | + $mime_type = finfo_file($finfo, $file); |
| 227 | + finfo_close($finfo); |
| 228 | + } |
| 229 | + |
| 230 | + // try to determine mime type by using unix file command |
| 231 | + // this should not be executed on windows |
| 232 | + if(!valid_src_mime_type($mime_type) && !(eregi('windows', $os))) { |
| 233 | + if(preg_match("/freebsd|linux/", $os)) { |
| 234 | + $mime_type = trim(@shell_exec('file -bi $file')); |
| 235 | + } |
| 236 | + } |
| 237 | + |
| 238 | + // use file's extension to determine mime type |
| 239 | + if(!valid_src_mime_type($mime_type)) { |
| 240 | + |
| 241 | + // set defaults |
| 242 | + $mime_type = 'image/jpeg'; |
| 243 | + // file details |
| 244 | + $fileDetails = pathinfo($file); |
| 245 | + $ext = strtolower($fileDetails["extension"]); |
| 246 | + // mime types |
| 247 | + $types = array( |
| 248 | + 'jpg' => 'image/jpeg', |
| 249 | + 'jpeg' => 'image/jpeg', |
| 250 | + 'png' => 'image/png', |
| 251 | + 'gif' => 'image/gif' |
| 252 | + ); |
| 253 | + |
| 254 | + if(strlen($ext) && strlen($types[$ext])) { |
| 255 | + $mime_type = $types[$ext]; |
| 256 | + } |
| 257 | + |
| 258 | + } |
| 259 | + |
| 260 | + return $mime_type; |
| 261 | + |
| 262 | +} |
| 263 | + |
| 264 | +function valid_src_mime_type($mime_type) { |
| 265 | + |
| 266 | + if(preg_match("/jpg|jpeg|gif|png/i", $mime_type)) { |
| 267 | + return true; |
| 268 | + } |
| 269 | + return false; |
| 270 | + |
| 271 | +} |
| 272 | + |
| 273 | +function check_cache($cache_dir, $mime_type) { |
| 274 | + |
| 275 | + // make sure cache dir exists |
| 276 | + if(!file_exists($cache_dir)) { |
| 277 | + // give 777 permissions so that developer can overwrite |
| 278 | + // files created by web server user |
| 279 | + mkdir($cache_dir); |
| 280 | + chmod($cache_dir, 0777); |
| 281 | + } |
| 282 | + |
| 283 | + show_cache_file($cache_dir, $mime_type); |
| 284 | + |
| 285 | +} |
| 286 | + |
| 287 | +function show_cache_file($cache_dir, $mime_type) { |
| 288 | + |
| 289 | + $cache_file = $cache_dir . '/' . get_cache_file(); |
| 290 | + |
| 291 | + if( file_exists( $cache_file ) ) { |
| 292 | + |
| 293 | + if( isset( $_SERVER[ "HTTP_IF_MODIFIED_SINCE" ] ) ) { |
| 294 | + |
| 295 | + // check for updates |
| 296 | + $if_modified_since = preg_replace( '/;.*$/', '', $_SERVER[ "HTTP_IF_MODIFIED_SINCE" ] ); |
| 297 | + $gmdate_mod = gmdate( 'D, d M Y H:i:s', filemtime( $cache_file ) ); |
| 298 | + |
| 299 | + if( strstr( $gmdate_mod, 'GMT' ) ) { |
| 300 | + $gmdate_mod .= " GMT"; |
| 301 | + } |
| 302 | + |
| 303 | + if ( $if_modified_since == $gmdate_mod ) { |
| 304 | + header( "HTTP/1.1 304 Not Modified" ); |
| 305 | + exit; |
| 306 | + } |
| 307 | + |
| 308 | + } |
| 309 | + |
| 310 | + $fileSize = filesize($cache_file); |
| 311 | + |
| 312 | + // send headers then display image |
| 313 | + header("Content-Type: " . $mime_type); |
| 314 | + //header("Accept-Ranges: bytes"); |
| 315 | + header("Last-Modified: " . gmdate('D, d M Y H:i:s', filemtime($cache_file)) . " GMT"); |
| 316 | + header("Content-Length: " . $fileSize); |
| 317 | + header("Cache-Control: max-age=9999, must-revalidate"); |
| 318 | + header("Expires: " . gmdate("D, d M Y H:i:s", time() + 9999) . "GMT"); |
| 319 | + |
| 320 | + readfile($cache_file); |
| 321 | + |
| 322 | + die(); |
| 323 | + |
| 324 | + } |
| 325 | + |
| 326 | +} |
| 327 | + |
| 328 | +function get_cache_file () { |
| 329 | + |
| 330 | + global $quality; |
| 331 | + |
| 332 | + static $cache_file; |
| 333 | + if(!$cache_file) { |
| 334 | + $frags = split( "\.", $_REQUEST['src'] ); |
| 335 | + $ext = strtolower( $frags[ count( $frags ) - 1 ] ); |
| 336 | + if(!valid_extension($ext)) { $ext = 'jpg'; } |
| 337 | + $cachename = get_request( 'src', 'timthumb' ) . get_request( 'w', 100 ) . get_request( 'h', 100 ) . get_request( 'zc', 1 ) . get_request( '9', 80 ); |
| 338 | + $cache_file = md5( $cachename ) . '.' . $ext; |
| 339 | + } |
| 340 | + return $cache_file; |
| 341 | + |
| 342 | +} |
| 343 | + |
| 344 | +function valid_extension ($ext) { |
| 345 | + |
| 346 | + if( preg_match( "/jpg|jpeg|png|gif/i", $ext ) ) return 1; |
| 347 | + return 0; |
| 348 | + |
| 349 | +} |
| 350 | + |
| 351 | +function clean_source ( $src ) { |
| 352 | + |
| 353 | + // remove http/ https/ ftp |
| 354 | + $src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src); |
| 355 | + // remove domain name from the source url |
| 356 | + $host = $_SERVER["HTTP_HOST"]; |
| 357 | + $src = str_replace($host, "", $src); |
| 358 | + $host = str_replace("www.", "", $host); |
| 359 | + $src = str_replace($host, "", $src); |
| 360 | + |
| 361 | + //$src = preg_replace( "/(?:^\/+|\.{2,}\/+?)/", "", $src ); |
| 362 | + //$src = preg_replace( '/^\w+:\/\/[^\/]+/', '', $src ); |
| 363 | + |
| 364 | + // don't allow users the ability to use '../' |
| 365 | + // in order to gain access to files below document root |
| 366 | + |
| 367 | + // src should be specified relative to document root like: |
| 368 | + // src=images/img.jpg or src=/images/img.jpg |
| 369 | + // not like: |
| 370 | + // src=../images/img.jpg |
| 371 | + $src = preg_replace( "/\.\.+\//", "", $src ); |
| 372 | + |
| 373 | + return $src; |
| 374 | + |
| 375 | +} |
| 376 | + |
| 377 | +function get_document_root ($src) { |
| 378 | + if( @file_exists( $_SERVER['DOCUMENT_ROOT'] . '/' . $src ) ) { |
| 379 | + return $_SERVER['DOCUMENT_ROOT']; |
| 380 | + } |
| 381 | + // the relative paths below are useful if timthumb is moved outside of document root |
| 382 | + // specifically if installed in wordpress themes like mimbo pro: |
| 383 | + // /wp-content/themes/mimbopro/scripts/timthumb.php |
| 384 | + $paths = array( '..', '../..', '../../..', '../../../..' ); |
| 385 | + foreach( $paths as $path ) { |
| 386 | + if( @file_exists( $path . '/' . $src ) ) { |
| 387 | + return $path; |
| 388 | + } |
| 389 | + } |
| 390 | + |
| 391 | +} |
| 392 | + |
| 393 | +?> |
Index: trunk/tools/wikiportrait/inc/lib-admin.php |
— | — | @@ -0,0 +1,33 @@ |
| 2 | +<?php |
| 3 | + // Library for the admin page |
| 4 | + function admin_action($action) { |
| 5 | + global $image; |
| 6 | + |
| 7 | + // Start with a header |
| 8 | + $mail = sprintf(___("RESPONSE_HEADER"), $image['name']); |
| 9 | + |
| 10 | + // Add specific text for this action |
| 11 | + switch($action) { |
| 12 | + case "good": |
| 13 | + $mail .= sprintf(___("RESPONSE_ACTION_CONFIRMATION"), $image['title']); |
| 14 | + break; |
| 15 | + case "google": |
| 16 | + $mail .= ___("RESPONSE_ACTION_GOOGLE"); |
| 17 | + break; |
| 18 | + case "invalid_email": |
| 19 | + $mail .= ___("RESPONSE_ACTION_INVALID_EMAIL"); |
| 20 | + break; |
| 21 | + case "bad_quality": |
| 22 | + $mail .= ___("RESPONSE_ACTION_BAD_QUALITY"); |
| 23 | + break; |
| 24 | + case "not_relevant": |
| 25 | + $mail .= ___("RESPONSE_ACTION_NOT_RELEVANT"); |
| 26 | + } |
| 27 | + |
| 28 | + // add footer and disclaimer |
| 29 | + $mail .= ___("RESPONSE_FOOTER"); |
| 30 | + $mail .= ___("RESPONSE_DISCLAIMER"); |
| 31 | + |
| 32 | + return $mail; |
| 33 | + } |
| 34 | +?> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/inc/config-sample.php |
— | — | @@ -0,0 +1,28 @@ |
| 2 | +<?php
|
| 3 | + # config
|
| 4 | + define ('DB_HOST', 'localhost'); // host for your database. usually 'localhost' will do ok
|
| 5 | + define ('DB_USER', 'root'); // username for acces to the database
|
| 6 | + define ('DB_PASS', ''); // password for the database
|
| 7 | + define ('DB_DATABASE', 'uploadwizard'); // the database you have made for the tables of this script
|
| 8 | +
|
| 9 | + define ('TB_PREFIX', '');
|
| 10 | + define ('TB_MESSAGES', TB_PREFIX.'messages'); |
| 11 | + define ('TB_IMAGES', TB_PREFIX.'images');
|
| 12 | +
|
| 13 | + define ('GE_DEBUG', 0);
|
| 14 | + define ('GE_LANGUAGE', 'nl'); // default language
|
| 15 | +
|
| 16 | + define ('ABSPATH', '/var/www/wikiportrait/'); // Trailing slash! |
| 17 | + define ('GE_URL', 'http://www.example.com/'); |
| 18 | + define ('GE_HOME', GE_URL.'index.php'); |
| 19 | + define ('GE_WIZARD', GE_URL.'wizard.php'); |
| 20 | + define ('GE_IMAGES_PATH', ABSPATH.'uploads/'); |
| 21 | + |
| 22 | + $ALLOWED_EXTENSIONS = array(".png", ".jpg", ".jpeg", ".gif"); // allowed extensions for image uploads, NOTE THE DOT (.) before every extension! |
| 23 | + define ('GE_MIN_RESOLUTION', 480); |
| 24 | + |
| 25 | + define ('GE_OTRS_MAIL', 'email@example.com'); |
| 26 | + define ('GE_OTRS_FROM', 'email@example.com'); |
| 27 | + |
| 28 | + error_reporting(0); // set this to 'E_ALL ^ E_NOTICE' for normal error reporting, SET TO ZERO FOR PRODUCTION USE! |
| 29 | +?> |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/inc/config-sample.php |
___________________________________________________________________ |
Name: svn:executable |
1 | 30 | + * |
Index: trunk/tools/wikiportrait/inc/lib-utils.php |
— | — | @@ -0,0 +1,74 @@ |
| 2 | +<?php |
| 3 | + function printr($msg) { |
| 4 | + echo "<pre>".print_r($msg, true)."</pre>"; |
| 5 | + } |
| 6 | + |
| 7 | + function bail($msg) { |
| 8 | + // Die, or if in debug mode, with a message |
| 9 | + if(GE_DEBUG > 0) { |
| 10 | + die($msg); |
| 11 | + } else { |
| 12 | + die(); |
| 13 | + } |
| 14 | + }
|
| 15 | + |
| 16 | + // returns a constant from the $GLOBALS['constants'] array |
| 17 | + function disp($const) {
|
| 18 | + if ($GLOBALS['constants'][$const]) { |
| 19 | + // This constant is available
|
| 20 | + return $GLOBALS['constants'][$const]; |
| 21 | + } else { |
| 22 | + // Not available, display when GE_DEBUG is on |
| 23 | + if (GE_DEBUG >= 1) { |
| 24 | + return "Unknown constant: $const"; |
| 25 | + } |
| 26 | + }
|
| 27 | + } |
| 28 | + |
| 29 | + // Functions for translating entries. __() gives an echo, ___() returns the value |
| 30 | + // I know, we could have used gettext() for this, but the messages need to be in the |
| 31 | + // db, not in .mo files and i'm lazy |
| 32 | + function __($const) { |
| 33 | + echo disp($const); |
| 34 | + } |
| 35 | + |
| 36 | + function ___($const) { |
| 37 | + return disp($const); |
| 38 | + } |
| 39 | + |
| 40 | + // Simple wrapper for the timthumb.php script |
| 41 | + function timthumb($src, $width, $height, $zoomcrop = 0, $echo = true) { |
| 42 | + $url = GE_URL."inc/timthumb.php?src=$src&w=$width&h=$height&zc=$zc"; |
| 43 | + if($echo) { |
| 44 | + echo $url; |
| 45 | + } else { |
| 46 | + return $url; |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + // shows a variable if GE_DEBUG > 1
|
| 51 | + function debug($var) {
|
| 52 | + if (GE_DEBUG >= 1) {
|
| 53 | + echo $var;
|
| 54 | + }
|
| 55 | + } |
| 56 | + |
| 57 | + function sanitize_dashed($value) {
+ $value = strip_tags($value);
+ $value = strtolower($value);
+ $value = preg_replace('/&.+?;/', '', $value); // kill entities
+ $value = preg_replace('/[^%a-z0-9 _-]/', '', $value);
+ $value = preg_replace('/\s+/', '-', $value);
+ $value = preg_replace('|-+|', '-', $value);
+ $value = trim($value, '-');
+ return $value;
+ } |
| 58 | + |
| 59 | + // Checkes wheter we are in a development environment |
| 60 | + // either because the current URI has 'localhost', '127.0.0.1' or |
| 61 | + // the explicit GE_DEV_MODE is set to true |
| 62 | + function is_development_mode() { |
| 63 | + // TODO add checks for localhost/127.0.0.1, etc |
| 64 | + return GE_DEV_MODE; |
| 65 | + } |
| 66 | +?> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/inc/lib.php |
— | — | @@ -0,0 +1,384 @@ |
| 2 | +<?php |
| 3 | + // displays the explanation that goes with an action or question if applicable
|
| 4 | + function explanation($constant) {
|
| 5 | + $explanation = $GLOBALS['explanations'][$constant];
|
| 6 | + if ($explanation) {
|
| 7 | + echo '<div id="expwrap">';
|
| 8 | + echo '» <a href="#" id="toggleexp">'.disp('EXPLANATION').'</a>'."\n";
|
| 9 | + echo '<div id="explanation" class="jshide"><p>'.$explanation.'</p></div>'."\n";
|
| 10 | + echo '</div>';
|
| 11 | + }
|
| 12 | + }
|
| 13 | +
|
| 14 | + function question($question, $yes, $no, $constant) {
|
| 15 | + $phpself = $_SERVER['PHP_SELF'];
|
| 16 | + echo "<p>$question</p>";
|
| 17 | + explanation($constant);
|
| 18 | + echo '<a href="'.$phpself.'?question='.$yes.'" class="question">'.disp('YES').'</a><br />';
|
| 19 | + echo '<a href="'.$phpself.'?question='.$no.'" class="question">'.disp('NO').'</a></br />';
|
| 20 | + }
|
| 21 | +
|
| 22 | + function action($action, $constant) {
|
| 23 | + // display an action
|
| 24 | + $phpself = $_SERVER['PHP_SELF'];
|
| 25 | + if ($constant == DO_NOT_UPLOAD) {
|
| 26 | + $class = 'caution';
|
| 27 | + } else {
|
| 28 | + $class = 'action';
|
| 29 | + }
|
| 30 | + echo "<p>".disp('ADVICE_WIZARD')."</p>";
|
| 31 | + echo '<div class="'.$class.'">'.$action.'</div>';
|
| 32 | +
|
| 33 | + explanation($constant);
|
| 34 | +
|
| 35 | + // if the action is not 'DO_NOT_UPLOAD' present a link to the upload form
|
| 36 | + if ($constant != DO_NOT_UPLOAD) {
|
| 37 | + echo '<a href="'.$phpself.'?question=uploadform&action='.$constant.'" class="question">'.disp('UPLOAD_LINK').'</a><br />';
|
| 38 | + }
|
| 39 | +
|
| 40 | + echo '<a href="'.GE_HOME.'" class="question">'.disp('START_AGAIN').'</a>';
|
| 41 | + }
|
| 42 | +
|
| 43 | + function fill_globals() { |
| 44 | + global $db; |
| 45 | +
|
| 46 | + // get all values from the db and puts it into a new array called $constants
|
| 47 | + $GLOBALS['constants'] = array();
|
| 48 | + $GLOBALS['explanations'] = array();
|
| 49 | + $messages = $db->select(TB_MESSAGES, array("language" => $GLOBALS['settings']['language'])); |
| 50 | + |
| 51 | + foreach($messages as $message) { |
| 52 | + $GLOBALS['constants'][$message['constant']] = $message['message'];
|
| 53 | +
|
| 54 | + // add to the explanations array if applicable
|
| 55 | + if ($message['explanation']) {
|
| 56 | + $GLOBALS['explanations'][$message['constant']] = $message['explanation'];
|
| 57 | + }
|
| 58 | + }
|
| 59 | +
|
| 60 | + // transfer data to global array
|
| 61 | + $const = $GLOBALS['constants'];
|
| 62 | + $GLOBALS['questions'] = array(
|
| 63 | + "SUBJECT_PROTECTED" => array($const['SUBJECT_PROTECTED'], "DO_NOT_UPLOAD", "OWN_WORK"),
|
| 64 | + "OWN_WORK" => array($const['OWN_WORK'], "WORK_IN_EMPLOYMENT", "CREATOR_PD"),
|
| 65 | + "WORK_IN_EMPLOYMENT" => array($const['WORK_IN_EMPLOYMENT'], "EMPLOYER_PERMISSION", "OWN_PERMISSION"),
|
| 66 | + "CREATOR_PERMISSION" => array($const['CREATOR_PERMISSION'], "UPLOAD_LICENSE_EMAIL", "DO_NOT_UPLOAD"),
|
| 67 | + "CREATOR_PD" => array($const['CREATOR_PD'], "UPLOAD_PD", "DO_NOT_UPLOAD"),
|
| 68 | + "OWN_PERMISSION" => array($const['OWN_PERMISSION'], "UPLOAD_LICENSE", "DO_NOT_UPLOAD"),
|
| 69 | + "EMPLOYER_PERMISSION" => array($const['EMPLOYER_PERMISSION'], "UPLOAD_LICENSE_EMAIL", "DO_NOT_UPLOAD")
|
| 70 | + );
|
| 71 | +
|
| 72 | + $GLOBALS['actions'] = array(
|
| 73 | + "DO_NOT_UPLOAD" => $const['DO_NOT_UPLOAD'],
|
| 74 | + "UPLOAD_PD" => $const['UPLOAD_PD'],
|
| 75 | + "UPLOAD_LICENSE" => $const['UPLOAD_LICENSE'],
|
| 76 | + "UPLOAD_LICENSE_EMAIL" => $const['UPLOAD_LICENSE_EMAIL']
|
| 77 | + );
|
| 78 | + }
|
| 79 | +
|
| 80 | + function show_language_chooser() {
|
| 81 | + // gives a dropdown box of all available languages and changes $GLOBALS['settings']['language'] to that language
|
| 82 | + $languages = array(
|
| 83 | + "en" => "English",
|
| 84 | + "nl" => "Nederlands"
|
| 85 | + );
|
| 86 | +
|
| 87 | + echo '<br /><form method="GET" action="" name="language">';
|
| 88 | + echo disp('CHOOSE_LANGUAGE').': '; |
| 89 | + echo '<select name="newLanguage">'."\n";
|
| 90 | + foreach ($languages as $code=>$language) {
|
| 91 | + // if this is the current selected language give a selected attribute
|
| 92 | + if ($code == $GLOBALS['settings']['language']) {
|
| 93 | + $selected = " selected";
|
| 94 | + } else {
|
| 95 | + $selected = "";
|
| 96 | + }
|
| 97 | + echo '<option value="'.$code.'"'.$selected.'>'.$language.'</option>';
|
| 98 | + }
|
| 99 | + echo '</select>';
|
| 100 | + echo '<input type="submit" action="" value="OK" />';
|
| 101 | + echo '</form>';
|
| 102 | + } |
| 103 | + |
| 104 | + function return_file_upload_errorcode($code) { |
| 105 | + $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 => 'File upload stopped by extension.',
+ ); |
| 106 | + return $errors[$code]; |
| 107 | + } |
| 108 | +
|
| 109 | + function upload_file($file, $filename) { |
| 110 | + $destination = GE_IMAGES_PATH.$filename; |
| 111 | + $moveresult = @move_uploaded_file($_FILES[$file]['tmp_name'], $destination); |
| 112 | + |
| 113 | + $return = array(); |
| 114 | + if ($moveresult) { |
| 115 | + $return['key'] = "ok"; |
| 116 | + $return['value'] = $destination; |
| 117 | + } else { |
| 118 | + $return['key'] = "error"; |
| 119 | + $return['value'] = return_file_upload_errorcode($_FILES[$file]['error']); |
| 120 | + } |
| 121 | + return $return; |
| 122 | + } |
| 123 | + |
| 124 | + function add_image($array) { |
| 125 | + global $db, $settings; |
| 126 | + |
| 127 | + // set up return value |
| 128 | + $return = array(); |
| 129 | + |
| 130 | + // We assume that $array contains all the values we need |
| 131 | + $img_array = build_assoc_array($array, array("file", "title", "source", "name", "email", "license", "disclaimerAgree", "date", "description")); |
| 132 | + |
| 133 | + // check if all needed values are inserted |
| 134 | + $check = check_array_required($img_array, array("title", "source", "name", "email", "license", "disclaimerAgree")); |
| 135 | + if ($check != "ok") { |
| 136 | + $return['key'] = "missing_values"; |
| 137 | + $return['value'] = $check; |
| 138 | + return $return; |
| 139 | + } |
| 140 | + |
| 141 | + // Check if email is valid |
| 142 | + $regex = "/^[^@]+@[^@]+(\.[^@]+)+$/"; |
| 143 | + if (!preg_match($regex, $array['email'])) { |
| 144 | + $return['key'] = "invalid_email"; |
| 145 | + return $return; |
| 146 | + } |
| 147 | + |
| 148 | + // Check if the extension is supported |
| 149 | + $extension = strtolower(strrchr($_FILES["file"]["name"],".")); |
| 150 | + |
| 151 | + if (!in_array($extension, $settings['ALLOWED_EXTENSIONS'])) { |
| 152 | + $return['key'] = "unsupported_extension"; |
| 153 | + return $return; |
| 154 | + } |
| 155 | + |
| 156 | + // Check if the resolution is high enough |
| 157 | + $imagesize = getimagesize($_FILES["file"]["tmp_name"]); |
| 158 | + if ( ($imagesize[0] < GE_MIN_RESOLUTION) || ($imagesize[1] < GE_MIN_RESOLUTION) ) { |
| 159 | + $return['key'] = "low_resolution"; |
| 160 | + return $return; |
| 161 | + } |
| 162 | + |
| 163 | + // Okay, upload the image |
| 164 | + // First we make an unique name simply by using a sanitized title + the current UNIX timestamp |
| 165 | + $filename = sanitize_dashed($img_array["title"])."-".time().".jpg"; |
| 166 | + |
| 167 | + $upload_result = upload_file("file", $filename); |
| 168 | + if ($upload_result['key'] == "error") { |
| 169 | + $return['key'] = "upload_false"; |
| 170 | + $return['value'] = $upload_result['value']; |
| 171 | + return $return; |
| 172 | + } else if ($upload_result['key'] == "ok") { |
| 173 | + $img_array["filename"] = $filename; |
| 174 | + unset($img_array["file"]); |
| 175 | + unset($img_array["disclaimerAgree"]); |
| 176 | + } |
| 177 | + |
| 178 | + // Also add a timestamp and IP to the DB entry |
| 179 | + $img_array["timestamp"] = time(); |
| 180 | + $img_array["ip"] = $_SERVER['REMOTE_ADDR']; |
| 181 | + |
| 182 | + // build the query and execute it |
| 183 | + $result = $db->insert(TB_IMAGES, $img_array); |
| 184 | + if ($result) { |
| 185 | + $return['key'] = "db_ok"; |
| 186 | + |
| 187 | + // Also add the id from mysql_insert_id() |
| 188 | + $img_array['id'] = $db->last_insert_id; |
| 189 | + $return['value'] = $img_array; |
| 190 | + } else { |
| 191 | + $return['key'] = "db_error"; |
| 192 | + $return['value'] = mysql_error(); |
| 193 | + } |
| 194 | + return $return; |
| 195 | + } |
| 196 | + |
| 197 | + function check_array_required($array, $required) { |
| 198 | + $return = ''; |
| 199 | + foreach ($required as $value) { |
| 200 | + if ($array[$value] == "") { |
| 201 | + // we translate the form names as well |
| 202 | + $translate = array( |
| 203 | + 'title' => ___('FORM_TITLE'), |
| 204 | + 'source' => ___('FORM_SOURCE'), |
| 205 | + 'name' => ___('FORM_NAME'), |
| 206 | + 'email' => ___('FORM_EMAIL'), |
| 207 | + 'disclaimerAgree' => ___('FORM_DISCLAIMER_AGREE') |
| 208 | + ); |
| 209 | + |
| 210 | + foreach ($translate as $val=>$trans) { |
| 211 | + if ($value == $val) $value = $trans; |
| 212 | + } |
| 213 | + $return .= $value.", "; |
| 214 | + } |
| 215 | + } |
| 216 | + $return = ($return == '') ? "ok" : $return; |
| 217 | + return $return; |
| 218 | + } |
| 219 | + |
| 220 | + function build_assoc_array($inputarray, $okvalues) { |
| 221 | + $newarray = array(); |
| 222 | + foreach ($inputarray as $key=>$value) { |
| 223 | + if (in_array($key, $okvalues)) { |
| 224 | + $newarray[$key] = $value; |
| 225 | + } |
| 226 | + } |
| 227 | + return $newarray; |
| 228 | + } |
| 229 | + |
| 230 | + /* |
| 231 | + * Sends an e-mail to OTRS containing the data from this upload |
| 232 | + */ |
| 233 | + function send_otrs_mail($data) { |
| 234 | + global $settings; |
| 235 | + |
| 236 | + $id = $data['id']; |
| 237 | + $secret = md5(GE_SECRET.$data['id'].$data['timestamp']); |
| 238 | + |
| 239 | + $msg = "Content-Type: text/plain; charset=UTF-8\n"; |
| 240 | + $msg .= " |
| 241 | +Beste OTRS vrijwillger, |
| 242 | +zojuist is er op www.wikiportret.nl een nieuwe foto geupload. |
| 243 | +Deze foto heeft als titel '".$data['title']."', gemaakt door '".$data['source']."' |
| 244 | +onder de licentie '".$data['license']."' met als omschrijving '".$data['description']."' |
| 245 | +De uploader heeft het volgende IP-adres: '".$data['ip']."' |
| 246 | + |
| 247 | +Je kunt de foto bekijken op Wikiportret en de foto daar afwijzen, of een tekst genereren die |
| 248 | +je kan copy-pasten om een e-mail te schrijven. |
| 249 | + |
| 250 | +Klik op deze link: |
| 251 | +".GE_URL."admin/?id=$id&secret=$secret |
| 252 | + |
| 253 | +Als je vragen hebt over de uploadwizard kun je terecht bij Hay (Husky) |
| 254 | +via http://nl.wikipedia.org/wiki/Gebruiker:Husky of eventueel via hay@bykr.org. |
| 255 | + |
| 256 | +Al vast heel erg bedankt voor je medewerking! |
| 257 | +"; |
| 258 | + |
| 259 | + // ok, mail |
| 260 | + $to = GE_OTRS_MAIL; |
| 261 | + $subject = "[Wikiportret] ".$data['title']." geupload op wikiportret.nl"; |
| 262 | + if(GE_DEV_MODE > 0) $subject = "TEST-MODE:".$subject; |
| 263 | + $headers = 'From: '.$data['email']."\r\n". |
| 264 | + 'Reply-to: '.$data['email']."\r\n". |
| 265 | + 'X-Mailer: PHP/'.phpversion(); |
| 266 | + |
| 267 | + @$mail = mail($to, $subject, $msg, $headers); |
| 268 | + |
| 269 | + // Also mail to some extra people |
| 270 | + foreach($settings['EXTRA_MAIL_RECEIVERS'] as $address) { |
| 271 | + @mail($address, $subject, $msg, $headers); |
| 272 | + } |
| 273 | + |
| 274 | + if ($mail) { |
| 275 | + return true; |
| 276 | + } else { |
| 277 | + return false; |
| 278 | + } |
| 279 | + } |
| 280 | + |
| 281 | + function show_page($page) { |
| 282 | + // echoes the contents of a static page from the /pages directory |
| 283 | + // used for the welcome page, form page, license page, etc. |
| 284 | + $file = ABSPATH.'pages/'.$page.'_'.$GLOBALS['settings']['language'].'.php'; |
| 285 | + if (is_file($file)) {
|
| 286 | + $text = file_get_contents($file);
|
| 287 | + } else {
|
| 288 | + $text = "<p class='error'>ERROR: No page could be found for language code '".$GLOBALS['settings']['language']."'</p>";
|
| 289 | + } |
| 290 | + echo $text; |
| 291 | + }
|
| 292 | +
|
| 293 | + function show_wizard() { |
| 294 | + global $settings; |
| 295 | +
|
| 296 | + $question = $GLOBALS['question'];
|
| 297 | + $questions = $GLOBALS['questions'];
|
| 298 | + $actions = $GLOBALS['actions'];
|
| 299 | + $phpself = $_SERVER['PHP_SELF'];
|
| 300 | +
|
| 301 | + if (!$question) {
|
| 302 | + // welcome, no questions yet
|
| 303 | + show_language_chooser(); // gives a dropdown box of all available languages and changes $GLOBALS['settings']['language'] to that language
|
| 304 | + echo "<p>".disp('WELCOME_MESSAGE')."</p>";
|
| 305 | + echo '<a href="'.$phpself.'?question=first" class="question">'.disp('CLICK_TO_BEGIN').'</a>'; |
| 306 | + } else if ($question == "licenses") { |
| 307 | + show_page('licenses');
|
| 308 | + echo '<a href="'.GE_HOME.'" class="question">'.disp('START_AGAIN').'</a>';
|
| 309 | + } else if ($question == "uploadform") { |
| 310 | + if (isset($_POST['btnUpload'])) { |
| 311 | + $result = add_image($_POST); |
| 312 | + $msg_status = "alert"; // we presume there will be an error :) |
| 313 | + if ($result['key'] == "db_ok") { |
| 314 | + $msg_status = "ok"; |
| 315 | + } else if ($result['key'] == "upload_false") { |
| 316 | + $msg = "Ik kon het bestand niet uploaden vanwege ".$result['value']; |
| 317 | + } else if ($result['key'] == "db_error") { |
| 318 | + $msg = "Er was een fout met de database: ".$result['value']; |
| 319 | + } else if ($result['key'] == "thumbnail_error") { |
| 320 | + $msg = "Er is een fout opgetreden bij het maken van de thumbnails: ".$result['value']; |
| 321 | + $msg .= "<br />De foto is <strong>niet</strong> toegevoegd aan de website!"; |
| 322 | + } else if ($result['key'] == "invalid_email") { |
| 323 | + $msg = "Het door u opgegeven e-mail adres is niet correct"; |
| 324 | + } else if ($result['key'] == "unsupported_extension") { |
| 325 | + $msg = "Het bestand wat u probeert te uploaden is geen afbeelding. De afbeeldingstypes die wij ondersteunen zijn: "; |
| 326 | + foreach ($settings['ALLOWED_EXTENSIONS'] as $ext) { |
| 327 | + $msg .= $ext.", "; |
| 328 | + } |
| 329 | + } else if ($result['key'] == "low_resolution") { |
| 330 | + $msg = "De resolutie van uw afbeelding is te laag. De minimale afmetingen van uw afbeelding moet 640x480 pixels zijn."; |
| 331 | + } else if ($result['key'] == "missing_values") { |
| 332 | + // missing values |
| 333 | + $msg = "Deze waardes zijn niet ingevuld maar zijn wel noodzakelijk: ".$result['value']; |
| 334 | + } |
| 335 | + |
| 336 | + // files uploaded |
| 337 | + if ($msg_status == "ok") { |
| 338 | + // Send an e-mail to OTRS |
| 339 | + |
| 340 | + if (send_otrs_mail($result['value'])) { |
| 341 | + echo '<h2>'.disp('UPLOAD_SUCCESSFUL').'</h2>'; |
| 342 | + echo '<p>'.disp('UPLOAD_SUCCESSFUL_MESSAGE').'</p>';
|
| 343 | + echo '<big>'.disp('THANKS_UPLOAD').'</big>';
|
| 344 | + echo '<a href="'.$phpself.'?question=uploadform" class="question">'.disp('UPLOAD_ANOTHER_IMAGE').'</a><br />'; |
| 345 | + echo '<p style="margin-top:0;"><em>'.disp('UPLOAD_ANOTHER_IMAGE_WARNING').'</em></p>'; |
| 346 | + } else { |
| 347 | + // OTRS mail failed for some reason |
| 348 | + echo '<h2>'.disp('UPLOAD_FAILED').'</h2>'; |
| 349 | + echo '<p>'.disp('TRY_AGAIN_LATER').'</h2>'; |
| 350 | + } |
| 351 | + } else { |
| 352 | + echo '<h2>'.disp('UPLOAD_FAILED').'</h2>'; |
| 353 | + echo '<p>'.$msg.'</p>'; |
| 354 | + echo '<p><a href="#" id="goback">'.disp('GO_BACK_CHANGE_VALUES').'</a></p>'; |
| 355 | + }
|
| 356 | + } else {
|
| 357 | + // files not uploaded yet, only display upload form |
| 358 | + show_page('uploadform');
|
| 359 | + }
|
| 360 | +
|
| 361 | + echo '<a href="'.GE_HOME.'" class="question">'.disp('START_AGAIN').'</a>';
|
| 362 | + } else if ($question == "first") {
|
| 363 | + // first time question
|
| 364 | + // give 'SUBJECT_PROTECTED' in the function to avoid having to search explanations for 'first'
|
| 365 | + question ($questions["SUBJECT_PROTECTED"][0], $questions['SUBJECT_PROTECTED'][1], $questions['SUBJECT_PROTECTED'][2], 'SUBJECT_PROTECTED');
|
| 366 | + } else {
|
| 367 | + // not the first question or welcome
|
| 368 | + if (!array_key_exists($question, $actions)) {
|
| 369 | + question ($questions[$question][0], $questions[$question][1], $questions[$question][2], $question);
|
| 370 | + } else {
|
| 371 | + // not a question but an action
|
| 372 | + action($actions[$question], $question);
|
| 373 | + }
|
| 374 | + }
|
| 375 | + }
|
| 376 | +?> |
\ No newline at end of file |
Property changes on: trunk/tools/wikiportrait/inc/lib.php |
___________________________________________________________________ |
Name: svn:executable |
1 | 377 | + * |
Index: trunk/tools/wikiportrait/inc/common.php |
— | — | @@ -0,0 +1,36 @@ |
| 2 | +<?php |
| 3 | + // General variables |
| 4 | + $wikiportrait_version = "1.1beta-3"; |
| 5 | + |
| 6 | + if(!@include 'config.php') die("Could not find config.php. Maybe you haven't made a configuration file yet?"); |
| 7 | + require 'lib.php'; // General library |
| 8 | + require 'lib-db.php'; // Global database Class |
| 9 | + require 'lib-utils.php'; // Utility stuff |
| 10 | + require 'lib-admin.php'; // stuff for admin/index.php |
| 11 | + |
| 12 | + // connect to db |
| 13 | + $db = new db(DB_HOST, DB_USER, DB_PASS, DB_DATABASE); |
| 14 | + |
| 15 | + // start session
|
| 16 | + session_start();
|
| 17 | +
|
| 18 | + // select language |
| 19 | + $newLanguage = $_GET['newLanguage'];
|
| 20 | + if ($newLanguage) {
|
| 21 | + // set new language
|
| 22 | + $_SESSION['language'] = $newLanguage;
|
| 23 | + }
|
| 24 | +
|
| 25 | + // failsafe is value is not yet set
|
| 26 | + if (!$_SESSION['language']) {
|
| 27 | + $_SESSION['language'] = GE_LANGUAGE; // default language set in config.php
|
| 28 | + }
|
| 29 | +
|
| 30 | + // fill a global var with the language
|
| 31 | + $GLOBALS['settings']['language'] = $_SESSION['language'];
|
| 32 | +
|
| 33 | + // fill all global variables with data from the db
|
| 34 | + fill_globals();
|
| 35 | +
+ $GLOBALS['question'] = $_GET['question']; |
| 36 | +?> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/style_ie6.css |
— | — | @@ -0,0 +1,3 @@ |
| 2 | +label { |
| 3 | + clear: both; |
| 4 | +} |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/_header.php |
— | — | @@ -0,0 +1,55 @@ |
| 2 | +<?php |
| 3 | + include 'inc/common.php'; |
| 4 | +?> |
| 5 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| 6 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
|
| 7 | + <head>
|
| 8 | + <!--
|
| 9 | + Wikiportrait v<?php echo $wikiportrait_version; ?>
|
| 10 | + Programmed by [[User:Husky]] / Hay Kranen
|
| 11 | + Released under the terms of the GNU Public License, version 2 or later
|
| 12 | + Concept by the Werkgroep Vrije Media (Workgroup Free Media) of the Dutch Chapter
|
| 13 | + of the Wikimedia Foundation: http://nl.wikimedia.org
|
| 14 | + -->
|
| 15 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 16 | + <link rel="stylesheet" type="text/css" href="style.css" />
|
| 17 | + <!--[if lt IE 7]> |
| 18 | + <link rel="stylesheet" href="style_ie6.css" type="text/css" media="screen" /> |
| 19 | + <![endif]--> |
| 20 | + <style type="text/css"> |
| 21 | + #wrapper { |
| 22 | + /* we need to set this here because it might change per language */ |
| 23 | + background: url('images/logo_<?php echo $GLOBALS['settings']['language']; ?>.png') top left no-repeat; |
| 24 | + } |
| 25 | + </style> |
| 26 | + |
| 27 | + <script type="text/javascript" src="javascript/jquery.js"></script> |
| 28 | + <script type="text/javascript" src="javascript/lib_formvalidation.js"></script> |
| 29 | + <script type="text/javascript" src="javascript/lib_js.js"></script> |
| 30 | + <script type="text/javascript"> |
| 31 | + var GE_WIZARD='<?php echo GE_WIZARD; // this is a quick hack to prevent having to write a parser for the uploadforms :) ?>'; |
| 32 | + var GE_URL='<?php echo GE_URL; ?>'; |
| 33 | + |
| 34 | + var messages = {}; |
| 35 | + <?php |
| 36 | + $values = array("EMPTY_VALUE", "INVALID_EMAIL", "INVALID_EMAIL_PROVIDER", "DISCLAIMER_NOT_AGREED", "INVALID_FILETYPE", "WAIT_FOR_UPLOAD"); |
| 37 | + foreach($values as $value) { |
| 38 | + echo "messages.$value = '".addslashes(___($value))."';\n"; |
| 39 | + } |
| 40 | + ?> |
| 41 | + </script> |
| 42 | + <title> |
| 43 | + <?php if(GE_DEV_MODE > 0) echo "TEST MODE - "; ?> |
| 44 | + <?php __('TITLE'); ?> |
| 45 | + </title>
|
| 46 | + </head>
|
| 47 | + <body>
|
| 48 | + <div id="wrapper">
|
| 49 | + <div id="header">
|
| 50 | + <h1> |
| 51 | + <a href="<?php echo GE_HOME; ?>"> |
| 52 | + <?php if(GE_DEV_MODE > 0) echo "TEST MODE - "; ?> |
| 53 | + <?php __('TITLE'); ?> |
| 54 | + </a> |
| 55 | + </h1>
|
| 56 | + </div> |
\ No newline at end of file |
Index: trunk/tools/wikiportrait/index.php |
— | — | @@ -0,0 +1,43 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + Wikiportrait - upload, tag and manage uploads of media with a free license, specific for Wikimedia projects |
| 5 | + Copyright (C) 2008-2009 Hay Kranen (hay@bykr.org) / [[User:Husky]] |
| 6 | + Originally developed for Wikimedia Nederland: <http://nl.wikimedia.org> |
| 7 | + |
| 8 | + This program is free software: you can redistribute it and/or modify |
| 9 | + it under the terms of the GNU General Public License as published by |
| 10 | + the Free Software Foundation, either version 3 of the License, or |
| 11 | + (at your option) any later version. |
| 12 | + |
| 13 | + This program is distributed in the hope that it will be useful, |
| 14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | + GNU General Public License for more details. |
| 17 | + |
| 18 | + You should have received a copy of the GNU General Public License |
| 19 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | + |
| 21 | + This software contains (pieces of) software from other people under a free license, |
| 22 | + see doc/readme.txt for more information |
| 23 | + |
| 24 | + See doc/gpl.txt for the full GPLv3 license |
| 25 | +*/ |
| 26 | + |
| 27 | + include '_header.php'; |
| 28 | +?> |
| 29 | + <div id="questions"> |
| 30 | + <?php |
| 31 | + show_page('welcome'); |
| 32 | + ?> |
| 33 | + |
| 34 | + <p> |
| 35 | + <a href="<?php echo GE_WIZARD; ?>?question=first" class="question"><?php echo disp('CLICK_TO_BEGIN'); ?></a> |
| 36 | + </p> |
| 37 | + |
| 38 | + <?php |
| 39 | + show_page('welcome_disclaimer'); |
| 40 | + ?> |
| 41 | + </div> <!-- /questions --> |
| 42 | +<?php |
| 43 | + include '_footer.php'; |
| 44 | +?> |
\ No newline at end of file |