# HG changeset patch # User dan@scribus.fuhry.local.fuhry.local # Date 1181764980 14400 # Node ID 902822492a682e515f25e35a7269d17f8d21a5a9 Initial population diff -r 000000000000 -r 902822492a68 .htaccess diff -r 000000000000 -r 902822492a68 GPL --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GPL Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,131 @@ +Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +== Preamble == + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +== Terms and conditions for copying, distribution and modification == + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +* You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. +* You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. +* If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + +* Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, +* Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, +* Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +== No Warranty == + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 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. + +END OF TERMS AND CONDITIONS + +== How to Apply These Terms to Your New Programs == + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This 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. + diff -r 000000000000 -r 902822492a68 KNOWN_BUGS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/KNOWN_BUGS Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,75 @@ +Enano 1.0RC2 - Known Issues and Bugs +--------------------------------------------------------------------- + +In the Javascripted Access Control List editor, the text "on this +page" appears at the top of the editor window, even if the user +selected that the rule affect the entire site. This does not affect +the behavior of the rule; it will still affect the entire site. This +bug has been fixed in upstream. + +The Javascripted ACL editor currently is not supported in Internet +Explorer. The safe (non-JS) version of the editor is used instead. +There is no planned fix for this, the workaround is to use Firefox. + +On seemingly random occasions, the "more options" menu on some pages +does not show when the mouse is hovered over it. The only known +workaround at this point is to reload the page. The bug seems to be +more prevalent on Windows systems. + +The RenderMan class is in a state of transition - the wikiFormat +method is unchanged but a new next_gen_wiki_format method has been +added. The new method is parameter-incompatible with the old +wikiFormat, so developers should continue to use wikiFormat for the +time being. This transition will be finalized in Banshee. + +The Moderators group never got included in the schema. Whoops... +To create it just create a group as normal in the admin panel and +MAKE SURE IT HAS group_id 3! If it doesn't then do a manual SQL +query to set it to group_id 3. This will be fixed in the gold +release for sure. + +The search box is visually distorted. The cause of this is not known. + +The Links sidebar block is empty by default. Want to contribute some +filler HTML that doesn't suck? Be my guest! + +The files table is borked. I don't know how or why, but somehow the +updated structure apparently didn't make it into RC1 OR RC2. This +applies ONLY to installations, and not upgrades. Fixed in 1.0. + +It is possible to inject PHP into pages by using the +tags as normal, even when not logged in. + +OK, I was only KIDDING on that last one. + + +Enano 1.0RC1 - Known Issues and Bugs +--------------------------------------------------------------------- + +First and foremost, changing a user's password, either from the +preferences page or the admin panel, DOES NOT work. The password +reset feature is working properly. A fix for this issue will be +included in RC2 (Clurichaun). + +The Javascripted ACL editor currently is not supported in Internet +Explorer. The safe (non-JS) version of the editor is used instead. + +Uploaded files are checked based on their extension, not with a +MIME magic file like they used to be. Depending on what kind of +feedback I get, I can re-enable FileInfo support. Much of the code +is already there, just commented out. + +Setting up Enano on servers running IIS is currently very difficult, +but it is doable. Make sure that you use a newer version of PHP (5.x) +because PHP4 has some issues with the MySQL client library. + +Reverting file creation doesn't work. Need to rewrite rollback code +for the files table. + +There's more. I can't think of it right now, but the bugs are there. +If you find anything, please report it on +http://bugzilla.enanocms.org. + +(Note - the bug tracker itself is still being set up, so that might +not work either) + diff -r 000000000000 -r 902822492a68 TODO --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TODO Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,74 @@ +Enano Banshee - TODO +------------------------------------------ + +[ ] COPPA compliance +[x] Add in Moderators group + [x] Create default ACL rule for mods +[x] Fix invalid HTML in SF.net logo +[ ] Clean up the wikitext parser - a lot. It needs some serious work. + We need a way to detect whether the text is mostly HTML, and if + so, then leave stuff like automatic adding of

and
out + of the picture. Continue to parse wikilinks. +[x] Add a system_group column and if it's set to 1, give (at least) a + stern warning before deleting the group. Maybe disable the delete + button altogether? +[x] SQL exporter: fix structure exporting when an auto column is defined + and it's a named key (see pun_search_words) +[x] Possibly add these fields: AIM, Yahoo, MSN, XMPP messenger icons, then homepage, location, occupation, hobbies, allow public e-mail display + [ ] Put it in a user_extra table and have an option to enable or disable these fields in the admin panel + [Y] Delay until RC3 or Banshee? + [ ] When added, put a box on the user page that shows the information +[x] Fix "this page" bug in ACL editor + [x] The problem itself got fixed BUT there seem to be deeper problems related to scope selection + This needs to be FIXED and WORKING PERFECTLY in Banshee! +[x] Change the string shown on a successful re-auth into elevated privileges + [x] ...and write a function that converts a numeric userlevel to a string +[x] Make Special:Login remember parameters (target level, target page) even on auth fail + + +Enano Clurichaun - TODO +------------------------------------------ + +[x] Finish rewriting userprefs panel + Remaining components: + [x] Signature + [x] Real name +[x] When a user's level is set to Moderator or Administrator, automatically add them to the respective group +[x] Fix de-authentication button in admin panel +[x] Merge newer artwork into installer; make trademark notices +[x] Case-insensitive usernames for login +[x] Mass e-mail function in admin panel + +Enano Leprechaun - TODO +------------------------------------------ +[x] Make a frontend for creating/managing usergroups in the admin panel +[x] Make a frontend for group mods to add/remove group members in a new special page +[x] Create ACL editing frontends - preferably a "Manage access" button on every page and in the user admin panel + [x] Need no-Javascript version of ACL editor +[x] Make absolutely everything check for the proper access - do a complete audit of index.php and pageutils.php + [x] Also need to check RenderMan::getPage, and require view_source privileges to get pages without wiki + formatting or without PHP/HTML code + [x] Check permissions for uploaded files and category editing - if the category is protected and the user doesn't have + even_when_protected rights, lock down the category from adding/removing articles + [x] For this to work, need SessionManager's ability to calculate effective permissions for a page implemented +[x] Update installation schema to create the default Everyone, Administrators, and Moderators groups and insert the + admin user into Moderators and Administrators +[x] Update the upgrade schema - last point plus add in table creation for e_groups, e_group_members, and e_acl +[x] AJAX: Access control list editor + [x] Write a template parsing class in Javascript + [x] Use JSON to transport template data, permission types, etc. to the javascript client + [x] Use JSON to send the updated permissions back to the server +[x] File uploads: Rewrite Special:UploadFile to work with new storage system +[x] Implement password reset +[x] Fix empty group bug in javascripted ACL editor + +Delayed: + +[x] REWRITE Special:Preferences - settle for nothing less than perfect on this one! (DELAYED until RC2 - put password reset issues in known bugs) +[ ] Implement ACL presets (DELAYED until RC2) + +Website-related: + +[ ] Enano website: add versioning rules page (like linux: x.y.z: x is major release, y is minor, and z is revision; if y is odd then its a beta) +[ ] Enano website: create codename tracker page (PARTIALLY DONE) + diff -r 000000000000 -r 902822492a68 ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ajax.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,216 @@ +page, $p); + break; + case "getpage": + // echo PageUtils::getpage($paths->page, false, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false )); + $page = new PageProcessor( $paths->cpage['urlname_nons'], $paths->namespace ); + $page->send(); + break; + case "savepage": + $summ = ( isset($_POST['summary']) ) ? $_POST['summary'] : ''; + $minor = isset($_POST['minor']); + $e = PageUtils::savepage($paths->cpage['urlname_nons'], $paths->namespace, $_POST['text'], $summ, $minor); + if($e=='good') + { + $page = new PageProcessor($paths->cpage['urlname_nons'], $paths->namespace); + $page->send(); + } + else + { + echo 'Error saving the page: '.$e; + } + break; + case "protect": + echo PageUtils::protect($paths->cpage['urlname_nons'], $paths->namespace, (int)$_POST['level'], $_POST['reason']); + break; + case "histlist": + echo PageUtils::histlist($paths->cpage['urlname_nons'], $paths->namespace); + break; + case "rollback": + echo PageUtils::rollback( (int)$_GET['id'] ); + break; + + /* + * This is old code and should not be used. It's badly broken and a perfect example of bad database organization. + + case "addcomment": + $cc = ( isset($_POST['captcha_code']) ) ? $_POST['captcha_code'] : false; + $ci = ( isset($_POST['captcha_id'] ) ) ? $_POST['captcha_id'] : false; + if(!isset($_POST['text']) || + !isset($_POST['subj']) || + !isset($_POST['name'])) die('alert(\'Error in POST DATA string, aborting\');'); + if($_POST['text']=='' || + $_POST['name']=='' || + $_POST['subj']=='') die('alert(\'One or more POST DATA fields was empty, aborting post submission\')'); + echo PageUtils::addcomment($paths->cpage['urlname_nons'], $paths->namespace, $_POST['name'], $_POST['subj'], $_POST['text'], $cc, $ci); + break; + case "comments": + echo PageUtils::comments($paths->cpage['urlname_nons'], $paths->namespace, ( isset($_GET['action']) ? $_GET['action'] : false ), Array( + 'name' => ( isset($_POST['name']) ) ? $_POST['name'] : '', + 'subj' => ( isset($_POST['subj']) ) ? $_POST['subj'] : '', + 'text' => ( isset($_POST['text']) ) ? $_POST['text'] : '' + )); + break; + case "savecomment": + echo PageUtils::savecomment($paths->cpage['urlname_nons'], $paths->namespace, $_POST['s'], $_POST['t'], $_POST['os'], $_POST['ot'], $_POST['id']); + break; + case "deletecomment": + echo PageUtils::deletecomment($paths->cpage['urlname_nons'], $paths->namespace, $_POST['name'], $_POST['subj'], $_POST['text'], $_GET['id']); + break; + */ + + case "comments": + $comments = new Comments($paths->cpage['urlname_nons'], $paths->namespace); + if ( isset($_POST['data']) ) + { + $comments->process_json($_POST['data']); + } + else + { + die('{ "mode" : "error", "error" : "No input" }'); + } + break; + case "rename": + echo PageUtils::rename($paths->cpage['urlname_nons'], $paths->namespace, $_POST['newtitle']); + break; + case "flushlogs": + echo PageUtils::flushlogs($paths->cpage['urlname_nons'], $paths->namespace); + break; + case "deletepage": + echo PageUtils::deletepage($paths->cpage['urlname_nons'], $paths->namespace); + break; + case "delvote": + echo PageUtils::delvote($paths->cpage['urlname_nons'], $paths->namespace); + break; + case "resetdelvotes": + echo PageUtils::resetdelvotes($paths->cpage['urlname_nons'], $paths->namespace); + break; + case "getstyles": + echo PageUtils::getstyles($_GET['id']); + break; + case "catedit": + echo PageUtils::catedit($paths->cpage['urlname_nons'], $paths->namespace); + break; + case "catsave": + echo PageUtils::catsave($paths->cpage['urlname_nons'], $paths->namespace, $_POST); + break; + case "setwikimode": + echo PageUtils::setwikimode($paths->cpage['urlname_nons'], $paths->namespace, (int)$_GET['mode']); + break; + case "setpass": + echo PageUtils::setpass($paths->cpage['urlname_nons'], $paths->namespace, $_POST['password']); + break; + case "wikihelp": + $html = file_get_contents('http://www.enanocms.org/ajax.php?title=Help:Wiki_formatting&_mode=getpage&nofooters'); + $html = str_replace('src="/Special', 'src="http://www.enanocms.org/Special', $html); + echo '

Wiki formatting guide

'.$html.'
'; + break; + case "fillusername": + $name = (isset($_GET['name'])) ? $db->escape($_GET['name']) : false; + if(!$name) die('userlist = new Array(); errorstring=\'Invalid URI\''); + $q = $db->sql_query('SELECT username,user_id FROM '.table_prefix.'users WHERE username LIKE \'%'.$name.'%\';'); + if(!$q) die('userlist = new Array(); errorstring=\'MySQL error selecting username data: '.addslashes(mysql_error()).'\''); + if($db->numrows() < 1) die('userlist = new Array(); errorstring=\'No usernames found.\''); + echo 'var errorstring = false; userlist = new Array();'; + $i=0; + while($r = $db->fetchrow()) + { + echo "userlist[$i] = '".addslashes($r['username'])."'; "; + $i++; + } + $db->free_result(); + break; + case "fillpagename": + $name = (isset($_GET['name'])) ? $_GET['name'] : false; + if(!$name) die('userlist = new Array(); namelist = new Array(); errorstring=\'Invalid URI\''); + $nd = RenderMan::strToPageID($name); + $c = 0; + $u = Array(); + $n = Array(); + for($i=0;$ipages)/2;$i++) + { + if( ( + preg_match('#'.preg_quote($name).'(.*)#i', $paths->pages[$i]['name']) || + preg_match('#'.preg_quote($name).'(.*)#i', $paths->pages[$i]['urlname']) || + preg_match('#'.preg_quote($name).'(.*)#i', $paths->pages[$i]['urlname_nons']) || + preg_match('#'.preg_quote(str_replace(' ', '_', $name)).'(.*)#i', $paths->pages[$i]['name']) || + preg_match('#'.preg_quote(str_replace(' ', '_', $name)).'(.*)#i', $paths->pages[$i]['urlname']) || + preg_match('#'.preg_quote(str_replace(' ', '_', $name)).'(.*)#i', $paths->pages[$i]['urlname_nons']) + ) && + ( ( $nd[1] != 'Article' && $paths->pages[$i]['namespace'] == $nd[1] ) || $nd[1] == 'Article' ) + && $paths->pages[$i]['visible'] + ) + { + $c++; + $u[] = $paths->pages[$i]['name']; + $n[] = $paths->pages[$i]['urlname']; + } + } + if($c > 0) + { + echo 'userlist = new Array(); namelist = new Array(); errorstring = false; '."\n"; + for($i=0;$iInvalid request.

'; $template->footer(); break; } + if(!preg_match('#^([0-9]+)$#', (string)$_GET['diff1']) || + !preg_match('#^([0-9]+)$#', (string)$_GET['diff2'] )) { echo '

SQL injection attempt

'; $template->footer(); break; } + echo PageUtils::pagediff($paths->cpage['urlname_nons'], $paths->namespace, $id1, $id2); + break; + case "jsres": + die('// ERROR: this section is deprecated and has moved to includes/clientside/static/enano-lib-basic.js.'); + break; + case "rdns": + if(!$session->get_permissions('mod_misc')) die('Go somewhere else for your reverse DNS info!'); + $ip = $_GET['ip']; + $rdns = gethostbyaddr($ip); + if($rdns == $ip) echo 'Unable to get reverse DNS information. Perhaps the IP address does not exist anymore.'; + else echo $rdns; + break; + case 'acljson': + $parms = ( isset($_POST['acl_params']) ) ? rawurldecode($_POST['acl_params']) : false; + echo PageUtils::acl_json($parms); + break; + default: + die('Hacking attempt'); + break; + } + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 cache/.htaccess --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cache/.htaccess Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,1 @@ +Deny from all diff -r 000000000000 -r 902822492a68 cache/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cache/index.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,13 @@ +perms['edit_page'] = AUTH_DENY; +$session->perms['view_source'] = AUTH_DENY; +$template->tpl_strings['PAGE_NAME'] = 'Access denied'; + +$template->header(); +echo '

The administrator has flagged the page "' . $_SERVER['REQUEST_URI'] . '" so that it cannot be accessed from the web. Perhaps this is because this is a cache or includes directory and only needs to be accessed by scripts.

HTTP error: 403 Forbidden

'; +$template->footer(); +$db->close(); diff -r 000000000000 -r 902822492a68 config.php diff -r 000000000000 -r 902822492a68 files/.htaccess --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/.htaccess Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,1 @@ +Deny from all diff -r 000000000000 -r 902822492a68 files/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/index.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,13 @@ +perms['edit_page'] = AUTH_DENY; +$session->perms['view_source'] = AUTH_DENY; +$template->tpl_strings['PAGE_NAME'] = 'Access denied'; + +$template->header(); +echo '

The administrator has flagged the page "' . $_SERVER['REQUEST_URI'] . '" so that it cannot be accessed from the web. Perhaps this is because this is a cache or includes directory and only needs to be accessed by scripts.

HTTP error: 403 Forbidden

'; +$template->footer(); +$db->close(); diff -r 000000000000 -r 902822492a68 images/about-powered-enano-hover.png Binary file images/about-powered-enano-hover.png has changed diff -r 000000000000 -r 902822492a68 images/about-powered-enano.png Binary file images/about-powered-enano.png has changed diff -r 000000000000 -r 902822492a68 images/about-powered-mysql.png Binary file images/about-powered-mysql.png has changed diff -r 000000000000 -r 902822492a68 images/about-powered-php.png Binary file images/about-powered-php.png has changed diff -r 000000000000 -r 902822492a68 images/bad.gif Binary file images/bad.gif has changed diff -r 000000000000 -r 902822492a68 images/delete.png Binary file images/delete.png has changed diff -r 000000000000 -r 902822492a68 images/disenable.png Binary file images/disenable.png has changed diff -r 000000000000 -r 902822492a68 images/edit.png Binary file images/edit.png has changed diff -r 000000000000 -r 902822492a68 images/enano-artwork/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/enano-artwork/README Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,8 @@ +The images in this directory are copyright (C) 2007 Dan Fuhry. Except +as permitted by applicable law, they may not be used in any way other +than to promote the unmodified Enano CMS. You also may not modify and +then distribute the images in this directory, or distribute them sep- +arately from the Enano packages. The goal here is to establish a uni- +que identity for Enano through the use of a logo, and that identity +would be confused if this logo is used for unofficial Enano distros. + diff -r 000000000000 -r 902822492a68 images/enano-artwork/installer-greeting-blue.png Binary file images/enano-artwork/installer-greeting-blue.png has changed diff -r 000000000000 -r 902822492a68 images/enano-artwork/installer-greeting-green.png Binary file images/enano-artwork/installer-greeting-green.png has changed diff -r 000000000000 -r 902822492a68 images/error.png Binary file images/error.png has changed diff -r 000000000000 -r 902822492a68 images/good.gif Binary file images/good.gif has changed diff -r 000000000000 -r 902822492a68 images/grippy.gif Binary file images/grippy.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/empty.gif Binary file images/icons/empty.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/join.gif Binary file images/icons/join.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/joinbottom.gif Binary file images/icons/joinbottom.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/line.gif Binary file images/icons/line.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/minus.gif Binary file images/icons/minus.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/minusbottom.gif Binary file images/icons/minusbottom.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/page.gif Binary file images/icons/page.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/plus.gif Binary file images/icons/plus.gif has changed diff -r 000000000000 -r 902822492a68 images/icons/plusbottom.gif Binary file images/icons/plusbottom.gif has changed diff -r 000000000000 -r 902822492a68 images/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/index.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,13 @@ +perms['edit_page'] = AUTH_DENY; +$session->perms['view_source'] = AUTH_DENY; +$template->tpl_strings['PAGE_NAME'] = 'Access denied'; + +$template->header(); +echo '

The administrator has flagged the page "' . $_SERVER['REQUEST_URI'] . '" so that it cannot be accessed from the web. Perhaps this is because this is a cache or includes directory and only needs to be accessed by scripts.

HTTP error: 403 Forbidden

'; +$template->footer(); +$db->close(); diff -r 000000000000 -r 902822492a68 images/info.png Binary file images/info.png has changed diff -r 000000000000 -r 902822492a68 images/loading-big.gif Binary file images/loading-big.gif has changed diff -r 000000000000 -r 902822492a68 images/loading.gif Binary file images/loading.gif has changed diff -r 000000000000 -r 902822492a68 images/lock.png Binary file images/lock.png has changed diff -r 000000000000 -r 902822492a68 images/lock16.png Binary file images/lock16.png has changed diff -r 000000000000 -r 902822492a68 images/minus.gif Binary file images/minus.gif has changed diff -r 000000000000 -r 902822492a68 images/move.png Binary file images/move.png has changed diff -r 000000000000 -r 902822492a68 images/plus.gif Binary file images/plus.gif has changed diff -r 000000000000 -r 902822492a68 images/question.png Binary file images/question.png has changed diff -r 000000000000 -r 902822492a68 images/redirector.png Binary file images/redirector.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/LICENSE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/LICENSE Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,4 @@ +The images in this folder are from the Tango Desktop Project at +http://tango.freedesktop.org. The SVG files and the rendered PNGs are available +under the Creative Commons Attribution-ShareAlike license, which can be viewed +in the /licenses directory in the Enano package. diff -r 000000000000 -r 902822492a68 images/smilies/convert.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/convert.sh Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,7 @@ +#!/bin/bash +for f in *.svg; do + echo Converting $f + fname=`echo $f | cut -d '.' -f 1` + rm -f $fname.png + inkscape -z -f $f -w 22 -h 22 -e ./$fname.png +done diff -r 000000000000 -r 902822492a68 images/smilies/face-angel.png Binary file images/smilies/face-angel.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-angel.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-angel.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Angel + + + emoticon + emote + smiley + angel + 0:) + 0:-) + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + Corey Woodworth + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-crying.png Binary file images/smilies/face-crying.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-crying.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-crying.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Crying + + + emoticon + emote + smiley + crying + :~( + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-devil-grin.png Binary file images/smilies/face-devil-grin.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-devil-grin.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-devil-grin.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Devil Grin + + + emoticon + emote + smiley + laugh + grin + >:-D + >:D + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + Tuomas Kuosmanen + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-embarassed.png Binary file images/smilies/face-embarassed.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-embarassed.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-embarassed.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,386 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Happy + + + emoticon + emote + smiley + happy + :) + :-) + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-glasses.png Binary file images/smilies/face-glasses.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-glasses.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-glasses.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,386 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Happy + + + emoticon + emote + smiley + happy + :) + :-) + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-grin.png Binary file images/smilies/face-grin.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-grin.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-grin.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Laughing + + + emoticon + emote + smiley + laughing + :-D + :D + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + Tuomas Kuosmanen + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-kiss.png Binary file images/smilies/face-kiss.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-kiss.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-kiss.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,407 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Kiss + + + emoticon + emote + smiley + kiss + :-* + :* + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + Lapo Calamandrei + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-oops.png Binary file images/smilies/face-oops.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-oops.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-oops.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Happy + + + emoticon + emote + smiley + happy + :) + :-) + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-plain.png Binary file images/smilies/face-plain.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-plain.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-plain.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Plain + + + emoticon + emote + face + plain + :| + :-| + + + + + + Steven Garrity + + + http://www.tango-project.org + + + Based on face-smile by jimmac + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-sad.png Binary file images/smilies/face-sad.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-sad.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-sad.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Sad + + + emoticon + emote + smiley + sad + :( + :-( + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-sick.png Binary file images/smilies/face-sick.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-sick.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-sick.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Plain + + + emoticon + emote + face + plain + :| + :-| + + + + + + Steven Garrity + + + http://www.tango-project.org + + + Based on face-smile by jimmac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-smile-big.png Binary file images/smilies/face-smile-big.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-smile-big.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-smile-big.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Laughing + + + emoticon + emote + smiley + laughing + :-D + :D + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-smile.png Binary file images/smilies/face-smile.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-smile.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-smile.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Happy + + + emoticon + emote + smiley + happy + :) + :-) + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-surprise.png Binary file images/smilies/face-surprise.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-surprise.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-surprise.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Shocked + + + emoticon + emote + smiley + stare + shocked + :O + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-tongue-out.png Binary file images/smilies/face-tongue-out.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-tongue-out.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-tongue-out.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Laughing + + + emoticon + emote + smiley + laughing + :-D + :D + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/smilies/face-wink.png Binary file images/smilies/face-wink.png has changed diff -r 000000000000 -r 902822492a68 images/smilies/face-wink.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/images/smilies/face-wink.svg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Face - Wink + + + emoticon + emote + winkie + wink + ;) + ;-) + + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + Corey Woodworth + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 images/spacer.gif Binary file images/spacer.gif has changed diff -r 000000000000 -r 902822492a68 images/thumbnail.png Binary file images/thumbnail.png has changed diff -r 000000000000 -r 902822492a68 images/unknown.gif Binary file images/unknown.gif has changed diff -r 000000000000 -r 902822492a68 images/wait.png Binary file images/wait.png has changed diff -r 000000000000 -r 902822492a68 images/warning.png Binary file images/warning.png has changed diff -r 000000000000 -r 902822492a68 index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/index.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,425 @@ +The action "'.$_GET['do'].'" is not defined. Return to viewing this page\'s text.

'); + break; + case 'view': + // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false )); + $page = new PageProcessor( $paths->cpage['urlname_nons'], $paths->namespace ); + $page->send_headers = true; + $page->send(); + break; + case 'comments': + $template->header(); + $sub = ( isset ($_GET['sub']) ) ? $_GET['sub'] : false; + switch($sub) + { + case 'admin': + default: + $act = ( isset ($_GET['action']) ) ? $_GET['action'] : false; + $id = ( isset ($_GET['id']) ) ? intval($_GET['id']) : -1; + echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace, $act, Array('id'=>$id)); + break; + case 'postcomment': + if(empty($_POST['name']) || + empty($_POST['subj']) || + empty($_POST['text']) + ) { echo 'Invalid request'; break; } + $cid = ( isset($_POST['captcha_id']) ) ? $_POST['captcha_id'] : false; + $cin = ( isset($_POST['captcha_input']) ) ? $_POST['captcha_input'] : false; + PageUtils::addcomment($paths->cpage['urlname_nons'], $paths->namespace, $_POST['name'], $_POST['subj'], $_POST['text'], $cin, $cid); // All filtering, etc. is handled inside this method + echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace); + break; + case 'editcomment': + if(!isset($_GET['id']) || ( isset($_GET['id']) && !preg_match('#^([0-9]+)$#', $_GET['id']) )) { echo '

Invalid comment ID

'; break; } + $q = $db->sql_query('SELECT subject,comment_data,comment_id FROM '.table_prefix.'comments WHERE comment_id='.$_GET['id']); + if(!$q) $db->_die('The comment data could not be selected.'); + $row = $db->fetchrow(); + $db->free_result(); + echo '
'; + echo "
+ + + +
Subject:
Comment:
"; + echo '
'; + break; + case 'savecomment': + if(empty($_POST['subj']) || empty($_POST['text'])) { echo '

Invalid request

'; break; } + $r = PageUtils::savecomment_neater($paths->cpage['urlname_nons'], $paths->namespace, $_POST['subj'], $_POST['text'], (int)$_POST['id']); + if($r != 'good') { echo "
$r
"; break; } + echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace); + break; + case 'deletecomment': + if(!empty($_GET['id'])) + { + PageUtils::deletecomment_neater($paths->cpage['urlname_nons'], $paths->namespace, (int)$_GET['id']); + } + echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace); + break; + } + $template->footer(); + break; + case 'edit': + if(isset($_POST['_cancel'])) { header('Location: '.makeUrl($paths->page)); echo 'Redirecting...If you haven\'t been redirected yet, click here.'; break; } + if(isset($_POST['_save'])) { + $e = PageUtils::savepage($paths->cpage['urlname_nons'], $paths->namespace, $_POST['page_text'], $_POST['edit_summary'], isset($_POST['minor'])); + header('Location: '.makeUrl($paths->page)); echo 'Redirecting...If you haven\'t been redirected yet, click here.'; break; + } + $template->header(); + if(isset($_POST['_preview'])) + { + $text = $_POST['page_text']; + echo PageUtils::genPreview($_POST['page_text']); + } + else $text = RenderMan::getPage($paths->cpage['urlname_nons'], $paths->namespace, 0, false, false, false, false); + echo ' +
+
+
+
+ '; + if($paths->wiki_mode) + echo 'Edit summary:

'; + echo '
+ + + + +
+ '; + $template->footer(); + break; + case 'viewsource': + $template->header(); + $text = RenderMan::getPage($paths->cpage['urlname_nons'], $paths->namespace, 0, false, false, false, false); + echo ' +
+
+ '; + echo '
+ +
+ '; + $template->footer(); + break; + case 'history': + $hist = PageUtils::histlist($paths->cpage['urlname_nons'], $paths->namespace); + $template->header(); + echo $hist; + $template->footer(); + break; + case 'rollback': + $id = (isset($_GET['id'])) ? $_GET['id'] : false; + if(!$id || !preg_match('#^([0-9]+)$#', $id)) die_friendly('Invalid action ID', '

The URL parameter "id" is not an integer. Exiting to prevent nasties like SQL injection, etc.

'); + $rb = PageUtils::rollback( (int) $id ); + $template->header(); + echo '

'.$rb.' Return to the page.

'; + $template->footer(); + break; + case 'catedit': + if(isset($_POST['__enanoSaveButton'])) + { + unset($_POST['__enanoSaveButton']); + $val = PageUtils::catsave($paths->cpage['urlname_nons'], $paths->namespace, $_POST); + if($val == 'GOOD') + { + header('Location: '.makeUrl($paths->page)); echo 'Redirecting...If you haven\'t been redirected yet, click here.'; break; + } else { + die_friendly('Error saving category information', '

'.$val.'

'); + } + } + elseif(isset($_POST['__enanoCatCancel'])) + { + header('Location: '.makeUrl($paths->page)); echo 'Redirecting...If you haven\'t been redirected yet, click here.'; break; + } + $template->header(); + $c = PageUtils::catedit_raw($paths->cpage['urlname_nons'], $paths->namespace); + echo $c[1]; + $template->footer(); + break; + case 'moreoptions': + $template->header(); + echo '
'.$template->tpl_strings['TOOLBAR_EXTRAS'].'
'; + $template->footer(); + break; + case 'protect': + if (!isset($_REQUEST['level'])) die_friendly('Invalid request', '

No protection level specified

'); + if(!empty($_POST['reason'])) + { + if(!preg_match('#^([0-2]*){1}$#', $_POST['level'])) die_friendly('Error protecting page', '

Request validation failed

'); + PageUtils::protect($paths->cpage['urlname_nons'], $paths->namespace, intval($_POST['level']), $_POST['reason']); + die_friendly('Page protected', '

The protection setting has been applied. Return to the page.

'); + } + $template->header(); + ?> +
+ + Error: you must enter a reason for protecting this page.

'; ?> +

Reason for protecting the page:

+


+ Protecion level to be applied: Warning: request validation will fail after clicking submit'; + } + ?>

+

+ + footer(); + break; + case 'rename': + if(!empty($_POST['newname'])) + { + $r = PageUtils::rename($paths->cpage['urlname_nons'], $paths->namespace, $_POST['newname']); + die_friendly('Page renamed', '

'.nl2br($r).' Return to the page.

'); + } + $template->header(); + ?> +
+ Error: you must enter a new name for this page.

'; ?> +

Please enter a new name for this page:

+

+

+
+ footer(); + break; + case 'flushlogs': + if(!$session->get_permissions('clear_logs')) die_friendly('Access denied', '

Flushing the logs for a page requires administrative rights.

'); + if(isset($_POST['_downthejohn'])) + { + $template->header(); + $result = PageUtils::flushlogs($paths->cpage['urlname_nons'], $paths->namespace); + echo '

'.$result.' Return to the page.

'; + $template->footer(); + break; + } + $template->header(); + ?> +
+

You are about to destroy all logged edits and actions on this page.

+

Unlike deleting or editing this page, this action is not reversible! You should only do this if you are desperate for + database space.

+

Do you really want to continue?

+

+
+ footer(); + break; + case 'delvote': + if(isset($_POST['_ballotbox'])) + { + $template->header(); + $result = PageUtils::delvote($paths->cpage['urlname_nons'], $paths->namespace); + echo '

'.$result.' Return to the page.

'; + $template->footer(); + break; + } + $template->header(); + ?> +
+

Your vote counts.

+

If you think that this page is not relavent to the content on this site, or if it looks like this page was only created in + an attempt to spam the site, you can request that this page be deleted by an administrator.

+

After you vote, you should leave a comment explaining the reason for your vote, especially if you are the first person to + vote against this page.

+

So far, cpage['delvotes'] == 1 ) ? $paths->cpage['delvotes'] . ' person has' : $paths->cpage['delvotes'] . ' people have'; ?> voted to delete this page.

+

+
+ footer(); + break; + case 'resetvotes': + if(!$session->get_permissions('vote_reset')) die_friendly('Access denied', '

Resetting the deletion votes against this page requires admin rights.

'); + if(isset($_POST['_youmaylivealittlelonger'])) + { + $template->header(); + $result = PageUtils::resetdelvotes($paths->cpage['urlname_nons'], $paths->namespace); + echo '

'.$result.' Return to the page.

'; + $template->footer(); + break; + } + $template->header(); + ?> +
+

This action will reset the number of votes against this page to zero. Are you sure you want to do this?

+

+
+ footer(); + break; + case 'deletepage': + if(!$session->get_permissions('delete_page')) die_friendly('Access denied', '

Deleting pages requires admin rights.

'); + if(isset($_POST['_adiossucker'])) + { + $template->header(); + $result = PageUtils::deletepage($paths->cpage['urlname_nons'], $paths->namespace); + echo '

'.$result.' Return to the page.

'; + $template->footer(); + break; + } + $template->header(); + ?> +
+

You are about to destroy this page.

+

While the deletion of the page itself is completely reversible, it is impossible to recover any comments or category information on this page. If this is a file page, the file along with all older revisions of it will be permanently deleted. Also, any custom information that this page is tagged with, such as a custom name, protection status, or additional settings such as whether to allow comments, will be permanently lost.

+

Are you absolutely sure that you want to continue?
+ You will not be asked again.

+

+
+ footer(); + break; + case 'setwikimode': + if(!$session->get_permissions('set_wiki_mode')) die_friendly('Access denied', '

Changing the wiki mode setting requires admin rights.

'); + if(!isset($_GET['level']) || ( isset($_GET['level']) && !preg_match('#^([0-9])$#', $_GET['level']))) die_friendly('Invalid request', '

Level not specified

'); + $template->header(); + $template->footer(); + break; + case 'diff': + $template->header(); + $id1 = ( isset($_GET['diff1']) ) ? (int)$_GET['diff1'] : false; + $id2 = ( isset($_GET['diff2']) ) ? (int)$_GET['diff2'] : false; + if(!$id1 || !$id2) { echo '

Invalid request.

'; $template->footer(); break; } + if(!preg_match('#^([0-9]+)$#', (string)$_GET['diff1']) || + !preg_match('#^([0-9]+)$#', (string)$_GET['diff2'] )) { echo '

SQL injection attempt

'; $template->footer(); break; } + echo PageUtils::pagediff($paths->cpage['urlname_nons'], $paths->namespace, $id1, $id2); + $template->footer(); + break; + case 'aclmanager': + $data = ( isset($_POST['data']) ) ? $_POST['data'] : Array('mode' => 'listgroups'); + PageUtils::aclmanager($data); + break; + } + + // + // Optimize HTML by replacing newlines with spaces (excludes
, 
+    

Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend, + and we need to have access to a MySQL server in order to continue.

+

If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from + MySQL.com. Please note that, like Enano, MySQL is licensed under the GNU GPL. + If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL + or purchase a proprietary license.

+
+ + + + + + + + + + + + + +

Database information

Database hostname
This is the hostname (or sometimes the IP address) of your MySQL server. In many cases, this is "localhost".
Good/bad icon
Database name
The name of the actual database. If you don't already have a database, you can create one here, if you have the username and password of a MySQL user with administrative rights.
Good/bad icon
Database login
These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.
Good/bad icon

Optional information

Table prefix
The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).
Good/bad icon
Database administrative login
If the MySQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.
Good/bad icon
MySQL versionMySQL version information will be checked when you click "Test Connection".Good/bad icon
Delete existing tables?
If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.
+ +
+ restart the installation.'; + $template->footer(); + exit; + } + unset($_POST['_cont']); + ?> + +
+ '."\n"; + } + ?> +

The next step is to enter some information about your website. You can always change this information later, using the administration panel.

+ + + + + + +
Website name
The display name of your website. Allowed characters are uppercase and lowercase letters, numerals, and spaces. This must not be blank or "Enano".
Good/bad icon
Website description
This text will be shown below the name of your website.
Good/bad icon
Copyright info
This should be a one-line legal notice that will appear at the bottom of all your pages.
Good/bad icon
Wiki mode
This feature allows people to create and edit pages on your site. Enano keeps a history of all page modifications, and you can protect pages to prevent editing.
URL scheme
Choose how the page URLs will look. Depending on your server configuration, you may need to select the first option. If you don't know, select the first option, and you can always change it later.
name="urlscheme" value="ugly" id="ugly">
name="urlscheme" value="short" id="short">
+ +
+ restart the installation.'; + $template->footer(); + exit; + } + unset($_POST['_cont']); + require('config.php'); + $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); + if(!isset($cryptkey) || ( isset($cryptkey) && strlen($cryptkey) != AES_BITS / 4) ) + { + $cryptkey = $aes->gen_readymade_key(); + $handle = @fopen(ENANO_ROOT.'/config.php', 'w'); + if(!$handle) + { + echo '

ERROR: Cannot open config.php for writing - exiting!

'; + $template->footer(); + exit; + } + fwrite($handle, ''); + fclose($handle); + } + ?> + +
+ '."\n"; + } + ?> +

Next, enter your desired username and password. The account you create here will be used to administer your site.

+ + + + + + +
Administration username
The administration username you will use to log into your site.
Good/bad icon
Administration password:Good/bad icon
Enter it again to confirm:
Your e-mail address:Good/bad icon
If your browser supports Javascript, the password you enter here will be encrypted with AES before it is sent to the server.
+ +
+ + + +
+ + restart the installation.'; + $template->footer(); + exit; + } + unset($_POST['_cont']); + ?> +
+ '."\n"; + } + ?> +

Enano is ready to install.

+

The wizard has finished collecting information and is ready to install the database schema. Please review the information below, + and then click the button below to install the database.

+
    +
  • Database hostname:
  • +
  • Database name:
  • +
  • Database user:
  • +
  • Database password: <hidden>
  • +
  • Site name:
  • +
  • Site description:
  • +
  • Administration username:
  • +
  • Cipher strength: -bit AES
    Cipher strength is defined in the file constants.php; if you desire to change the cipher strength, you may do so and then restart installation. Unless your site is mission-critical, changing the cipher strength is not necessary.
  • +
+ +
+ restart the installation.'; + $template->footer(); + exit; + } + switch($_POST['urlscheme']) + { + case "ugly": + default: + $cp = scriptPath.'/index.php?title='; + break; + case "short": + $cp = scriptPath.'/index.php/'; + break; + case "tiny": + $cp = scriptPath.'/'; + break; + } + function err($t) { global $template; echo $t; $template->footer(); exit; } + + echo 'Connecting to MySQL...'; + if($_POST['db_root_user'] != '') + { + $conn = mysql_connect($_POST['db_host'], $_POST['db_root_user'], $_POST['db_root_pass']); + if(!$conn) err('Error connecting to MySQL: '.mysql_error()); + $q = mysql_query('USE '.$_POST['db_name']); + if(!$q) + { + $q = mysql_query('CREATE DATABASE '.$_POST['db_name']); + if(!$q) err('Error initializing database: '.mysql_error()); + } + $q = mysql_query('GRANT ALL PRIVILEGES ON '.$_POST['db_name'].'.* TO \''.$_POST['db_user'].'\'@\'localhost\' IDENTIFIED BY \''.$_POST['db_pass'].'\' WITH GRANT OPTION;'); + if(!$q) err('Could not create the user account'); + $q = mysql_query('GRANT ALL PRIVILEGES ON '.$_POST['db_name'].'.* TO \''.$_POST['db_user'].'\'@\'%\' IDENTIFIED BY \''.$_POST['db_pass'].'\' WITH GRANT OPTION;'); + if(!$q) err('Could not create the user account'); + mysql_close($conn); + } + $conn = mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']); + if(!$conn) err('Error connecting to MySQL: '.mysql_error()); + $q = mysql_query('USE '.$_POST['db_name']); + if(!$q) err('Error selecting database: '.mysql_error()); + echo 'done!
'; + + // Are we supposed to drop any existing tables? If so, do it now + if(isset($_POST['drop_tables'])) + { + echo 'Dropping existing Enano tables...'; + // Our list of tables included in Enano + $tables = Array( 'mdg_categories', 'mdg_comments', 'mdg_config', 'mdg_logs', 'mdg_page_text', 'mdg_session_keys', 'mdg_pages', 'mdg_users', 'mdg_themes', 'mdg_buddies', 'mdg_banlist', 'mdg_files', 'mdg_privmsgs', 'mdg_sidebar', 'mdg_hits', 'mdg_search_index', 'mdg_groups', 'mdg_group_members', 'mdg_acl', 'mdg_search_cache' ); + $tables = implode(', ', $tables); + $tables = str_replace('mdg_', $_POST['table_prefix'], $tables); + $query_of_death = 'DROP TABLE '.$tables.';'; + mysql_query($query_of_death); // We won't check for errors here because if this operation fails it probably means the tables didn't exist + echo 'done!
'; + } + + $cacheonoff = is_writable(ENANO_ROOT.'/cache/') ? '1' : '0'; + + echo 'Decrypting administration password...'; + require('config.php'); + $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); + $key = $aes->hexToByteArray($cryptkey); + $enc = $aes->hexToByteArray($_POST['crypt_data']); + $dec = $aes->rijndaelDecrypt($enc, $key, 'ECB'); + $dec = $aes->byteArrayToString($dec); + echo 'done!
Generating '.AES_BITS.'-bit AES private key...'; + $privkey = $aes->gen_readymade_key(); + $pkba = hexdecode($privkey); + $encpass = $aes->encrypt($dec, $pkba, ENC_HEX); + + echo 'done!
Preparing for schema execution...'; + $schema = file_get_contents('schema.sql'); + $schema = str_replace('{{SITE_NAME}}', mysql_real_escape_string($_POST['sitename'] ), $schema); + $schema = str_replace('{{SITE_DESC}}', mysql_real_escape_string($_POST['sitedesc'] ), $schema); + $schema = str_replace('{{COPYRIGHT}}', mysql_real_escape_string($_POST['copyright'] ), $schema); + $schema = str_replace('{{ADMIN_USER}}', mysql_real_escape_string($_POST['admin_user'] ), $schema); + $schema = str_replace('{{ADMIN_PASS}}', mysql_real_escape_string($encpass ), $schema); + $schema = str_replace('{{ADMIN_EMAIL}}', mysql_real_escape_string($_POST['admin_email']), $schema); + $schema = str_replace('{{ENABLE_CACHE}}', mysql_real_escape_string($cacheonoff ), $schema); + $schema = str_replace('{{REAL_NAME}}', '', $schema); + $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'], $schema); + $schema = str_replace('{{VERSION}}', ENANO_VERSION, $schema); + // Not anymore! :-D + // $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION, $schema); + + if(isset($_POST['wiki_mode'])) $schema = str_replace('{{WIKI_MODE}}', '1', $schema); + else $schema = str_replace('{{WIKI_MODE}}', '0', $schema); + + // Build an array of queries + $schema = explode(";\n", $schema); + echo 'done!
Executing schema.sql...'; + + // OK, do the loop, baby!!! + foreach($schema as $q) + { + $r = mysql_query($q, $conn); + if(!$r) err('Error during mainstream installation: '.mysql_error()); + } + + echo 'done!
Writing configuration files...'; + if($_POST['urlscheme']=='tiny') + { + $ht = fopen(dirname(__FILE__).'/.htaccess', 'a+'); + if(!$ht) err('Error opening file .htaccess for writing'); + fwrite($ht, ' +RewriteEngine on +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.+) '.scriptPath.'/index.php/$1 [L,QSA] +RewriteRule \.(php|html|gif|jpg|png|css|js)$ - [L] +'); + fclose($ht); + } + + $config_file = ''; + + $cf_handle = fopen(dirname(__FILE__).'/config.php', 'w'); + if(!$cf_handle) err('Couldn\'t open file config.php for writing'); + fwrite($cf_handle, $config_file); + fclose($cf_handle); + + echo 'done!
Initializing logs...'; + + $q = mysql_query('INSERT INTO ' . $_POST['table_prefix'] . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($_POST['admin_user']) . '\', \'' . mysql_real_escape_string(ENANO_VERSION) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');', $conn); + if ( !$q ) + err('Error setting up logs: '.mysql_error()); + + echo 'done!

Installation of Enano is complete.

Review any warnings above, and then click here to finish the installation.'; + + // echo ''; + + break; + case "finish": + echo '

Congratulations!

+

You have finished installing Enano on this server.

+

Now what?

+

Click the link below to see the main page for your website. Where to go from here:

+
    +
  • The first thing you should do is log into your site using the Log in link on the sidebar.
  • +
  • Go into the Administration panel, expand General, and click General Configuration. There you will be able to configure some basic information about your site.
  • +
  • Visit the Enano Plugin Gallery to download and use plugins on your site.
  • +
  • Periodically create a backup of your database and filesystem, in case something goes wrong. This should be done at least once a week – more for wiki-based sites.
  • +
  • Hire some moderators, to help you keep rowdy users tame.
  • +
  • Tell the Enano team what you think.
  • +
  • Spread the word about Enano by adding a link to the Enano homepage on your sidebar! You can enable this option in the General Configuration section of the administration panel.
  • +
+

Go to your website...

'; + break; +} +$template->footer(); + +?> diff -r 000000000000 -r 902822492a68 licenses/bsdlic.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/bsdlic.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,102 @@ + + + +BSD License + + + + + +
+ +

The BSD license

+ + + +

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

+

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

+

Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

+

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ +

Extra copyright information for the Javascript MD5 algorithm

+ +

The JavaScript code implementing the algorithm is derived from the C code in RFC 1321 and is covered by the following copyright:

+

License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function.

+

License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work.

+

RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind.

+

These notices must be retained in any copies of any part of this documentation and/or software.

+

This copyright does not prohibit distribution of the JavaScript MD5 code under the BSD license.

+ + + + + +
+ + + diff -r 000000000000 -r 902822492a68 licenses/cc-by-2.0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/cc-by-2.0.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,222 @@ + + + +Creative Commons Attribution 2.0 License + + + + + +
+ +

Creative Commons Attribution 2.0 License

+ + + +

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

+ +

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

+ + +

1. Definitions

+ +
    + +
  1. +"Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. +
  2. + +
  3. +"Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  4. + +
  5. +"Licensor" means the individual or entity that offers the Work under the terms of this License. +
  6. + +
  7. +"Original Author" means the individual or entity who created the Work. +
  8. + +
  9. +"Work" means the copyrightable work of authorship offered under the terms of this License. +
  10. + +
  11. +"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + +
  12. +
+ +

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

+ + +

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

+ + +
    +
  1. + +to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; +
  2. + +
  3. +to create and reproduce Derivative Works; +
  4. + +
  5. +to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + +
  6. + +
  7. +to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. +
  8. + +
  9. For the avoidance of doubt, where the work is a musical composition:

    + +
      +
    1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    2. + +
    3. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
  10. + +
  11. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).
  12. + +
+ + +

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

+ +

4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

+ + +
    +
  1. +You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. +
  2. + + +
  3. +If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. +
  4. + +
+ +

5. Representations, Warranties and Disclaimer

+ +

UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

+ + +

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

+ +

7. Termination

+ +
    + +
  1. +This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. +
  2. + +
  3. +Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. +
  4. +
+ +

8. Miscellaneous

+ +
    + +
  1. +Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. +
  2. + +
  3. +Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. +
  4. + +
  5. +If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +
  6. + +
  7. +No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + +
  8. + +
  9. +This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. +
  10. +
+ + + + + +
+ + + diff -r 000000000000 -r 902822492a68 licenses/gpl.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/gpl.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,190 @@ + + + +GNU General Public License + + + + + +
+ +

GNU General Public License

+ +

Version 2, June 1991

+ +
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+ +

Preamble

+

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.

+

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

+

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

+

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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.

+

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

+

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

+

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

+

The precise terms and conditions for copying, distribution and modification follow.

+ +

Terms and conditions for copying, distribution and modification

+ +

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

+

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

+

1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

+

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

+

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

+ +
    +
  • You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
  • +
  • You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
  • +
  • If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
  • +
+ +

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

+

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

+

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

+

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

+ +
    +
  • Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
  • +
  • Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
  • +
  • Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
  • +
+ +

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

+

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

+

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

+

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

+

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

+

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

+

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

+

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

+

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

+

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

+

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

+

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

+

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

+ +

No Warranty

+ +

11. Because the program is licensed free of charge, 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.

+

12. In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute 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.

+ +

END OF TERMS AND CONDITIONS

+ +

How to Apply These Terms to Your New Programs

+

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

+

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

+ +
<one line to give the program's name and a brief idea of what it does.>
+Copyright (C) <year>  <name of author>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ +

Also add information on how to contact you by electronic and paper mail.

+ +

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

+ +
Gnomovision version 69, Copyright (C) <year>  <name of author>
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+ +

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.

+

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:

+ +
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+`Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<signature of Ty Coon>, 1 April 1989
+Ty Coon, President of Vice
+ +

This 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.

+ + + +
+ + + diff -r 000000000000 -r 902822492a68 licenses/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/index.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,133 @@ + + + +Enano third-party libraries + + + + + +
+ +

OK, so I didn't write all of Enano's code.

+

Enano relies on some third-party libraries for some of its functionality. Not all of these libraries are licensed under the same terms as Enano; a list of third-party libraries is available below, sorted by which license the library is under.

+ +

GNU General Public License

+

View the text of this license

+
    +
  • phpWiki - just the diff engine, which is also used in MediaWiki
  • +
  • MediaWiki's table parsing engine (the Text_Wiki one doesn't work in PHP 5.2.0)
  • +
  • One of the CAPTCHA easter eggs was ported from the phpBB Advanced Visual Confirmation Mod. The strange thing here is this: The installation instructions expressly state that the MOD is distributed under the GPL, but immediately afterwards it says that the MOD "can be freely used, but not distributed, without permission." Sorry buddy, but I'm with the FSF on this one, I'm legally allowed to distribute/modify it under the GPL. +
  • The e-mail address encryption routine was originally written by Jim Tucek, and ported to PHP by Dan Fuhry. Jim allowed the code to be released under the GPL specifically for Enano.
  • +
+ +

GNU Lesser General Public License

+

View the text of this license

+ + +

Creative Commons Licenses

+

View text: Attribution 2.0 [deed]

+ + +

The PHP License

+

View the text of this license

+ + +

The BSD License

+

View the text of this license

+
    +
  • Paul Johnston's implementations of the MD5 and SHA1 algorithms in Javascript
  • +
+ +

The MIT/X License

+

View the text of this license

+
    +
  • FastJSON - a JSON encoder/decoder. Copyright © 2006 - 2007 Andrea Giammarchi.
  • +
+ +

Unknown license

+

For the following libraries, the license was either not formally stated or could not be found.

+
    +
  • Slide-in-slide-out, ala Digg - used for the collapsible sidebar headings in the Oxygen theme. The original author says the code may be used "for whatever you want."
  • +
  • Graph Generator for PHP - only used when the GD-based graph generator won't work (e.g. no GD support)
  • +
  • Tigra Tree Menu - a modified version that remembers the state of the tree. The license terms are stated here. I believe that these terms are GPL-compatible, at least to a point where the code can be used in GPL-licensed programs. If you believe this is not the case then please contact me.
  • +
+ + + +
+ + + diff -r 000000000000 -r 902822492a68 licenses/lgpl.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/lgpl.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,646 @@ + + + +GNU Lesser General Public License + + + + + +
+ +

GNU Lesser General Public License

+ + + +

Version 2.1, February 1999

+ +
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ +

Preamble

+ +

The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General +Public Licenses are intended to guarantee your freedom to share +and change free software--to make sure the software is free for +all its users.

+ +

This license, the Lesser General Public License, applies to +some specially designated software packages--typically +libraries--of the Free Software Foundation and other authors who +decide to use it. You can use it too, but we suggest you first +think carefully about whether this license or the ordinary +General Public License is the better strategy to use in any +particular case, based on the explanations below.

+ +

When we speak of free software, we are referring to freedom of +use, 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 this service if you wish); that you +receive source code or can get it if you want it; that you can +change the software and use pieces of it in new free programs; +and that you are informed that you can do these things.

+ +

To protect your rights, we need to make restrictions that +forbid distributors to deny you these rights or to ask you to +surrender these rights. These restrictions translate to certain +responsibilities for you if you distribute copies of the library +or if you modify it.

+ +

For example, if you distribute copies of the library, whether +gratis or for a fee, you must give the recipients all the rights +that we gave you. You must make sure that they, too, receive or +can get the source code. If you link other code with the library, +you must provide complete object files to the recipients, so that +they can relink them with the library after making changes to the +library and recompiling it. And you must show them these terms so +they know their rights.

+ +

We protect your rights with a two-step method: (1) we +copyright the library, and (2) we offer you this license, which +gives you legal permission to copy, distribute and/or modify the +library.

+ +

To protect each distributor, we want to make it very clear +that there is no warranty for the free library. Also, if the +library is modified by someone else and passed on, the recipients +should know that what they have is not the original version, so +that the original author's reputation will not be affected by +problems that might be introduced by others.

+ +

Finally, software patents pose a constant threat to the +existence of any free program. We wish to make sure that a +company cannot effectively restrict the users of a free program +by obtaining a restrictive license from a patent holder. +Therefore, we insist that any patent license obtained for a +version of the library must be consistent with the full freedom +of use specified in this license.

+ +

Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, +and is quite different from the ordinary General Public License. +We use this license for certain libraries in order to permit +linking those libraries into non-free programs.

+ +

When a program is linked with a library, whether statically or +using a shared library, the combination of the two is legally +speaking a combined work, a derivative of the original library. +The ordinary General Public License therefore permits such +linking only if the entire combination fits its criteria of +freedom. The Lesser General Public License permits more lax +criteria for linking other code with the library.

+ +

We call this license the "Lesser" General Public License +because it does Less to protect the user's freedom than the +ordinary General Public License. It also provides other free +software developers Less of an advantage over competing non-free +programs. These disadvantages are the reason we use the ordinary +General Public License for many libraries. However, the Lesser +license provides advantages in certain special circumstances.

+ +

For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that +it becomes a de-facto standard. To achieve this, non-free +programs must be allowed to use the library. A more frequent case +is that a free library does the same job as widely used non-free +libraries. In this case, there is little to gain by limiting the +free library to free software only, so we use the Lesser General +Public License.

+ +

In other cases, permission to use a particular library in +non-free programs enables a greater number of people to use a +large body of free software. For example, permission to use the +GNU C Library in non-free programs enables many more people to +use the whole GNU operating system, as well as its variant, the +GNU/Linux operating system.

+ +

Although the Lesser General Public License is Less protective +of the users' freedom, it does ensure that the user of a program +that is linked with the Library has the freedom and the +wherewithal to run that program using a modified version of the +Library.

+ +

The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference +between a "work based on the library" and a "work that uses the +library". The former contains code derived from the library, +whereas the latter must be combined with the library in order to +run.

+ +

Terms and conditions for copying, distribution and modification

+ +

0. This License Agreement applies to any software +library or other program which contains a notice placed by the +copyright holder or other authorized party saying it may be +distributed under the terms of this Lesser General Public License +(also called "this License"). Each licensee is addressed as +"you".

+ +

A "library" means a collection of software functions and/or +data prepared so as to be conveniently linked with application +programs (which use some of those functions and data) to form +executables.

+ +

The "Library", below, refers to any such software library or +work which has been distributed under these terms. A "work based +on the Library" means either the Library or any derivative work +under copyright law: that is to say, a work containing the +Library or a portion of it, either verbatim or with modifications +and/or translated straightforwardly into another language. +(Hereinafter, translation is included without limitation in the +term "modification".)

+ +

"Source code" for a work means the preferred form of the work +for making modifications to it. For a library, complete source +code means all the source code for all modules it contains, plus +any associated interface definition files, plus the scripts used +to control compilation and installation of the library.

+ +

Activities other than copying, distribution and modification +are not covered by this License; they are outside its scope. The +act of running a program using the Library is not restricted, and +output from such a program is covered only if its contents +constitute a work based on the Library (independent of the use of +the Library in a tool for writing it). Whether that is true +depends on what the Library does and what the program that uses +the Library does.

+ +

1. You may copy and distribute verbatim copies of the +Library's complete source code as you receive it, in any medium, +provided that you conspicuously and appropriately publish on each +copy an appropriate copyright notice and disclaimer of warranty; +keep intact all the notices that refer to this License and to the +absence of any warranty; and distribute a copy of this License +along with the Library.

+ +

You may charge a fee for the physical act of transferring a +copy, and you may at your option offer warranty protection in +exchange for a fee.

+ +

2. You may modify your copy or copies of the Library or +any portion of it, thus forming a work based on the Library, and +copy and distribute such modifications or work under the terms of +Section 1 above, provided that you also meet all of these +conditions:

+ +
    +
  • a) The modified work must itself be a software +library.
  • + +
  • b) You must cause the files modified to carry +prominent notices stating that you changed the files and the date +of any change.
  • + +
  • c) You must cause the whole of the work to be licensed +at no charge to all third parties under the terms of this +License.
  • + +
  • d) If a facility in the modified Library refers to a +function or a table of data to be supplied by an application +program that uses the facility, other than as an argument passed +when the facility is invoked, then you must make a good faith +effort to ensure that, in the event an application does not +supply such function or table, the facility still operates, and +performs whatever part of its purpose remains meaningful. + +

    (For example, a function in a library to compute square roots +has a purpose that is entirely well-defined independent of the +application. Therefore, Subsection 2d requires that any +application-supplied function or table used by this function must +be optional: if the application does not supply it, the square +root function must still compute square roots.)

    + +

    These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the +Library, and can be reasonably considered independent and +separate works in themselves, then this License, and its terms, +do not apply to those sections when you distribute them as +separate works. But when you distribute the same sections as part +of a whole which is a work based on the Library, the distribution +of the whole must be on the terms of this License, whose +permissions for other licensees extend to the entire whole, and +thus to each and every part regardless of who wrote it.

    + +

    Thus, it is not the intent of this section to claim rights or +contest your rights to work written entirely by you; rather, the +intent is to exercise the right to control the distribution of +derivative or collective works based on the Library.

    + +

    In addition, mere aggregation of another work not based on the +Library with the Library (or with a work based on the Library) on +a volume of a storage or distribution medium does not bring the +other work under the scope of this License.

    +
  • +
+ +

3. You may opt to apply the terms of the ordinary GNU +General Public License instead of this License to a given copy of +the Library. To do this, you must alter all the notices that +refer to this License, so that they refer to the ordinary GNU +General Public License, version 2, instead of to this License. +(If a newer version than version 2 of the ordinary GNU General +Public License has appeared, then you can specify that version +instead if you wish.) Do not make any other change in these +notices.

+ +

Once this change is made in a given copy, it is irreversible +for that copy, so the ordinary GNU General Public License applies +to all subsequent copies and derivative works made from that +copy.

+ +

This option is useful when you wish to copy part of the code +of the Library into a program that is not a library.

+ +

4. You may copy and distribute the Library (or a +portion or derivative of it, under Section 2) in object code or +executable form under the terms of Sections 1 and 2 above +provided that you accompany it with the complete corresponding +machine-readable source code, which must be distributed under the +terms of Sections 1 and 2 above on a medium customarily used for +software interchange.

+ +

If distribution of object code is made by offering access to +copy from a designated place, then offering equivalent access to +copy the source code from the same place satisfies the +requirement to distribute the source code, even though third +parties are not compelled to copy the source along with the +object code.

+ +

5. A program that contains no derivative of any portion +of the Library, but is designed to work with the Library by being +compiled or linked with it, is called a "work that uses the +Library". Such a work, in isolation, is not a derivative work of +the Library, and therefore falls outside the scope of this +License.

+ +

However, linking a "work that uses the Library" with the +Library creates an executable that is a derivative of the Library +(because it contains portions of the Library), rather than a +"work that uses the library". The executable is therefore covered +by this License. Section 6 states terms for distribution of such +executables.

+ +

When a "work that uses the Library" uses material from a +header file that is part of the Library, the object code for the +work may be a derivative work of the Library even though the +source code is not. Whether this is true is especially +significant if the work can be linked without the Library, or if +the work is itself a library. The threshold for this to be true +is not precisely defined by law.

+ +

If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small +inline functions (ten lines or less in length), then the use of +the object file is unrestricted, regardless of whether it is +legally a derivative work. (Executables containing this object +code plus portions of the Library will still fall under Section +6.)

+ +

Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of +Section 6. Any executables containing that work also fall under +Section 6, whether or not they are linked directly with the +Library itself.

+ +

6. As an exception to the Sections above, you may also +combine or link a "work that uses the Library" with the Library +to produce a work containing portions of the Library, and +distribute that work under terms of your choice, provided that +the terms permit modification of the work for the customer's own +use and reverse engineering for debugging such modifications.

+ +

You must give prominent notice with each copy of the work that +the Library is used in it and that the Library and its use are +covered by this License. You must supply a copy of this License. +If the work during execution displays copyright notices, you must +include the copyright notice for the Library among them, as well +as a reference directing the user to the copy of this License. +Also, you must do one of these things:

+ +
    +
  • a) Accompany the work with the complete corresponding +machine-readable source code for the Library including whatever +changes were used in the work (which must be distributed under +Sections 1 and 2 above); and, if the work is an executable linked +with the Library, with the complete machine-readable "work that +uses the Library", as object code and/or source code, so that the +user can modify the Library and then relink to produce a modified +executable containing the modified Library. (It is understood +that the user who changes the contents of definitions files in +the Library will not necessarily be able to recompile the +application to use the modified definitions.)
  • + +
  • b) Use a suitable shared library mechanism for linking +with the Library. A suitable mechanism is one that (1) uses at +run time a copy of the library already present on the user's +computer system, rather than copying library functions into the +executable, and (2) will operate properly with a modified version +of the library, if the user installs one, as long as the modified +version is interface-compatible with the version that the work +was made with.
  • + +
  • c) Accompany the work with a written offer, valid for +at least three years, to give the same user the materials +specified in Subsection 6a, above, for a charge no more than the +cost of performing this distribution.
  • + +
  • d) If distribution of the work is made by offering +access to copy from a designated place, offer equivalent access +to copy the above specified materials from the same place.
  • + +
  • e) Verify that the user has already received a copy of +these materials or that you have already sent this user a +copy.
  • +
+ +

For an executable, the required form of the "work that uses +the Library" must include any data and utility programs needed +for reproducing the executable from it. However, as a special +exception, the materials to be distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of +the operating system on which the executable runs, unless that +component itself accompanies the executable.

+ +

It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you +cannot use both them and the Library together in an executable +that you distribute.

+ +

7. You may place library facilities that are a work +based on the Library side-by-side in a single library together +with other library facilities not covered by this License, and +distribute such a combined library, provided that the separate +distribution of the work based on the Library and of the other +library facilities is otherwise permitted, and provided that you +do these two things:

+ +
    +
  • a) Accompany the combined library with a copy of the +same work based on the Library, uncombined with any other library +facilities. This must be distributed under the terms of the +Sections above.
  • + +
  • b) Give prominent notice with the combined library of +the fact that part of it is a work based on the Library, and +explaining where to find the accompanying uncombined form of the +same work.
  • +
+ +

8. You may not copy, modify, sublicense, link with, or +distribute the Library except as expressly provided under this +License. Any attempt otherwise to copy, modify, sublicense, link +with, or distribute the Library is void, and will automatically +terminate your rights under this License. However, parties who +have received copies, or rights, from you under this License will +not have their licenses terminated so long as such parties remain +in full compliance.

+ +

9. You are not required to accept this License, since +you have not signed it. However, nothing else grants you +permission to modify or distribute the Library or its derivative +works. These actions are prohibited by law if you do not accept +this License. Therefore, by modifying or distributing the Library +(or any work based on the Library), you indicate your acceptance +of this License to do so, and all its terms and conditions for +copying, distributing or modifying the Library or works based on +it.

+ +

10. Each time you redistribute the Library (or any work +based on the Library), the recipient automatically receives a +license from the original licensor to copy, distribute, link with +or modify the Library subject to these terms and conditions. You +may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible +for enforcing compliance by third parties with this License.

+ +

11. If, as a consequence of a court judgment or +allegation of patent infringement or for any other reason (not +limited to patent issues), 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 distribute so as to +satisfy simultaneously your obligations under this License and +any other pertinent obligations, then as a consequence you may +not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the +Library by all those who receive copies directly or indirectly +through you, then the only way you could satisfy both it and this +License would be to refrain entirely from distribution of the +Library.

+ +

If any portion of this section is held invalid or +unenforceable under any particular circumstance, the balance of +the section is intended to apply, and the section as a whole is +intended to apply in other circumstances.

+ +

It is not the purpose of this section to induce you to +infringe any patents or other property right claims or to contest +validity of any such claims; this section has the sole purpose of +protecting the integrity of the free software distribution system +which is implemented by public license practices. Many people +have made generous contributions to the wide range of software +distributed through that system in reliance on consistent +application of that system; it is up to the author/donor to +decide if he or she is willing to distribute software through any +other system and a licensee cannot impose that choice.

+ +

This section is intended to make thoroughly clear what is +believed to be a consequence of the rest of this License.

+ +

12. If the distribution and/or use of the Library is +restricted in certain countries either by patents or by +copyrighted interfaces, the original copyright holder who places +the Library under this License may add an explicit geographical +distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation +as if written in the body of this License.

+ +

13. The Free Software Foundation may publish revised +and/or new versions of the Lesser General Public License from +time to time. Such new versions will be similar in spirit to the +present version, but may differ in detail to address new problems +or concerns.

+ +

Each version is given a distinguishing version number. If the +Library specifies a version number of this License which applies +to it and "any later version", you have the option of following +the terms and conditions either of that version or of any later +version published by the Free Software Foundation. If the Library +does not specify a license version number, you may choose any +version ever published by the Free Software Foundation.

+ +

14. If you wish to incorporate parts of the Library +into other free programs whose distribution conditions are +incompatible with these, write to the author to ask for +permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we +sometimes make exceptions for this. Our decision will be guided +by the two goals of preserving the free status of all derivatives +of our free software and of promoting the sharing and reuse of +software generally.

+ +

NO WARRANTY

+ +

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, +THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE +COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH +YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

+ +

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR +AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER +PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO +OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

+ +

END OF TERMS AND CONDITIONS

+ +

How to Apply These Terms to Your New Libraries

+ +

If you develop a new library, and you want it to be of the +greatest possible use to the public, we recommend making it free +software that everyone can redistribute and change. You can do so +by permitting redistribution under these terms (or, +alternatively, under the terms of the ordinary General Public +License).

+ +

To apply these terms, attach the following notices to the +library. It is safest to attach them to the start of each source +file to most effectively convey the exclusion of warranty; and +each file should have at least the "copyright" line and a pointer +to where the full notice is found.

+ +
+<one line to give the library's name and an idea of what it does.>
+Copyright (C) <year> <name of author>
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+ +

Also add information on how to contact you by electronic and +paper mail.

+ +

You should also get your employer (if you work as a +programmer) or your school, if any, to sign a "copyright +disclaimer" for the library, if necessary. Here is a sample; +alter the names:

+ +
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+the library `Frob' (a library for tweaking knobs) written
+by James Random Hacker.
+
+<signature of Ty Coon>, 1 April 1990
+Ty Coon, President of Vice
+
+ +

That's all there is to it!

+ + + + + +
+ + + diff -r 000000000000 -r 902822492a68 licenses/mitlic.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/mitlic.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,93 @@ + + + +MIT/X License + + + + + +
+ +

The MIT/X license

+ + + +

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

+

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

+ + + + + +
+ + + + diff -r 000000000000 -r 902822492a68 licenses/phplic.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/licenses/phplic.html Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,154 @@ + + + +The PHP License + + + + + +
+ +

The PHP license, version 3.01

+ + + +

Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.

+ +

Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met:

+
    +
  1. +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer.
  2. + +
  3. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution.
  4. + +
  5. The name "PHP" must not be used to endorse or promote products +derived from this software without prior written permission. For +written permission, please contact group@php.net.
  6. + +
  7. Products derived from this software may not be called "PHP", nor +may "PHP" appear in their name, without prior written permission +from group@php.net. You may indicate that your software works in +conjunction with PHP by saying "Foo for PHP" instead of calling +it "PHP Foo" or "phpfoo"
  8. + +
  9. The PHP Group may publish revised and/or new versions of the +license from time to time. Each version will be given a +distinguishing version number.
    +Once covered code has been published under a particular version +of the license, you may always continue to use it under the terms +of that version. You may also choose to use such covered code +under the terms of any subsequent version of the license +published by the PHP Group. No one other than the PHP Group has +the right to modify the terms applicable to covered code created +under this License.
  10. + +
  11. Redistributions of any form whatsoever must retain the following +acknowledgment: +"This product includes PHP software, freely available from +<http://www.php.net/software/>".
  12. + +
  13. This software is provided by the PHP development team “as is” and +any expressed or implied warranties, including, but not limited to, +the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the PHP +development team or its contributors be liable for any direct, +indirect, incidental, special, exemplary, or consequential damages +(including, but not limited to, procurement of substitute goods or +services; loss of use, data, or profits; or business interruption) +however caused and on any theory of liability, whether in contract, +strict liability, or tort (including negligence or otherwise) +arising in any way out of the use of this software, even if advised +of the possibility of such damage.
  14. +
+ +

This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group.

+ +

The PHP Group can be contacted via Email at group@php.net.

+ +

For more information on the PHP Group and the PHP project, +please see <http://www.php.net>.

+ +

PHP includes the Zend Engine, freely available at +<http://www.zend.com>.

+ + + + + +
+ + + diff -r 000000000000 -r 902822492a68 plugins/#Untitled-1# --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/#Untitled-1# Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,1 @@ + MAUMEE, OH, US 06/12/2007 11:26 P.M. ARRIVAL SCAN diff -r 000000000000 -r 902822492a68 plugins/Decir.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/Decir.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,92 @@ +attachHook('acl_rule_init', 'decir_early_init($this, $session);'); +$plugins->attachHook('base_classes_initted', ' + $paths->add_page(Array( + \'name\'=>\'Forum\', + \'urlname\'=>\'Forum\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +function decir_early_init(&$paths, &$session) +{ + $paths->addAdminNode('Decir forum configuration', 'General settings', 'DecirGeneral'); + $paths->nslist['DecirForum'] = $paths->nslist['Special'] . 'Forum/ViewForum/'; + $paths->nslist['DecirPost'] = $paths->nslist['Special'] . 'Forum/Post/'; + $paths->nslist['DecirTopic'] = $paths->nslist['Special'] . 'Forum/Topic/'; + + $session->register_acl_type('decir_see_forum', AUTH_ALLOW, 'See forum in index', Array('read'), 'DecirForum'); + $session->register_acl_type('decir_view_forum', AUTH_ALLOW, 'View forum', Array('decir_see_forum'), 'DecirForum'); + $session->register_acl_type('decir_post', AUTH_ALLOW, 'Post new topics', Array('decir_view_forum'), 'DecirForum'); + $session->register_acl_type('decir_reply', AUTH_ALLOW, 'Reply to topics', Array('decir_post'), 'DecirTopic'); +} + +function page_Special_Forum() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if ( getConfig('decir_version') != ENANO_DECIR_VERSION || isset($_POST['do_install_finish']) ) + { + require(DECIR_ROOT . '/install.php'); + } + + $act = strtolower( ( $n = $paths->getParam(0) ) ? $n : 'Index' ); + + $curdir = getcwd(); + chdir(DECIR_ROOT); + + switch($act) + { + case 'index': + default: + require('forum_index.php'); + break; + case 'viewforum': + require('viewforum.php'); + break; + case 'topic': + case 'post': + case 'viewtopic': + require('viewtopic.php'); + break; + case 'new': + require('posting.php'); + break; + } + + chdir($curdir); + +} + +function page_Admin_DecirGeneral() +{ + global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { header('Location: '.makeUrl($paths->nslist['Special'].'Administration'.urlSeparator.'noheaders')); die('Hacking attempt'); } + echo 'Hello world!'; +} + +?> diff -r 000000000000 -r 902822492a68 plugins/EnanoPress.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/EnanoPress.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,767 @@ +attachHook('base_classes_initted', ' + $paths->add_page(Array( + \'name\'=>\'Site Blog\', + \'urlname\'=>\'Blog\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Write blog post\', + \'urlname\'=>\'WriteBlogPost\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->addAdminNode(\'Plugin configuration\', \'EnanoPress settings\', \'EnanoPress\'); + '); + +$plugins->attachHook('compile_template', 'global $template; $template->tpl_bool[\'in_blog\'] = false;'); +$plugins->attachHook('paths_init_before', 'global $paths; $paths->create_namespace("Blog", "BlogPost:");'); +$plugins->attachHook('page_not_found', 'return EnanoPress_BlogNamespaceHandler();'); +$plugins->attachHook('page_type_string_set', 'global $paths, $template; if($paths->namespace == "Blog") $template->namespace_string = "blog post";'); + +define('BLOG_POST_PUBLISHED', 1); +define('BLOG_POST_DRAFT', 0); +define('BLOG_POSTS_PER_PAGE', 20); + +function EnanoPress_BlogNamespaceHandler() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $pid = intval($paths->cpage['urlname_nons']); + if($pid == 0) return null; + $q = $db->sql_query('SELECT post_id, post_title, post_content, time, author FROM '.table_prefix.'blog WHERE status='.BLOG_POST_PUBLISHED.' AND post_id='.$pid.';'); + if(!$q) $db->_die(''); + if($db->numrows() < 1) return null; + $row = $db->fetchrow($q); + $paths->cpage['name'] = $row['post_title']; + $template->header(); + echo EnanoPress_FormatBlogPost($row['post_title'], RenderMan::render($row['post_content']), $row['time'], $row['author'], 0, $row['post_id']); + echo EnanoPress_Separator(); + $sub = ( isset ($_GET['sub']) ) ? $_GET['sub'] : false; + $act = ( isset ($_GET['action']) ) ? $_GET['action'] : false; + $id = ( isset ($_GET['id']) ) ? intval($_GET['id']) : -1; + $comments = EnanoPress_GetComments($id); + echo $comments; + $template->footer(); + return true; +} + +function page_Special_Blog() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if(!getConfig('blog_table_version')) + { + $q = $db->sql_query('CREATE TABLE '.table_prefix.'blog ( post_id mediumint(8) NOT NULL auto_increment, post_title text, post_content text, time int(12), status tinyint(1) NOT NULL DEFAULT 0, author varchar(63) NOT NULL, num_comments mediumint(8) NOT NULL DEFAULT 0, PRIMARY KEY ( post_id ) );'); + if(!$q) $db->_die('The blog table could not be created'); + setConfig('blog_table_version', '1'); + } + if($n = getConfig('blog_name')) $paths->cpage['name'] = $n; + if(!defined('ENANO_TEMPLATE_LOADED')) + $template->init_vars(); + $template->tpl_bool['in_blog'] = true; + $template->header(); + if($s = $paths->getParam(0)) + { + if($s == 'archive') + { + $y = (int)$paths->getParam(1); + $m = (int)$paths->getParam(2); + $d = (int)$paths->getParam(3); + $t = $paths->getParam(4); + if(!$y || !$m || !$d || !$t) + { + echo '

Invalid permalink syntax

'; + $template->footer(); + return false; + } + $t = $db->escape(str_replace(Array('-', '_'), Array('_', '_'), $t)); // It's impossible to reconstruct the title from the URL, so let MySQL do it for us using wildcards + // Determine the valid UNIX timestamp values + $lower_limit = mktime(0, 0, 0, $m, $d, $y); + // EnanoPress will officially stop working on February 29, 2052. To extend the date, add more leap years here. + $leapyears = Array(2000,2004,2008,2012,2016,2020,2024,2028,2032,2040,2044,2048); + // add one to the day + // 30 days hath September, April, June, and November, all the rest have 31, except el enano, February :-P + if (in_array($m, Array(4, 6, 9, 11)) && $d == 30) $m++; + elseif(in_array($m, Array(1, 3, 5, 7, 8, 10, 12)) && $d == 31) $m++; + elseif($m == 2 && in_array($y, $leapyears) && $d == 29) $m++; + elseif($m == 2 && !in_array($y, $leapyears) && $d == 28) $m++; + else $d++; + $upper_limit = mktime(0, 0, 0, $m, $d, $y); + $q = $db->sql_query('SELECT b.post_id, b.post_title, b.post_content, b.time, COUNT(c.comment_id) AS num_comments, b.author FROM '.table_prefix.'blog AS b LEFT JOIN '.table_prefix.'comments AS c ON (c.page_id=b.post_id AND c.namespace=\'Blog\' AND c.approved=1) WHERE b.status='.BLOG_POST_PUBLISHED.' AND b.post_title LIKE \''.$t.'\' AND b.time >= '.$lower_limit.' AND b.time <= '.$upper_limit.' GROUP BY b.post_id ORDER BY b.time DESC;'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + return; + } + if($db->numrows() < 1) + { + // Try it with no date specifiation + $q = $db->sql_query('SELECT b.post_id, b.post_title, b.post_content, b.time, COUNT(c.comment_id) AS num_comments, b.author FROM '.table_prefix.'blog AS b LEFT JOIN '.table_prefix.'comments AS c ON (c.page_id=b.post_id AND c.namespace=\'Blog\' AND c.approved=1) WHERE b.status='.BLOG_POST_PUBLISHED.' AND b.post_title LIKE \''.$t.'\' GROUP BY b.post_id ORDER BY b.time DESC;'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + return; + } + if($db->numrows() < 1) + { + echo '

No posts matching that permalink could be found.

'; + $template->footer(); + return; + } + } + $row = $db->fetchrow(); + echo EnanoPress_FormatBlogPost($row['post_title'], RenderMan::render($row['post_content']), $row['time'], $row['author'], (int)$row['num_comments'], (int)$row['post_id']); + echo EnanoPress_Separator(); + $sub = ( isset ($_GET['sub']) ) ? $_GET['sub'] : false; + $act = ( isset ($_GET['action']) ) ? $_GET['action'] : false; + $id = ( isset ($_GET['id']) ) ? intval($_GET['id']) : -1; + $comments = EnanoPress_GetComments((int)$row['post_id']); + if(is_array($comments)) + { + $comments = EnanoPress_FormatComments($comments); + echo $comments; + } + $template->footer(); + return; + } + else + { + $start = intval($s); + } + } + else $start = 0; + $end = $start + BLOG_POSTS_PER_PAGE + 1; + $q = $db->sql_query('SELECT b.post_id, b.post_title, b.post_content, b.time, b.author, COUNT(c.comment_id) AS num_comments FROM '.table_prefix.'blog AS b LEFT JOIN '.table_prefix.'comments AS c ON (c.page_id=b.post_id AND c.namespace=\'Blog\' AND c.approved=1) WHERE b.status='.BLOG_POST_PUBLISHED.' GROUP BY b.post_id ORDER BY b.time DESC LIMIT '.$start.','. $end .';'); + if(!$q) { echo $db->get_error('The blog data could not be selected'); $template->footer(); return false; } + $numrows = $db->numrows(); + if($numrows == BLOG_POSTS_PER_PAGE+1) + { + $nextpage = true; + $numrows = BLOG_POSTS_PER_PAGE; + } + if($numrows < 1) + { + echo '

No posts yet! Write a post...

'; + } + else + { + $i = 0; + while($row = $db->fetchrow()) + { + $i++; + if($i == BLOG_POSTS_PER_PAGE+1) break; + echo EnanoPress_FormatBlogPost($row['post_title'], RenderMan::render($row['post_content']), $row['time'], $row['author'], (int)$row['num_comments'], (int)$row['post_id']); + if($i < $numrows) echo EnanoPress_Separator(); + } + if($session->user_level >= USER_LEVEL_MOD) echo '

More actions

Write a post...

'; + } + $template->footer(); +} + +function page_Special_WriteBlogPost() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if($session->user_level < USER_LEVEL_MOD) die_friendly('Access denied', '

You are not authorized to post blog messages.

'); + $errors = Array(); + $template->header(); + $editing = false; + if(isset($_POST['__save'])) $status = BLOG_POST_DRAFT; + if(isset($_POST['__publish'])) $status = BLOG_POST_PUBLISHED; + if(isset($_POST['__save']) || isset($_POST['__publish'])) + { + $text = RenderMan::preprocess_text($_POST['content'], false, true); + $title = $db->escape(htmlspecialchars($_POST['title'])); + $author = $db->escape($session->username); + $time = time(); + if($text == '') $errors[] = 'You must enter a post.'; + if($title == '') $errors[] = 'You must enter a title for your post.'; + if(sizeof($errors) < 1) + { + if(isset($_POST['edit_id']) && preg_match('#^([0-9]+)$#', $_POST['edit_id'])) + { + $q = $db->sql_query('UPDATE '.table_prefix."blog SET post_title='{$title}',post_content='{$text}',time={$time},author='{$author}',status=".$status." WHERE post_id={$_POST['edit_id']};"); + } + else + { + $q = $db->sql_query('INSERT INTO '.table_prefix."blog(post_title,post_content,time,author,status) VALUES('{$title}', '{$text}', {$time}, '{$author}', ".$status.");"); + } + if(!$q) + { + echo $db->get_error(); + $template->footer(); + return; + } + $q = $db->sql_query('SELECT post_id FROM '.table_prefix.'blog WHERE time='.$time.' ORDER BY post_id DESC;'); + if(!$q) { echo $db->get_error(); $template->footer(); return false; } + if($db->numrows() > 0) + { + $row = $db->fetchrow(); + $editing = $row['post_id']; + } + switch($status): + case BLOG_POST_DRAFT: + echo '
Your post has been saved; however it will not appear on the main blog page until it is published.
'; + break; + case BLOG_POST_PUBLISHED: + echo '
Your post has been published to the main blog page.
'; + break; + endswitch; + } + + $text =& $_POST['content']; + $title =& $_POST['title']; + } + elseif(isset($_POST['__delete']) && isset($_POST['del_confirm'])) + { + $pid = intval($_POST['edit_id']); + if($pid > 0) + { + $q = $db->sql_query('DELETE FROM '.table_prefix.'blog WHERE post_id='.$pid.';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + return; + } + else + echo '
Your post has been deleted.
'; + } + $text = ''; + $title = ''; + $editing = false; + } + elseif($t = $paths->getParam(0)) + { + $id = intval($t); + if($t == 0) die('SQL injection attempt'); + $q = $db->sql_query('SELECT post_title,post_content FROM '.table_prefix.'blog WHERE post_id='.$t.';'); + if(!$q) { echo $db->get_error(); $template->footer(); return false; } + if($db->numrows() > 0) + { + $row = $db->fetchrow(); + $text =& $row['post_content']; + $title =& $row['post_title']; + $editing = $t; + } + else + { + $text = ''; + $title = ''; + } + } + elseif(isset($_POST['__preview'])) + { + $text = RenderMan::preprocess_text($_POST['content'], false, false); + $text = RenderMan::render($text); + ob_start(); + eval('?>'.$text); + $text = ob_get_contents(); + ob_end_clean(); + echo '
Reminder:
This is only a preview - your changes to this post will not be saved until you click Save Draft or Save and Publish below.
' + . PageUtils::scrollBox(EnanoPress_FormatBlogPost($_POST['title'], $text, time(), $session->username, 0, false)); + $text =& $_POST['content']; + $title = $_POST['title']; + } + else + { + $text = ''; + $title = ''; + } + if(sizeof($errors) > 0) + { + echo '
The following errors were encountered:
' . implode('
', $errors) . '
'; + } + $q = $db->sql_query('SELECT post_id, post_title FROM '.table_prefix.'blog WHERE status='.BLOG_POST_DRAFT.' ORDER BY post_title ASC;'); + if(!$q) { echo $db->get_error('The blog data could not be selected'); $template->footer(); return false; } + $n = $db->numrows(); + if($n > 0) + { + echo '
Your drafts: '; + $posts = Array(); + while($r = $db->fetchrow()) + { + $posts[$r['post_id']] = $r['post_title']; + } + $i=0; + foreach($posts as $id => $t) + { + $i++; + echo ''.$t.''; + if($i < $n) echo ' » '; + } + echo '
'; + } + $idthing = ( $editing ) ? '' : ''; + $delbtn = ( $editing ) ? ' ' : ''; + $textarea = $template->tinymce_textarea('content', $text); + echo '
' + . '

Post title:


Post:
' + . $textarea + . '

The following information will be added to your post:

  • Date and time: '.date('F d, Y h:i a').'
  • Username: '.$session->username.'
' + . '

' + . $delbtn + . '

' + . $idthing + . '
'; + $template->footer(); +} + +/** + * Convert a blog post to HTML + * @param string $title the name of the blog post + * @param string $text the content, needs to be HTML formatted as no renderer is called + * @param int $time UNIX timestamp for the time of the post + * @param string $author [user]name of the person who wrote the post + * @param int $num_comments The number of comments attached to the post + * @param int $post_id The numerical ID of the post + * @return string + */ + +function EnanoPress_FormatBlogPost($title, $text, $time, $author, $num_comments = 0, $post_id) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + static $cached_template = false; + if(!$cached_template) + { + if(file_exists(ENANO_ROOT.'/themes/'.$session->theme.'/blogpost.tpl')) + $cached_template = file_get_contents(ENANO_ROOT.'/themes/'.$session->theme.'/blogpost.tpl', 'r'); + if(!$cached_template) + $cached_template = << +
+

{D} {j} {M} {Y}

+ +
+
+ {CONTENT} +
+ +TPLCODE; + } + $parser = $template->makeParserText($cached_template); + $datechars = 'dDjlSwzWFmMntLYyaABGhHisIOTZrU'; // A list of valid metacharacters for date() + $datechars = enano_str_split($datechars); + $datevals = Array(); + foreach($datechars as $d) + { + $datevals[$d] = date($d, $time); + } + unset($datechars); + $parser->assign_vars($datevals); + $parser->assign_bool(Array( + 'can_edit'=> ( $session->user_level >= USER_LEVEL_MOD ), + )); + $permalink = makeUrlNS('Special', 'Blog/archive/'.date('Y', $time).'/'.date('m', $time).'/'.date('d', $time).'/'.enanopress_sanitize_title($title)); + $commentlink = $permalink . '#post-comments'; + if($num_comments == 0) $ctext = 'No comments'; + elseif($num_comments == 1) $ctext = '1 comment'; + else $ctext = $num_comments . ' comments'; + $edit_link = ( is_int($post_id) ) ? makeUrlNS('Special', 'WriteBlogPost/'.$post_id) : '#" onclick="return false;'; + $parser->assign_vars(Array( + 'TITLE' => $title, + 'PERMALINK' => $permalink, + 'AUTHOR' => $author, + 'AUTHOR_LINK' => makeUrlNS('User', $author), + 'AUTHOR_USERPAGE_CLASS' => ( isset($paths->pages[$paths->nslist['User'].$author]) ) ? '' : ' class="wikilink-nonexistent" ', + 'COMMENT_LINK' => $commentlink, + 'COMMENT_LINK_TEXT' => $ctext, + 'CONTENT' => $text, + 'EDIT_LINK' => $edit_link, + )); + return $parser->run(); +} + +/** + * Draws a separator for use between blog posts - searches for the appropriate template file + * @return string + */ + +function EnanoPress_Separator() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + static $cached_template = false; + if(!$cached_template) + { + if(file_exists(ENANO_ROOT.'/themes/'.$session->theme.'/blogseparator.tpl')) + $cached_template = file_get_contents(ENANO_ROOT.'/themes/'.$session->theme.'/blogseparator.tpl'); + if(!$cached_template) + $cached_template = << +TPLCODE; + } + $parser = $template->makeParserText($cached_template); + return $parser->run(); +} + +/** + * Make a blog post title acceptable for URLs + * @param string $text the input text + * @return string + */ + +function enanopress_sanitize_title($text) +{ + $text = strtolower(str_replace(' ', '_', $text)); + $badchars = '/*+-,.?!@#$%^&*|{}[];:\'"`~'; + $badchars = enano_str_split($badchars); + $dash = Array(); + foreach($badchars as $i => $b) $dash[] = "-"; + $text = str_replace($badchars, $dash, $text); + return $text; +} + +/** + * Fetch comments for a post + * @param int $post_id The numerical ID of the post to get comments for + * @return array A hierarchial array - numbered keys, each key is a subarray with keys "name", "subject", "text", "time", and "comment_id" with time being a UNIX timestamp + */ + +function EnanoPress_GetComments($post_id) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if(!is_int($post_id)) return false; + + if(isset($_GET['sub'])) + { + $e = $db->sql_query('SELECT comment_id,name,subject,comment_data,user_id FROM '.table_prefix.'comments WHERE comment_id='.intval($_REQUEST['id']).';'); + if($e) + { + $comment = $db->fetchrow(); + $auth_edit = ( ( intval($comment['user_id']) == $session->user_id && $session->user_logged_in ) || $session->user_level >= USER_LEVEL_MOD ); + if($auth_edit) + { + switch($_GET['sub']) + { + case 'editcomment': + if(!isset($_GET['id']) || ( isset($_GET['id']) && !preg_match('#^([0-9]+)$#', $_GET['id']) )) { echo '

Invalid comment ID

'; break; } + $row =& $comment; + echo '

Edit comment

'; + echo "
+ + + +
Subject:
Comment:
"; + echo '
'; + return false; + break; + case 'savecomment': + if(empty($_POST['subj']) || empty($_POST['text'])) { echo '

Invalid request

'; break; } + $r = PageUtils::savecomment_neater((string)$post_id, 'Blog', $_POST['subj'], $_POST['text'], (int)$_POST['id']); + if($r != 'good') { echo "
$r
"; return false; } + break; + case 'deletecomment': + if(isset($_GET['id'])) + { + $q = 'DELETE FROM '.table_prefix.'comments WHERE comment_id='.intval($_GET['id']).' LIMIT 1;'; + $e=$db->sql_query($q); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + $e=$db->sql_query('UPDATE '.table_prefix.'blog SET num_comments=num_comments-1 WHERE post_id='.$post_id.';'); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + } + break; + case 'admin': + if(isset($_GET['action']) && $session->user_level >= USER_LEVEL_MOD) // Nip hacking attempts in the bud + { + switch($_GET['action']) { + case "delete": + if(isset($_GET['id'])) + { + $q = 'DELETE FROM '.table_prefix.'comments WHERE comment_id='.intval($_GET['id']).' LIMIT 1;'; + $e=$db->sql_query($q); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + $e=$db->sql_query('UPDATE '.table_prefix.'blog SET num_comments=num_comments-1 WHERE post_id='.$post_id.';'); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + } + break; + case "approve": + if(isset($_GET['id'])) + { + $where = 'comment_id='.intval($_GET['id']); + $q = 'SELECT approved FROM '.table_prefix.'comments WHERE '.$where.' LIMIT 1;'; + $e = $db->sql_query($q); + if(!$e) die('alert(unesape(\''.rawurlencode('Error selecting approval status: '.mysql_error().'\n\nQuery:\n'.$q).'\'));'); + $r = $db->fetchrow(); + $a = ( $r['approved'] ) ? '0' : '1'; + $q = 'UPDATE '.table_prefix.'comments SET approved='.$a.' WHERE '.$where.';'; + $e=$db->sql_query($q); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + if($a == '1') + { + $q = 'UPDATE '.table_prefix.'blog SET num_comments=num_comments+1 WHERE post_id='.$post_id.';'; + } + else + { + $q = 'UPDATE '.table_prefix.'blog SET num_comments=num_comments-1 WHERE post_id='.$post_id.';'; + } + $e=$db->sql_query($q); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + } + break; + } + } + break; + } + } + else + { + echo '
You are not authorized to perform this action.
'; + } + } + } + + if(isset($_POST['__doPostBack'])) + { + if(getConfig('comments_need_login') == '2' && !$session->user_logged_in) echo('Access denied to post comments: you need to be logged in first.'); + else + { + $cb=false; + if(getConfig('comments_need_login') == '1' && !$session->user_logged_in) + { + if(!isset($_POST['captcha_input']) || !isset($_POST['captcha_id'])) + { + echo('BUG: PageUtils::addcomment: no CAPTCHA data passed to method'); + $cb=true; + } + else + { + $result = $session->get_captcha($_POST['captcha_id']); + if($_POST['captcha_input'] != $result) { $cb=true; echo('The confirmation code you entered was incorrect.'); } + } + } + if(!$cb) + { + $text = RenderMan::preprocess_text($_POST['text']); + $name = $session->user_logged_in ? RenderMan::preprocess_text($session->username) : RenderMan::preprocess_text($_POST['name']); + $subj = RenderMan::preprocess_text($_POST['subj']); + if(getConfig('approve_comments')=='1') $appr = '0'; else $appr = '1'; + $q = 'INSERT INTO '.table_prefix.'comments(page_id,namespace,subject,comment_data,name,user_id,approved,time) VALUES(\''.$post_id.'\',\'Blog\',\''.$subj.'\',\''.$text.'\',\''.$name.'\','.$session->user_id.','.$appr.','.time().')'; + $e = $db->sql_query($q); + if(!$e) echo 'Error inserting comment data: '.mysql_error().'

Query:
'.$q; + else + { + echo '
Your comment has been posted.
'; + if(getConfig('approve_comments')=='1') + { + $e=$db->sql_query('UPDATE '.table_prefix.'blog SET num_comments=num_comments+1 WHERE post_id='.$post_id.';'); + if(!$e) + { + echo 'Error during query: '.mysql_error().'

Query:
'.$q; + return false; + } + } + } + } + } + } + + $apprv_clause = ( $session->user_level >= USER_LEVEL_MOD ) ? '' : 'AND approved=1'; + + $q = $db->sql_query('SELECT c.comment_id,c.subject,c.comment_data,c.name,c.time,c.approved,c.time,u.signature,u.user_level,u.user_id FROM '.table_prefix.'comments AS c + LEFT JOIN '.table_prefix.'users AS u + ON u.user_id=c.user_id + WHERE page_id='.$post_id.' + AND namespace=\'Blog\' + '.$apprv_clause.' + ORDER BY time DESC;'); + if(!$q) + { + echo $db->get_error(); + return false; + } + $posts = Array(); + while($row = $db->fetchrow()) + { + $row['text'] =& $row['comment_data']; + $posts[] = $row; + } + return $posts; +} + +/** + * Formats a comments array from EnanoPress_GetComments() as HTML + * @param array $comments The array of fetched comments + * @return string + */ + +function EnanoPress_FormatComments($comments) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + ob_start(); + $tpl = $template->makeParser('comment.tpl'); + + $seed = substr(md5(microtime() . mt_rand()), 0, 12); + + ?> + + Post comments"; + if ( count($comments) < 1 ) + { + $commentlink = ( getConfig('comments_need_login') == '2' && !$session->user_logged_in ) ? 'Log in to post a comment...' : 'Leave a comment...' ; + echo '

There are no comments on this post. Yours could be the first! '.$commentlink.'

'; + } + $i = -1; + + foreach($comments as $comment) + { + $auth_edit = ( ( intval($comment['user_id']) == $session->user_id && $session->user_logged_in ) || $session->user_level >= USER_LEVEL_MOD ); + $auth_mod = ( $session->user_level >= USER_LEVEL_MOD ); + + // Comment ID (used in the Javascript apps) + $strings['ID'] = (string)$i; + + // Determine the name, and whether to link to the user page or not + $name = ''; + if($comment['user_id'] > 0) $name .= ''; + $name .= $comment['name']; + if($comment['user_id'] > 0) $name .= ''; + $strings['NAME'] = $name; unset($name); + + // Subject + $s = $comment['subject']; + if(!$comment['approved']) $s .= ' (Unapproved)'; + $strings['SUBJECT'] = $s; + + // Date and time + $strings['DATETIME'] = date('F d, Y h:i a', $comment['time']); + + // User level + switch($comment['user_level']) + { + default: + case USER_LEVEL_GUEST: + $l = 'Guest'; + break; + case USER_LEVEL_MEMBER: + $l = 'Member'; + break; + case USER_LEVEL_MOD: + $l = 'Moderator'; + break; + case USER_LEVEL_ADMIN: + $l = 'Administrator'; + break; + } + $strings['USER_LEVEL'] = $l; unset($l); + + // The actual comment data + $strings['DATA'] = RenderMan::render($comment['text']); + + // Edit link + $strings['EDIT_LINK'] = 'edit'; + + // Delete link + $strings['DELETE_LINK'] = 'delete'; + + // Send PM link + $strings['SEND_PM_LINK'] = ( $session->user_logged_in && $comment['user_id'] > 0 ) ? 'Send private message' : ''; + + // Add Buddy link + $strings['ADD_BUDDY_LINK'] = ( $session->user_logged_in && $comment['user_id'] > 0 ) ? 'Add Buddy' : ''; + + // Mod links + $applink = ''; + $applink .= ''; + if($comment['approved']) $applink .= 'Unapprove'; + else $applink .= 'Approve'; + $applink .= ''; + $strings['MOD_APPROVE_LINK'] = $applink; + unset($applink); + $strings['MOD_DELETE_LINK'] = 'Delete'; + + // Signature + $strings['SIGNATURE'] = ''; + if($comment['signature'] != '') $strings['SIGNATURE'] = RenderMan::render($comment['signature']); + + $bool['auth_mod'] = $auth_mod; + $bool['can_edit'] = $auth_edit; + $bool['signature'] = ( $strings['SIGNATURE'] == '' ) ? false : true; + + $tpl->assign_vars($strings); + $tpl->assign_bool($bool); + echo $tpl->run(); + } + + $sn = $session->user_logged_in ? $session->username . '' : ''; + if(getConfig('comments_need_login') == '1') + { + $session->kill_captcha(); + $captcha = $session->make_captcha(); + } + $captcha = ( getConfig('comments_need_login') == '1' && !$session->user_logged_in ) ? 'Visual confirmation:
Please enter the code you see on the right.Visual confirmation
Code:
' : ''; + + echo '
+ '.EnanoPress_Separator().' +
+ + + + '.$captcha.' + + +
Your name or screen name:'.$sn.'
Comment subject:
Comment text:
(most HTML will be stripped)
+
+
+ +'; + + $ret = ob_get_contents(); + ob_end_clean(); + return $ret; +} + +function page_Admin_EnanoPress() +{ + global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { header('Location: '.makeUrl($paths->nslist['Special'].'Administration'.urlSeparator.'noheaders')); die('Hacking attempt'); } + echo '

Coming soon!

'; +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/Newsboy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/Newsboy.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,1033 @@ +attachHook('acl_rule_init', 'NewsBoy_namespace_setup($this);'); + +// Hook into page rendering +$plugins->attachHook('page_not_found', 'NewsBoy_namespace_handler();'); +$plugins->attachHook('send_page_footers', 'NewsBoy_PortalLink();'); + +// String to determine page type string +$plugins->attachHook('page_type_string_set', 'NewsBoy_set_page_string();'); + +// Attach to the Feed Me plugin, if it's loaded (if not, the feed handler simply won't get called) +$plugins->attachHook('feed_me_request', 'NewsBoy_feed_handler($mode);'); + +function NewsBoy_namespace_setup(&$paths) +{ + $paths->create_namespace('NewsBoy', 'News:'); + $paths->addAdminNode('Newsboy portal', 'Configuration', 'NewsboyConfiguration'); + $paths->addAdminNode('Newsboy portal', 'Manage news items', 'NewsboyItemManager'); + + global $db, $session, $paths, $template, $plugins; // Common objects + + $session->acl_extend_scope('read', 'NewsBoy', $paths); + $session->acl_extend_scope('post_comments', 'NewsBoy', $paths); + $session->acl_extend_scope('edit_comments', 'NewsBoy', $paths); + $session->acl_extend_scope('edit_page', 'NewsBoy', $paths); + $session->acl_extend_scope('view_source', 'NewsBoy', $paths); + $session->acl_extend_scope('mod_comments', 'NewsBoy', $paths); + $session->acl_extend_scope('history_view', 'NewsBoy', $paths); + $session->acl_extend_scope('history_rollback', 'NewsBoy', $paths); + $session->acl_extend_scope('history_rollback_extra', 'NewsBoy', $paths); + $session->acl_extend_scope('protect', 'NewsBoy', $paths); + $session->acl_extend_scope('rename', 'NewsBoy', $paths); + $session->acl_extend_scope('clear_logs', 'NewsBoy', $paths); + $session->acl_extend_scope('vote_delete', 'NewsBoy', $paths); + $session->acl_extend_scope('vote_reset', 'NewsBoy', $paths); + $session->acl_extend_scope('delete_page', 'NewsBoy', $paths); + $session->acl_extend_scope('set_wiki_mode', 'NewsBoy', $paths); + $session->acl_extend_scope('password_set', 'NewsBoy', $paths); + $session->acl_extend_scope('password_reset', 'NewsBoy', $paths); + $session->acl_extend_scope('mod_misc', 'NewsBoy', $paths); + $session->acl_extend_scope('edit_cat', 'NewsBoy', $paths); + $session->acl_extend_scope('even_when_protected', 'NewsBoy', $paths); + $session->acl_extend_scope('upload_files', 'NewsBoy', $paths); + $session->acl_extend_scope('upload_new_version', 'NewsBoy', $paths); + $session->acl_extend_scope('create_page', 'NewsBoy', $paths); + $session->acl_extend_scope('php_in_pages', 'NewsBoy', $paths); + $session->acl_extend_scope('edit_acl', 'NewsBoy', $paths); + +} + +function NewsBoy_namespace_handler() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if ( defined('ENANO_FEEDBURNER_INCLUDED') ) + { + $template->add_header(''); + } + + if ( $paths->namespace != 'NewsBoy' ) + return; + + $chk = $paths->page; + $chk1 = substr($chk, 0, ( strlen($paths->nslist['NewsBoy']) + 8 )); + $chk2 = substr($chk, 0, ( strlen($paths->nslist['NewsBoy']) + 7 )); + + if ( $paths->cpage['urlname_nons'] == 'Portal' || $paths->cpage['urlname_nons'] == 'Archive' || $chk1 == $paths->nslist['NewsBoy'] . 'Archive/' || $chk2 == $paths->nslist['NewsBoy'] . 'Archive' ) + { + + // Add admin opener Javascript function + $template->add_header(' + '); + + $x = getConfig('nb_portal_title'); + + $template->tpl_strings['PAGE_NAME'] = ( $paths->cpage['urlname_nons'] == 'Portal' ) ? + ( ( empty($x) ) ? + 'Welcome to ' . getConfig('site_name') : + $x ) : + 'News Archive'; + + if ( !$session->get_permissions('read') ) + { + die_friendly('Access denied', '
Access to this page is denied.
This may be because you are not logged in or you have not met certain criteria for viewing this page.
'); + } + + $paths->cpage['comments_on'] = 0; + + $template->header(); + ( $paths->cpage['urlname_nons'] == 'Portal' ) ? NewsBoy_portal() : NewsBoy_archive(); + $template->footer(); + } +} + +function NewsBoy_set_page_string() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $paths->namespace == 'NewsBoy' ) + { + if ( $paths->cpage['urlname_nons'] == 'Portal' ) + { + $template->namespace_string = 'portal'; + + // block editing + $perm_arr = Array('edit_page' => AUTH_DENY, 'view_source' => AUTH_DENY); + $session->acl_merge_with_current($perm_arr, false, 2); + } + else + { + $template->namespace_string = 'news item'; + } + } +} + +function NewsBoy_format_title($title) +{ + $title = strtolower($title); + $title = preg_replace('/\W/', '-', $title); + $title = preg_replace('/([-]+)/', '-', $title); + $title = trim($title, '-'); + return $title; +} + +function NewsBoy_feed_handler($mode) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if ( $mode != 'news' ) + return; + + $limit = ( $x = $paths->getParam(1) ) ? $x : 20; + $limit = intval($limit); + if ( $limit > 50 ) + $limit = 50; + + $title = getConfig('site_name') . ': Site news'; + + $x = getConfig('nb_portal_title'); + $desc = ( empty($x) ) ? 'Welcome to ' . getConfig('site_name') : $x; + + $link = makeUrlComplete('NewsBoy', 'Portal'); + $generator = 'Enano CMS ' . enano_version() . ' - NewsBoy plugin'; + $email = getConfig('contact_email'); + + $rss = new RSS($title, $desc, $link, $generator, $email); + + $sql = 'SELECT p.*, l.time_id, l.author, u.user_level,COUNT(c.comment_id) AS num_comments,t.page_text FROM '.table_prefix.'pages AS p + LEFT JOIN '.table_prefix.'comments AS c + ON ( c.page_id=p.urlname AND c.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'logs AS l + ON ( l.page_id=p.urlname AND l.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'users AS u + ON ( u.username=l.author ) + LEFT JOIN '.table_prefix.'page_text AS t + ON ( t.page_id=p.urlname AND t.namespace=p.namespace ) + WHERE p.namespace=\'NewsBoy\' + AND l.action=\'create\' + AND p.urlname REGEXP \'^([0-9]+)$\' + AND p.visible=1 + GROUP BY p.urlname + ORDER BY urlname DESC + LIMIT '.$limit.';'; + + $q = $db->sql_unbuffered_query($sql); + + if ( !$q ) + $db->_die(); + + $formatter = new NewsBoyFormatter(); + + if ( $row = $db->fetchrow() ) + { + do { + + $title = $row['name']; + $link = makeUrlComplete('NewsBoy', $row['urlname']); + $desc = RenderMan::render($row['page_text']); + $time = intval($row['urlname']); + + $rss->add_item($title, $link, $desc, $time); + + } while ( $row = $db->fetchrow() ); + } + else + { + $rss->add_item('Error', $link, 'No news items yet.', time()); + } + + echo $rss->render(); + +} + +function NewsBoy_portal() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + $news_template = << + + + + + + + + + + +
{TITLE}
+ {CONTENT} +
+ Posted by {USER_LINK} on {DATE}
+ [ {NUM_COMMENTS} comment{COMMENT_S} | {COMMENT_LINK} ] +
+ +TPLCODE; + + /* + $p = RenderMan::strToPageID(getConfig('main_page')); + if ( $p[1] != 'NewsBoy' ) + { + echo RenderMan::getPage($p[0], $p[1]); + } + else + { */ + /* + $s = $paths->nslist['NewsBoy'] . 'Announce'; + if ( isPage($s) ) + { + $p = RenderMan::getPage('Announce', 'NewsBoy'); + echo $p; + } + /* } */ + + $s = $paths->nslist['NewsBoy'] . 'Announce'; + $announce_page = getConfig('nb_announce_page'); + if ( !empty($announce_page) && isPage($announce_page) ) + { + $s = $announce_page; + } + else if ( !isPage($s) ) + { + $s = false; + } + if ( $s ) + { + $stuff = RenderMan::strToPageID($s); + $p = RenderMan::getPage($stuff[0], $stuff[1]); + echo $p; + } + + echo '

Latest news

'; + + $q = $db->sql_unbuffered_query('SELECT p.*, COUNT(c.comment_id) AS num_comments, t.page_text, l.time_id, l.author, u.user_level FROM '.table_prefix.'pages AS p + LEFT JOIN '.table_prefix.'comments AS c + ON ( c.page_id=p.urlname AND c.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'page_text AS t + ON ( t.page_id=p.urlname AND t.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'logs AS l + ON ( l.page_id=p.urlname AND l.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'users AS u + ON ( u.username=l.author OR u.user_id=1 ) + WHERE p.namespace=\'NewsBoy\' + AND l.action=\'create\' + AND p.urlname!=\'Announce\' + AND p.visible=1 + GROUP BY p.urlname + ORDER BY urlname DESC;'); + if ( !$q ) + $db->_die(); + + if ( $row = $db->fetchrow() ) + { + $i = 0; + $parser = $template->makeParserText($news_template); + do + { + if ( $i < 5 ) + { + $title = htmlspecialchars($row['name']); + $content = RenderMan::render($row['page_text']); + if ( strlen($content) > 400 ) + { + $content = nb_trim_paragraph($content, 400, $trimmed); + } + if ( $trimmed ) + { + $content .= ' Read more...'; + } + $user_link = nb_make_username_link($row['author'], $row['user_level']); + $date = date('F d, Y h:i:s a', $row['urlname']); + $num_comments = $row['num_comments']; + $comment_s = ( $num_comments == 1 ) ? '' : 's'; + $comment_link = 'add a comment'; + $parser->assign_vars(array( + 'TITLE' => $title, + 'LINK' => makeUrlNS('NewsBoy', $row['urlname']), + 'CONTENT' => $content, + 'USER_LINK' => $user_link, + 'DATE' => $date, + 'NUM_COMMENTS' => $num_comments, + 'COMMENT_S' => $comment_s, + 'COMMENT_LINK' => $comment_link + )); + echo $parser->run(); + } + else + { + echo '

Older news...

'; + break; + } + $i++; + } while ( $row = $db->fetchrow() ); + } + else + { + echo '

No news items yet.

'; + } + if ( $session->user_level >= USER_LEVEL_ADMIN ) + { + echo '
+ + + + + + +
Administrative tools:Edit announcement »Portal Administration
+

'; + } +} + +/** + * Formats row data in the archive. + * @package Enano + * @subpackage Newsboy + * @license GNU General Public License + */ + +class NewsBoyFormatter +{ + function article_link($name, $row) + { + $article_link = '' . $row['name'] . ''; + return $article_link; + } + function format_date($date, $row) + { + $date = date('Y-m-j g:m', intval ( $date )); + return $date; + } + function format_username($x, $row) + { + $ul = intval($row['user_level']); + $author = nb_make_username_link($row['author'], $ul); + return $author; + } + function format_commentlink($x, $row) + { + $comments = '' . $row['num_comments'] . ''; + return $comments; + } +} + +function NewsBoy_archive() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + $lower_limit = ( isset($_GET['start']) ) ? intval($_GET['start']) : ( ( $xx = $paths->getParam(0) ) ? intval($xx) : 0 ); + $entries_per_page = 50; + + $row_count = $entries_per_page + 1; + + // Determine number of total news entries + $q = $db->sql_query('SELECT urlname FROM '.table_prefix.'pages WHERE namespace=\'NewsBoy\' AND urlname REGEXP \'^([0-9]+)$\' AND visible=1;'); + if ( !$q ) + $db->_die(); + $r = $db->fetchrow(); + $num_total = intval($db->numrows()); + $db->free_result(); + + if ( $lower_limit >= $num_total ) + $lower_limit = 0; + + $sql = 'SELECT p.*, l.time_id, l.author, u.user_level,COUNT(c.comment_id) AS num_comments FROM '.table_prefix.'pages AS p + LEFT JOIN '.table_prefix.'comments AS c + ON ( c.page_id=p.urlname AND c.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'logs AS l + ON ( l.page_id=p.urlname AND l.namespace=p.namespace ) + LEFT JOIN '.table_prefix.'users AS u + ON ( u.username=l.author ) + WHERE p.namespace=\'NewsBoy\' + AND l.action=\'create\' + AND p.urlname REGEXP \'^([0-9]+)$\' + AND p.visible=1 + GROUP BY p.urlname + ORDER BY urlname DESC;'; + + $q = $db->sql_unbuffered_query($sql); + + if ( !$q ) + $db->_die(); + + $formatter = new NewsBoyFormatter(); + + $callers = Array( + 'name' => Array($formatter, 'article_link'), + 'urlname' => Array($formatter, 'format_date'), + 'author' => Array($formatter, 'format_username'), + 'num_comments' => Array($formatter, 'format_commentlink') + ); + + $head = '
+ + + + '; + $foot = "
ArticleDateAuthorComments
"; + + $content = paginate($q, "\n".'{name}{urlname}{author}{num_comments}', + $num_total, makeUrlNS('NewsBoy', 'Archive/%s'), $lower_limit, 20, $callers, $head, $foot); + echo $content; + + $code = $plugins->setHook('send_page_footers'); + foreach ( $code as $cmd ) + { + eval($cmd); + } + +} + +function nb_make_username_link($username, $user_level) +{ + $color = '#0000AA'; + $user_level = intval($user_level); + if ( $user_level < USER_LEVEL_MEMBER ) return $username; + if ( $user_level >= USER_LEVEL_MOD ) $color = '#00AA00'; + if ( $user_level >= USER_LEVEL_ADMIN ) $color = '#AA0000'; + $link = '' . $username . ''; + return $link; +} + +function NewsBoy_PortalLink() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $paths->namespace == 'NewsBoy' ) + echo '
'; +} + +// Administration panel +function page_Admin_NewsboyItemManager() +{ + global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { redirect(makeUrlNS('Special', 'Administration', 'noheaders', true), '', '', 0); die('Hacking attempt'); } + + $done = false; + + if ( isset( $_GET['act'] ) ) + { + switch ( $_GET['act'] ) + { + case 'edit': + + // Error list + $errors = Array(); + + if ( isset ( $_POST['submitting'] ) ) + { + // Generate timestamp + $year = intval($_POST['pub_year']); + $month = intval($_POST['pub_month']); + $day = intval($_POST['pub_day']); + $hour = intval($_POST['pub_hour']); + $minute = intval($_POST['pub_minute']); + $second = intval($_POST['pub_second']); + + // Validation + if ( $year < 1500 || $year > 10000 ) + $errors[] = 'Invalid year.'; + + if ( $month < 1 || $month > 12 ) + $errors[] = 'Invalid month.'; + + if ( $day < 1 || $day > 31 ) + $errors[] = 'Invalid day.'; + + if ( $hour < 0 || $hour > 23 ) + $errors[] = 'Invalid hour.'; + + if ( $minute < 0 || $minute > 60 ) + $errors[] = 'Invalid minute.'; + + if ( $second < 0 || $second > 60 ) + $errors[] = 'Invalid second.'; + + $name = $_POST['article_name']; + $name = $db->escape($name); + + $author = $_POST['author']; + $author = $db->escape($author); + + if ( count($errors) < 1 ) + { + $time = mktime($hour, $minute, $second, $month, $day, $year); + } + + if ( isset($paths->pages[ $paths->nslist['NewsBoy'] . $time ]) && $paths->pages[ $paths->nslist['NewsBoy'] . $time ] != $paths->pages[ $paths->nslist['NewsBoy'] . $_POST['page_id'] ] ) + $errors[] = 'You cannot have two news articles with the same publish time.'; + + if ( count($errors) < 1 ) + { + $publ = ( isset($_POST['published']) ) ? '1' : '0'; + $sql = 'UPDATE '.table_prefix.'pages SET name=\'' . $name . '\',visible='.$publ.',urlname=\''.$time.'\' WHERE urlname=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'NewsBoy\';'; + $q = $db->sql_query($sql); + + if ( !$q ) + $db->_die(); + + // Update author + $q = $db->sql_query('UPDATE '.table_prefix.'logs SET author=\'' . $author . '\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'NewsBoy\' AND action=\'create\';'); + + if ( !$q ) + $db->_die(); + + // Update other tables with urlname info + $q = $db->sql_query('UPDATE '.table_prefix.'logs SET page_id=\'' . $time . '\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'NewsBoy\';'); + if ( !$q ) + $db->_die(); + + $q = $db->sql_query('UPDATE '.table_prefix.'comments SET page_id=\'' . $time . '\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'NewsBoy\';'); + if ( !$q ) + $db->_die(); + + $q = $db->sql_query('UPDATE '.table_prefix.'page_text SET page_id=\'' . $time . '\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'NewsBoy\';'); + if ( !$q ) + $db->_die(); + + $q = $db->sql_query('UPDATE '.table_prefix.'categories SET page_id=\'' . $time . '\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'NewsBoy\';'); + if ( !$q ) + $db->_die(); + + echo '
Your changes have been saved.
'; + + break; + } + } + + if ( count($errors) > 0 ) + echo '
Errors encountered while saving data:
  • ' . implode('
  • ', $errors) . '
'; + + // Obtain page information + if ( !isset($paths->pages[ $paths->nslist['NewsBoy'] . $_GET['id'] ]) ) + { + echo 'Invalid ID'; + return false; + } + $page_info =& $paths->pages[ $paths->nslist['NewsBoy'] . $_GET['id'] ]; + $time = intval($page_info['urlname_nons']); + + // Get author + $q = $db->sql_query('SELECT author FROM '.table_prefix.'logs WHERE page_id=\'' . $db->escape($page_info['urlname_nons']) . '\' AND namespace=\'NewsBoy\' AND action=\'create\' ORDER BY time_id DESC LIMIT 1;'); + + if ( !$q ) + $db->_die(); + + $row = $db->fetchrow(); + $author = ( isset($row['author']) ) ? $row['author'] : ''; + if ( empty($author) ) + $author = 'Anonymous'; + + // Set date & time + $month = date('n', $time); + $year = date('Y', $time); + $day = date('j', $time); + $hour = date('G', $time); + $minute = date('m', $time); + $second = date('s', $time); + + echo '
'; + echo '
+ + + + + + + + + + + + + + + + + + + + + +
Editing news article
Article name:
Published date: + - + , time: +  :  : 
+ Note: Hours are in 24-hour format. +
Publish article:
Article author:' . $template->username_field('author', $author) . '
+ Save changes  Return to main menu +
+
+ + '; + echo '
'; + $done = true; + break; + case 'del': + if ( isset( $_POST['confirmed'] ) ) + { + $page_id = $_POST['page_id']; + $namespace = 'NewsBoy'; + + $e = $db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,page_id,namespace,author) VALUES('.time().', \''.date('d M Y h:i a').'\', \'page\', \'delete\', \''.$page_id.'\', \''.$namespace.'\', \''.$session->username.'\')'); + if(!$e) $db->_die('The page log entry could not be inserted.'); + $e = $db->sql_query('DELETE FROM '.table_prefix.'categories WHERE page_id=\''.$page_id.'\' AND namespace=\''.$namespace.'\''); + if(!$e) $db->_die('The page categorization entries could not be deleted.'); + $e = $db->sql_query('DELETE FROM '.table_prefix.'comments WHERE page_id=\''.$page_id.'\' AND namespace=\''.$namespace.'\''); + if(!$e) $db->_die('The page comments could not be deleted.'); + $e = $db->sql_query('DELETE FROM '.table_prefix.'page_text WHERE page_id=\''.$page_id.'\' AND namespace=\''.$namespace.'\''); + if(!$e) $db->_die('The page text entry could not be deleted.'); + $e = $db->sql_query('DELETE FROM '.table_prefix.'pages WHERE urlname=\''.$page_id.'\' AND namespace=\''.$namespace.'\''); + if(!$e) $db->_die('The page entry could not be deleted.'); + $e = $db->sql_query('DELETE FROM '.table_prefix.'files WHERE page_id=\''.$page_id.'\''); + if(!$e) $db->_die('The file entry could not be deleted.'); + + $result = 'This page has been deleted. Note that there is still a log of edits and actions in the database, and anyone with admin rights can raise this page from the dead unless the log is cleared. If the deleted file is an image, there may still be cached thumbnails of it in the cache/ directory, which is inaccessible to users.'; + + echo $result . '
+
+ Return to Newsboy'; + } + else + { + echo '
'; + echo '
+ + + + + + + + + + +
Confirm deletion
+

Are you sure you want to delete this news article?

+
+ Delete  Cancel +
+
+ + '; + echo '
'; + } + $done = true; + break; + case 'create': + + // Error list + $errors = Array(); + + if ( isset ( $_POST['submitting'] ) ) + { + // Generate timestamp + $year = intval($_POST['pub_year']); + $month = intval($_POST['pub_month']); + $day = intval($_POST['pub_day']); + $hour = intval($_POST['pub_hour']); + $minute = intval($_POST['pub_minute']); + $second = intval($_POST['pub_second']); + + // Validation + if ( $year < 1500 || $year > 10000 ) + $errors[] = 'Invalid year.'; + + if ( $month < 1 || $month > 12 ) + $errors[] = 'Invalid month.'; + + if ( $day < 1 || $day > 31 ) + $errors[] = 'Invalid day.'; + + if ( $hour < 0 || $hour > 23 ) + $errors[] = 'Invalid hour.'; + + if ( $minute < 0 || $minute > 60 ) + $errors[] = 'Invalid minute.'; + + if ( $second < 0 || $second > 60 ) + $errors[] = 'Invalid second.'; + + $name = $_POST['article_name']; + $name = $db->escape($name); + + $author = $_POST['author']; + $author = $db->escape($author); + + if ( count($errors) < 1 ) + { + $time = mktime($hour, $minute, $second, $month, $day, $year); + } + + if ( isset($paths->pages[ $paths->nslist['NewsBoy'] . $time ]) && $paths->pages[ $paths->nslist['NewsBoy'] . $time ] != $paths->pages[ $paths->nslist['NewsBoy'] . $_POST['page_id'] ] ) + $errors[] = 'You cannot have two news articles with the same publish time.'; + + if ( count($errors) < 1 ) + { + $publ = ( isset($_POST['published']) ) ? 1 : 0; + $result = PageUtils::createpage( (string)$time, 'NewsBoy', $name, $publ ); + + // Set content + $content = RenderMan::preprocess_text($_POST['content'], true); // this also SQL-escapes it + + $q = $db->sql_query('UPDATE '.table_prefix.'page_text SET page_text=\'' . $content . '\' WHERE page_id=\'' . $time . '\' AND namespace=\'NewsBoy\';'); + if ( !$q ) + $db->_die(); + + if ( $result ) + echo '
Your changes have been saved.
'; + else + $errors[] = 'PageUtils::createpage returned an error.'; + + break; + } + } + + if ( count($errors) > 0 ) + echo '
Errors encountered while preparing data:
  • ' . implode('
  • ', $errors) . '
'; + + $time = time();; + + // Get author + $author = $session->username; + + if ( empty($author) ) + $author = 'Anonymous'; + + // Set date & time + $month = date('n', $time); + $year = date('Y', $time); + $day = date('j', $time); + $hour = date('G', $time); + $minute = date('m', $time); + $second = date('s', $time); + + echo '
'; + echo '
+ + + + + + + + + + + + + + + + + + + + + + + +
Creating news article
Article name:
Published datestamp: + - + , time: +  :  : 
+ Note: Hours are in 24-hour format. +
Publish article:
Article author:' . $template->username_field('author', $author) . '
Initial content:
You can always edit this later.
+ Create article  Return to main menu +
+
+ '; + echo '
'; + + $done = true; + break; + } + } + + if ( !$done ) + { + + // Start output + echo '
+ + + + + + '; + + $row_class = 'row2'; + + // List existing news entries + $q = $db->sql_query('SELECT name,urlname FROM '.table_prefix.'pages WHERE namespace="NewsBoy" AND urlname!="Announce" ORDER BY name ASC;'); + + if ( !$q ) + $db->_die(); + + if ( $row = $db->fetchrow($q) ) + { + do { + $row_class = ( $row_class == 'row1' ) ? 'row2' : 'row1'; + $ts = intval($row['urlname']); + $date = date('F d, Y h:i a', $ts); + $edit_url = makeUrlNS('Special', 'Administration', "module={$paths->cpage['module']}&act=edit&id={$row['urlname']}", true); + $dele_url = makeUrlNS('Special', 'Administration', "module={$paths->cpage['module']}&act=del&id={$row['urlname']}", true); + $page_url = makeUrlNS('NewsBoy', $row['urlname']); + echo " + + + + + + "; + } while ( $row = $db->fetchrow($q) ); + } + else + { + echo ''; + } + echo ' +
NameDate publishedActions
+ {$row['name']} + + $date + + Settings + + Page + + Delete +
No news items yet.
cpage['module']}&act=create", true) . '" style="color: inherit;">Create new entry
'; + $db->free_result(); + + } + +} + +function page_Admin_NewsboyConfiguration() +{ + global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { redirect(makeUrlNS('Special', 'Administration', 'noheaders', true), '', '', 0); die('Hacking attempt'); } + if ( isset($_POST['submit']) ) + { + setConfig('nb_portal_title', $_POST['portal_name']); + if ( isPage($_POST['announce_page']) ) + setConfig('nb_announce_page', $_POST['announce_page']); + else + setConfig('nb_announce_page', ''); + // Submit + echo '
Your changes have been saved.
'; + } + echo '
'; + echo '
+ + + + + + + + + + + + + + + +
+ Newsboy portal: General configuration +
+ Portal title:
+ This is the text that will be shown as the page title on the
+ portal. If you don\'t enter anything here, a default will be used.
+
+ Page to embed as announcement:
+ The page you enter here will always be shown at the top of the
+ portal. The default is "' . $paths->nslist['NewsBoy'] . 'Announce".
+
+ ' . $template->pagename_field('announce_page', htmlspecialchars(getConfig('nb_announce_page'))) . ' +
+ +
+
'; + echo '
'; +} + +/** + * Trims a wad of text to the specified length. + * @todo make HTML friendly (don't break tags) + * @param string The text to trim + * @param int The maximum length to trim the text to. + * @param bool Reference. Set to true if the text was trimmed, otherwise set to false. + */ + +function nb_trim_paragraph($text, $len = 500, &$trimmed = false) +{ + $trimmed = false; + if ( strlen($text) <= $len ) + return $text; + $trimmed = true; + $text = substr($text, 0, $len); + for ( $i = $len; $i > 0; $i-- ) + { + $chr = $text{$i-1}; + if ( preg_match('/[\s]/', $chr) ) + { + $text = substr($text, 0, $i - 1); + $text .= '...'; + return $text; + } + $text = substr($text, 0, $i); + } + return $text; +} + +?> diff -r 000000000000 -r 902822492a68 plugins/PrivateMessages.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/PrivateMessages.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,547 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Private Messages\', + \'urlname\'=>\'PrivateMessages\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +function page_Special_PrivateMessages() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if(!$session->user_logged_in) die_friendly('Access denied', '

You need to log in to view your private messages.

'); + $argv = Array(); + $argv[] = $paths->getParam(0); + $argv[] = $paths->getParam(1); + $argv[] = $paths->getParam(2); + if(!$argv[0]) $argv[0] = 'InVaLiD'; + switch($argv[0]) + { + default: + header('Location: '.makeUrlNS('Special', 'PrivateMessages/Folder/Inbox')); + break; + case 'View': + $id = $argv[1]; + if(!preg_match('#^([0-9]+)$#', $id)) die_friendly('Message error', '

Invalid message ID

'); + $q = $db->sql_query('SELECT p.message_from, p.message_to, p.subject, p.message_text, p.date, p.folder_name, u.signature FROM '.table_prefix.'privmsgs AS p LEFT JOIN '.table_prefix.'users AS u ON (p.message_from=u.username) WHERE message_id='.$id.''); + if(!$q) $db->_die('The message data could not be selected.'); + $r = $db->fetchrow(); + $db->free_result(); + if( ($r['message_to'] != $session->username && $r['message_from'] != $session->username ) || $r['folder_name']=='drafts' ) die_friendly('Access denied', '

You are not authorized to view this message.

'); + if($r['message_to'] == $session->username) + { + $q = $db->sql_query('UPDATE '.table_prefix.'privmsgs SET message_read=1 WHERE message_id='.$id.''); + $db->free_result(); + if(!$q) $db->_die('Could not mark message as read'); + } + $template->header(); + userprefs_show_menu(); + ?> +
+
+ + + + + +
Private message from
Subject:
Date:
Message:'; + echo RenderMan::render($r['signature']); + } + ?>
Send reply | Delete message | Archive message | Return to inbox
+ footer(); + break; + case 'Move': + $id = $argv[1]; + if(!preg_match('#^([0-9]+)$#', $id)) die_friendly('Message error', '

Invalid message ID

'); + $q = $db->sql_query('SELECT message_to FROM '.table_prefix.'privmsgs WHERE message_id='.$id.''); + if(!$q) $db->_die('The message data could not be selected.'); + $r = $db->fetchrow(); + $db->free_result(); + if($r['message_to'] != $session->username) die_friendly('Access denied', '

You are not authorized to alter this message.

'); + $fname = $argv[2]; + if(!$fname || ( $fname != 'Inbox' && $fname != 'Outbox' && $fname != 'Sent' && $fname != 'Drafts' && $fname != 'Archive' ) ) die_friendly('Invalid request', '

The folder name "'.$fname.'" is invalid.

'); + $q = $db->sql_query('UPDATE '.table_prefix.'privmsgs SET folder_name=\''.strtolower($fname).'\' WHERE message_id='.$id.';'); + $db->free_result(); + if(!$q) $db->_die('The message was not successfully moved.'); + die_friendly('Message status', '

Your message has been moved to the folder "'.$fname.'".

Return to inbox

'); + break; + case 'Delete': + $id = $argv[1]; + if(!preg_match('#^([0-9]+)$#', $id)) die_friendly('Message error', '

Invalid message ID

'); + $q = $db->sql_query('SELECT message_to FROM '.table_prefix.'privmsgs WHERE message_id='.$id.''); + if(!$q) $db->_die('The message data could not be selected.'); + $r = $db->fetchrow(); + if($r['message_to'] != $session->username) die_friendly('Access denied', '

You are not authorized to delete this message.

'); + $q = $db->sql_query('DELETE FROM '.table_prefix.'privmsgs WHERE message_id='.$id.';'); + if(!$q) $db->_die('The message was not successfully deleted.'); + $db->free_result(); + die_friendly('Message status', '

The message has been deleted.

Return to inbox

'); + break; + case 'Compose': + if($argv[1]=='Send' && isset($_POST['_send'])) + { + // Check each POST DATA parameter... + if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', '

Please enter the username to which you want to send your message.

'); + if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', '

Please enter a subject for your message.

'); + if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', '

Please enter a message to send.

'); + $namelist = $_POST['to']; + $namelist = str_replace(', ', ',', $namelist); + $namelist = explode(',', $namelist); + foreach($namelist as $n) { $n = $db->escape($n); } + $subject = RenderMan::preprocess_text($_POST['subject']); + $message = RenderMan::preprocess_text($_POST['message']); + $base_query = 'INSERT INTO '.table_prefix.'privmsgs(message_from,message_to,date,subject,message_text,folder_name,message_read) VALUES'; + foreach($namelist as $n) + { + $base_query .= '(\''.$session->username.'\', \''.$n.'\', '.time().', \''.$subject.'\', \''.$message.'\', \'inbox\', 0),'; + } + $base_query = substr($base_query, 0, strlen($base_query)-1) . ';'; + $result = $db->sql_query($base_query); + $db->free_result(); + if(!$result) $db->_die('The message could not be sent.'); + else die_friendly('Message status', '

Your message has been sent. You may edit the message if you wish; one copy for each recipient will be in your outbox until each recipient has read it. Return to your inbox.

'); + return; + } elseif($argv[1]=='Send' && isset($_POST['_savedraft'])) { + // Check each POST DATA parameter... + if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', '

Please enter the username to which you want to send your message.

'); + if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', '

Please enter a subject for your message.

'); + if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', '

Please enter a message to send.

'); + $namelist = $_POST['to']; + $namelist = str_replace(', ', ',', $namelist); + $namelist = explode(',', $namelist); + foreach($namelist as $n) { $n = $db->escape($n); } + if(count($namelist) > MAX_PMS_PER_BATCH && $session->get_permssions('mod_misc')) die_friendly('Limit exceeded', '

You can only send this message to a maximum of '.MAX_PMS_PER_BATCH.' users.

'); + $subject = $db->escape($_POST['subject']); + $message = RenderMan::preprocess_text($_POST['message']); + $base_query = 'INSERT INTO '.table_prefix.'privmsgs(message_from,message_to,date,subject,message_text,folder_name,message_read) VALUES'; + foreach($namelist as $n) + { + $base_query .= '(\''.$session->username.'\', \''.$n.'\', '.time().', \''.$subject.'\', \''.$message.'\', \'drafts\', 0),'; + } + $base_query = substr($base_query, 0, strlen($base_query)-1) . ';'; + $result = $db->sql_query($base_query); + $db->free_result(); + if(!$result) $db->_die('The message could not be saved.'); + } elseif(isset($_POST['_inbox'])) { + header('Location: '.makeUrlNS('Special', 'PrivateMessages/Folder/Inbox')); + } + if($argv[1] == 'ReplyTo' && preg_match('#^([0-9]+)$#', $argv[2])) + { + $to = ''; + $text = ''; + $subj = ''; + $id = $argv[2]; + $q = $db->sql_query('SELECT p.message_from, p.message_to, p.subject, p.message_text, p.date, p.folder_name, u.signature FROM '.table_prefix.'privmsgs AS p LEFT JOIN '.table_prefix.'users AS u ON (p.message_from=u.username) WHERE message_id='.$id.';'); + if(!$q) $db->_die('The message data could not be selected.'); + $r = $db->fetchrow(); + $db->free_result(); + if( ($r['message_to'] != $session->username && $r['message_from'] != $session->username ) || $r['folder_name']=='drafts' ) die_friendly('Access denied', '

You are not authorized to view the contents of this message.

'); + $subj = 'Re: ' . $r['subject']; + $text = "\n\n\nOn ".date('M j, Y G:i', $r['date']).", ".$r['message_from']." wrote:\n> ".str_replace("\n", "\n> ", $r['message_text']); // Way less complicated than using a regex ;-) + + $tbuf = $text; + while( preg_match("/\n([\> ]*?)\> \>/", $text) ) + { + $text = preg_replace("/\n([\> ]*?)\> \>/", '\\1>>', $text); + if ( $text == $tbuf ) + break; + $tbuf = $text; + } + + $to = $r['message_from']; + } else { + if($argv[1]=='to' && $argv[2]) $to = $argv[2]; + else $to = ''; + $text = ''; + $subj = ''; + } + $template->header(); + userprefs_show_menu(); + echo '
'; + ?> +
+
+ + + + + +
Compose new private message
To:
Separate multiple names with a single comma; you
can send this message to up to users.
username_field('to', (isset($_POST['_savedraft'])) ? $_POST['to'] : $to ); ?>
Subject:
Message:
+ '; + $template->footer(); + break; + case 'Edit': + $id = $argv[1]; + if(!preg_match('#^([0-9]+)$#', $id)) die_friendly('Message error', '

Invalid message ID

'); + $q = $db->sql_query('SELECT message_from, message_to, subject, message_text, date, folder_name, message_read FROM '.table_prefix.'privmsgs WHERE message_id='.$id.''); + if(!$q) $db->_die('The message data could not be selected.'); + $r = $db->fetchrow(); + $db->free_result(); + if($r['message_from'] != $session->username || $r['message_read'] == 1 ) die_friendly('Access denied', '

You are not authorized to edit this message.

'); + $fname = $argv[2]; + + if(isset($_POST['_send'])) + { + // Check each POST DATA parameter... + if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', '

Please enter the username to which you want to send your message.

'); + if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', '

Please enter a subject for your message.

'); + if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', '

Please enter a message to send.

'); + $namelist = $_POST['to']; + $namelist = str_replace(', ', ',', $namelist); + $namelist = explode(',', $namelist); + foreach($namelist as $n) { $n = $db->escape($n); } + $subject = RenderMan::preprocess_text($_POST['subject']); + $message = RenderMan::preprocess_text($_POST['message']); + $base_query = 'UPDATE '.table_prefix.'privmsgs SET subject=\''.$subject.'\',message_to=\''.$namelist[0].'\',message_text=\''.$message.'\',folder_name=\'inbox\' WHERE message_id='.$id.';'; + $result = $db->sql_query($base_query); + $db->free_result(); + if(!$result) $db->_die('The message could not be sent.'); + else die_friendly('Message status', '

Your message has been sent. You may edit the message if you wish; one copy for each recipient will be in your outbox until each recipient has read it. Return to your inbox.

'); + return; + } elseif(isset($_POST['_savedraft'])) { + // Check each POST DATA parameter... + if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', '

Please enter the username to which you want to send your message.

'); + if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', '

Please enter a subject for your message.

'); + if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', '

Please enter a message to send.

'); + $namelist = $_POST['to']; + $namelist = str_replace(', ', ',', $namelist); + $namelist = explode(',', $namelist); + foreach($namelist as $n) { $n = $db->escape($n); } + $subject = $db->escape($_POST['subject']); + $message = RenderMan::preprocess_text($_POST['message']); + $base_query = 'UPDATE '.table_prefix.'privmsgs SET subject=\''.$subject.'\',message_to=\''.$namelist[0].'\',message_text=\''.$message.'\' WHERE message_id='.$id.';'; + $result = $db->sql_query($base_query); + $db->free_result(); + if(!$result) $db->_die('The message could not be saved.'); + } + if($argv[1]=='to' && $argv[2]) $to = $argv[2]; + else $to = ''; + $template->header(); + userprefs_show_menu(); + echo ''; + ?> +
+
+ + + + + +
Edit draft
To:
Separate multiple names with a single comma
Subject:
Message:
+ '; + $template->footer(); + break; + case 'Folder': + $template->header(); + userprefs_show_menu(); + switch($argv[1]) + { + default: + echo '

The folder "'.$argv[1].'" does not exist. Return to your inbox.

'; + break; + case 'Inbox': + case 'Outbox': + case 'Sent': + case 'Drafts': + case 'Archive': + ?> + + + +
+
+ + + + + + + + + +
Private messages
Inbox
Outbox
Sent Items
Drafts
Archive
Buddies
Friend list
Foe list
+
+ sql_query('SELECT p.message_id, p.message_from, p.message_to, p.date, p.subject, p.message_read FROM '.table_prefix.'privmsgs AS p WHERE p.folder_name=\''.$fname.'\' AND p.message_to=\''.$session->username.'\' ORDER BY date DESC;'); + break; + case 'Outbox': + $q = $db->sql_query('SELECT p.message_id, p.message_from, p.message_to, p.date, p.subject, p.message_read FROM '.table_prefix.'privmsgs AS p WHERE p.message_from=\''.$session->username.'\' AND message_read=0 ORDER BY date DESC;'); + break; + case 'Sent': + $q = $db->sql_query('SELECT p.message_id, p.message_from, p.message_to, p.date, p.subject, p.message_read FROM '.table_prefix.'privmsgs AS p WHERE p.message_from=\''.$session->username.'\' AND message_read=1 ORDER BY date DESC;'); + break; + case 'Drafts': + $q = $db->sql_query('SELECT p.message_id, p.message_from, p.message_to, p.date, p.subject, p.message_read FROM '.table_prefix.'privmsgs AS p WHERE p.folder_name=\''.$fname.'\' AND p.message_from=\''.$session->username.'\' ORDER BY date DESC;'); + break; + } + if($argv[1] == 'Drafts' || $argv[1] == 'Outbox') $act = 'Edit'; + else $act = 'View'; + if(!$q) $db->_die('The private message data could not be selected.'); + echo '
'; + if($db->numrows() < 1) + echo ''; + else { + $cls = 'row2'; + while($r = $db->fetchrow()) + { + if($cls == 'row2') $cls='row1'; + else $cls = 'row2'; + $mto = str_replace(' ', '_', $r['message_to']); + $mfr = str_replace(' ', '_', $r['message_from']); + echo ''; + } + $db->free_result(); + } + echo ''; + echo '
Folder: '.$argv[1].'
'; + if($fname == 'drafts' || $fname == 'Outbox') echo 'To'; else echo 'From'; + echo 'SubjectDateMark
No messages in this folder.
'; + if($fname == 'drafts' || $fname == 'outbox') echo $r['message_to']; else echo $r['message_from']; + echo ''; + if($r['message_read'] == 0) echo ''; + echo $r['subject']; + if($r['message_read'] == 0) echo ''; + echo ''.date('M j, Y G:i', $r['date']).'
+
+ New message +
'; + break; + } + $template->footer(); + break; + case 'PostHandler': + $fname = $db->escape(strtolower($_POST['folder'])); + if($fname=='drafts' || $fname=='outbox') + { + $q = $db->sql_query('SELECT p.message_id, p.message_from, p.message_to, p.date, p.subject FROM '.table_prefix.'privmsgs AS p WHERE p.folder_name=\''.$fname.'\' AND p.message_from=\''.$session->username.'\' ORDER BY date DESC;'); + } else { + $q = $db->sql_query('SELECT p.message_id, p.message_from, p.message_to, p.date, p.subject FROM '.table_prefix.'privmsgs AS p WHERE p.folder_name=\''.$fname.'\' AND p.message_to=\''.$session->username.'\' ORDER BY date DESC;'); + } + if(!$q) $db->_die('The private message data could not be selected.'); + + if(isset($_POST['archive'])) { + while($row = $db->fetchrow($q)) + { + if(isset($_POST['marked_'.$row['message_id']])) + { + $e = $db->sql_query('UPDATE '.table_prefix.'privmsgs SET folder_name=\'archive\' WHERE message_id='.$row['message_id'].';'); + if(!$e) $db->_die('Message '.$row['message_id'].' was not successfully moved.'); + $db->free_result(); + } + } + } elseif(isset($_POST['delete'])) { + while($row = $db->fetchrow($q)) + { + if(isset($_POST['marked_'.$row['message_id']])) + { + $e = $db->sql_query('DELETE FROM '.table_prefix.'privmsgs WHERE message_id='.$row['message_id'].';'); + if(!$e) $db->_die('Message '.$row['message_id'].' was not successfully moved.'); + $db->free_result(); + } + } + } elseif(isset($_POST['deleteall'])) { + while($row = $db->fetchrow($q)) + { + $e = $db->sql_query('DELETE FROM '.table_prefix.'privmsgs WHERE message_id='.$row['message_id'].';'); + if(!$e) $db->_die('Message '.$row['message_id'].' was not successfully moved.'); + $db->free_result(); + } + } else { + die_friendly('Invalid request', 'This section can only be accessed from within another Private Message section.'); + } + $db->free_result($q); + header('Location: '.makeUrlNS('Special', 'PrivateMessages/Folder/'. substr(strtoupper($_POST['folder']), 0, 1) . substr(strtolower($_POST['folder']), 1, strlen($_POST['folder'])) )); + break; + case 'FriendList': + if($argv[1] == 'Add') + { + if(isset($_POST['_go'])) + $buddyname = $_POST['buddyname']; + elseif($argv[2]) + $buddyname = $argv[2]; + else + die_friendly('Error adding buddy', '

No name specified

'); + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\''.$db->escape($buddyname).'\''); + if(!$q) $db->_die('The buddy\'s user ID could not be selected.'); + if($db->numrows() < 1) echo '

Error adding buddy

The username you entered is not in use by any registered user.

'; + { + $r = $db->fetchrow(); + $db->free_result(); + $q = $db->sql_query('INSERT INTO '.table_prefix.'buddies(user_id,buddy_user_id,is_friend) VALUES('.$session->user_id.', '.$r['user_id'].', 1);'); + if(!$q) echo '

Warning:

Buddy could not be added: '.mysql_error().'

'; + $db->free_result(); + } + } elseif($argv[1] == 'Remove' && preg_match('#^([0-9]+)$#', $argv[2])) { + // Using WHERE user_id prevents users from deleting others' buddies + $q = $db->sql_query('DELETE FROM '.table_prefix.'buddies WHERE user_id='.$session->user_id.' AND buddy_id='.$argv[2].';'); + $db->free_result(); + if(!$q) echo '

Warning:

Buddy could not be deleted: '.mysql_error().'

'; + if(mysql_affected_rows() < 1) echo '

Warning:

No rows were affected. Either the selected buddy ID does not exist or you tried to delete someone else\'s buddy.

'; + } + $template->header(); + userprefs_show_menu(); + ?> + + + + + +
+
+ + + + + + + + + +
Private messages
Inbox
Outbox
Sent Items
Drafts
Archive
Buddies
Friend list
Foe list
+
+ sql_query('SELECT u.username,b.buddy_id FROM '.table_prefix.'buddies AS b LEFT JOIN '.table_prefix.'users AS u ON ( u.user_id=b.buddy_user_id ) WHERE b.user_id='.$session->user_id.' AND is_friend=1;'); + if(!$q) $db->_die('The buddy list could not be selected.'); + else + { + $allbuds = ''; + echo '
'; + if($db->numrows() < 1) echo ''; + $cls = 'row2'; + while ( $row = $db->fetchrow() ) + { + if($cls=='row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + $allbuds .= str_replace(' ', '_', $row['username']).','; + } + $db->free_result(); + $allbuds = substr($allbuds, 0, strlen($allbuds)-1); + if($cls=='row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + echo '
Buddy list for '.$session->username.'
No buddies in your list.
nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].'Send private messageRemove
Send a PM to all buddies
'; + } + echo '
+

Add a new friend

'; + echo '

Username: '.$template->username_field('buddyname').'

'; + echo '
'; + ?> +
+ footer(); + break; + case 'FoeList': + if($argv[1] == 'Add' && isset($_POST['_go'])) + { + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['buddyname']).'\''); + if(!$q) $db->_die('The buddy\'s user ID could not be selected.'); + if($db->numrows() < 1) echo '

Error adding buddy

The username you entered is not in use by any registered user.

'; + { + $r = $db->fetchrow(); + $q = $db->sql_query('INSERT INTO '.table_prefix.'buddies(user_id,buddy_user_id,is_friend) VALUES('.$session->user_id.', '.$r['user_id'].', 0);'); + if(!$q) echo '

Warning:

Buddy could not be added: '.mysql_error().'

'; + } + $db->free_result(); + } elseif($argv[1] == 'Remove' && preg_match('#^([0-9]+)$#', $argv[2])) { + // Using WHERE user_id prevents users from deleting others' buddies + $q = $db->sql_query('DELETE FROM '.table_prefix.'buddies WHERE user_id='.$session->user_id.' AND buddy_id='.$argv[2].';'); + $db->free_result(); + if(!$q) echo '

Warning:

Buddy could not be deleted: '.mysql_error().'

'; + if(mysql_affected_rows() < 1) echo '

Warning:

No rows were affected. Either the selected buddy ID does not exist or you tried to delete someone else\'s buddy.

'; + } + $template->header(); + userprefs_show_menu(); + ?> + + + + + +
+
+ + + + + + + + + +
Private messages
Inbox
Outbox
Sent Items
Drafts
Archive
Buddies
Friend list
Foe list
+
+ sql_query('SELECT u.username,b.buddy_id FROM '.table_prefix.'buddies AS b LEFT JOIN '.table_prefix.'users AS u ON ( u.user_id=b.buddy_user_id ) WHERE b.user_id='.$session->user_id.' AND is_friend=0;'); + if(!$q) $db->_die('The buddy list could not be selected.'); + else + { + $allbuds = ''; + echo '
'; + if($db->numrows() < 1) echo ''; + $cls = 'row2'; + while ( $row = $db->fetchrow() ) + { + if($cls=='row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + $allbuds .= str_replace(' ', '_', $row['username']).','; + } + $allbuds = substr($allbuds, 0, strlen($allbuds)-1); + if($cls=='row2') $cls = 'row1'; + else $cls = 'row2'; + //echo ''; + echo '
Foe list for '.$session->username.'
No foes in your list.
nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].'Send private messageRemove
Send a PM to all buddies
'; + } + $db->free_result(); + echo '
+

Add a new foe

'; + echo '

Username: '.$template->username_field('buddyname').'

'; + echo '
'; + ?> +
+ footer(); + break; + } +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialAdmin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialAdmin.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,2722 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Administration\', + \'urlname\'=>\'Administration\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Manage the Sidebar\', + \'urlname\'=>\'EditSidebar\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +// function names are IMPORTANT!!! The name pattern is: page__ + +function page_Admin_Home() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + // Basic information + echo RenderMan::render( +'== Welcome to Runt, the Enano administration panel. == + +Thank you for choosing Enano as your CMS. This screen allows you to see some information about your website, plus some details about how your site is doing statistically. + +Using the links on the left you can control every aspect of your website\'s look and feel, plus you can manage users, work with pages, and install plugins to make your Enano installation even better.'); + + // Check for the installer scripts + if(file_exists(ENANO_ROOT.'/install.php') || file_exists(ENANO_ROOT.'/schema.sql')) + { + echo '
NOTE: It appears that your install.php and/or schema.sql files still exist. It is HIGHLY RECOMMENDED that you delete or rename these files, to prevent getting your server hacked.
'; + } + + // Inactive users + $q = $db->sql_query('SELECT * FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\';'); + if($q) + if($db->numrows() > 0) + { + $n = $db->numrows(); + if($n == 1) $s = $n . ' user is'; + else $s = $n . ' users are'; + echo '
It appears that '.$s.' awaiting account activation. You can activate those accounts by going to the User Manager.
'; + } + $db->free_result(); + // Stats + if(getConfig('log_hits') == '1') + { + $stats = stats_top_pages(10); + $c = 0; + $cls = 'row2'; + echo '

Most requested pages

'; + foreach($stats as $page => $count) + { + if(isset($paths->pages[$page])) + { + echo ''; + $cls = ( $cls == 'row1' ) ? 'row2' : 'row1'; + echo ''; + echo ''; + } + } + echo '
PageHits
'.$paths->pages[$page]['name'].''.$count.'
'; + } + + // Security log + echo '

Security log

'; + echo '
'; + $cls = 'row2'; + echo ''; + if(isset($_GET['fulllog'])) + { + $l = 'SELECT action,date_string,author,edit_summary,time_id,page_text FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC;'; + } + else + { + $l = 'SELECT action,date_string,author,edit_summary,time_id,page_text FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC LIMIT 5'; + } + $q = $db->sql_query($l); + while($r = $db->fetchrow()) + { + if($cls == 'row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + } + $db->free_result(); + echo '
TypeDateUsernameIP Address
'; + switch($r['action']) { + case "admin_auth_good": echo 'Successful elevated authentication'; if ( !empty($r['page_text']) ) { $level = $session->userlevel_to_string( intval($r['page_text']) ); echo "
Authentication level: $level"; } break; + case "admin_auth_bad": echo 'Failed administration logon'; break; + case "activ_good": echo 'Successful account activation'; break; + case "auth_good": echo 'Successful regular user logon'; break; + case "activ_bad": echo 'Failed account activation'; break; + case "auth_bad": echo 'Failed regular user logon'; break; + case "sql_inject": echo 'SQL injection attempt
Offending query: ' . htmlspecialchars($r['page_text']) . '
'; break; + case "db_backup": echo 'Database backup created
Tables: ' . $r['page_text'] . ''; break; + case "install_enano": echo "Installed Enano version {$r['page_text']}"; break; + } + echo '
'.date('d M Y h:i a', $r['time_id']).''.$r['author'].''.$r['edit_summary'].'
'; + if(!isset($_GET['fulllog'])) echo '

Full security log

'; + +} + +function page_Admin_GeneralConfig() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['submit'])) { + + // Global site options + setConfig('site_name', $_POST['site_name']); + setConfig('site_desc', $_POST['site_desc']); + setConfig('main_page', str_replace(' ', '_', $_POST['main_page'])); + setConfig('copyright_notice', $_POST['copyright']); + setConfig('contact_email', $_POST['contact_email']); + + // Wiki mode + if(isset($_POST['wikimode'])) setConfig('wiki_mode', '1'); + else setConfig('wiki_mode', '0'); + if(isset($_POST['wiki_mode_require_login'])) setConfig('wiki_mode_require_login', '1'); + else setConfig('wiki_mode_require_login', '0'); + if(isset($_POST['editmsg'])) setConfig('wiki_edit_notice', '1'); + else setConfig('wiki_edit_notice', '0'); + setConfig('wiki_edit_notice_text', $_POST['editmsg_text']); + + // Stats + if(isset($_POST['log_hits'])) setConfig('log_hits', '1'); + else setConfig('log_hits', '0'); + + // Disablement + if(isset($_POST['site_disabled'])) { setConfig('site_disabled', '1'); setConfig('site_disabled_notice', $_POST['site_disabled_notice']); } + else setConfig('site_disabled', '0'); + + // Account activation + setConfig('account_activation', $_POST['account_activation']); + + // W3C compliance buttons + if(isset($_POST['w3c-vh32'])) setConfig("w3c_vh32", "1"); + else setConfig("w3c_vh32", "0"); + if(isset($_POST['w3c-vh40'])) setConfig("w3c_vh40", "1"); + else setConfig("w3c_vh40", "0"); + if(isset($_POST['w3c-vh401'])) setConfig("w3c_vh401", "1"); + else setConfig("w3c_vh401", "0"); + if(isset($_POST['w3c-vxhtml10'])) setConfig("w3c_vxhtml10", "1"); + else setConfig("w3c_vxhtml10", "0"); + if(isset($_POST['w3c-vxhtml11'])) setConfig("w3c_vxhtml11", "1"); + else setConfig("w3c_vxhtml11", "0"); + if(isset($_POST['w3c-vcss'])) setConfig("w3c_vcss", "1"); + else setConfig("w3c_vcss", "0"); + + // SourceForge.net logo + if(isset($_POST['showsf'])) setConfig('sflogo_enabled', '1'); + else setConfig('sflogo_enabled', '0'); + setConfig('sflogo_groupid', $_POST['sfgroup']); + setConfig('sflogo_type', $_POST['sflogo']); + + // Comment options + if(isset($_POST['comment-approval'])) setConfig('approve_comments', '1'); + else setConfig('approve_comments', '0'); + if(isset($_POST['enable-comments'])) setConfig('enable_comments', '1'); + else setConfig('enable_comments', '0'); + setConfig('comments_need_login', $_POST['comments_need_login']); + + // Powered by link + if ( isset($_POST['enano_powered_link']) ) setConfig('powered_btn', '1'); + else setConfig('powered_btn', '0'); + + if(isset($_POST['dbdbutton'])) setConfig('dbd_button', '1'); + else setConfig('dbd_button', '0'); + + if($_POST['emailmethod'] == 'phpmail') setConfig('smtp_enabled', '0'); + else setConfig('smtp_enabled', '1'); + + setConfig('smtp_server', $_POST['smtp_host']); + setConfig('smtp_user', $_POST['smtp_user']); + if($_POST['smtp_pass'] != 'XXXXXXXXXXXX') setConfig('smtp_password', $_POST['smtp_pass']); + + echo '
Your changes to the site configuration have been saved.

'; + + } + echo('
'); + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Global site options
These options control the entire site.
Site name:
Site description:
Main page: pagename_field('main_page', str_replace('_', ' ', getConfig('main_page'))); ?>
Copyright notice shown on pages:
Hint: If you're using Windows, you can make a "©" symbol by holding ALT and pressing 0169 on the numeric keypad.
Contact e-mail
All e-mail sent from this site will appear to have come from the address shown here.
Wiki mode
+ Enano can also act as a wiki, meaning anyone can edit and create pages. To enable Wiki Mode, check the box to the right.

+ In Wiki Mode, certain HTML tags such as <script> and <object> are disabled, and all PHP code is disabled, except if the person editing the page is an administrator.

+ Also, Enano keeps complete page history, which makes restoring vandalized pages easy. You can also protect pages so that they cannot be edited. +
+ /> +
+ Edit page notice
+ When Wiki Mode is enabled, anyone can edit pages. Check the box below and enter a message to display it whenever the page editor is opened. +
+ /> +
+ +
Statistics and hit counting
Enano has the ability to show statistics for every page on the site. This allows you to keep very close track of who is visiting your site, and from where.

Unfortunately, some users don't like being logged. For this reason, you should state clearly what is logged (usually the username or IP address, current time, page name, and referer URL) in your privacy policy. If your site is primarily geared towards children, and you are a United States citizen, you are required to have a privacy policy stating exactly what is being logged under the terms of the Childrens' Online Privacy Protection Act.

This excludes special and administration pages.
Comment system
/>
/>
Guest comment posting allowed + +
Promote Enano
+ If you think Enano is nice, or if you want to show your support for the Enano team, you can do so by placing a link to the Enano + homepage in your Links sidebar block. You absolutely don't have to do this, and you won't get degraded support if you don't. Because + Enano is still relatively new in the CMS world, it needs all the attention it can get - and you can easily help to spread the word + using this link. + + +
Disable all site access
Disabling the site allows you to work on the site without letting non-administrators see or use it.
+
+ Message to show to users:
+ +
+
User account activation
+ If you would like to require users to confirm their e-mail addresses by way of account activation, you can enable this behavior here. If this option is set to "None", users will be able to register and use this site without confirming their e-mail addresses. If this option is set to "User", users will automatically be sent e-mails upon registration with a link to activate their accounts. And lastly, if this option is set to "Admin", users' accounts will not be active until an administrator activates the account.

+ You may also disable registration completely if needed.

+ Note: because of abuse by project administrators, sending account activation e-mails will not work on SourceForge.net servers. +
Account activation: + Disable registration
'; + echo ''; + echo ''; + echo ''; + ?> +
E-mail sent from the site
E-mail sending method:
Try using the built-in e-mail method first. If that doesn't work, you will need to enter valid SMTP information here.

+
SMTP hostname:
This option only applies to the external SMTP mode.
SMTP credentials:
This option only applies to the external SMTP mode.
Username:
+ Password:
SourceForge.net logo
+ All projects hosted by SourceForge.net are required to display an official SourceForge.net logo on their pages. If you want + to display a SourceForge.net logo on the sidebar, check the box below, enter your group ID, and select an image type. +
Display the SourceForge.net logo on the right sidebar />
Group ID:
Logo style: + +
W3C compliance logos
Enano generates (by default) Valid XHTML 1.1 code, plus valid CSS. If you want to show this off, check the appropriate boxes below.
id="w3c-vh32" name="w3c-vh32" />
id="w3c-vh40" name="w3c-vh40" />
id="w3c-vh401" name="w3c-vh401" />
id="w3c-vxhtml10" name="w3c-vxhtml10" />
id="w3c-vxhtml11" name="w3c-vxhtml11" />
id="w3c-vcss" name="w3c-vcss" />
Defective By Design Anti-DRM button
The Enano project is strongly against Digital Restrictions Management. DRM removes the freedoms that every consumer should have: to freely copy and use digital media items they legally purchased to their own devices. Showing your opposition to DRM is as easy as checking the box below to place a link to DefectiveByDesign.org on your sidebar.
/>
+
+
+ auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['save'])) + { + if(isset($_POST['enable_uploads'])) setConfig('enable_uploads', '1'); else setConfig('enable_uploads', '0'); + if(isset($_POST['enable_imagemagick'])) setConfig('enable_imagemagick', '1'); else setConfig('enable_imagemagick', '0'); + if(isset($_POST['cache_thumbs'])) setConfig('cache_thumbs', '1'); else setConfig('cache_thumbs', '0'); + if(isset($_POST['file_history'])) setConfig('file_history', '1'); else setConfig('file_history', '0'); + if(file_exists($_POST['imagemagick_path'])) setConfig('imagemagick_path', $_POST['imagemagick_path']); + else echo 'Warning: the file "'.$_POST['imagemagick_path'].'" was not found, and the ImageMagick file path was not updated.'; + $max_upload = floor((float)$_POST['max_file_size'] * (int)$_POST['fs_units']); + setConfig('max_file_size', $max_upload.''); + } + echo '
'; + ?> +

File upload configuration

+

Enano supports the ability to upload files to your website and store the files in the database. This enables you to embed images + and such into pages without manually writing the HTML. However, the upload feature can sometimes pose a risk to your site, as viruses + and executable files can sometimes be uploaded.

+

+

Maximum file size:

+

You can allow Enano to generate thumbnails of images automatically. This feature requires ImageMagick to work properly. If your server + does not have ImageMagick on it, Enano will simply make your users' browsers scale the images. In most cases this is fine, but if you + are uploading large (>100KB) images and embedding them inside of pages, you should try to enable ImageMagick because transferring these + large images many times can cost you quite a lot of bandwidth.

+


+ Path to ImageMagick:
+ On Linux and Unix servers, the most likely options here are /usr/bin/convert and /usr/local/bin/convert. If you server runs Windows, then + ImageMagick is most likely to be C:\Windows\Convert.exe or C:\Windows\System32\Convert.exe. +

+

If you use ImageMagick to scale images, your server will be very busy constantly scaling images if your website is busy, and your site + may experience slowdowns. You can dramatically speed up this scaling process if you use a directory to cache thumbnail images.

+

Please note: the cache/ directory on your server must be writable by the server. While this is not usually a problem on + Windows servers, most Linux/Unix servers will require you to CHMOD the cache/ directory to 777. See your FTP client's user guide for + more information on how to do this.At present, it seems that the cache directory + is not writable. The checkbox below has been disabled to maintain the stability of Enano.'; ?>

+

+

Lastly, you can choose whether file history will be saved. If this option is turned on, you will be able to roll back any malicious + changes made to uploaded files, but this requires a significant amount of database storage. You should probably leave this option + enabled unless you have less than 250MB of MySQL database space.

+

+
+

+ '; +} + +function page_Admin_PluginManager() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + if(isset($_GET['action'])) { + switch($_GET['action']) { + case "enable": + setConfig('plugin_'.$_GET['plugin'], '1'); + break; + case "disable": + if($_GET['plugin']!='admin.php') setConfig('plugin_'.$_GET['plugin'], '0'); + else echo('

Error disabling plugin

The administration panel plugin cannot be disabled.

'); + break; + } + } + $dir = './plugins/'; + $plugin_list = Array(); + $system = Array(); + if (is_dir($dir)) { + if ($dh = opendir($dir)) { + while (($file = readdir($dh)) !== false) { + if(preg_match('#^(.*?)\.php$#is', $file) && $file != 'index.php') + { + if ( in_array($file, $plugins->system_plugins) ) + { + $thelist =& $system; + continue; + } + else + { + $thelist =& $plugin_list; + } + $f = file_get_contents($dir . $file); + $f = explode("\n", $f); + $f = array_slice($f, 2, 7); + $f[0] = substr($f[0], 13, strlen($f[0])); + $f[1] = substr($f[1], 12, strlen($f[1])); + $f[2] = substr($f[2], 13, strlen($f[2])); + $f[3] = substr($f[3], 8, strlen($f[3])); + $f[4] = substr($f[4], 9, strlen($f[4])); + $f[5] = substr($f[5], 12, strlen($f[5])); + $thelist[$file] = Array(); + $thelist[$file]['name'] = $f[0]; + $thelist[$file]['uri'] = $f[1]; + $thelist[$file]['desc'] = $f[2]; + $thelist[$file]['auth'] = $f[3]; + $thelist[$file]['vers'] = $f[4]; + $thelist[$file]['aweb'] = $f[5]; + } + } + closedir($dh); + } + } + echo('
+ '); + $plugin_files = array_keys($plugin_list); + $cls = 'row2'; + for ( $i = 0; $i < sizeof($plugin_files); $i++ ) + { + $cls = ( $cls == 'row2' ) ? 'row3' : 'row2'; + echo ' + + + + + + '; + } + echo '
Plugin filenamePlugin nameDescriptionAuthorVersion
'.$plugin_files[$i].''.$plugin_list[$plugin_files[$i]]['name'].''.$plugin_list[$plugin_files[$i]]['desc'].''.$plugin_list[$plugin_files[$i]]['auth'].''.$plugin_list[$plugin_files[$i]]['vers'].''; + if ( getConfig('plugin_'.$plugin_files[$i]) == '1' ) + { + echo 'Disable'; + } + else + { + echo 'Enable'; + } + echo '
'; +} + +function page_Admin_UploadAllowedMimeTypes() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + global $mime_types, $mimetype_exps, $mimetype_extlist; + if(isset($_POST['save'])) + { + $bits = ''; + $keys = array_keys($mime_types); + foreach($keys as $i => $k) + { + if(isset($_POST['ext_'.$k])) $bits .= '1'; + else $bits .= '0'; + } + $bits = compress_bitfield($bits); + setConfig('allowed_mime_types', $bits); + echo '
Your changes have been saved.
'; + } + $allowed = fetch_allowed_extensions(); + ?> +

Allowed file types

+

Using the form below, you can decide which file types are allowed to be uploaded to this site.

+ nslist['Special'].'Administration', (( isset($_GET['sqldbg'])) ? 'sqldbg&' : '') .'module='.$paths->cpage['module']).'" method="post">'; + $c = -1; + $t = -1; + $cl = 'row1'; + echo "\n".'
'."\n".' '."\n".' '."\n "; + foreach($mime_types as $e => $m) + { + $c++; + $t++; + if($c == 3) + { + $c = 0; + $cl = ( $cl == 'row1' ) ? 'row2' : 'row1'; + echo ''."\n".' '."\n "; + } + $seed = "extchkbx_{$e}_".md5(microtime() . mt_rand()); + $chk = (!empty($allowed[$e])) ? ' checked="checked"' : ''; + echo " \n "; + } + while($c < 2) + { + $c++; + echo " \n "; + } + echo ''; + echo ''."\n".'
\n \n
'."\n".'
'; + echo '
'; + ?> + auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + ?> +

Editing and managing the Enano sidebar

+

The Enano sidebar is a versatile tool when scripted correctly. You don't have to be a programmer to enjoy the features the Sidebar + provides; however, editing the sidebar requires a small bit of programming knowledge and an understanding of Enano's system message + markup language. +

+

The Enano system markup language is somewhat similar to HTML, in that it uses tags (<example>like this</example>) for the + main syntax. However, Enano uses curly brackets ({ and }) as opposed to less-than and greater-than signs (< and >).

+

Programming the Enano sidebar requires the use of two tags: {slider} and {if}. The {slider} tag is used to create a new heading + on the sidebar, and all text enclosed in that tag will be collapsed when the heading is clicked. To specify the text on the heading, + use an equals sign (=) after the "slider" text. Then insert any links (they should be wiki-formatted) to internal Enano pages and + external sites.

+

So here is what the language for the default sidebar's "Navigation" heading looks like:

+
{slider=Navigation}
+  [[Main Page|Home]]
+  [[Enano:Sidebar|Edit the sidebar]]
+{/slider}
+

Pretty simple, huh? Good, now we're going to learn another common aspect of Enano programming: conditionals. The {if} tag allows you + to decide whether a portion of the sidebar will be displayed based on a template variable. Currently the only available conditions are + "user_logged_in" and "auth_admin", but more will be added soon. To use a conditional, enter {if conditional_name}, and then the + wiki-formatted text that you want to be under that condition, and then close the tag with {/if}. In the same way, you can reverse the + effect with {!if}. With {!if}, the closing tag is still {/if}, so keep that in mind. An {else} tag will be supported soon.

+

Now it's time for some real fun: variables. All template variables can be accessed from the sidebar. A variable is simply the + variable name, prefixed by a dollar sign ($). Some of the most common variables are $USERNAME, $SITE_NAME, $SITE_DESC, and $PAGE_NAME. + The sidebar also has some special variables that it uses for some of its links. The logout link can be added with $LOGOUT_LINK, and + the "change theme" button can be added with $STYLE_LINK.

+

So here is the Enano markup for the portion of the sidebar that contains the user tools:

+
{slider=$USERNAME}
+  [[User:$USERNAME|User page]]
+  [[Special:Contributions?user=$USERNAME|My Contributions]]
+  {if user_logged_in}
+    [[Special:Preferences|Preferences]]
+    $THEME_LINK
+  {/if}
+  {if auth_admin}
+    [[Special:Administration|Administration]]
+  {/if}
+  {if user_logged_in}
+    $LOGOUT_LINK
+  {/if}
+  {!if user_logged_in}
+    Create an account
+    Log in
+  {/if}
+{/slider}
+ auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['go'])) { + // We need the user ID before we can do anything + $q = $db->sql_query('SELECT user_id,username,email,real_name,style,user_level FROM '.table_prefix.'users WHERE username=\'' . $db->escape($_POST['username']) . '\''); + if(!$q) die('Error selecting user ID: '.mysql_error()); + if($db->numrows() < 1) { echo('User does not exist, please enter another username.'); return; } + $r = $db->fetchrow(); + $db->free_result(); + if(isset($_POST['save'])) + { + $_POST['level'] = intval($_POST['level']); + + $new_level = $_POST['level']; + $old_level = intval($r['user_level']); + + $re = $session->update_user((int)$r['user_id'], $_POST['new_username'], false, $_POST['new_pass'], $_POST['email'], $_POST['real_name'], false, $_POST['level']); + + if($re == 'success') + { + + if ( $new_level != $old_level ) + { + $user_id = intval($r['user_id']); + // We need to update group memberships + if ( $old_level == USER_LEVEL_ADMIN ) + { + $session->remove_user_from_group($user_id, GROUP_ID_ADMIN); + } + else if ( $old_level == USER_LEVEL_MOD ) + { + $session->remove_user_from_group($user_id, GROUP_ID_MOD); + } + + if ( $new_level == USER_LEVEL_ADMIN ) + { + $session->add_user_to_group($user_id, GROUP_ID_ADMIN, false); + } + else if ( $new_level == USER_LEVEL_MOD ) + { + $session->add_user_to_group($user_id, GROUP_ID_MOD, false); + } + } + + echo('
Your changes have been saved.
'); + } + else + { + echo('
Error saving changes: '.implode('
', $re).'
'); + } + $q = $db->sql_query('SELECT user_id,username,email,real_name,style,user_level FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['username']).'\''); + if ( !$q ) + { + die('Error selecting user ID: '.mysql_error()); + } + if($db->numrows($q) < 1) + { + die('User does not exist, please enter another username.'); + } + $r = mysql_fetch_object($q); + $db->free_result(); + } + elseif(isset($_POST['deleteme']) && isset($_POST['delete_conf'])) + { + $q = $db->sql_query('DELETE FROM users WHERE user_id='.$r['user_id'].';'); + if($q) + { + echo '
The user account "'.$r['username'].'" was deleted.
'; + } + else + { + echo '
The user account "'.$r['username'].'" could not be deleted due to a database error.

'.$db->get_error().'
'; + } + } + else + { + echo(' +

Edit User Info

+
+ + + + + + + +
Username:
New Password:
E-mail:
Real Name:
User level:
Delete user: +
+
+
+ '); + } + } elseif(isset($_POST['clearsessions'])) { + // Get the current session information so the user doesn't get logged out + $aes = new AESCrypt(); + $sk = md5($session->sid_super); + $qb = $db->sql_query('SELECT session_key,salt,auth_level,source_ip,time FROM '.table_prefix.'session_keys WHERE session_key=\''.$sk.'\' AND user_id='.$session->user_id.' AND auth_level='.USER_LEVEL_ADMIN); + if(!$qb) die('Error selecting session key info block B: '.$db->get_error()); + if($db->numrows($qb) < 1) die('Error: cannot read admin session info block B, aborting table clear process'); + $qa = $db->sql_query('SELECT session_key,salt,auth_level,source_ip,time FROM '.table_prefix.'session_keys WHERE session_key=\''.md5($session->sid).'\' AND user_id='.$session->user_id.' AND auth_level='.USER_LEVEL_MEMBER); + if(!$qa) die('Error selecting session key info block A: '.$db->get_error()); + if($db->numrows($qa) < 1) die('Error: cannot read user session info block A, aborting table clear process'); + $ra = mysql_fetch_object($qa); + $rb = mysql_fetch_object($qb); + $db->free_result($qa); + $db->free_result($qb); + $db->sql_query('DELETE FROM '.table_prefix.'session_keys;'); + $db->sql_query('INSERT INTO '.table_prefix.'session_keys( session_key,salt,user_id,auth_level,source_ip,time ) VALUES( \''.$ra->session_key.'\', \''.$ra->salt.'\', \''.$session->user_id.'\', \''.$ra->auth_level.'\', \''.$ra->source_ip.'\', '.$ra->time.' ),( \''.$rb->session_key.'\', \''.$rb->salt.'\', \''.$session->user_id.'\', \''.$rb->auth_level.'\', \''.$rb->source_ip.'\', '.$rb->time.' )'); + echo(' +
The session key table has been cleared. Your database should be a little bit smaller now.
+ '); + } + echo(' +

User Management

+
+

Username: '.$template->username_field('username').'

+

Clear session keys table

+

It\'s a good idea to clean out your session keys table every once in a while, since this helps to reduce database size. During this process you will be logged off and (hopefully) logged back on automatically. The side effects of this include all users except you being logged off.

+

+
+ '); + if(isset($_GET['action']) && isset($_GET['user'])) + { + switch($_GET['action']) + { + case "activate": + $e = $db->sql_query('SELECT activation_key FROM '.table_prefix.'users WHERE username=\'' . $db->escape($_GET['user']) . '\''); + if($e) + { + $row = $db->fetchrow(); + $db->free_result(); + if($session->activate_account($_GET['user'], $row['activation_key'])) { echo '
The user account "'.$_GET['user'].'" has been activated.
'; $db->sql_query('DELETE FROM '.table_prefix.'logs WHERE time_id=' . $db->escape($_GET['logid'])); } + else echo '
The user account "'.$_GET['user'].'" has NOT been activated, possibly because the account is already active.
'; + } else echo '
Error activating account: '.mysql_error().'
'; + break; + case "sendemail": + if($session->send_activation_mail($_GET['user'])) { echo '
The user "'.$_GET['user'].'" has been sent an e-mail with an activation link.
'; $db->sql_query('DELETE FROM '.table_prefix.'logs WHERE time_id=' . $db->escape($_GET['logid'])); } + else echo '
The user account "'.$_GET['user'].'" has not been activated, probably because of a bad SMTP configuration.
'; + break; + case "deny": + $e = $db->sql_query('DELETE FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\' AND edit_summary=\'' . $db->escape($_GET['user']) . '\';'); + if(!$e) echo '
Error during row deletion: '.mysql_error().'
'; + else echo '
All activation requests for the user "'.$_GET['user'].'" have been deleted.
'; + break; + } + } + $q = $db->sql_query('SELECT log_type, action, time_id, date_string, author, edit_summary FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\' ORDER BY time_id DESC;'); + if($q) + { + if($db->numrows() > 0) + { + $n = $db->numrows(); + if($n == 1) $s = $n . ' user is'; + else $s = $n . ' users are'; + echo '

'.$s . ' awaiting account activation

'; + echo '
+ + '; + $cls = 'row2'; + while($row = $db->fetchrow()) + { + if($cls == 'row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + } + echo '
Date of requestRequested byRequested forActions
'.date('F d, Y h:i a', $row['time_id']).''.$row['author'].''.$row['edit_summary'].'Activate nowSend activation e-mailDeny request
'; + } + $db->free_result(); + } +} + +function page_Admin_GroupManager() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['do_create_stage1'])) + { + if(!preg_match('/^([A-z0-9 -]+)$/', $_POST['create_group_name'])) + { + echo '

The group name you chose is invalid.

'; + return; + } + echo '
'; + echo '
+ + + + + + + + + +
Creating group: '.$_POST['create_group_name'].'
Group moderator' . $template->username_field('group_mod') . '
Group status +
+
+
+ +
+ + +
+
'; + echo '
'; + return; + } + elseif(isset($_POST['do_create_stage2'])) + { + if(!preg_match('/^([A-z0-9 -]+)$/', $_POST['create_group_name'])) + { + echo '

The group name you chose is invalid.

'; + return; + } + if(!in_array(intval($_POST['group_status']), Array(GROUP_CLOSED, GROUP_OPEN, GROUP_HIDDEN, GROUP_REQUEST))) + { + echo '

Hacking attempt

'; + return; + } + $e = $db->sql_query('SELECT group_id FROM '.table_prefix.'groups WHERE group_name=\''.$db->escape($_POST['create_group_name']).'\';'); + if(!$e) + { + echo $db->get_error(); + return; + } + if($db->numrows() > 0) + { + echo '

The group name you entered already exists.

'; + return; + } + $db->free_result(); + $q = $db->sql_query('INSERT INTO '.table_prefix.'groups(group_name,group_type) VALUES( \''.$db->escape($_POST['create_group_name']).'\', ' . intval($_POST['group_status']) . ' )'); + if(!$q) + { + echo $db->get_error(); + return; + } + $e = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['group_mod']).'\';'); + if(!$e) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo '

The username you entered could not be found.

'; + return; + } + $row = $db->fetchrow(); + $id = $row['user_id']; + $db->free_result(); + $e = $db->sql_query('SELECT group_id FROM '.table_prefix.'groups WHERE group_name=\''.$db->escape($_POST['create_group_name']).'\';'); + if(!$e) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo '

The group ID could not be looked up.

'; + return; + } + $row = $db->fetchrow(); + $gid = $row['group_id']; + $db->free_result(); + $e = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id,is_mod) VALUES('.$gid.', '.$id.', 1);'); + if(!$e) + { + echo $db->get_error(); + return; + } + echo "
+ Information
+ The group {$_POST['create_group_name']} has been created successfully. +
"; + } + if(isset($_POST['do_edit']) || isset($_POST['edit_do'])) + { + // Fetch the group name + $q = $db->sql_query('SELECT group_name,system_group FROM '.table_prefix.'groups WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo '

Error: couldn\'t look up group name

'; + } + $row = $db->fetchrow(); + $name = $row['group_name']; + $db->free_result(); + if(isset($_POST['edit_do'])) + { + if(isset($_POST['edit_do']['del_group'])) + { + if ( $row['system_group'] == 1 ) + { + echo '
The group "' . $name . '" could not be deleted because it is a system group required for site functionality.
'; + } + else + { + $q = $db->sql_query('DELETE FROM '.table_prefix.'group_members WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + $q = $db->sql_query('DELETE FROM '.table_prefix.'groups WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + echo '
The group "'.$name.'" has been deleted. Return to the group manager.
'; + return; + } + } + if(isset($_POST['edit_do']['save_name'])) + { + if(!preg_match('/^([A-z0-9 -]+)$/', $_POST['group_name'])) + { + echo '

The group name you chose is invalid.

'; + return; + } + $q = $db->sql_query('UPDATE '.table_prefix.'groups SET group_name=\''.$db->escape($_POST['group_name']).'\' + WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + else + { + echo '
+ The group name has been updated. +
'; + } + $name = $_POST['group_name']; + + } + $q = $db->sql_query('SELECT member_id FROM '.table_prefix.'group_members + WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() > 0) + { + while($row = $db->fetchrow($q)) + { + if(isset($_POST['edit_do']['del_' . $row['member_id']])) + { + $e = $db->sql_query('DELETE FROM '.table_prefix.'group_members WHERE member_id='.$row['member_id']); + if(!$e) + { + echo $db->get_error(); + return; + } + } + } + } + $db->free_result(); + if(isset($_POST['edit_do']['add_member'])) + { + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['edit_add_username']).'\';'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() > 0) + { + $row = $db->fetchrow(); + $user_id = $row['user_id']; + $is_mod = ( isset( $_POST['add_mod'] ) ) ? '1' : '0'; + $q = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id,is_mod) VALUES('.intval($_POST['group_edit_id']).','.$user_id.','.$is_mod.');'); + if(!$q) + { + echo $db->get_error(); + return; + } + else + { + echo '
+ The user "'.$_POST['edit_add_username'].'" has been added to this usergroup. +
'; + } + } + else + echo '
The user "'.$_POST['edit_add_username'].'" could not be added.
This username does not exist.
'; + } + } + $sg_disabled = ( $row['system_group'] == 1 ) ? ' value="Can\'t delete system group" disabled="disabled" style="color: #FF9773" ' : ' value="Delete this group" style="color: #FF3713" '; + echo '
'; + echo '
+ + + + + + + + +
Edit group name
+ Group name: +
+ + +
+
+ '; + echo '
'; + echo '
'; + echo '
+ + '; + $q = $db->sql_query('SELECT m.member_id,m.is_mod,u.username FROM '.table_prefix.'group_members AS m + LEFT JOIN '.table_prefix.'users AS u + ON u.user_id=m.user_id + WHERE m.group_id='.intval($_POST['group_edit_id']).' + ORDER BY m.is_mod DESC, u.username ASC;'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo ''; + } + else + { + $cls = 'row2'; + while($row = $db->fetchrow()) + { + $cls = ( $cls == 'row1' ) ? 'row2' : 'row1'; + $mod = ( $row['is_mod'] == 1 ) ? 'Mod' : ''; + echo ' + + + + '; + } + } + $db->free_result(); + echo '
Edit group members
This group has no members.
+ ' . $row['username'] . ' + + '.$mod.' + + +
+
+ '; + echo '
'; + echo '
'; + echo '
+ + + + + + + + + + + + + +
Add a new member
+ Username: ' . $template->username_field('edit_add_username') . ' +
+ (can add and delete other members) +
+ +
+
+ '; + echo '
'; + return; + } + echo '

Manage Usergroups

'; + echo '
'; + $q = $db->sql_query('SELECT group_id,group_name FROM '.table_prefix.'groups ORDER BY group_name ASC;'); + if(!$q) + { + echo $db->get_error(); + } + else + { + echo '
+ + + + '; + echo ''; + echo ' +
Edit an existing group
+
+

'; + } + echo '
'; + echo '
+ + + + '; + echo ''; + echo ' +
Create a new group
Group name:
+
'; + echo '
'; +} + +function page_Admin_PageManager() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + echo '

Page management

'; + + if(isset($_POST['search']) || isset($_POST['select']) || ( isset($_GET['source']) && $_GET['source'] == 'ajax' )) { + // The object of the game: using only the text a user entered, guess the page ID and namespace. *sigh* I HATE writing search algorithms... + $source = ( isset($_GET['source']) ) ? $_GET['source'] : false; + if ( $source == 'ajax' ) + { + $_POST['search'] = true; + $_POST['page_url'] = $_GET['page_id']; + } + if(isset($_POST['search'])) $pid = $_POST['page_url']; + elseif(isset($_POST['select'])) $pid = $_POST['page_force_url']; + else { echo 'Internal error selecting page search terms'; return false; } + // Look for a namespace prefix in the urlname, and assign a different namespace, if necessary + $k = array_keys($paths->nslist); + for($i=0;$inslist);$i++) + { + $ln = strlen($paths->nslist[$k[$i]]); + if(substr($pid, 0, $ln) == $paths->nslist[$k[$i]]) + { + $ns = $k[$i]; + $page_id = substr($pid, $ln, strlen($pid)); + } + } + // The namespace is in $ns and the page name or ID (we don't know which yet) is in $page_id + // Now, iterate through $paths->pages searching for a page with this name or ID + for($i=0;$ipages)/2;$i++) + { + if(!isset($final_pid)) + { + if ($paths->pages[$i]['urlname_nons'] == str_replace(' ', '_', $page_id)) $final_pid = str_replace(' ', '_', $page_id); + elseif($paths->pages[$i]['name'] == $page_id) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['urlname_nons']) == strtolower(str_replace(' ', '_', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['name']) == strtolower(str_replace('_', ' ', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + if(isset($final_pid)) { $_POST['name'] = $paths->pages[$i]['name']; $_POST['urlname'] = $paths->pages[$i]['urlname_nons']; } + } + } + if(!isset($final_pid)) { echo 'The page you searched for cannot be found. Back'; return false; } + $_POST['namespace'] = $ns; + $_POST['old_namespace'] = $ns; + $_POST['page_id'] = $final_pid; + $_POST['old_page_id'] = $final_pid; + if(!isset($paths->pages[$paths->nslist[$_POST['namespace']].$_POST['urlname']])) { echo 'The page you searched for cannot be found. Back'; return false; } + } + + if(isset($_POST['page_id']) && isset($_POST['namespace']) && !isset($_POST['cancel'])) + { + $cpage = $paths->pages[$paths->nslist[$_POST['namespace']].$_POST['old_page_id']]; + if(isset($_POST['submit'])) + { + // Create a list of things to update + $page_info = Array( + 'name'=>$_POST['name'], + 'urlname'=>$_POST['page_id'], + 'namespace'=>$_POST['namespace'], + 'special'=>isset($_POST['special']) ? '1' : '0', + 'visible'=>isset($_POST['visible']) ? '1' : '0', + 'comments_on'=>isset($_POST['comments_on']) ? '1' : '0', + 'protected'=>isset($_POST['protected']) ? '1' : '0' + ); + // Build the query + $q = 'UPDATE '.table_prefix.'pages SET '; + $k = array_keys($page_info); + foreach($k as $c) + { + $q .= $c.'=\''.$db->escape($page_info[$c]).'\','; + } + $q = substr($q, 0, strlen($q)-1); + // Build the WHERE statements + $q .= ' WHERE '; + $k = array_keys($cpage); + foreach($k as $c) + { + if($c != 'urlname_nons' && $c != 'urlname' && $c != 'really_protected') $q .= $c.'=\''.$cpage[$c].'\' AND '; + elseif($c == 'urlname') $q .= $c.'=\''.$cpage['urlname_nons'].'\' AND '; + } + $q = substr($q, 0, strlen($q)-5) . ';'; + // Send the completed query to MySQL + $e = $db->sql_query($q); + if(!$e) $db->_die('The page data could not be updated.'); + // Update any additional tables + $q = Array( + 'UPDATE '.table_prefix.'categories SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'UPDATE '.table_prefix.'comments SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'UPDATE '.table_prefix.'logs SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'UPDATE '.table_prefix.'page_text SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + ); + foreach($q as $cq) + { + $e = $db->sql_query($cq); + if(!$e) $db->_die('Some of the additional tables containing page information could not be updated.'); + } + // Update $cpage + $cpage = $page_info; + $cpage['urlname_nons'] = $cpage['urlname']; + $cpage['urlname'] = $paths->nslist[$cpage['namespace']].$cpage['urlname']; + $_POST['old_page_id'] = $page_info['urlname']; + $_POST['old_namespace'] = $page_info['namespace']; + echo '
Your changes have been saved.
'; + } elseif(isset($_POST['delete'])) { + $q = Array( + 'DELETE FROM '.table_prefix.'categories WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'DELETE FROM '.table_prefix.'comments WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'DELETE FROM '.table_prefix.'logs WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'DELETE FROM '.table_prefix.'page_text WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + ); + foreach($q as $cq) + { + $e = $db->sql_query($cq); + if(!$e) $db->_die('Some of the additional tables containing page information could not be updated.'); + } + + if(!$db->sql_query( + 'DELETE FROM '.table_prefix.'pages WHERE urlname="'.$db->escape($_POST['old_page_id']).'" AND namespace="'.$db->escape($_POST['old_namespace']).'";' + )) $db->_die('The page could not be deleted.'); + echo '
This page has been deleted.

Return to Page manager
Admin home

'; + return; + } + echo '
'; + ?> +

Modify page:

+ + + + + + + + + + + +
Namespace:
Page title:
Page URL string:
No spaces, and don't enter the namespace prefix (e.g. User:).
Changing this value is usually not a good idea, especially for templates and project pages.
name="comments_on" type="checkbox" id="cmt" />
name="special" type="checkbox" id="spc" />
This option enables you to use your own HTML headers and other code. It is recommended that only advanced users enable this feature. As with other Enano pages, you may use PHP code in your pages, meaning you can use Enano's API on the page.
name="visible" type="checkbox" id="vis" />
Unchecking this checkbox prevents the page for being indexed for searching. The index is rebuilt each time a page is saved, and you can force an index rebuild by going to the page nslist['Special']; ?>SearchRebuild.
name="protected" type="checkbox" id="prt" />
This option only has an effect when Wiki Mode is enabled.

+ + +
+ '; + } else { + echo '

Please select a page

'; + echo ''; + ?> +

Search for page title (remember prefixes like User: and File:) pagename_field('page_url'); ?>

+

Select page title from a list:

+ '; + + } +} + +function page_Admin_PageEditor() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + echo '

Edit page content

'; + + if(isset($_POST['search']) || isset($_POST['select'])) { + // The object of the game: using only the text a user entered, guess the page ID and namespace. *sigh* I HATE writing search algorithms... + if(isset($_POST['search'])) $pid = $_POST['page_url']; + elseif(isset($_POST['select'])) $pid = $_POST['page_force_url']; + else { echo 'Internal error selecting page search terms'; return false; } + // Look for a namespace prefix in the urlname, and assign a different namespace, if necessary + $k = array_keys($paths->nslist); + for($i=0;$inslist);$i++) + { + $ln = strlen($paths->nslist[$k[$i]]); + if(substr($pid, 0, $ln) == $paths->nslist[$k[$i]]) + { + $ns = $k[$i]; + $page_id = substr($pid, $ln, strlen($pid)); + } + } + // The namespace is in $ns and the page name or ID (we don't know which yet) is in $page_id + // Now, iterate through $paths->pages searching for a page with this name or ID + for($i=0;$ipages)/2;$i++) + { + if(!isset($final_pid)) + { + if ($paths->pages[$i]['urlname_nons'] == str_replace(' ', '_', $page_id)) $final_pid = str_replace(' ', '_', $page_id); + elseif($paths->pages[$i]['name'] == $page_id) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['urlname_nons']) == strtolower(str_replace(' ', '_', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['name']) == strtolower(str_replace('_', ' ', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + if(isset($final_pid)) { $_POST['name'] = $paths->pages[$i]['name']; $_POST['urlname'] = $paths->pages[$i]['urlname_nons']; } + } + } + if(!isset($final_pid)) { echo 'The page you searched for cannot be found. Back'; return false; } + $_POST['namespace'] = $ns; + $_POST['page_id'] = $final_pid; + if(!isset($paths->pages[$paths->nslist[$_POST['namespace']].$_POST['urlname']])) { echo 'The page you searched for cannot be found. Back'; return false; } + } + + if(isset($_POST['page_id']) && !isset($_POST['cancel'])) + { + echo ''; + if(!isset($_POST['content']) || isset($_POST['revert'])) $content = RenderMan::getPage($_POST['page_id'], $_POST['namespace'], 0, false, false, false, false); + else $content = $_POST['content']; + if(isset($_POST['save'])) + { + $data = $content; + $id = md5( microtime() . mt_rand() ); + + $minor = isset($_POST['minor']) ? 'true' : 'false'; + $q='INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,page_id,namespace,page_text,char_tag,author,edit_summary,minor_edit) VALUES(\'page\', \'edit\', '.time().', \''.date('d M Y h:i a').'\', \'' . $db->escape($_POST['page_id']) . '\', \'' . $db->escape($_POST['namespace']) . '\', \''.$data.'\', \''.$id.'\', \''.$session->username.'\', \''.$db->escape(htmlspecialchars($_POST['summary'])).'\', '.$minor.');'; + if(!$db->sql_query($q)) $db->_die('The history (log) entry could not be inserted into the logs table.'); + + $query = 'UPDATE '.table_prefix.'page_text SET page_text=\''.$db->escape($data).'\',char_tag=\''.$id.'\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'' . $db->escape($_POST['namespace']) . '\';'; + $e = $db->sql_query($query); + if(!$e) echo '
The page data could not be saved. MySQL said: '.mysql_error().'

Query:
'.$query.'
'; + else echo '
Your page has been saved. View page...
'; + } elseif(isset($_POST['preview'])) { + echo '

Preview

Reminder: This is only a preview; your changes to this page have not yet been saved.

'.RenderMan::render($content).'
'; + } + ?> +

+
+ Edit summary:
+ +

+

+ + +        +

+ '; + } else { + echo '

Please select a page

'; + echo ''; + ?> +

Search for page title (remember prefixes like User: and File:) pagename_field('page_url'); ?>

+

Select page title from a list:

+ '; + } +} + +function page_Admin_ThemeManager() +{ + + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + // Get the list of styles in the themes/ dir + $h = opendir('./themes'); + $l = Array(); + if(!$h) die('Error opening directory "./themes" for reading.'); + while(false !== ($n = readdir($h))) { + if($n != '.' && $n != '..' && is_dir('./themes/'.$n)) + $l[] = $n; + } + closedir($h); + echo(' +

Theme Management

+

Install, uninstall, and manage Enano themes.

+ '); + if(isset($_POST['disenable'])) { + $q = 'SELECT enabled FROM '.table_prefix.'themes WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting enabled/disabled state value: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $db->free_result(); + if($r[0] == 1) $e = 0; + else $e = 1; + $s=true; + if($e==0) + { + $c = $db->sql_query('SELECT * FROM '.table_prefix.'themes WHERE enabled=1'); + if(!$c) $db->_die('The backup check for having at least on theme enabled failed.'); + if($db->numrows() <= 1) { echo '
You cannot disable the last remaining theme.
'; $s=false; } + } + $db->free_result(); + if($s) { + $q = 'UPDATE '.table_prefix.'themes SET enabled='.$e.' WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $a = $db->sql_query($q); + if(!$a) die('Error updating enabled/disabled state value: '.mysql_error().'
SQL:
'.$q); + else echo('
The theme "'.$_POST['theme_id'].'" has been '. ( ( $e == '1' ) ? 'enabled' : 'disabled' ).'.
'); + } + } + elseif(isset($_POST['edit'])) { + + $dir = './themes/'.$_POST['theme_id'].'/css/'; + $list = Array(); + // Open a known directory, and proceed to read its contents + if (is_dir($dir)) { + if ($dh = opendir($dir)) { + while (($file = readdir($dh)) !== false) { + if(preg_match('#^(.*?)\.css$#is', $file) && $file != '_printable.css') { + $list[$file] = capitalize_first_letter(substr($file, 0, strlen($file)-4)); + } + } + closedir($dh); + } + } + $lk = array_keys($list); + + $q = 'SELECT theme_name,default_style FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting name value: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $db->free_result(); + echo(''); + echo('
+ Theme name displayed to users:

+ Default stylesheet:

+ +
'); + echo(''); + } + elseif(isset($_POST['editsave'])) { + $q = 'UPDATE '.table_prefix.'themes SET theme_name=\'' . $db->escape($_POST['name']) . '\',default_style=\''.$db->escape($_POST['defaultcss']).'\' WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $s = $db->sql_query($q); + if(!$s) die('Error updating name value: '.mysql_error().'
SQL:
'.$q); + else echo('
Theme data updated.
'); + } + elseif(isset($_POST['up'])) { + // If there is only one theme or if the selected theme is already at the top, do nothing + $q = 'SELECT theme_order FROM '.table_prefix.'themes ORDER BY theme_order;'; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $q = 'SELECT theme_order FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; + $sn = $db->sql_query($q); + if(!$sn) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($sn); + if( /* check for only one theme... */ $db->numrows($s) < 2 || $r[0] == 1 /* ...and check if this theme is already at the top */ ) { echo('
This theme is already at the top of the list, or there is only one theme installed.
'); } else { + // Get the order IDs of the selected theme and the theme before it + $q = 'SELECT theme_order FROM '.table_prefix.'themes WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $r = $r[0]; + $rb = $r - 1; + // Thank God for jEdit's rectangular selection and the ablity to edit multiple lines at the same time ;) + $q = 'UPDATE '.table_prefix.'themes SET theme_order=0 WHERE theme_order='.$rb.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$rb.' WHERE theme_order='.$r.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$r.' WHERE theme_order=0'; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + echo('
Theme moved up.
'); + } + $db->free_result($s); + $db->free_result($sn); + } + elseif(isset($_POST['down'])) { + // If there is only one theme or if the selected theme is already at the top, do nothing + $q = 'SELECT theme_order FROM '.table_prefix.'themes ORDER BY theme_order;'; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + if( /* check for only one theme... */ $db->numrows($s) < 2 || $r[0] == $db->numrows($s) /* ...and check if this theme is already at the bottom */ ) { echo('
This theme is already at the bottom of the list, or there is only one theme installed.
'); } else { + // Get the order IDs of the selected theme and the theme before it + $q = 'SELECT theme_order FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $r = $r[0]; + $rb = $r + 1; + // Thank God for jEdit's rectangular selection and the ablity to edit multiple lines at the same time ;) + $q = 'UPDATE '.table_prefix.'themes SET theme_order=0 WHERE theme_order='.$rb.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$rb.' WHERE theme_order='.$r.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$r.' WHERE theme_order=0'; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + echo('
Theme moved down.
'); + } + } + else if(isset($_POST['uninstall'])) + { + $q = 'SELECT * FROM '.table_prefix.'themes;'; + $s = $db->sql_query($q); + if ( !$s ) + { + die('Error getting theme count: '.mysql_error().'
SQL:
'.$q); + } + $n = $db->numrows($s); + $db->free_result(); + + if ( $_POST['theme_id'] == 'oxygen' ) + { + echo '
The Oxygen theme is used by Enano for installation, upgrades, and error messages, and cannot be uninstalled.
'; + } + else + { + if($n < 2) + { + echo '
The theme could not be uninstalled because it is the only theme left.
'; + } + else + { + $q = 'DELETE FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\' LIMIT 1;'; + $s = $db->sql_query($q); + if ( !$s ) + { + die('Error deleting theme data: '.mysql_error().'
SQL:
'.$q); + } + else + { + echo('
Theme uninstalled.
'); + } + } + } + } + elseif(isset($_POST['install'])) { + $q = 'SELECT * FROM '.table_prefix.'themes;'; + $s = $db->sql_query($q); + if(!$s) die('Error getting theme count: '.mysql_error().'
SQL:
'.$q); + $n = $db->numrows($s); + $n++; + $theme_id = $_POST['theme_id']; + $theme = Array(); + include('./themes/'.$theme_id.'/theme.cfg'); + $q = 'INSERT INTO '.table_prefix.'themes(theme_id,theme_name,theme_order,enabled) VALUES(\''.$theme['theme_id'].'\', \''.$theme['theme_name'].'\', '.$n.', 1)'; + $s = $db->sql_query($q); + if(!$s) die('Error inserting theme data: '.mysql_error().'
SQL:
'.$q); + else echo('
Theme "'.$theme['theme_name'].'" installed.
'); + } + echo(' +

Currently installed themes

+
+

+ +

+
+

Install a new theme

+ '); + $theme = Array(); + $obb = ''; + for($i=0;$isql_query($q); + if(!$s) die('Error selecting list of currently installed themes: '.mysql_error().'
Attempted SQL:
'.$q); + if($db->numrows($s) < 1) { + $obb .= ''; + } + $db->free_result(); + } + } + if($obb != '') { + echo('

'); + echo(''); + echo(' + +

'); + } else echo('

All themes are currently installed.

'); +} + +function page_Admin_BanControl() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id']) && $_GET['id'] != '') + { + $e = $db->sql_query('DELETE FROM '.table_prefix.'banlist WHERE ban_id=' . $db->escape($_GET['id']) . ''); + if(!$e) $db->_die('The ban list entry was not deleted.'); + } + if(isset($_POST['create'])) + { + $q = 'INSERT INTO '.table_prefix.'banlist(ban_type,ban_value,reason,is_regex) VALUES( ' . $db->escape($_POST['type']) . ', \'' . $db->escape($_POST['value']) . '\', \''.$db->escape($_POST['reason']).'\''; + if(isset($_POST['regex'])) $q .= ', 1'; + else $q .= ', 0'; + $q .= ');'; + $e = $db->sql_query($q); + if(!$e) $db->_die('The banlist could not be updated.'); + } + $q = $db->sql_query('SELECT ban_id,ban_type,ban_value,is_regex FROM '.table_prefix.'banlist ORDER BY ban_type;'); + if(!$q) $db->_die('The banlist data could not be selected.'); + echo ''; + echo ''; + if($db->numrows() < 1) echo ''; + while($r = $db->fetchrow()) + { + if($r['ban_type']==BAN_IP) $t = 'IP address'; + elseif($r['ban_type']==BAN_USER) $t = 'Username'; + elseif($r['ban_type']==BAN_EMAIL) $t = 'E-mail address'; + if($r['is_regex']) $g = 'Yes'; else $g = 'No'; + echo ''; + } + $db->free_result(); + echo '
TypeValueRegular Expression
No ban rules yet.
'.$t.''.$r['ban_value'].''.$g.'Delete
'; + echo '

Create new ban rule

'; + echo '
'; + ?> + Type:
+ Rule:
+ Reason to show to the banned user:
+ (advanced users only)
+ + '; +} + +function page_Admin_MassEmail() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + global $enano_config; + if ( isset($_POST['do_send']) ) + { + $use_smtp = getConfig('smtp_enabled') == '1'; + + // + // Let's do some checking to make sure that mass mail functions + // are working in win32 versions of php. (copied from phpBB) + // + if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$use_smtp) + { + $ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; + + // We are running on windows, force delivery to use our smtp functions + // since php's are broken by default + $use_smtp = true; + $enano_config['smtp_server'] = @$ini_val('SMTP'); + } + + $mail = new emailer( !empty($use_smtp) ); + + // Validate subject/message body + $subject = stripslashes(trim($_POST['subject'])); + $message = stripslashes(trim($_POST['message'])); + + if ( empty($subject) ) + $errors[] = 'Please enter a subject.'; + if ( empty($message) ) + $errors[] = 'Please enter a message.'; + + // Get list of members + if ( !empty($_POST['userlist']) ) + { + $userlist = str_replace(', ', ',', $_POST['userlist']); + $userlist = explode(',', $userlist); + foreach ( $userlist as $k => $u ) + { + if ( $u == $session->username ) + { + // Message is automatically sent to the sender + unset($userlist[$k]); + } + else + { + $userlist[$k] = $db->escape($u); + } + } + $userlist = 'WHERE username=\'' . implode('\' OR username=\'', $userlist) . '\''; + + $q = $db->sql_query('SELECT email FROM '.table_prefix.'users ' . $userlist . ';'); + if ( !$q ) + $db->_die(); + + if ( $row = $db->fetchrow() ) + { + do { + $mail->cc($row['email']); + } while ( $row = $db->fetchrow() ); + } + + $db->free_result(); + + } + else + { + // Sending to a usergroup + + $group_id = intval($_POST['group_id']); + if ( $group_id < 1 ) + { + $errors[] = 'Invalid group ID'; + } + else + { + $q = $db->sql_query('SELECT u.email FROM '.table_prefix.'group_members AS g + LEFT JOIN '.table_prefix.'users AS u + ON (u.user_id=g.user_id) + WHERE g.group_id=' . $group_id . ';'); + if ( !$q ) + $db->_die(); + + if ( $row = $db->fetchrow() ) + { + do { + $mail->cc($row['email']); + } while ( $row = $db->fetchrow() ); + } + + $db->free_result(); + } + } + + if ( sizeof($errors) < 1 ) + { + + $mail->from(getConfig('contact_email')); + $mail->replyto(getConfig('contact_email')); + $mail->set_subject($subject); + $mail->email_address(getConfig('contact_email')); + + // Copied/modified from phpBB + $email_headers = 'X-AntiAbuse: Website server name - ' . $_SERVER['SERVER_NAME'] . "\n"; + $email_headers .= 'X-AntiAbuse: User_id - ' . $session->user_id . "\n"; + $email_headers .= 'X-AntiAbuse: Username - ' . $session->username . "\n"; + $email_headers .= 'X-AntiAbuse: User IP - ' . $_SERVER['REMOTE_ADDR'] . "\n"; + + $mail->extra_headers($email_headers); + + $tpl = 'The following message was mass-mailed by {SENDER}, one of the administrators from {SITE_NAME}. If this message contains spam or any comments which you find abusive or offensive, please contact the administration team at: + +{CONTACT_EMAIL} + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +{MESSAGE} +'; + + $mail->use_template($tpl); + + $mail->assign_vars(array( + 'SENDER' => $session->username, + 'SITE_NAME' => getConfig('site_name'), + 'CONTACT_EMAIL' => getConfig('contact_email'), + 'MESSAGE' => $message + )); + + //echo '
'.print_r($mail,true).'
'; + + // All done + $mail->send(); + $mail->reset(); + + echo '
Your message has been sent.
'; + + } + else + { + echo '
Could not send message for the following reason(s):
  • ' . implode('
  • ', $errors) . '
'; + } + + } + echo ''; + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + +
Send mass e-mail
+ Send message to:
+ + By default, this message will be sent to the group selected here. You may instead send the message to a specific + list of users by entering them in the second row, with usernames separated by a single comma (no space). + +
+ +
+ Usernames: +
+ Subject: + + +
+ Message: + + +
+
+ Please be warned: it may take a LONG time to send this message. Please do not stop the script until the process is finished. +
+
+ '; +} + +function page_Admin_DBBackup() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + global $system_table_list; + if(isset($_GET['submitting']) && $_GET['submitting'] == 'yes') + { + + if(defined('SQL_BACKUP_CRYPT')) + // Try to increase our time limit + @set_time_limit(300); // five minutes + // Do the actual export + $aesext = ( defined('SQL_BACKUP_CRYPT') ) ? '.tea' : ''; + $filename = 'enano_backup_' . date('dmy') . '.sql' . $aesext; + ob_start(); + header('Content-disposition: attachment, filename="'.$filename.'";'); + header('Content-type: application/transact-sql'); + // Spew some headers + $headdate = date('F d, Y \a\t h:i a'); + echo <<
username} + +HEADER; + // build the table list + $base = ( isset($_POST['do_system_tables']) ) ? $system_table_list : Array(); + $add = ( isset($_POST['additional_tables'])) ? $_POST['additional_tables'] : Array(); + $tables = array_merge($base, $add); + + // Log it! + $e = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'db_backup\', '.time().', \''.date('d M Y h:i a').'\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(implode(', ', $tables)) . '\')'); + if ( !$e ) + $db->_die(); + + foreach($tables as $i => $t) + { + if(!preg_match('#^([a-z0-9_]+)$#i', $t)) + die('Hacking attempt'); + // if($t == table_prefix.'files' && isset($_POST['do_data'])) + // unset($tables[$i]); + } + foreach($tables as $t) + { + // Sorry folks - this script CAN'T backup enano_files, enano_search_index, and enano_search_cache due to the sheer size of the tables. + // If encryption is enabled the log data will be excluded too. + echo export_table( + $t, + isset($_POST['do_struct']), + ( isset($_POST['do_data']) /* && $t != table_prefix.'files' && $t != table_prefix.'search_index' && $t != table_prefix.'search_cache' && ( !defined('SQL_BACKUP_CRYPT') || ( defined('SQL_BACKUP_CRYPT') && $t != table_prefix.'logs' ) ) */ ), + false + ) . "\n"; + } + $data = ob_get_contents(); + ob_end_clean(); + if(defined('SQL_BACKUP_CRYPT')) + { + // Free some memory, we don't need this stuff any more + $db->close(); + unset($paths, $db, $template, $plugins); + $tea = new TEACrypt(); + $data = $tea->encrypt($data, $session->private_key); + } + header('Content-length: '.strlen($data)); + echo $data; + exit; + } + else + { + // Show the UI + echo ''; + ?> +

This page allows you to back up your Enano database should something go miserably wrong.

+

+

Additional tables to export:

+

+

+


+ +

+

+ '; + } +} + +function page_Admin_AdminLogout() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + $session->logout(USER_LEVEL_ADMIN); + echo '

You have now been logged out of the administration panel.

You will continue to be logged into the website, but you will need to re-authenticate before you can access the administration panel again.

Return to the Main Page.

'; +} + +function page_Special_Administration() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if($session->auth_level < USER_LEVEL_ADMIN) { + redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), 'Not authorized', 'You need an authorization level of '.USER_LEVEL_ADMIN.' to use this page, your auth level is: ' . $session->auth_level, 0); + exit; + } + else + { + $template->load_theme('admin', 'default'); + $template->init_vars(); + if( !isset( $_GET['noheaders'] ) ) + { + $template->header(); + } + echo 'Administer your Enano website.'; + ?> + + + + + + +
+
+ +
+
+
+ nslist); + for ( $i = 0; $i < sizeof($paths->nslist); $i++ ) + { + $ln = strlen( $paths->nslist[ $k[ $i ] ] ); + if ( substr($_GET['module'], 0, $ln) == $paths->nslist[$k[$i]] ) + { + $ns = $k[$i]; + $nm = substr($_GET['module'], $ln, strlen($_GET['module'])); + } + } + $fname = 'page_'.$ns.'_'.$nm; + $s = strpos($fname, '?noheaders'); + if($s) $fname = substr($fname, 0, $s); + $paths->cpage['module'] = $_GET['module']; + if ( function_exists($fname) && $_GET['module'] != $paths->nslist['Special'] . 'Administration' ) + { + eval($fname.'();'); + } + } + else + { + echo '
Please wait while the administration panel loads. You need to be using a recent browser with AJAX support in order to use Runt.
'; + } + ?> +
+
+ + footer(); + } +} + +function page_Special_EditSidebar() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if($session->auth_level < USER_LEVEL_ADMIN) + { + redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), '', '', false); + exit; + } + else + { + + $template->add_header(''); + $template->add_header(''); + $template->add_header(''); + $template->add_header(''); + + // Knock the sidebars dead to keep javascript in plugins from interfering + $template->tpl_strings['SIDEBAR_LEFT'] = ''; + $template->tpl_strings['SIDEBAR_RIGHT'] = ''; + + $template->load_theme('oxygen', 'bleu'); + $template->init_vars(); + + $template->header(); + + if(isset($_POST['save'])) + { + // Write the new block order to the database + // The only way to do this is with tons of queries (one per block + one select query at the start to count everything) but afaik its safe... + // Anyone know a better way to do this? + $q = $db->sql_query('SELECT item_order,item_id,sidebar_id FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;'); + if ( !$q ) + { + $db->_die('The sidebar order data could not be selected.'); + } + $orders = Array(); + while($row = $db->fetchrow()) + { + $orders[] = Array( + count($orders), + $row['item_id'], + $row['sidebar_id'], + ); + } + $db->free_result(); + + // We now have an array with each sidebar ID in its respective order. Explode the order string in $_POST['order_(left|right)'] and use it to build a set of queries. + $ol = explode(',', $_POST['order_left']); + $odr = explode(',', $_POST['order_right']); + $om = array_merge($ol, $odr); + unset($ol, $odr); + $queries = Array(); + foreach($orders as $k => $v) + { + $queries[] = 'UPDATE '.table_prefix.'sidebar SET item_order='.$om[$k].' WHERE item_id='.$v[1].';'; + } + foreach($queries as $sql) + { + $q = $db->sql_query($sql); + if(!$q) + { + $t = $db->get_error(); + echo $t; + $template->footer(); + exit; + } + } + echo '
The sidebar order information was updated successfully.
'; + } + elseif(isset($_POST['create'])) + { + switch((int)$_POST['type']) + { + case BLOCK_WIKIFORMAT: + $content = $_POST['wikiformat_content']; + break; + case BLOCK_TEMPLATEFORMAT: + $content = $_POST['templateformat_content']; + break; + case BLOCK_HTML: + $content = $_POST['html_content']; + break; + case BLOCK_PHP: + $content = $_POST['php_content']; + break; + case BLOCK_PLUGIN: + $content = $_POST['plugin_id']; + break; + } + // Get the value of item_order + + $q = $db->sql_query('SELECT * FROM '.table_prefix.'sidebar WHERE sidebar_id='.$db->escape($_POST['sidebar_id']).';'); + if(!$q) $db->_die('The order number could not be selected'); + $io = $db->numrows(); + + $db->free_result(); + + $q = 'INSERT INTO '.table_prefix.'sidebar(block_name, block_type, sidebar_id, block_content, item_order) VALUES ( \''.$db->escape($_POST['title']).'\', \''.$db->escape($_POST['type']).'\', \''.$db->escape($_POST['sidebar_id']).'\', \''.$db->escape($content).'\', '.$io.' );'; + $result = $db->sql_query($q); + if(!$result) + { + echo $db->get_error(); + $template->footer(); + exit; + } + + echo '
The item was added.
'; + + } + + if(isset($_GET['action']) && isset($_GET['id'])) + { + if(preg_match('#^([0-9]*)$#', $_GET['id'])) + { + } else { + echo '
Error with action: $_GET["id"] was not an integer, aborting to prevent SQL injection
'; + } + switch($_GET['action']) + { + case 'new': + ?> + + + + +

+ What type of block should this be? +

+

+ +

+ +

+ + Block title:
+ Which sidebar: + +

+ +
+

+ Wikitext: +

+

+ +

+
+ +
+

+ Template code: +

+

+ +

+
+ +
+

+ HTML to place inside the sidebar: +

+

+ +

+
+ +
+

+ WARNING: If you don't know what you're doing, or if you are not fluent in PHP, stop now and choose a different block type. You will brick your Enano installation if you are not careful here. + ALWAYS remember to write secure code! The Enano team is not responsible if someone drops all your tables because of an SQL injection vulnerability in your sidebar code. You are probably better off using the template-formatted block type. +

+

+ + It is especially important to note that this code is NOT checked for errors! If there is a syntax error in your code here, it will prevent any pages from loading AT ALL. So you need to use an external PHP editor (like jEdit) to check your syntax before you hit save. + You have been warned. +

+

+ Also, you should avoid using output buffering functions (ob_[start|end|get_contents|clean]) here, because Enano uses those to track output from this script. +

+

+ The standard <?php and ?> tags work here. Don't use an initial "<?php" or it will cause a parse error. +

+

+ PHP code: +

+

+ +

+
+ +
+

+ Plugin: +

+

+ +

+
+ +

+ +   + + +

+ + + + + + footer(); + return; + break; + case 'move': + if( !isset($_GET['side']) || ( isset($_GET['side']) && !preg_match('#^([0-9]+)$#', $_GET['side']) ) ) + { + echo '
$_GET[\'side\'] contained an SQL injection attempt
'; + break; + } + $query = $db->sql_query('UPDATE '.table_prefix.'sidebar SET sidebar_id=' . $db->escape($_GET['side']) . ' WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$query) + { + echo $db->get_error(); + $template->footer(); + exit; + } + echo '
Item moved.
'; + break; + case 'delete': + $query = $db->sql_query('DELETE FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); // Already checked for injection attempts ;-) + if(!$query) + { + echo $db->get_error(); + $template->footer(); + exit; + } + if(isset($_GET['ajax'])) + { + ob_end_clean(); + die('GOOD'); + } + echo '
Item deleted.
'; + break; + case 'disenable'; + $q = $db->sql_query('SELECT item_enabled FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + exit; + } + $r = $db->fetchrow(); + $db->free_result(); + $e = ( $r['item_enabled'] == 1 ) ? '0' : '1'; + $q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET item_enabled='.$e.' WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + exit; + } + if(isset($_GET['ajax'])) + { + ob_end_clean(); + die('GOOD'); + } + break; + case 'getsource': + $q = $db->sql_query('SELECT block_content,block_type FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + exit; + } + ob_end_clean(); + $r = $db->fetchrow(); + $db->free_result(); + if($r['block_type'] == BLOCK_PLUGIN) die('HOUSTON_WE_HAVE_A_PLUGIN'); + die($r['block_content']); + break; + case 'save': + $q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET block_content=\''.$db->escape(rawurldecode($_POST['content'])).'\' WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo 'var status=unescape(\''.hexencode($db->get_error()).'\');'; + exit; + } + $q = $db->sql_query('SELECT block_type,block_content FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo 'var status=unescape(\''.hexencode($db->get_error()).'\');'; + exit; + } + $row = $db->fetchrow(); + $db->free_result(); + switch($row['block_type']) + { + case BLOCK_WIKIFORMAT: + default: + $c = RenderMan::render($row['block_content']); + break; + case BLOCK_TEMPLATEFORMAT: + $c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl'); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_HTML: + $c = $row['block_content']; + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PHP: + ob_start(); + eval($row['block_content']); + $c = ob_get_contents(); + ob_end_clean(); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PLUGIN: + $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block'; + break; + } + die('var status = \'GOOD\'; var content = unescape(\''.hexencode($c).'\');'); + break; + } + } + + $q = $db->sql_query('SELECT item_id,sidebar_id,item_enabled,block_name,block_type,block_content FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;'); + if(!$q) $db->_die('The sidebar text data could not be selected.'); + + $vars = $template->extract_vars('sidebar-editor.tpl'); + + $parser = $template->makeParserText($vars['sidebar_button']); + $parser->assign_vars(Array( + 'HREF'=>'#', + 'FLAGS'=>'onclick="return false;"', + 'TEXT'=>'Change theme' + )); + $template->tpl_strings['THEME_LINK'] = $parser->run(); + $parser->assign_vars(Array( + 'TEXT'=>'Log out', + )); + $template->tpl_strings['LOGOUT_LINK'] = $parser->run(); + + $n1 = Array(); + $n2 = Array(); + $n =& $n1; + + echo '
'; + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']); + + // Time for the loop + // what this loop does is fetch the row data, then send it out to the appropriate parser for formatting, + // then puts the result into $c, which is then sent to the template compiler for insertion into the TPL code. + while($row = $db->fetchrow()) + { + if(isset($current_side)) + { + if($current_side != $row['sidebar_id']) + { + // Time to switch! + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']); + echo '
'; + //echo '
'; + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']); + $n =& $n2; + } + } + $n[] = count($n); + $current_side = $row['sidebar_id']; + switch($row['block_type']) + { + case BLOCK_WIKIFORMAT: + default: + $parser = $template->makeParserText($vars['sidebar_section']); + $c = RenderMan::render($row['block_content']); + break; + case BLOCK_TEMPLATEFORMAT: + $parser = $template->makeParserText($vars['sidebar_section']); + $c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl'); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_HTML: + $parser = $template->makeParserText($vars['sidebar_section_raw']); + $c = $row['block_content']; + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PHP: + $parser = $template->makeParserText($vars['sidebar_section_raw']); + ob_start(); + eval($row['block_content']); + $c = ob_get_contents(); + ob_end_clean(); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PLUGIN: + $parser = $template->makeParserText($vars['sidebar_section_raw']); + $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block'; + break; + } + $t = $template->tplWikiFormat($row['block_name']); + if($row['item_enabled'] == 0) $t .= ' (disabled)'; + else $t .= ' '; + $side = ( $row['sidebar_id'] == SIDEBAR_LEFT ) ? SIDEBAR_RIGHT : SIDEBAR_LEFT; + $tb = 'Enable/disable this block + Edit this block + Delete this block + Move this block'; + $as = ''; + $ae = '  '.$tb; + $parser->assign_vars(Array('CONTENT'=>$c,'TITLE'=>$t,'ADMIN_START'=>$as,'ADMIN_END'=>$ae)); + echo $parser->run(); + unset($parser); + + } + $db->free_result(); + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']); + echo '
'; + echo '
'; + $order = implode(',', $n1); + echo ""; + $order = implode(',', $n2); + echo ""; + echo ' + +
+ '; + } + + $template->footer(); +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialAdmin.php~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialAdmin.php~ Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,2722 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Administration\', + \'urlname\'=>\'Administration\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Manage the Sidebar\', + \'urlname\'=>\'EditSidebar\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +// function names are IMPORTANT!!! The name pattern is: page__ + +function page_Admin_Home() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + // Basic information + echo RenderMan::render( +'== Welcome to Runt, the Enano administration panel. == + +Thank you for choosing Enano as your CMS. This screen allows you to see some information about your website, plus some details about how your site is doing statistically. + +Using the links on the left you can control every aspect of your website\'s look and feel, plus you can manage users, work with pages, and install plugins to make your Enano installation even better.'); + + // Check for the installer scripts + if(file_exists(ENANO_ROOT.'/install.php') || file_exists(ENANO_ROOT.'/schema.sql')) + { + echo '
NOTE: It appears that your install.php and/or schema.sql files still exist. It is HIGHLY RECOMMENDED that you delete or rename these files, to prevent getting your server hacked.
'; + } + + // Inactive users + $q = $db->sql_query('SELECT * FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\';'); + if($q) + if($db->numrows() > 0) + { + $n = $db->numrows(); + if($n == 1) $s = $n . ' user is'; + else $s = $n . ' users are'; + echo '
It appears that '.$s.' awaiting account activation. You can activate those accounts by going to the User Manager.
'; + } + $db->free_result(); + // Stats + if(getConfig('log_hits') == '1') + { + $stats = stats_top_pages(10); + $c = 0; + $cls = 'row2'; + echo '

Most requested pages

'; + foreach($stats as $page => $count) + { + if(isset($paths->pages[$page])) + { + echo ''; + $cls = ( $cls == 'row1' ) ? 'row2' : 'row1'; + echo ''; + echo ''; + } + } + echo '
PageHits
'.$paths->pages[$page]['name'].''.$count.'
'; + } + + // Security log + echo '

Security log

'; + echo '
'; + $cls = 'row2'; + echo ''; + if(isset($_GET['fulllog'])) + { + $l = 'SELECT action,date_string,author,edit_summary,time_id,page_text FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC;'; + } + else + { + $l = 'SELECT action,date_string,author,edit_summary,time_id,page_text FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC LIMIT 5'; + } + $q = $db->sql_query($l); + while($r = $db->fetchrow()) + { + if($cls == 'row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + } + $db->free_result(); + echo '
TypeDateUsernameIP Address
'; + switch($r['action']) { + case "admin_auth_good": echo 'Successful elevated authentication'; if ( !empty($r['page_text']) ) { $level = $session->userlevel_to_string( intval($r['page_text']) ); echo "
Authentication level: $level"; } break; + case "admin_auth_bad": echo 'Failed administration logon'; break; + case "activ_good": echo 'Successful account activation'; break; + case "auth_good": echo 'Successful regular user logon'; break; + case "activ_bad": echo 'Failed account activation'; break; + case "auth_bad": echo 'Failed regular user logon'; break; + case "sql_inject": echo 'SQL injection attempt
Offending query: ' . htmlspecialchars($r['page_text']) . '
'; break; + case "db_backup": echo 'Database backup created
Tables: ' . $r['page_text'] . ''; break; + case "install_enano": echo "Installed Enano version {$r['page_text']}"; break; + } + echo '
'.date('d M Y h:i a', $r['time_id']).''.$r['author'].''.$r['edit_summary'].'
'; + if(!isset($_GET['fulllog'])) echo '

Full security log

'; + +} + +function page_Admin_GeneralConfig() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['submit'])) { + + // Global site options + setConfig('site_name', $_POST['site_name']); + setConfig('site_desc', $_POST['site_desc']); + setConfig('main_page', str_replace(' ', '_', $_POST['main_page'])); + setConfig('copyright_notice', $_POST['copyright']); + setConfig('contact_email', $_POST['contact_email']); + + // Wiki mode + if(isset($_POST['wikimode'])) setConfig('wiki_mode', '1'); + else setConfig('wiki_mode', '0'); + if(isset($_POST['wiki_mode_require_login'])) setConfig('wiki_mode_require_login', '1'); + else setConfig('wiki_mode_require_login', '0'); + if(isset($_POST['editmsg'])) setConfig('wiki_edit_notice', '1'); + else setConfig('wiki_edit_notice', '0'); + setConfig('wiki_edit_notice_text', $_POST['editmsg_text']); + + // Stats + if(isset($_POST['log_hits'])) setConfig('log_hits', '1'); + else setConfig('log_hits', '0'); + + // Disablement + if(isset($_POST['site_disabled'])) { setConfig('site_disabled', '1'); setConfig('site_disabled_notice', $_POST['site_disabled_notice']); } + else setConfig('site_disabled', '0'); + + // Account activation + setConfig('account_activation', $_POST['account_activation']); + + // W3C compliance buttons + if(isset($_POST['w3c-vh32'])) setConfig("w3c_vh32", "1"); + else setConfig("w3c_vh32", "0"); + if(isset($_POST['w3c-vh40'])) setConfig("w3c_vh40", "1"); + else setConfig("w3c_vh40", "0"); + if(isset($_POST['w3c-vh401'])) setConfig("w3c_vh401", "1"); + else setConfig("w3c_vh401", "0"); + if(isset($_POST['w3c-vxhtml10'])) setConfig("w3c_vxhtml10", "1"); + else setConfig("w3c_vxhtml10", "0"); + if(isset($_POST['w3c-vxhtml11'])) setConfig("w3c_vxhtml11", "1"); + else setConfig("w3c_vxhtml11", "0"); + if(isset($_POST['w3c-vcss'])) setConfig("w3c_vcss", "1"); + else setConfig("w3c_vcss", "0"); + + // SourceForge.net logo + if(isset($_POST['showsf'])) setConfig('sflogo_enabled', '1'); + else setConfig('sflogo_enabled', '0'); + setConfig('sflogo_groupid', $_POST['sfgroup']); + setConfig('sflogo_type', $_POST['sflogo']); + + // Comment options + if(isset($_POST['comment-approval'])) setConfig('approve_comments', '1'); + else setConfig('approve_comments', '0'); + if(isset($_POST['enable-comments'])) setConfig('enable_comments', '1'); + else setConfig('enable_comments', '0'); + setConfig('comments_need_login', $_POST['comments_need_login']); + + // Powered by link + if ( isset($_POST['enano_powered_link']) ) setConfig('powered_btn', '1'); + else setConfig('powered_btn', '0'); + + if(isset($_POST['dbdbutton'])) setConfig('dbd_button', '1'); + else setConfig('dbd_button', '0'); + + if($_POST['emailmethod'] == 'phpmail') setConfig('smtp_enabled', '0'); + else setConfig('smtp_enabled', '1'); + + setConfig('smtp_server', $_POST['smtp_host']); + setConfig('smtp_user', $_POST['smtp_user']); + if($_POST['smtp_pass'] != 'XXXXXXXXXXXX') setConfig('smtp_password', $_POST['smtp_pass']); + + echo '
Your changes to the site configuration have been saved.

'; + + } + echo('
'); + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Global site options
These options control the entire site.
Site name:
Site description:
Main page: pagename_field('main_page', str_replace('_', ' ', getConfig('main_page'))); ?>
Copyright notice shown on pages:
Hint: If you're using Windows, you can make a "©" symbol by holding ALT and pressing 0169 on the numeric keypad.
Contact e-mail
All e-mail sent from this site will appear to have come from the address shown here.
Wiki mode
+ Enano can also act as a wiki, meaning anyone can edit and create pages. To enable Wiki Mode, check the box to the right.

+ In Wiki Mode, certain HTML tags such as <script> and <object> are disabled, and all PHP code is disabled, except if the person editing the page is an administrator.

+ Also, Enano keeps complete page history, which makes restoring vandalized pages easy. You can also protect pages so that they cannot be edited. +
+ /> +
+ Edit page notice
+ When Wiki Mode is enabled, anyone can edit pages. Check the box below and enter a message to display it whenever the page editor is opened. +
+ /> +
+ +
Statistics and hit counting
Enano has the ability to show statistics for every page on the site. This allows you to keep very close track of who is visiting your site, and from where.

Unfortunately, some users don't like being logged. For this reason, you should state clearly what is logged (usually the username or IP address, current time, page name, and referer URL) in your privacy policy.

This excludes special and administration pages.
Comment system
/>
/>
Guest comment posting allowed + +
Promote Enano
+ If you think Enano is nice, or if you want to show your support for the Enano team, you can do so by placing a link to the Enano + homepage in your Links sidebar block. You absolutely don't have to do this, and you won't get degraded support if you don't. Because + Enano is still relatively new in the CMS world, it needs all the attention it can get - and you can easily help to spread the word + using this link. + + +
Disable all site access
Disabling the site allows you to work on the site without letting non-administrators see or use it.
+
+ Message to show to users:
+ +
+
User account activation
+ If you would like to require users to confirm their e-mail addresses by way of account activation, you can enable this behavior here. If this option is set to "None", users will be able to register and use this site without confirming their e-mail addresses. If this option is set to "User", users will automatically be sent e-mails upon registration with a link to activate their accounts. And lastly, if this option is set to "Admin", users' accounts will not be active until an administrator activates the account.

+ You may also disable registration completely if needed.

+ Note: because of abuse by project administrators, sending account activation e-mails will not work on SourceForge.net servers. +
Account activation: + Disable registration
'; + echo ''; + echo ''; + echo ''; + ?> +
E-mail sent from the site
E-mail sending method:
Try using the built-in e-mail method first. If that doesn't work, you will need to enter valid SMTP information here.

+
SMTP hostname:
This option only applies to the external SMTP mode.
SMTP credentials:
This option only applies to the external SMTP mode.
Username:
+ Password:
SourceForge.net logo
+ All projects hosted by SourceForge.net are required to display an official SourceForge.net logo on their pages. If you want + to display a SourceForge.net logo on the sidebar, check the box below, enter your group ID, and select an image type. +
Display the SourceForge.net logo on the right sidebar />
Group ID:
Logo style: + +
W3C compliance logos
Enano generates (by default) Valid XHTML 1.1 code, plus valid CSS. If you want to show this off, check the appropriate boxes below.
id="w3c-vh32" name="w3c-vh32" />
id="w3c-vh40" name="w3c-vh40" />
id="w3c-vh401" name="w3c-vh401" />
id="w3c-vxhtml10" name="w3c-vxhtml10" />
id="w3c-vxhtml11" name="w3c-vxhtml11" />
id="w3c-vcss" name="w3c-vcss" />
Defective By Design Anti-DRM button
The Enano project is strongly against Digital Restrictions Management. DRM removes the freedoms that every consumer should have: to freely copy and use digital media items they legally purchased to their own devices. Showing your opposition to DRM is as easy as checking the box below to place a link to DefectiveByDesign.org on your sidebar.
/>
+
+
+ auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['save'])) + { + if(isset($_POST['enable_uploads'])) setConfig('enable_uploads', '1'); else setConfig('enable_uploads', '0'); + if(isset($_POST['enable_imagemagick'])) setConfig('enable_imagemagick', '1'); else setConfig('enable_imagemagick', '0'); + if(isset($_POST['cache_thumbs'])) setConfig('cache_thumbs', '1'); else setConfig('cache_thumbs', '0'); + if(isset($_POST['file_history'])) setConfig('file_history', '1'); else setConfig('file_history', '0'); + if(file_exists($_POST['imagemagick_path'])) setConfig('imagemagick_path', $_POST['imagemagick_path']); + else echo 'Warning: the file "'.$_POST['imagemagick_path'].'" was not found, and the ImageMagick file path was not updated.'; + $max_upload = floor((float)$_POST['max_file_size'] * (int)$_POST['fs_units']); + setConfig('max_file_size', $max_upload.''); + } + echo '
'; + ?> +

File upload configuration

+

Enano supports the ability to upload files to your website and store the files in the database. This enables you to embed images + and such into pages without manually writing the HTML. However, the upload feature can sometimes pose a risk to your site, as viruses + and executable files can sometimes be uploaded.

+

+

Maximum file size:

+

You can allow Enano to generate thumbnails of images automatically. This feature requires ImageMagick to work properly. If your server + does not have ImageMagick on it, Enano will simply make your users' browsers scale the images. In most cases this is fine, but if you + are uploading large (>100KB) images and embedding them inside of pages, you should try to enable ImageMagick because transferring these + large images many times can cost you quite a lot of bandwidth.

+


+ Path to ImageMagick:
+ On Linux and Unix servers, the most likely options here are /usr/bin/convert and /usr/local/bin/convert. If you server runs Windows, then + ImageMagick is most likely to be C:\Windows\Convert.exe or C:\Windows\System32\Convert.exe. +

+

If you use ImageMagick to scale images, your server will be very busy constantly scaling images if your website is busy, and your site + may experience slowdowns. You can dramatically speed up this scaling process if you use a directory to cache thumbnail images.

+

Please note: the cache/ directory on your server must be writable by the server. While this is not usually a problem on + Windows servers, most Linux/Unix servers will require you to CHMOD the cache/ directory to 777. See your FTP client's user guide for + more information on how to do this.At present, it seems that the cache directory + is not writable. The checkbox below has been disabled to maintain the stability of Enano.'; ?>

+

+

Lastly, you can choose whether file history will be saved. If this option is turned on, you will be able to roll back any malicious + changes made to uploaded files, but this requires a significant amount of database storage. You should probably leave this option + enabled unless you have less than 250MB of MySQL database space.

+

+
+

+ '; +} + +function page_Admin_PluginManager() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + if(isset($_GET['action'])) { + switch($_GET['action']) { + case "enable": + setConfig('plugin_'.$_GET['plugin'], '1'); + break; + case "disable": + if($_GET['plugin']!='admin.php') setConfig('plugin_'.$_GET['plugin'], '0'); + else echo('

Error disabling plugin

The administration panel plugin cannot be disabled.

'); + break; + } + } + $dir = './plugins/'; + $plugin_list = Array(); + $system = Array(); + if (is_dir($dir)) { + if ($dh = opendir($dir)) { + while (($file = readdir($dh)) !== false) { + if(preg_match('#^(.*?)\.php$#is', $file) && $file != 'index.php') + { + if ( in_array($file, $plugins->system_plugins) ) + { + $thelist =& $system; + continue; + } + else + { + $thelist =& $plugin_list; + } + $f = file_get_contents($dir . $file); + $f = explode("\n", $f); + $f = array_slice($f, 2, 7); + $f[0] = substr($f[0], 13, strlen($f[0])); + $f[1] = substr($f[1], 12, strlen($f[1])); + $f[2] = substr($f[2], 13, strlen($f[2])); + $f[3] = substr($f[3], 8, strlen($f[3])); + $f[4] = substr($f[4], 9, strlen($f[4])); + $f[5] = substr($f[5], 12, strlen($f[5])); + $thelist[$file] = Array(); + $thelist[$file]['name'] = $f[0]; + $thelist[$file]['uri'] = $f[1]; + $thelist[$file]['desc'] = $f[2]; + $thelist[$file]['auth'] = $f[3]; + $thelist[$file]['vers'] = $f[4]; + $thelist[$file]['aweb'] = $f[5]; + } + } + closedir($dh); + } + } + echo('
+ '); + $plugin_files = array_keys($plugin_list); + $cls = 'row2'; + for ( $i = 0; $i < sizeof($plugin_files); $i++ ) + { + $cls = ( $cls == 'row2' ) ? 'row3' : 'row2'; + echo ' + + + + + + '; + } + echo '
Plugin filenamePlugin nameDescriptionAuthorVersion
'.$plugin_files[$i].''.$plugin_list[$plugin_files[$i]]['name'].''.$plugin_list[$plugin_files[$i]]['desc'].''.$plugin_list[$plugin_files[$i]]['auth'].''.$plugin_list[$plugin_files[$i]]['vers'].''; + if ( getConfig('plugin_'.$plugin_files[$i]) == '1' ) + { + echo 'Disable'; + } + else + { + echo 'Enable'; + } + echo '
'; +} + +function page_Admin_UploadAllowedMimeTypes() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + global $mime_types, $mimetype_exps, $mimetype_extlist; + if(isset($_POST['save'])) + { + $bits = ''; + $keys = array_keys($mime_types); + foreach($keys as $i => $k) + { + if(isset($_POST['ext_'.$k])) $bits .= '1'; + else $bits .= '0'; + } + $bits = compress_bitfield($bits); + setConfig('allowed_mime_types', $bits); + echo '
Your changes have been saved.
'; + } + $allowed = fetch_allowed_extensions(); + ?> +

Allowed file types

+

Using the form below, you can decide which file types are allowed to be uploaded to this site.

+ nslist['Special'].'Administration', (( isset($_GET['sqldbg'])) ? 'sqldbg&' : '') .'module='.$paths->cpage['module']).'" method="post">'; + $c = -1; + $t = -1; + $cl = 'row1'; + echo "\n".'
'."\n".' '."\n".' '."\n "; + foreach($mime_types as $e => $m) + { + $c++; + $t++; + if($c == 3) + { + $c = 0; + $cl = ( $cl == 'row1' ) ? 'row2' : 'row1'; + echo ''."\n".' '."\n "; + } + $seed = "extchkbx_{$e}_".md5(microtime() . mt_rand()); + $chk = (!empty($allowed[$e])) ? ' checked="checked"' : ''; + echo " \n "; + } + while($c < 2) + { + $c++; + echo " \n "; + } + echo ''; + echo ''."\n".'
\n \n
'."\n".'
'; + echo '
'; + ?> + auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + ?> +

Editing and managing the Enano sidebar

+

The Enano sidebar is a versatile tool when scripted correctly. You don't have to be a programmer to enjoy the features the Sidebar + provides; however, editing the sidebar requires a small bit of programming knowledge and an understanding of Enano's system message + markup language. +

+

The Enano system markup language is somewhat similar to HTML, in that it uses tags (<example>like this</example>) for the + main syntax. However, Enano uses curly brackets ({ and }) as opposed to less-than and greater-than signs (< and >).

+

Programming the Enano sidebar requires the use of two tags: {slider} and {if}. The {slider} tag is used to create a new heading + on the sidebar, and all text enclosed in that tag will be collapsed when the heading is clicked. To specify the text on the heading, + use an equals sign (=) after the "slider" text. Then insert any links (they should be wiki-formatted) to internal Enano pages and + external sites.

+

So here is what the language for the default sidebar's "Navigation" heading looks like:

+
{slider=Navigation}
+  [[Main Page|Home]]
+  [[Enano:Sidebar|Edit the sidebar]]
+{/slider}
+

Pretty simple, huh? Good, now we're going to learn another common aspect of Enano programming: conditionals. The {if} tag allows you + to decide whether a portion of the sidebar will be displayed based on a template variable. Currently the only available conditions are + "user_logged_in" and "auth_admin", but more will be added soon. To use a conditional, enter {if conditional_name}, and then the + wiki-formatted text that you want to be under that condition, and then close the tag with {/if}. In the same way, you can reverse the + effect with {!if}. With {!if}, the closing tag is still {/if}, so keep that in mind. An {else} tag will be supported soon.

+

Now it's time for some real fun: variables. All template variables can be accessed from the sidebar. A variable is simply the + variable name, prefixed by a dollar sign ($). Some of the most common variables are $USERNAME, $SITE_NAME, $SITE_DESC, and $PAGE_NAME. + The sidebar also has some special variables that it uses for some of its links. The logout link can be added with $LOGOUT_LINK, and + the "change theme" button can be added with $STYLE_LINK.

+

So here is the Enano markup for the portion of the sidebar that contains the user tools:

+
{slider=$USERNAME}
+  [[User:$USERNAME|User page]]
+  [[Special:Contributions?user=$USERNAME|My Contributions]]
+  {if user_logged_in}
+    [[Special:Preferences|Preferences]]
+    $THEME_LINK
+  {/if}
+  {if auth_admin}
+    [[Special:Administration|Administration]]
+  {/if}
+  {if user_logged_in}
+    $LOGOUT_LINK
+  {/if}
+  {!if user_logged_in}
+    Create an account
+    Log in
+  {/if}
+{/slider}
+ auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['go'])) { + // We need the user ID before we can do anything + $q = $db->sql_query('SELECT user_id,username,email,real_name,style,user_level FROM '.table_prefix.'users WHERE username=\'' . $db->escape($_POST['username']) . '\''); + if(!$q) die('Error selecting user ID: '.mysql_error()); + if($db->numrows() < 1) { echo('User does not exist, please enter another username.'); return; } + $r = $db->fetchrow(); + $db->free_result(); + if(isset($_POST['save'])) + { + $_POST['level'] = intval($_POST['level']); + + $new_level = $_POST['level']; + $old_level = intval($r['user_level']); + + $re = $session->update_user((int)$r['user_id'], $_POST['new_username'], false, $_POST['new_pass'], $_POST['email'], $_POST['real_name'], false, $_POST['level']); + + if($re == 'success') + { + + if ( $new_level != $old_level ) + { + $user_id = intval($r['user_id']); + // We need to update group memberships + if ( $old_level == USER_LEVEL_ADMIN ) + { + $session->remove_user_from_group($user_id, GROUP_ID_ADMIN); + } + else if ( $old_level == USER_LEVEL_MOD ) + { + $session->remove_user_from_group($user_id, GROUP_ID_MOD); + } + + if ( $new_level == USER_LEVEL_ADMIN ) + { + $session->add_user_to_group($user_id, GROUP_ID_ADMIN, false); + } + else if ( $new_level == USER_LEVEL_MOD ) + { + $session->add_user_to_group($user_id, GROUP_ID_MOD, false); + } + } + + echo('
Your changes have been saved.
'); + } + else + { + echo('
Error saving changes: '.implode('
', $re).'
'); + } + $q = $db->sql_query('SELECT user_id,username,email,real_name,style,user_level FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['username']).'\''); + if ( !$q ) + { + die('Error selecting user ID: '.mysql_error()); + } + if($db->numrows($q) < 1) + { + die('User does not exist, please enter another username.'); + } + $r = mysql_fetch_object($q); + $db->free_result(); + } + elseif(isset($_POST['deleteme']) && isset($_POST['delete_conf'])) + { + $q = $db->sql_query('DELETE FROM users WHERE user_id='.$r['user_id'].';'); + if($q) + { + echo '
The user account "'.$r['username'].'" was deleted.
'; + } + else + { + echo '
The user account "'.$r['username'].'" could not be deleted due to a database error.

'.$db->get_error().'
'; + } + } + else + { + echo(' +

Edit User Info

+
+ + + + + + + +
Username:
New Password:
E-mail:
Real Name:
User level:
Delete user: +
+
+
+ '); + } + } elseif(isset($_POST['clearsessions'])) { + // Get the current session information so the user doesn't get logged out + $aes = new AESCrypt(); + $sk = md5($session->sid_super); + $qb = $db->sql_query('SELECT session_key,salt,auth_level,source_ip,time FROM '.table_prefix.'session_keys WHERE session_key=\''.$sk.'\' AND user_id='.$session->user_id.' AND auth_level='.USER_LEVEL_ADMIN); + if(!$qb) die('Error selecting session key info block B: '.$db->get_error()); + if($db->numrows($qb) < 1) die('Error: cannot read admin session info block B, aborting table clear process'); + $qa = $db->sql_query('SELECT session_key,salt,auth_level,source_ip,time FROM '.table_prefix.'session_keys WHERE session_key=\''.md5($session->sid).'\' AND user_id='.$session->user_id.' AND auth_level='.USER_LEVEL_MEMBER); + if(!$qa) die('Error selecting session key info block A: '.$db->get_error()); + if($db->numrows($qa) < 1) die('Error: cannot read user session info block A, aborting table clear process'); + $ra = mysql_fetch_object($qa); + $rb = mysql_fetch_object($qb); + $db->free_result($qa); + $db->free_result($qb); + $db->sql_query('DELETE FROM '.table_prefix.'session_keys;'); + $db->sql_query('INSERT INTO '.table_prefix.'session_keys( session_key,salt,user_id,auth_level,source_ip,time ) VALUES( \''.$ra->session_key.'\', \''.$ra->salt.'\', \''.$session->user_id.'\', \''.$ra->auth_level.'\', \''.$ra->source_ip.'\', '.$ra->time.' ),( \''.$rb->session_key.'\', \''.$rb->salt.'\', \''.$session->user_id.'\', \''.$rb->auth_level.'\', \''.$rb->source_ip.'\', '.$rb->time.' )'); + echo(' +
The session key table has been cleared. Your database should be a little bit smaller now.
+ '); + } + echo(' +

User Management

+
+

Username: '.$template->username_field('username').'

+

Clear session keys table

+

It\'s a good idea to clean out your session keys table every once in a while, since this helps to reduce database size. During this process you will be logged off and (hopefully) logged back on automatically. The side effects of this include all users except you being logged off.

+

+
+ '); + if(isset($_GET['action']) && isset($_GET['user'])) + { + switch($_GET['action']) + { + case "activate": + $e = $db->sql_query('SELECT activation_key FROM '.table_prefix.'users WHERE username=\'' . $db->escape($_GET['user']) . '\''); + if($e) + { + $row = $db->fetchrow(); + $db->free_result(); + if($session->activate_account($_GET['user'], $row['activation_key'])) { echo '
The user account "'.$_GET['user'].'" has been activated.
'; $db->sql_query('DELETE FROM '.table_prefix.'logs WHERE time_id=' . $db->escape($_GET['logid'])); } + else echo '
The user account "'.$_GET['user'].'" has NOT been activated, possibly because the account is already active.
'; + } else echo '
Error activating account: '.mysql_error().'
'; + break; + case "sendemail": + if($session->send_activation_mail($_GET['user'])) { echo '
The user "'.$_GET['user'].'" has been sent an e-mail with an activation link.
'; $db->sql_query('DELETE FROM '.table_prefix.'logs WHERE time_id=' . $db->escape($_GET['logid'])); } + else echo '
The user account "'.$_GET['user'].'" has not been activated, probably because of a bad SMTP configuration.
'; + break; + case "deny": + $e = $db->sql_query('DELETE FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\' AND edit_summary=\'' . $db->escape($_GET['user']) . '\';'); + if(!$e) echo '
Error during row deletion: '.mysql_error().'
'; + else echo '
All activation requests for the user "'.$_GET['user'].'" have been deleted.
'; + break; + } + } + $q = $db->sql_query('SELECT log_type, action, time_id, date_string, author, edit_summary FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\' ORDER BY time_id DESC;'); + if($q) + { + if($db->numrows() > 0) + { + $n = $db->numrows(); + if($n == 1) $s = $n . ' user is'; + else $s = $n . ' users are'; + echo '

'.$s . ' awaiting account activation

'; + echo '
+ + '; + $cls = 'row2'; + while($row = $db->fetchrow()) + { + if($cls == 'row2') $cls = 'row1'; + else $cls = 'row2'; + echo ''; + } + echo '
Date of requestRequested byRequested forActions
'.date('F d, Y h:i a', $row['time_id']).''.$row['author'].''.$row['edit_summary'].'Activate nowSend activation e-mailDeny request
'; + } + $db->free_result(); + } +} + +function page_Admin_GroupManager() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_POST['do_create_stage1'])) + { + if(!preg_match('/^([A-z0-9 -]+)$/', $_POST['create_group_name'])) + { + echo '

The group name you chose is invalid.

'; + return; + } + echo '
'; + echo '
+ + + + + + + + + +
Creating group: '.$_POST['create_group_name'].'
Group moderator' . $template->username_field('group_mod') . '
Group status +
+
+
+ +
+ + +
+
'; + echo '
'; + return; + } + elseif(isset($_POST['do_create_stage2'])) + { + if(!preg_match('/^([A-z0-9 -]+)$/', $_POST['create_group_name'])) + { + echo '

The group name you chose is invalid.

'; + return; + } + if(!in_array(intval($_POST['group_status']), Array(GROUP_CLOSED, GROUP_OPEN, GROUP_HIDDEN, GROUP_REQUEST))) + { + echo '

Hacking attempt

'; + return; + } + $e = $db->sql_query('SELECT group_id FROM '.table_prefix.'groups WHERE group_name=\''.$db->escape($_POST['create_group_name']).'\';'); + if(!$e) + { + echo $db->get_error(); + return; + } + if($db->numrows() > 0) + { + echo '

The group name you entered already exists.

'; + return; + } + $db->free_result(); + $q = $db->sql_query('INSERT INTO '.table_prefix.'groups(group_name,group_type) VALUES( \''.$db->escape($_POST['create_group_name']).'\', ' . intval($_POST['group_status']) . ' )'); + if(!$q) + { + echo $db->get_error(); + return; + } + $e = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['group_mod']).'\';'); + if(!$e) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo '

The username you entered could not be found.

'; + return; + } + $row = $db->fetchrow(); + $id = $row['user_id']; + $db->free_result(); + $e = $db->sql_query('SELECT group_id FROM '.table_prefix.'groups WHERE group_name=\''.$db->escape($_POST['create_group_name']).'\';'); + if(!$e) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo '

The group ID could not be looked up.

'; + return; + } + $row = $db->fetchrow(); + $gid = $row['group_id']; + $db->free_result(); + $e = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id,is_mod) VALUES('.$gid.', '.$id.', 1);'); + if(!$e) + { + echo $db->get_error(); + return; + } + echo "
+ Information
+ The group {$_POST['create_group_name']} has been created successfully. +
"; + } + if(isset($_POST['do_edit']) || isset($_POST['edit_do'])) + { + // Fetch the group name + $q = $db->sql_query('SELECT group_name,system_group FROM '.table_prefix.'groups WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo '

Error: couldn\'t look up group name

'; + } + $row = $db->fetchrow(); + $name = $row['group_name']; + $db->free_result(); + if(isset($_POST['edit_do'])) + { + if(isset($_POST['edit_do']['del_group'])) + { + if ( $row['system_group'] == 1 ) + { + echo '
The group "' . $name . '" could not be deleted because it is a system group required for site functionality.
'; + } + else + { + $q = $db->sql_query('DELETE FROM '.table_prefix.'group_members WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + $q = $db->sql_query('DELETE FROM '.table_prefix.'groups WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + echo '
The group "'.$name.'" has been deleted. Return to the group manager.
'; + return; + } + } + if(isset($_POST['edit_do']['save_name'])) + { + if(!preg_match('/^([A-z0-9 -]+)$/', $_POST['group_name'])) + { + echo '

The group name you chose is invalid.

'; + return; + } + $q = $db->sql_query('UPDATE '.table_prefix.'groups SET group_name=\''.$db->escape($_POST['group_name']).'\' + WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + else + { + echo '
+ The group name has been updated. +
'; + } + $name = $_POST['group_name']; + + } + $q = $db->sql_query('SELECT member_id FROM '.table_prefix.'group_members + WHERE group_id='.intval($_POST['group_edit_id']).';'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() > 0) + { + while($row = $db->fetchrow($q)) + { + if(isset($_POST['edit_do']['del_' . $row['member_id']])) + { + $e = $db->sql_query('DELETE FROM '.table_prefix.'group_members WHERE member_id='.$row['member_id']); + if(!$e) + { + echo $db->get_error(); + return; + } + } + } + } + $db->free_result(); + if(isset($_POST['edit_do']['add_member'])) + { + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\''.$db->escape($_POST['edit_add_username']).'\';'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() > 0) + { + $row = $db->fetchrow(); + $user_id = $row['user_id']; + $is_mod = ( isset( $_POST['add_mod'] ) ) ? '1' : '0'; + $q = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id,is_mod) VALUES('.intval($_POST['group_edit_id']).','.$user_id.','.$is_mod.');'); + if(!$q) + { + echo $db->get_error(); + return; + } + else + { + echo '
+ The user "'.$_POST['edit_add_username'].'" has been added to this usergroup. +
'; + } + } + else + echo '
The user "'.$_POST['edit_add_username'].'" could not be added.
This username does not exist.
'; + } + } + $sg_disabled = ( $row['system_group'] == 1 ) ? ' value="Can\'t delete system group" disabled="disabled" style="color: #FF9773" ' : ' value="Delete this group" style="color: #FF3713" '; + echo '
'; + echo '
+ + + + + + + + +
Edit group name
+ Group name: +
+ + +
+
+ '; + echo '
'; + echo '
'; + echo '
+ + '; + $q = $db->sql_query('SELECT m.member_id,m.is_mod,u.username FROM '.table_prefix.'group_members AS m + LEFT JOIN '.table_prefix.'users AS u + ON u.user_id=m.user_id + WHERE m.group_id='.intval($_POST['group_edit_id']).' + ORDER BY m.is_mod DESC, u.username ASC;'); + if(!$q) + { + echo $db->get_error(); + return; + } + if($db->numrows() < 1) + { + echo ''; + } + else + { + $cls = 'row2'; + while($row = $db->fetchrow()) + { + $cls = ( $cls == 'row1' ) ? 'row2' : 'row1'; + $mod = ( $row['is_mod'] == 1 ) ? 'Mod' : ''; + echo ' + + + + '; + } + } + $db->free_result(); + echo '
Edit group members
This group has no members.
+ ' . $row['username'] . ' + + '.$mod.' + + +
+
+ '; + echo '
'; + echo '
'; + echo '
+ + + + + + + + + + + + + +
Add a new member
+ Username: ' . $template->username_field('edit_add_username') . ' +
+ (can add and delete other members) +
+ +
+
+ '; + echo '
'; + return; + } + echo '

Manage Usergroups

'; + echo '
'; + $q = $db->sql_query('SELECT group_id,group_name FROM '.table_prefix.'groups ORDER BY group_name ASC;'); + if(!$q) + { + echo $db->get_error(); + } + else + { + echo '
+ + + + '; + echo ''; + echo ' +
Edit an existing group
+
+

'; + } + echo '
'; + echo '
+ + + + '; + echo ''; + echo ' +
Create a new group
Group name:
+
'; + echo '
'; +} + +function page_Admin_PageManager() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + echo '

Page management

'; + + if(isset($_POST['search']) || isset($_POST['select']) || ( isset($_GET['source']) && $_GET['source'] == 'ajax' )) { + // The object of the game: using only the text a user entered, guess the page ID and namespace. *sigh* I HATE writing search algorithms... + $source = ( isset($_GET['source']) ) ? $_GET['source'] : false; + if ( $source == 'ajax' ) + { + $_POST['search'] = true; + $_POST['page_url'] = $_GET['page_id']; + } + if(isset($_POST['search'])) $pid = $_POST['page_url']; + elseif(isset($_POST['select'])) $pid = $_POST['page_force_url']; + else { echo 'Internal error selecting page search terms'; return false; } + // Look for a namespace prefix in the urlname, and assign a different namespace, if necessary + $k = array_keys($paths->nslist); + for($i=0;$inslist);$i++) + { + $ln = strlen($paths->nslist[$k[$i]]); + if(substr($pid, 0, $ln) == $paths->nslist[$k[$i]]) + { + $ns = $k[$i]; + $page_id = substr($pid, $ln, strlen($pid)); + } + } + // The namespace is in $ns and the page name or ID (we don't know which yet) is in $page_id + // Now, iterate through $paths->pages searching for a page with this name or ID + for($i=0;$ipages)/2;$i++) + { + if(!isset($final_pid)) + { + if ($paths->pages[$i]['urlname_nons'] == str_replace(' ', '_', $page_id)) $final_pid = str_replace(' ', '_', $page_id); + elseif($paths->pages[$i]['name'] == $page_id) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['urlname_nons']) == strtolower(str_replace(' ', '_', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['name']) == strtolower(str_replace('_', ' ', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + if(isset($final_pid)) { $_POST['name'] = $paths->pages[$i]['name']; $_POST['urlname'] = $paths->pages[$i]['urlname_nons']; } + } + } + if(!isset($final_pid)) { echo 'The page you searched for cannot be found. Back'; return false; } + $_POST['namespace'] = $ns; + $_POST['old_namespace'] = $ns; + $_POST['page_id'] = $final_pid; + $_POST['old_page_id'] = $final_pid; + if(!isset($paths->pages[$paths->nslist[$_POST['namespace']].$_POST['urlname']])) { echo 'The page you searched for cannot be found. Back'; return false; } + } + + if(isset($_POST['page_id']) && isset($_POST['namespace']) && !isset($_POST['cancel'])) + { + $cpage = $paths->pages[$paths->nslist[$_POST['namespace']].$_POST['old_page_id']]; + if(isset($_POST['submit'])) + { + // Create a list of things to update + $page_info = Array( + 'name'=>$_POST['name'], + 'urlname'=>$_POST['page_id'], + 'namespace'=>$_POST['namespace'], + 'special'=>isset($_POST['special']) ? '1' : '0', + 'visible'=>isset($_POST['visible']) ? '1' : '0', + 'comments_on'=>isset($_POST['comments_on']) ? '1' : '0', + 'protected'=>isset($_POST['protected']) ? '1' : '0' + ); + // Build the query + $q = 'UPDATE '.table_prefix.'pages SET '; + $k = array_keys($page_info); + foreach($k as $c) + { + $q .= $c.'=\''.$db->escape($page_info[$c]).'\','; + } + $q = substr($q, 0, strlen($q)-1); + // Build the WHERE statements + $q .= ' WHERE '; + $k = array_keys($cpage); + foreach($k as $c) + { + if($c != 'urlname_nons' && $c != 'urlname' && $c != 'really_protected') $q .= $c.'=\''.$cpage[$c].'\' AND '; + elseif($c == 'urlname') $q .= $c.'=\''.$cpage['urlname_nons'].'\' AND '; + } + $q = substr($q, 0, strlen($q)-5) . ';'; + // Send the completed query to MySQL + $e = $db->sql_query($q); + if(!$e) $db->_die('The page data could not be updated.'); + // Update any additional tables + $q = Array( + 'UPDATE '.table_prefix.'categories SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'UPDATE '.table_prefix.'comments SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'UPDATE '.table_prefix.'logs SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'UPDATE '.table_prefix.'page_text SET page_id=\''.$page_info['urlname'].'\',namespace=\''.$page_info['namespace'].'\' WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + ); + foreach($q as $cq) + { + $e = $db->sql_query($cq); + if(!$e) $db->_die('Some of the additional tables containing page information could not be updated.'); + } + // Update $cpage + $cpage = $page_info; + $cpage['urlname_nons'] = $cpage['urlname']; + $cpage['urlname'] = $paths->nslist[$cpage['namespace']].$cpage['urlname']; + $_POST['old_page_id'] = $page_info['urlname']; + $_POST['old_namespace'] = $page_info['namespace']; + echo '
Your changes have been saved.
'; + } elseif(isset($_POST['delete'])) { + $q = Array( + 'DELETE FROM '.table_prefix.'categories WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'DELETE FROM '.table_prefix.'comments WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'DELETE FROM '.table_prefix.'logs WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + 'DELETE FROM '.table_prefix.'page_text WHERE page_id=\'' . $db->escape($_POST['old_page_id']) . '\' AND namespace=\'' . $db->escape($_POST['old_namespace']) . '\';', + ); + foreach($q as $cq) + { + $e = $db->sql_query($cq); + if(!$e) $db->_die('Some of the additional tables containing page information could not be updated.'); + } + + if(!$db->sql_query( + 'DELETE FROM '.table_prefix.'pages WHERE urlname="'.$db->escape($_POST['old_page_id']).'" AND namespace="'.$db->escape($_POST['old_namespace']).'";' + )) $db->_die('The page could not be deleted.'); + echo '
This page has been deleted.

Return to Page manager
Admin home

'; + return; + } + echo '
'; + ?> +

Modify page:

+ + + + + + + + + + + +
Namespace:
Page title:
Page URL string:
No spaces, and don't enter the namespace prefix (e.g. User:).
Changing this value is usually not a good idea, especially for templates and project pages.
name="comments_on" type="checkbox" id="cmt" />
name="special" type="checkbox" id="spc" />
This option enables you to use your own HTML headers and other code. It is recommended that only advanced users enable this feature. As with other Enano pages, you may use PHP code in your pages, meaning you can use Enano's API on the page.
name="visible" type="checkbox" id="vis" />
Unchecking this checkbox prevents the page for being indexed for searching. The index is rebuilt each time a page is saved, and you can force an index rebuild by going to the page nslist['Special']; ?>SearchRebuild.
name="protected" type="checkbox" id="prt" />
This option only has an effect when Wiki Mode is enabled.

+ + +
+ '; + } else { + echo '

Please select a page

'; + echo ''; + ?> +

Search for page title (remember prefixes like User: and File:) pagename_field('page_url'); ?>

+

Select page title from a list:

+ '; + + } +} + +function page_Admin_PageEditor() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + echo '

Edit page content

'; + + if(isset($_POST['search']) || isset($_POST['select'])) { + // The object of the game: using only the text a user entered, guess the page ID and namespace. *sigh* I HATE writing search algorithms... + if(isset($_POST['search'])) $pid = $_POST['page_url']; + elseif(isset($_POST['select'])) $pid = $_POST['page_force_url']; + else { echo 'Internal error selecting page search terms'; return false; } + // Look for a namespace prefix in the urlname, and assign a different namespace, if necessary + $k = array_keys($paths->nslist); + for($i=0;$inslist);$i++) + { + $ln = strlen($paths->nslist[$k[$i]]); + if(substr($pid, 0, $ln) == $paths->nslist[$k[$i]]) + { + $ns = $k[$i]; + $page_id = substr($pid, $ln, strlen($pid)); + } + } + // The namespace is in $ns and the page name or ID (we don't know which yet) is in $page_id + // Now, iterate through $paths->pages searching for a page with this name or ID + for($i=0;$ipages)/2;$i++) + { + if(!isset($final_pid)) + { + if ($paths->pages[$i]['urlname_nons'] == str_replace(' ', '_', $page_id)) $final_pid = str_replace(' ', '_', $page_id); + elseif($paths->pages[$i]['name'] == $page_id) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['urlname_nons']) == strtolower(str_replace(' ', '_', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + elseif(strtolower($paths->pages[$i]['name']) == strtolower(str_replace('_', ' ', $page_id))) $final_pid = $paths->pages[$i]['urlname_nons']; + if(isset($final_pid)) { $_POST['name'] = $paths->pages[$i]['name']; $_POST['urlname'] = $paths->pages[$i]['urlname_nons']; } + } + } + if(!isset($final_pid)) { echo 'The page you searched for cannot be found. Back'; return false; } + $_POST['namespace'] = $ns; + $_POST['page_id'] = $final_pid; + if(!isset($paths->pages[$paths->nslist[$_POST['namespace']].$_POST['urlname']])) { echo 'The page you searched for cannot be found. Back'; return false; } + } + + if(isset($_POST['page_id']) && !isset($_POST['cancel'])) + { + echo ''; + if(!isset($_POST['content']) || isset($_POST['revert'])) $content = RenderMan::getPage($_POST['page_id'], $_POST['namespace'], 0, false, false, false, false); + else $content = $_POST['content']; + if(isset($_POST['save'])) + { + $data = $content; + $id = md5( microtime() . mt_rand() ); + + $minor = isset($_POST['minor']) ? 'true' : 'false'; + $q='INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,page_id,namespace,page_text,char_tag,author,edit_summary,minor_edit) VALUES(\'page\', \'edit\', '.time().', \''.date('d M Y h:i a').'\', \'' . $db->escape($_POST['page_id']) . '\', \'' . $db->escape($_POST['namespace']) . '\', \''.$data.'\', \''.$id.'\', \''.$session->username.'\', \''.$db->escape(htmlspecialchars($_POST['summary'])).'\', '.$minor.');'; + if(!$db->sql_query($q)) $db->_die('The history (log) entry could not be inserted into the logs table.'); + + $query = 'UPDATE '.table_prefix.'page_text SET page_text=\''.$db->escape($data).'\',char_tag=\''.$id.'\' WHERE page_id=\'' . $db->escape($_POST['page_id']) . '\' AND namespace=\'' . $db->escape($_POST['namespace']) . '\';'; + $e = $db->sql_query($query); + if(!$e) echo '
The page data could not be saved. MySQL said: '.mysql_error().'

Query:
'.$query.'
'; + else echo '
Your page has been saved. View page...
'; + } elseif(isset($_POST['preview'])) { + echo '

Preview

Reminder: This is only a preview; your changes to this page have not yet been saved.

'.RenderMan::render($content).'
'; + } + ?> +

+
+ Edit summary:
+ +

+

+ + +        +

+ '; + } else { + echo '

Please select a page

'; + echo ''; + ?> +

Search for page title (remember prefixes like User: and File:) pagename_field('page_url'); ?>

+

Select page title from a list:

+ '; + } +} + +function page_Admin_ThemeManager() +{ + + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + + // Get the list of styles in the themes/ dir + $h = opendir('./themes'); + $l = Array(); + if(!$h) die('Error opening directory "./themes" for reading.'); + while(false !== ($n = readdir($h))) { + if($n != '.' && $n != '..' && is_dir('./themes/'.$n)) + $l[] = $n; + } + closedir($h); + echo(' +

Theme Management

+

Install, uninstall, and manage Enano themes.

+ '); + if(isset($_POST['disenable'])) { + $q = 'SELECT enabled FROM '.table_prefix.'themes WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting enabled/disabled state value: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $db->free_result(); + if($r[0] == 1) $e = 0; + else $e = 1; + $s=true; + if($e==0) + { + $c = $db->sql_query('SELECT * FROM '.table_prefix.'themes WHERE enabled=1'); + if(!$c) $db->_die('The backup check for having at least on theme enabled failed.'); + if($db->numrows() <= 1) { echo '
You cannot disable the last remaining theme.
'; $s=false; } + } + $db->free_result(); + if($s) { + $q = 'UPDATE '.table_prefix.'themes SET enabled='.$e.' WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $a = $db->sql_query($q); + if(!$a) die('Error updating enabled/disabled state value: '.mysql_error().'
SQL:
'.$q); + else echo('
The theme "'.$_POST['theme_id'].'" has been '. ( ( $e == '1' ) ? 'enabled' : 'disabled' ).'.
'); + } + } + elseif(isset($_POST['edit'])) { + + $dir = './themes/'.$_POST['theme_id'].'/css/'; + $list = Array(); + // Open a known directory, and proceed to read its contents + if (is_dir($dir)) { + if ($dh = opendir($dir)) { + while (($file = readdir($dh)) !== false) { + if(preg_match('#^(.*?)\.css$#is', $file) && $file != '_printable.css') { + $list[$file] = capitalize_first_letter(substr($file, 0, strlen($file)-4)); + } + } + closedir($dh); + } + } + $lk = array_keys($list); + + $q = 'SELECT theme_name,default_style FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting name value: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $db->free_result(); + echo(''); + echo('
+ Theme name displayed to users:

+ Default stylesheet:

+ +
'); + echo(''); + } + elseif(isset($_POST['editsave'])) { + $q = 'UPDATE '.table_prefix.'themes SET theme_name=\'' . $db->escape($_POST['name']) . '\',default_style=\''.$db->escape($_POST['defaultcss']).'\' WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $s = $db->sql_query($q); + if(!$s) die('Error updating name value: '.mysql_error().'
SQL:
'.$q); + else echo('
Theme data updated.
'); + } + elseif(isset($_POST['up'])) { + // If there is only one theme or if the selected theme is already at the top, do nothing + $q = 'SELECT theme_order FROM '.table_prefix.'themes ORDER BY theme_order;'; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $q = 'SELECT theme_order FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; + $sn = $db->sql_query($q); + if(!$sn) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($sn); + if( /* check for only one theme... */ $db->numrows($s) < 2 || $r[0] == 1 /* ...and check if this theme is already at the top */ ) { echo('
This theme is already at the top of the list, or there is only one theme installed.
'); } else { + // Get the order IDs of the selected theme and the theme before it + $q = 'SELECT theme_order FROM '.table_prefix.'themes WHERE theme_id=\'' . $db->escape($_POST['theme_id']) . '\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $r = $r[0]; + $rb = $r - 1; + // Thank God for jEdit's rectangular selection and the ablity to edit multiple lines at the same time ;) + $q = 'UPDATE '.table_prefix.'themes SET theme_order=0 WHERE theme_order='.$rb.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$rb.' WHERE theme_order='.$r.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$r.' WHERE theme_order=0'; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + echo('
Theme moved up.
'); + } + $db->free_result($s); + $db->free_result($sn); + } + elseif(isset($_POST['down'])) { + // If there is only one theme or if the selected theme is already at the top, do nothing + $q = 'SELECT theme_order FROM '.table_prefix.'themes ORDER BY theme_order;'; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + if( /* check for only one theme... */ $db->numrows($s) < 2 || $r[0] == $db->numrows($s) /* ...and check if this theme is already at the bottom */ ) { echo('
This theme is already at the bottom of the list, or there is only one theme installed.
'); } else { + // Get the order IDs of the selected theme and the theme before it + $q = 'SELECT theme_order FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; + $s = $db->sql_query($q); + if(!$s) die('Error selecting order information: '.mysql_error().'
SQL:
'.$q); + $r = $db->fetchrow_num($s); + $r = $r[0]; + $rb = $r + 1; + // Thank God for jEdit's rectangular selection and the ablity to edit multiple lines at the same time ;) + $q = 'UPDATE '.table_prefix.'themes SET theme_order=0 WHERE theme_order='.$rb.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$rb.' WHERE theme_order='.$r.''; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + $q = 'UPDATE '.table_prefix.'themes SET theme_order='.$r.' WHERE theme_order=0'; /* Check for errors... */ $s = $db->sql_query($q); if(!$s) die('Error updating order information: '.mysql_error().'
SQL:
'.$q); + echo('
Theme moved down.
'); + } + } + else if(isset($_POST['uninstall'])) + { + $q = 'SELECT * FROM '.table_prefix.'themes;'; + $s = $db->sql_query($q); + if ( !$s ) + { + die('Error getting theme count: '.mysql_error().'
SQL:
'.$q); + } + $n = $db->numrows($s); + $db->free_result(); + + if ( $_POST['theme_id'] == 'oxygen' ) + { + echo '
The Oxygen theme is used by Enano for installation, upgrades, and error messages, and cannot be uninstalled.
'; + } + else + { + if($n < 2) + { + echo '
The theme could not be uninstalled because it is the only theme left.
'; + } + else + { + $q = 'DELETE FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\' LIMIT 1;'; + $s = $db->sql_query($q); + if ( !$s ) + { + die('Error deleting theme data: '.mysql_error().'
SQL:
'.$q); + } + else + { + echo('
Theme uninstalled.
'); + } + } + } + } + elseif(isset($_POST['install'])) { + $q = 'SELECT * FROM '.table_prefix.'themes;'; + $s = $db->sql_query($q); + if(!$s) die('Error getting theme count: '.mysql_error().'
SQL:
'.$q); + $n = $db->numrows($s); + $n++; + $theme_id = $_POST['theme_id']; + $theme = Array(); + include('./themes/'.$theme_id.'/theme.cfg'); + $q = 'INSERT INTO '.table_prefix.'themes(theme_id,theme_name,theme_order,enabled) VALUES(\''.$theme['theme_id'].'\', \''.$theme['theme_name'].'\', '.$n.', 1)'; + $s = $db->sql_query($q); + if(!$s) die('Error inserting theme data: '.mysql_error().'
SQL:
'.$q); + else echo('
Theme "'.$theme['theme_name'].'" installed.
'); + } + echo(' +

Currently installed themes

+
+

+ +

+
+

Install a new theme

+ '); + $theme = Array(); + $obb = ''; + for($i=0;$isql_query($q); + if(!$s) die('Error selecting list of currently installed themes: '.mysql_error().'
Attempted SQL:
'.$q); + if($db->numrows($s) < 1) { + $obb .= ''; + } + $db->free_result(); + } + } + if($obb != '') { + echo('

'); + echo(''); + echo(' + +

'); + } else echo('

All themes are currently installed.

'); +} + +function page_Admin_BanControl() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + if(isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id']) && $_GET['id'] != '') + { + $e = $db->sql_query('DELETE FROM '.table_prefix.'banlist WHERE ban_id=' . $db->escape($_GET['id']) . ''); + if(!$e) $db->_die('The ban list entry was not deleted.'); + } + if(isset($_POST['create'])) + { + $q = 'INSERT INTO '.table_prefix.'banlist(ban_type,ban_value,reason,is_regex) VALUES( ' . $db->escape($_POST['type']) . ', \'' . $db->escape($_POST['value']) . '\', \''.$db->escape($_POST['reason']).'\''; + if(isset($_POST['regex'])) $q .= ', 1'; + else $q .= ', 0'; + $q .= ');'; + $e = $db->sql_query($q); + if(!$e) $db->_die('The banlist could not be updated.'); + } + $q = $db->sql_query('SELECT ban_id,ban_type,ban_value,is_regex FROM '.table_prefix.'banlist ORDER BY ban_type;'); + if(!$q) $db->_die('The banlist data could not be selected.'); + echo ''; + echo ''; + if($db->numrows() < 1) echo ''; + while($r = $db->fetchrow()) + { + if($r['ban_type']==BAN_IP) $t = 'IP address'; + elseif($r['ban_type']==BAN_USER) $t = 'Username'; + elseif($r['ban_type']==BAN_EMAIL) $t = 'E-mail address'; + if($r['is_regex']) $g = 'Yes'; else $g = 'No'; + echo ''; + } + $db->free_result(); + echo '
TypeValueRegular Expression
No ban rules yet.
'.$t.''.$r['ban_value'].''.$g.'Delete
'; + echo '

Create new ban rule

'; + echo '
'; + ?> + Type:
+ Rule:
+ Reason to show to the banned user:
+ (advanced users only)
+ + '; +} + +function page_Admin_MassEmail() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + global $enano_config; + if ( isset($_POST['do_send']) ) + { + $use_smtp = getConfig('smtp_enabled') == '1'; + + // + // Let's do some checking to make sure that mass mail functions + // are working in win32 versions of php. (copied from phpBB) + // + if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$use_smtp) + { + $ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; + + // We are running on windows, force delivery to use our smtp functions + // since php's are broken by default + $use_smtp = true; + $enano_config['smtp_server'] = @$ini_val('SMTP'); + } + + $mail = new emailer( !empty($use_smtp) ); + + // Validate subject/message body + $subject = stripslashes(trim($_POST['subject'])); + $message = stripslashes(trim($_POST['message'])); + + if ( empty($subject) ) + $errors[] = 'Please enter a subject.'; + if ( empty($message) ) + $errors[] = 'Please enter a message.'; + + // Get list of members + if ( !empty($_POST['userlist']) ) + { + $userlist = str_replace(', ', ',', $_POST['userlist']); + $userlist = explode(',', $userlist); + foreach ( $userlist as $k => $u ) + { + if ( $u == $session->username ) + { + // Message is automatically sent to the sender + unset($userlist[$k]); + } + else + { + $userlist[$k] = $db->escape($u); + } + } + $userlist = 'WHERE username=\'' . implode('\' OR username=\'', $userlist) . '\''; + + $q = $db->sql_query('SELECT email FROM '.table_prefix.'users ' . $userlist . ';'); + if ( !$q ) + $db->_die(); + + if ( $row = $db->fetchrow() ) + { + do { + $mail->cc($row['email']); + } while ( $row = $db->fetchrow() ); + } + + $db->free_result(); + + } + else + { + // Sending to a usergroup + + $group_id = intval($_POST['group_id']); + if ( $group_id < 1 ) + { + $errors[] = 'Invalid group ID'; + } + else + { + $q = $db->sql_query('SELECT u.email FROM '.table_prefix.'group_members AS g + LEFT JOIN '.table_prefix.'users AS u + ON (u.user_id=g.user_id) + WHERE g.group_id=' . $group_id . ';'); + if ( !$q ) + $db->_die(); + + if ( $row = $db->fetchrow() ) + { + do { + $mail->cc($row['email']); + } while ( $row = $db->fetchrow() ); + } + + $db->free_result(); + } + } + + if ( sizeof($errors) < 1 ) + { + + $mail->from(getConfig('contact_email')); + $mail->replyto(getConfig('contact_email')); + $mail->set_subject($subject); + $mail->email_address(getConfig('contact_email')); + + // Copied/modified from phpBB + $email_headers = 'X-AntiAbuse: Website server name - ' . $_SERVER['SERVER_NAME'] . "\n"; + $email_headers .= 'X-AntiAbuse: User_id - ' . $session->user_id . "\n"; + $email_headers .= 'X-AntiAbuse: Username - ' . $session->username . "\n"; + $email_headers .= 'X-AntiAbuse: User IP - ' . $_SERVER['REMOTE_ADDR'] . "\n"; + + $mail->extra_headers($email_headers); + + $tpl = 'The following message was mass-mailed by {SENDER}, one of the administrators from {SITE_NAME}. If this message contains spam or any comments which you find abusive or offensive, please contact the administration team at: + +{CONTACT_EMAIL} + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +{MESSAGE} +'; + + $mail->use_template($tpl); + + $mail->assign_vars(array( + 'SENDER' => $session->username, + 'SITE_NAME' => getConfig('site_name'), + 'CONTACT_EMAIL' => getConfig('contact_email'), + 'MESSAGE' => $message + )); + + //echo '
'.print_r($mail,true).'
'; + + // All done + $mail->send(); + $mail->reset(); + + echo '
Your message has been sent.
'; + + } + else + { + echo '
Could not send message for the following reason(s):
  • ' . implode('
  • ', $errors) . '
'; + } + + } + echo ''; + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + +
Send mass e-mail
+ Send message to:
+ + By default, this message will be sent to the group selected here. You may instead send the message to a specific + list of users by entering them in the second row, with usernames separated by a single comma (no space). + +
+ +
+ Usernames: +
+ Subject: + + +
+ Message: + + +
+
+ Please be warned: it may take a LONG time to send this message. Please do not stop the script until the process is finished. +
+
+ '; +} + +function page_Admin_DBBackup() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + global $system_table_list; + if(isset($_GET['submitting']) && $_GET['submitting'] == 'yes') + { + + if(defined('SQL_BACKUP_CRYPT')) + // Try to increase our time limit + @set_time_limit(300); // five minutes + // Do the actual export + $aesext = ( defined('SQL_BACKUP_CRYPT') ) ? '.tea' : ''; + $filename = 'enano_backup_' . date('dmy') . '.sql' . $aesext; + ob_start(); + header('Content-disposition: attachment, filename="'.$filename.'";'); + header('Content-type: application/transact-sql'); + // Spew some headers + $headdate = date('F d, Y \a\t h:i a'); + echo <<
username} + +HEADER; + // build the table list + $base = ( isset($_POST['do_system_tables']) ) ? $system_table_list : Array(); + $add = ( isset($_POST['additional_tables'])) ? $_POST['additional_tables'] : Array(); + $tables = array_merge($base, $add); + + // Log it! + $e = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'db_backup\', '.time().', \''.date('d M Y h:i a').'\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(implode(', ', $tables)) . '\')'); + if ( !$e ) + $db->_die(); + + foreach($tables as $i => $t) + { + if(!preg_match('#^([a-z0-9_]+)$#i', $t)) + die('Hacking attempt'); + // if($t == table_prefix.'files' && isset($_POST['do_data'])) + // unset($tables[$i]); + } + foreach($tables as $t) + { + // Sorry folks - this script CAN'T backup enano_files, enano_search_index, and enano_search_cache due to the sheer size of the tables. + // If encryption is enabled the log data will be excluded too. + echo export_table( + $t, + isset($_POST['do_struct']), + ( isset($_POST['do_data']) /* && $t != table_prefix.'files' && $t != table_prefix.'search_index' && $t != table_prefix.'search_cache' && ( !defined('SQL_BACKUP_CRYPT') || ( defined('SQL_BACKUP_CRYPT') && $t != table_prefix.'logs' ) ) */ ), + false + ) . "\n"; + } + $data = ob_get_contents(); + ob_end_clean(); + if(defined('SQL_BACKUP_CRYPT')) + { + // Free some memory, we don't need this stuff any more + $db->close(); + unset($paths, $db, $template, $plugins); + $tea = new TEACrypt(); + $data = $tea->encrypt($data, $session->private_key); + } + header('Content-length: '.strlen($data)); + echo $data; + exit; + } + else + { + // Show the UI + echo ''; + ?> +

This page allows you to back up your Enano database should something go miserably wrong.

+

+

Additional tables to export:

+

+

+


+ +

+

+ '; + } +} + +function page_Admin_AdminLogout() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + $session->logout(USER_LEVEL_ADMIN); + echo '

You have now been logged out of the administration panel.

You will continue to be logged into the website, but you will need to re-authenticate before you can access the administration panel again.

Return to the Main Page.

'; +} + +function page_Special_Administration() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if($session->auth_level < USER_LEVEL_ADMIN) { + redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), 'Not authorized', 'You need an authorization level of '.USER_LEVEL_ADMIN.' to use this page, your auth level is: ' . $session->auth_level, 0); + exit; + } + else + { + $template->load_theme('admin', 'default'); + $template->init_vars(); + if( !isset( $_GET['noheaders'] ) ) + { + $template->header(); + } + echo 'Administer your Enano website.'; + ?> + + + + + + +
+
+ +
+
+
+ nslist); + for ( $i = 0; $i < sizeof($paths->nslist); $i++ ) + { + $ln = strlen( $paths->nslist[ $k[ $i ] ] ); + if ( substr($_GET['module'], 0, $ln) == $paths->nslist[$k[$i]] ) + { + $ns = $k[$i]; + $nm = substr($_GET['module'], $ln, strlen($_GET['module'])); + } + } + $fname = 'page_'.$ns.'_'.$nm; + $s = strpos($fname, '?noheaders'); + if($s) $fname = substr($fname, 0, $s); + $paths->cpage['module'] = $_GET['module']; + if ( function_exists($fname) && $_GET['module'] != $paths->nslist['Special'] . 'Administration' ) + { + eval($fname.'();'); + } + } + else + { + echo '
Please wait while the administration panel loads. You need to be using a recent browser with AJAX support in order to use Runt.
'; + } + ?> +
+
+ + footer(); + } +} + +function page_Special_EditSidebar() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + if($session->auth_level < USER_LEVEL_ADMIN) + { + redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), '', '', false); + exit; + } + else + { + + $template->add_header(''); + $template->add_header(''); + $template->add_header(''); + $template->add_header(''); + + // Knock the sidebars dead to keep javascript in plugins from interfering + $template->tpl_strings['SIDEBAR_LEFT'] = ''; + $template->tpl_strings['SIDEBAR_RIGHT'] = ''; + + $template->load_theme('oxygen', 'bleu'); + $template->init_vars(); + + $template->header(); + + if(isset($_POST['save'])) + { + // Write the new block order to the database + // The only way to do this is with tons of queries (one per block + one select query at the start to count everything) but afaik its safe... + // Anyone know a better way to do this? + $q = $db->sql_query('SELECT item_order,item_id,sidebar_id FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;'); + if ( !$q ) + { + $db->_die('The sidebar order data could not be selected.'); + } + $orders = Array(); + while($row = $db->fetchrow()) + { + $orders[] = Array( + count($orders), + $row['item_id'], + $row['sidebar_id'], + ); + } + $db->free_result(); + + // We now have an array with each sidebar ID in its respective order. Explode the order string in $_POST['order_(left|right)'] and use it to build a set of queries. + $ol = explode(',', $_POST['order_left']); + $odr = explode(',', $_POST['order_right']); + $om = array_merge($ol, $odr); + unset($ol, $odr); + $queries = Array(); + foreach($orders as $k => $v) + { + $queries[] = 'UPDATE '.table_prefix.'sidebar SET item_order='.$om[$k].' WHERE item_id='.$v[1].';'; + } + foreach($queries as $sql) + { + $q = $db->sql_query($sql); + if(!$q) + { + $t = $db->get_error(); + echo $t; + $template->footer(); + exit; + } + } + echo '
The sidebar order information was updated successfully.
'; + } + elseif(isset($_POST['create'])) + { + switch((int)$_POST['type']) + { + case BLOCK_WIKIFORMAT: + $content = $_POST['wikiformat_content']; + break; + case BLOCK_TEMPLATEFORMAT: + $content = $_POST['templateformat_content']; + break; + case BLOCK_HTML: + $content = $_POST['html_content']; + break; + case BLOCK_PHP: + $content = $_POST['php_content']; + break; + case BLOCK_PLUGIN: + $content = $_POST['plugin_id']; + break; + } + // Get the value of item_order + + $q = $db->sql_query('SELECT * FROM '.table_prefix.'sidebar WHERE sidebar_id='.$db->escape($_POST['sidebar_id']).';'); + if(!$q) $db->_die('The order number could not be selected'); + $io = $db->numrows(); + + $db->free_result(); + + $q = 'INSERT INTO '.table_prefix.'sidebar(block_name, block_type, sidebar_id, block_content, item_order) VALUES ( \''.$db->escape($_POST['title']).'\', \''.$db->escape($_POST['type']).'\', \''.$db->escape($_POST['sidebar_id']).'\', \''.$db->escape($content).'\', '.$io.' );'; + $result = $db->sql_query($q); + if(!$result) + { + echo $db->get_error(); + $template->footer(); + exit; + } + + echo '
The item was added.
'; + + } + + if(isset($_GET['action']) && isset($_GET['id'])) + { + if(preg_match('#^([0-9]*)$#', $_GET['id'])) + { + } else { + echo '
Error with action: $_GET["id"] was not an integer, aborting to prevent SQL injection
'; + } + switch($_GET['action']) + { + case 'new': + ?> + + + + +

+ What type of block should this be? +

+

+ +

+ +

+ + Block title:
+ Which sidebar: + +

+ +
+

+ Wikitext: +

+

+ +

+
+ +
+

+ Template code: +

+

+ +

+
+ +
+

+ HTML to place inside the sidebar: +

+

+ +

+
+ +
+

+ WARNING: If you don't know what you're doing, or if you are not fluent in PHP, stop now and choose a different block type. You will brick your Enano installation if you are not careful here. + ALWAYS remember to write secure code! The Enano team is not responsible if someone drops all your tables because of an SQL injection vulnerability in your sidebar code. You are probably better off using the template-formatted block type. +

+

+ + It is especially important to note that this code is NOT checked for errors! If there is a syntax error in your code here, it will prevent any pages from loading AT ALL. So you need to use an external PHP editor (like jEdit) to check your syntax before you hit save. + You have been warned. +

+

+ Also, you should avoid using output buffering functions (ob_[start|end|get_contents|clean]) here, because Enano uses those to track output from this script. +

+

+ The standard <?php and ?> tags work here. Don't use an initial "<?php" or it will cause a parse error. +

+

+ PHP code: +

+

+ +

+
+ +
+

+ Plugin: +

+

+ +

+
+ +

+ +   + + +

+ + + + + + footer(); + return; + break; + case 'move': + if( !isset($_GET['side']) || ( isset($_GET['side']) && !preg_match('#^([0-9]+)$#', $_GET['side']) ) ) + { + echo '
$_GET[\'side\'] contained an SQL injection attempt
'; + break; + } + $query = $db->sql_query('UPDATE '.table_prefix.'sidebar SET sidebar_id=' . $db->escape($_GET['side']) . ' WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$query) + { + echo $db->get_error(); + $template->footer(); + exit; + } + echo '
Item moved.
'; + break; + case 'delete': + $query = $db->sql_query('DELETE FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); // Already checked for injection attempts ;-) + if(!$query) + { + echo $db->get_error(); + $template->footer(); + exit; + } + if(isset($_GET['ajax'])) + { + ob_end_clean(); + die('GOOD'); + } + echo '
Item deleted.
'; + break; + case 'disenable'; + $q = $db->sql_query('SELECT item_enabled FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + exit; + } + $r = $db->fetchrow(); + $db->free_result(); + $e = ( $r['item_enabled'] == 1 ) ? '0' : '1'; + $q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET item_enabled='.$e.' WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + exit; + } + if(isset($_GET['ajax'])) + { + ob_end_clean(); + die('GOOD'); + } + break; + case 'getsource': + $q = $db->sql_query('SELECT block_content,block_type FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + exit; + } + ob_end_clean(); + $r = $db->fetchrow(); + $db->free_result(); + if($r['block_type'] == BLOCK_PLUGIN) die('HOUSTON_WE_HAVE_A_PLUGIN'); + die($r['block_content']); + break; + case 'save': + $q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET block_content=\''.$db->escape(rawurldecode($_POST['content'])).'\' WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo 'var status=unescape(\''.hexencode($db->get_error()).'\');'; + exit; + } + $q = $db->sql_query('SELECT block_type,block_content FROM '.table_prefix.'sidebar WHERE item_id=' . $db->escape($_GET['id']) . ';'); + if(!$q) + { + echo 'var status=unescape(\''.hexencode($db->get_error()).'\');'; + exit; + } + $row = $db->fetchrow(); + $db->free_result(); + switch($row['block_type']) + { + case BLOCK_WIKIFORMAT: + default: + $c = RenderMan::render($row['block_content']); + break; + case BLOCK_TEMPLATEFORMAT: + $c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl'); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_HTML: + $c = $row['block_content']; + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PHP: + ob_start(); + eval($row['block_content']); + $c = ob_get_contents(); + ob_end_clean(); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PLUGIN: + $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block'; + break; + } + die('var status = \'GOOD\'; var content = unescape(\''.hexencode($c).'\');'); + break; + } + } + + $q = $db->sql_query('SELECT item_id,sidebar_id,item_enabled,block_name,block_type,block_content FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;'); + if(!$q) $db->_die('The sidebar text data could not be selected.'); + + $vars = $template->extract_vars('sidebar-editor.tpl'); + + $parser = $template->makeParserText($vars['sidebar_button']); + $parser->assign_vars(Array( + 'HREF'=>'#', + 'FLAGS'=>'onclick="return false;"', + 'TEXT'=>'Change theme' + )); + $template->tpl_strings['THEME_LINK'] = $parser->run(); + $parser->assign_vars(Array( + 'TEXT'=>'Log out', + )); + $template->tpl_strings['LOGOUT_LINK'] = $parser->run(); + + $n1 = Array(); + $n2 = Array(); + $n =& $n1; + + echo '
'; + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']); + + // Time for the loop + // what this loop does is fetch the row data, then send it out to the appropriate parser for formatting, + // then puts the result into $c, which is then sent to the template compiler for insertion into the TPL code. + while($row = $db->fetchrow()) + { + if(isset($current_side)) + { + if($current_side != $row['sidebar_id']) + { + // Time to switch! + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']); + echo '
'; + //echo '
'; + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']); + $n =& $n2; + } + } + $n[] = count($n); + $current_side = $row['sidebar_id']; + switch($row['block_type']) + { + case BLOCK_WIKIFORMAT: + default: + $parser = $template->makeParserText($vars['sidebar_section']); + $c = RenderMan::render($row['block_content']); + break; + case BLOCK_TEMPLATEFORMAT: + $parser = $template->makeParserText($vars['sidebar_section']); + $c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl'); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_HTML: + $parser = $template->makeParserText($vars['sidebar_section_raw']); + $c = $row['block_content']; + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PHP: + $parser = $template->makeParserText($vars['sidebar_section_raw']); + ob_start(); + eval($row['block_content']); + $c = ob_get_contents(); + ob_end_clean(); + $c = preg_replace('#(.*?)#is', '\\2', $c); + break; + case BLOCK_PLUGIN: + $parser = $template->makeParserText($vars['sidebar_section_raw']); + $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block'; + break; + } + $t = $template->tplWikiFormat($row['block_name']); + if($row['item_enabled'] == 0) $t .= ' (disabled)'; + else $t .= ' '; + $side = ( $row['sidebar_id'] == SIDEBAR_LEFT ) ? SIDEBAR_RIGHT : SIDEBAR_LEFT; + $tb = 'Enable/disable this block + Edit this block + Delete this block + Move this block'; + $as = ''; + $ae = '  '.$tb; + $parser->assign_vars(Array('CONTENT'=>$c,'TITLE'=>$t,'ADMIN_START'=>$as,'ADMIN_END'=>$ae)); + echo $parser->run(); + unset($parser); + + } + $db->free_result(); + //if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']); + echo '
'; + echo '
'; + $order = implode(',', $n1); + echo ""; + $order = implode(',', $n2); + echo ""; + echo ' + +
+ '; + } + + $template->footer(); +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialCSS.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialCSS.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,47 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'CSS\', + \'urlname\'=>\'CSS\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +// function names are IMPORTANT!!! The name pattern is: page__ + +function page_Special_CSS() { + global $db, $session, $paths, $template, $plugins; // Common objects + header('Content-type: text/css'); + if(isset($_GET['printable']) || $paths->getParam(0) == 'printable') { + echo $template->get_css('_printable.css'); + } else { + echo $template->get_css(); + } +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialGroups.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialGroups.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,540 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Group Membership\', + \'urlname\'=>\'Usergroups\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +function page_Special_Usergroups() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $email; // Import e-mail encryption functions + + if ( !$session->user_logged_in ) + { + header('Location: ' . makeUrlComplete('Special', 'Login/' . $paths->page)); + $db->close(); + exit; + } + + $template->header(); + if ( isset($_POST['do_view']) || isset($_POST['do_view_n']) || ( isset($_GET['act']) && isset($_POST['group_id']) ) ) + { + $gid = ( isset ( $_POST['do_view_n'] ) ) ? intval($_POST['group_id_n']) : intval($_POST['group_id']); + if ( empty($gid) || $gid < 1 ) + { + die_friendly('Error', '

Hacking attempt

'); + } + $q = $db->sql_query('SELECT group_name,group_type FROM '.table_prefix.'groups WHERE group_id=' . $gid . ';'); + if ( !$q ) + { + $db->_die(); + } + $row = $db->fetchrow(); + $db->free_result(); + $members = array(); + $pending = array(); + $q = $db->sql_query('SELECT u.username,u.email,u.reg_time,m.member_id,m.user_id,m.is_mod,m.pending,COUNT(c.comment_id) + FROM '.table_prefix.'users AS u + LEFT JOIN '.table_prefix.'group_members AS m + ON ( m.user_id = u.user_id ) + LEFT JOIN '.table_prefix.'comments AS c + ON ( c.name = u.username ) + WHERE m.group_id=' . $gid . ' + GROUP BY u.user_id + ORDER BY m.is_mod DESC,u.username ASC;'); + if ( !$q ) + { + $db->_die(); + } + + $is_member = false; + $is_mod = false; + $is_pending = false; + + while ( $mr = $db->fetchrow() ) + { + if ( $mr['pending'] == 1 ) + { + $pending[] = $mr; + if ( $mr['user_id'] == $session->user_id ) + { + $is_pending = true; + } + } + else + { + $members[] = $mr; + if ( $mr['user_id'] == $session->user_id ) + { + $is_member = true; + if ( $mr['is_mod'] == 1 ) + { + $is_mod = true; + } + } + } + } + + $status = ( $is_member && $is_mod ) + ? 'You are a moderator of this group.' + : ( ( $is_member && !$is_mod ) + ? 'You are a member of this group.' + : 'You are not a member of this group.' + ); + + $can_do_admin_stuff = ( $is_mod || $session->user_level >= USER_LEVEL_ADMIN ); + + switch ( $row['group_type'] ) + { + case GROUP_HIDDEN: $g_state = 'Hidden group'; break; + case GROUP_CLOSED: $g_state = 'Closed group'; break; + case GROUP_REQUEST: $g_state = 'Members can request to join'; break; + case GROUP_OPEN: $g_state = 'Anyone can join'; break; + } + + if ( isset($_GET['act']) && $can_do_admin_stuff ) + { + switch($_GET['act']) + { + case 'update': + if(!in_array(intval($_POST['group_state']), Array(GROUP_CLOSED, GROUP_OPEN, GROUP_HIDDEN, GROUP_REQUEST))) + { + die_friendly('ERROR', '

Hacking attempt

'); + } + $q = $db->sql_query('UPDATE '.table_prefix.'groups SET group_type=' . intval($_POST['group_state']) . ' WHERE group_id=' . intval( $_POST['group_id']) . ';'); + if (!$q) + $db->_die(); + $row['group_type'] = $_POST['group_state']; + echo '
The group state was updated.
'; + break; + case 'adduser': + $username = $_POST['add_username']; + $mod = ( isset($_POST['add_mod']) ) ? '1' : '0'; + + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE username=\'' . $db->escape($username) . '\';'); + if (!$q) + $db->_die(); + if ($db->numrows() < 1) + { + echo '
The username you entered could not be found.
'; + break; + } + $r = $db->fetchrow(); + $db->free_result(); + $uid = intval($r['user_id']); + + // Check if the user is already in the group, and if so, only update modship + $q = $db->sql_query('SELECT member_id,is_mod FROM '.table_prefix.'group_members WHERE user_id=' . $uid . ' AND group_id=' . intval($_POST['group_id']) . ';'); + if ( !$q ) + $db->_die(); + if ( $db->numrows() > 0 ) + { + $r = $db->fetchrow(); + if ( (string) $r['is_mod'] != $mod ) + { + $q = $db->sql_query('UPDATE '.table_prefix.'group_members SET is_mod=' . $mod . ' WHERE member_id=' . $r['member_id'] . ';'); + if ( !$q ) + $db->_die(); + foreach ( $members as $i => $member ) + { + if ( $member['member_id'] == $r['member_id'] ) + $members[$i]['is_mod'] = (int)$mod; + } + echo '
The user "' . $username . '" is already in this group, so their moderator status was updated.
'; + } + else + { + echo '
The user "' . $username . '" is already in this group.
'; + } + break; + } + + $db->free_result(); + + $q = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id,is_mod) VALUES(' . intval($_POST['group_id']) . ', ' . $uid . ', ' . $mod . ');'); + if (!$q) + $db->_die(); + echo '
The user "' . $username . '" has been added to this usergroup.
'; + + $q = $db->sql_query('SELECT u.username,u.email,u.reg_time,m.member_id,m.user_id,m.is_mod,COUNT(c.comment_id) + FROM '.table_prefix.'users AS u + LEFT JOIN '.table_prefix.'group_members AS m + ON ( m.user_id = u.user_id ) + LEFT JOIN '.table_prefix.'comments AS c + ON ( c.name = u.username ) + WHERE m.group_id=' . $gid . ' + AND m.pending!=1 + AND u.user_id=' . $uid . ' + GROUP BY u.user_id + ORDER BY m.is_mod DESC,u.username ASC + LIMIT 1;'); + if ( !$q ) + $db->_die(); + + $r = $db->fetchrow(); + $members[] = $r; + $db->free_result(); + + break; + case 'del_users': + foreach ( $members as $i => $member ) + { + if ( isset($_POST['del_user'][$member['member_id']]) ) + { + $q = $db->sql_query('DELETE FROM '.table_prefix.'group_members WHERE member_id=' . $member['member_id'] . ';'); + if (!$q) + $db->_die(); + unset($members[$i]); + } + } + break; + case 'pending': + foreach ( $pending as $i => $member ) + { + if ( isset( $_POST['with_user'][$member['member_id']]) ) + { + if ( isset ( $_POST['do_appr_pending'] ) ) + { + $q = $db->sql_query('UPDATE '.table_prefix.'group_members SET pending=0 WHERE member_id=' . $member['member_id'] . ';'); + if (!$q) + $db->_die(); + $members[] = $member; + unset($pending[$i]); + continue; + } + elseif ( isset ( $_POST['do_reject_pending'] ) ) + { + $q = $db->sql_query('DELETE FROM '.table_prefix.'group_members WHERE member_id=' . $member['member_id'] . ';'); + if (!$q) + $db->_die(); + unset($pending[$i]); + } + } + } + echo '
Pending members status updated successfully.
'; + break; + } + } + + if ( isset($_GET['act']) && $_GET['act'] == 'update' && !$is_member && $row['group_type'] == GROUP_OPEN ) + { + $q = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id) VALUES(' . $gid . ', ' . $session->user_id . ');'); + if (!$q) + $db->_die(); + echo '
You have been added to this group.
'; + + $q = $db->sql_query('SELECT u.username,u.email,u.reg_time,m.member_id,m.user_id,m.is_mod,COUNT(c.comment_id) + FROM '.table_prefix.'users AS u + LEFT JOIN '.table_prefix.'group_members AS m + ON ( m.user_id = u.user_id ) + LEFT JOIN '.table_prefix.'comments AS c + ON ( c.name = u.username ) + WHERE m.group_id=' . $gid . ' + AND m.pending!=1 + AND u.user_id=' . $session->user_id . ' + GROUP BY u.user_id + ORDER BY m.is_mod DESC,u.username ASC + LIMIT 1;'); + if ( !$q ) + $db->_die(); + + $r = $db->fetchrow(); + $members[] = $r; + $db->free_result(); + + } + + if ( isset($_GET['act']) && $_GET['act'] == 'update' && !$is_member && $row['group_type'] == GROUP_REQUEST && !$is_pending ) + { + $q = $db->sql_query('INSERT INTO '.table_prefix.'group_members(group_id,user_id,pending) VALUES(' . $gid . ', ' . $session->user_id . ', 1);'); + if (!$q) + $db->_die(); + echo '
A request has been sent to the moderator(s) of this group to add you.
'; + } + + $state_btns = ( $can_do_admin_stuff ) ? + ' + + + ' + : $g_state; + if ( !$can_do_admin_stuff && $row['group_type'] == GROUP_REQUEST && !$is_member ) + { + if ( $is_pending ) + $state_btns .= ' (Your request to join is awaiting approval)'; + else + $state_btns .= ' '; + } + + if ( !$can_do_admin_stuff && $row['group_type'] == GROUP_OPEN && !$is_member ) + { + $state_btns .= ' '; + } + + echo '
+
+ + + + + + + + + + + + + + + + + ' . ( ( $is_mod || $session->user_level >= USER_LEVEL_ADMIN ) ? ' + + + + ' : '' ) . ' +
Group information
Group name:' . $row['group_name'] . '
Membership status:' . $status . '
Group state:' . $state_btns . '
+ +
+
+ +
'; + if ( sizeof ( $pending ) > 0 && $can_do_admin_stuff ) + { + echo '
+ +

Pending memberships

+
+ + + + + + + + '; + $cls = 'row2'; + foreach ( $pending as $member ) + { + + $date = date('F d, Y', $member['reg_time']); + $cls = ( $cls == 'row2' ) ? 'row1' : 'row2'; + $addy = $email->encryptEmail($member['email']); + + echo " + + + + + + "; + } + echo '
UsernameE-mailRegisteredTotal commentsSelect
{$member['username']}{$addy}{$date}{$member['COUNT(c.comment_id)']}
+
+
+ With selected: + + +
+
'; + } + echo '
+

Group members

+
+ + + + + + + ' . ( ( $can_do_admin_stuff ) ? " + + " : '' ) . ' + + + + '; + $mod_printed = false; + $mem_printed = false; + $cls = 'row2'; + + foreach ( $members as $member ) + { + if ( $member['is_mod'] != 1 ) + break; + + $date = date('F d, Y', $member['reg_time']); + $cls = ( $cls == 'row2' ) ? 'row1' : 'row2'; + $addy = $email->encryptEmail($member['email']); + + $mod_printed = true; + + echo " + + + + + " . ( ( $can_do_admin_stuff ) ? " + + " : '' ) . " + "; + } + if (!$mod_printed) + echo ''; + echo ''; + foreach ( $members as $member ) + { + if ( $member['is_mod'] == 1 ) + continue; + + $date = date('F d, Y', $member['reg_time']); + $cls = ( $cls == 'row2' ) ? 'row1' : 'row2'; + $addy = $email->encryptEmail($member['email']); + + $mem_printed = true; + + echo " + + + + + " . ( ( $can_do_admin_stuff ) ? " + + " : '' ) . " + "; + } + if (!$mem_printed) + echo ''; + echo '
UsernameE-mailRegisteredTotal commentsRemove?
Group moderators
{$member['username']}{$addy}{$date}{$member['COUNT(c.comment_id)']}
This group has no moderators.
Group members
{$member['username']}{$addy}{$date}{$member['COUNT(c.comment_id)']}
This group has no members.
+
'; + if ( $can_do_admin_stuff ) + { + echo "
"; + } + echo ' +
'; + if ( $can_do_admin_stuff ) + { + echo '
+
+ + + + + + + + + + + + + +
Add a new member to this group
Username:' . $template->username_field('add_username') . '
Group moderator:
+ +
+
+ +
'; + } + } + else + { + echo '
'; + echo '
+ + + + + + + + '; + $taboo = 'WHERE group_name != \'' . implode('\' AND group_name != \'', $taboo) . '\''; + $q = $db->sql_query('SELECT group_id,group_name FROM '.table_prefix.'groups '.$taboo.' AND group_type != ' . GROUP_HIDDEN . ' ORDER BY group_name ASC;'); + if(!$q) + { + echo $db->get_error(); + $template->footer(); + return; + } + if($db->numrows() > 0) + { + echo ' + + + + '; + } + $db->free_result(); + echo '
Group membership details
+ Current group memberships: + '; + $taboo = Array('Everyone'); + if ( sizeof ( $session->groups ) > 0 ) + { + echo ' + '; + } + else + { + echo 'None'; + } + + echo '
+ Non-memberships: + + + +
+
+
'; + } + $template->footer(); +} + +?> diff -r 000000000000 -r 902822492a68 plugins/SpecialPageFuncs.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialPageFuncs.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,365 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Create page\', + \'urlname\'=>\'CreatePage\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'All pages\', + \'urlname\'=>\'AllPages\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'List of special pages\', + \'urlname\'=>\'SpecialPages\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'About Enano\', + \'urlname\'=>\'About_Enano\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'GNU General Public License\', + \'urlname\'=>\'GNU_General_Public_License\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +// function names are IMPORTANT!!! The name pattern is: page__ + +function page_Special_CreatePage() { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( isset($_POST['do']) ) + { + $p = $_POST['pagename']; + $k = array_keys($paths->nslist); + for ( $i = 0; $i < sizeof( $paths->nslist ); $i++ ) + { + $ln = strlen( $paths->nslist[$k[$i]] ); + if ( substr($p, 0, $ln) == $paths->nslist[$k[$i]] ) + { + $namespace = $k[$i]; + } + } + if ( $namespace == 'Special' || ( $namespace == 'System' && $session->user_level < USER_LEVEL_ADMIN ) || $namespace == 'Admin') + { + $template->header(); + + echo '

The page could not be created.

The name "'.$p.'" is invalid.

'; + + $template->footer(); + $db->close(); + + exit; + } + $name = $db->escape(str_replace('_', ' ', $p)); + $urlname = $db->escape(str_replace(' ', '_', $p)); + $namespace = $_POST['namespace']; + if ( $namespace == 'Special' || ( $namespace == 'System' && $session->user_level < USER_LEVEL_ADMIN ) || $namespace == 'Admin') + { + $template->header(); + + echo '

The page could not be created.

The name "'.$paths->nslist[$namespace].$p.'" is invalid.

'; + + $template->footer(); + $db->close(); + + exit; + } + + $tn = $paths->nslist[$_POST['namespace']] . $urlname; + if ( isset($paths->pages[$tn]) ) + { + die_friendly('Error creating page', '

The page already exists.

'); + } + + if ( $paths->nslist[$namespace] == substr($urlname, 0, strlen($paths->nslist[$namespace]) ) ) + { + $urlname = substr($urlname, strlen($paths->nslist[$namespace]), strlen($urlname)); + } + + $k = array_keys( $paths->nslist ); + if(!in_array($_POST['namespace'], $k)) + { + $db->_die('An SQL injection attempt was caught at '.dirname(__FILE__).':'.__LINE__.'.'); + } + + $perms = $session->fetch_page_acl($urlname, $namespace); + if ( !$perms->get_permissions('create_page') ) + die_friendly('Error creating page', '

An access control rule is preventing you from creating pages.

'); + + $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.time().', \''.date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\');'); + if ( !$q ) + { + $db->_die('The page log could not be updated.'); + } + + $q = $db->sql_query('INSERT INTO '.table_prefix.'pages(name,urlname,namespace) VALUES(\''.$name.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\');'); + if ( !$q ) + { + $db->_die('The page entry could not be inserted.'); + } + $q = $db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text) VALUES(\''.$urlname.'\', \''.$_POST['namespace'].'\', \''.$db->escape('Please edit this page! ').'\');'); + if ( !$q ) + { + $db->_die('The page text entry could not be inserted.'); + } + + header('Location: '.makeUrl($paths->nslist[$_POST['namespace']].$p)); + exit; + } + $template->header(); + if ( !$session->get_permissions('create_page') ) + { + echo 'Wiki mode is disabled, only admins can create pages.'; + + $template->footer(); + $db->close(); + + exit; + } + echo RenderMan::render('Using the form below you can create a page.'); + ?> +
+

+

+

+
+ footer(); +} + +function page_Special_AllPages() +{ + // This should be an easy one + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + $sz = sizeof( $paths->pages ) / 2; + echo '

Below is a list of all of the pages on this website.

'; + $cclass = 'row1'; + for ( $i = 0; $i < $sz; $i = $i ) + { + if ( $cclass == 'row1') + { + $cclass='row3'; + } + else if ( $cclass == 'row3') + { + $cclass='row1'; + } + echo ''; + for ( $j = 0; $j < 2; $j = $j ) + { + if ( $i < $sz && $paths->pages[$i]['namespace'] != 'Special' && $paths->pages[$i]['namespace'] != 'Admin' && $paths->pages[$i]['visible'] == 1) + { + echo ''; + $j++; + } + else if ( $i >= $sz ) + { + echo ''; + $j++; + } + $i++; + } + echo ''; + } + echo '
'; + if ( $paths->pages[$i]['namespace'] != 'Article' ) + { + echo '('.$paths->pages[$i]['namespace'].') '; + } + echo $paths->pages[$i]['name'].'
'; + $template->footer(); +} + +function page_Special_SpecialPages() +{ + // This should be an easy one + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + $sz = sizeof($paths->pages) / 2; + echo '

Below is a list of all of the special pages on this website.

'; + $cclass='row1'; + for ( $i = 0; $i < $sz; $i = $i) + { + if ( $cclass == 'row1' ) + { + $cclass = 'row3'; + } + else if ( $cclass == 'row3') + { + $cclass='row1'; + } + echo ''; + for ( $j = 0; $j < 2; $j = $j ) + { + if ( $i < $sz && $paths->pages[$i]['namespace'] == 'Special' && $paths->pages[$i]['visible'] == 1) + { + echo ''; + $j++; + } + else if ( $i >= $sz ) + { + echo ''; + $j++; + } + $i++; + } + echo ''; + } + echo '
'; + echo $paths->pages[$i]['name'].'
'; + $template->footer(); +} + +function page_Special_About_Enano() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $platform = 'Unknown'; + $uname = @file_get_contents('/proc/sys/kernel/ostype'); + if($uname == "Linux\n") + $platform = 'Linux'; + else if(file_exists('/hurd/pfinet')) // I have a little experience with GNU/Hurd :-) http://hurdvm.enanocms.org/ + $platform = 'GNU/Hurd'; + else if(file_exists('C:\Windows\system32\ntoskrnl.exe')) + $platform = 'Windows NT'; + else if(file_exists('C:\Windows\system\krnl386.exe')) + $platform = 'Windows 9x/DOS'; + else if(file_exists('/bin/bash')) + $platform = 'Other GNU/Mac OS X'; + else if(is_dir('/bin')) + $platform = 'Other POSIX'; + $template->header(); + ?> +
+
+ + + + + + + + + + + +
About the Enano Content Management System

This website is powered by Enano, the lightweight and open source + CMS that everyone can use. Enano is copyright © 2006 Dan Fuhry. For legal information, along with a list of libraries that Enano + uses, please see Legal Information.

+

The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified, + distributed, and used to create derivative works. For more information about Free Software, check out the + Wikipedia page or + the Free Software Foundation's homepage.

+

This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.

+

You should have received a copy of + the GNU General Public License along with this program; if not, write to:

+

Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor
+ Boston, MA 02110-1301, USA

+

Alternatively, you can read it online.

+
+ + + + + + +
+ + Powered by Enano + + + + Written in PHP + + + + Database engine powered by MySQL + +
+
Enano version:
Web server:
Server platform:
PHP version:
MySQL version:_conn); ?>
+
+ footer(); +} + +function page_Special_GNU_General_Public_License() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + if(file_exists(ENANO_ROOT.'/GPL')) + { + echo '

The following text represents the license that the Enano content management system is under. To make it easier to read, the text has been wiki-formatted; in no other way has it been changed.

'; + echo RenderMan::render( htmlspecialchars ( file_get_contents ( ENANO_ROOT . '/GPL' ) ) ); + } + else + { + echo '

It appears that the file "GPL" is missing from your Enano installation. You may find a wiki-formatted copy of the GPL at: http://www.enanocms.org/GPL.

'; + } + $template->footer(); +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialSearch.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialSearch.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,511 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Rebuild search index\', + \'urlname\'=>\'SearchRebuild\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Search\', + \'urlname\'=>\'Search\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +function page_Special_SearchRebuild() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if(!$session->get_permissions('mod_misc')) die_friendly('Unauthorized', '

You need to be an administrator to rebuild the search index

'); + $template->header(); + if($paths->rebuild_search_index()) + echo '

Index rebuilt!

'; + else + echo '

Index was not rebuilt due to an error.'; + $template->footer(); +} + +function page_Special_Search() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if(!$q = $paths->getParam(0)) $q = ( isset($_GET['q']) ) ? $_GET['q'] : false; + if(isset($_GET['words_any'])) + { + $q = ''; + if(!empty($_GET['words_any'])) + { + $q .= $_GET['words_any'] . ' '; + } + if(!empty($_GET['exact_phrase'])) + { + $q .= '"' . $_GET['exact_phrase'] . '" '; + } + if(!empty($_GET['exclude_words'])) + { + $not = explode(' ', $_GET['exclude_words']); + foreach ( $not as $i => $foo ) + { + $not[$i] = '-' . $not[$i]; + } + $q .= implode(' ', $not); + } + if(!empty($_GET['require_words'])) + { + $req = explode(' ', $_GET['require_words']); + foreach ( $req as $i => $foo ) + { + $req[$i] = '+' . $req[$i]; + } + $q .= implode(' ', $req); + } + } + $template->header(); + if(!empty($q)) + { + switch(SEARCH_MODE) + { + + case "FULLTEXT": + if ( isset($_GET['offset']) ) + { + $offset = intval($_GET['offset']); + } + else + { + $offset = 0; + } + $sql = $db->sql_query('SELECT search_id FROM '.table_prefix.'search_cache WHERE query=\''.$db->escape($q).'\';'); + if(!$sql) + { + $db->_die('Error scanning search query cache'); + } + if($db->numrows() > 0) + { + $row = $db->fetchrow(); + $db->free_result(); + search_fetch_fulltext_results(intval($row['search_id']), $offset); + } + else + { + // Perform search + + $search = new MySQL_Fulltext_Search(); + + // Parse the query + $parse = new Searcher(); + $query = $parse->parseQuery($q); + unset($parse); + + // Send query to MySQL + $sql = $search->search($q); + $results = Array(); + if ( $row = $db->fetchrow($sql) ) + { + do { + $results[] = $row; + } while ( $row = $db->fetchrow($sql) ); + } + else + { + // echo '

No pages that matched your search criteria could be found.
'; + } + $texts = Array(); + foreach ( $results as $result ) + { + $texts[] = render_fulltext_result($result, $query); + } + + // Store the result in the search cache...if someone makes the same query later we can skip searching and rendering + // This cache is cleared when an affected page is saved. + + $results = serialize($texts); + + $sql = $db->sql_query('INSERT INTO '.table_prefix.'search_cache(search_time,query,results) VALUES('.time().', \''.$db->escape($q).'\', \''.$db->escape($results).'\');'); + if($sql) + { + search_render_fulltext_results(unserialize($results), $offset, $q); + } + else + { + $db->_die('Error inserting search into cache'); + } + + } + break; + + case "BUILTIN": + $titles = $paths->makeTitleSearcher(isset($_GET['match_case'])); + if ( isset($_GET['offset']) ) + { + $offset = intval($_GET['offset']); + } + else + { + $offset = 0; + } + $sql = $db->sql_query('SELECT search_id FROM '.table_prefix.'search_cache WHERE query=\''.$db->escape($q).'\';'); + if(!$sql) + { + $db->_die('Error scanning search query cache'); + } + if($db->numrows() > 0) + { + $row = $db->fetchrow(); + $db->free_result(); + search_show_results(intval($row['search_id']), $offset); + } + else + { + $titles->search($q, $paths->get_page_titles()); + $search = $paths->makeSearcher(isset($_GET['match_case'])); + $texts = $paths->fetch_page_search_resource(); + $search->searchMySQL($q, $texts); + + $results = Array(); + $results['text'] = $search->results; + $results['page'] = $titles->results; + $results['warn'] = $search->warnings; + + $results = serialize($results); + + $sql = $db->sql_query('INSERT INTO '.table_prefix.'search_cache(search_time,query,results) VALUES('.time().', \''.$db->escape($q).'\', \''.$db->escape($results).'\');'); + if($sql) + { + search_render_results(unserialize($results), $offset, $q); + } + else + { + $db->_die('Error inserting search into cache'); + } + } + break; + } + $code = $plugins->setHook('search_results'); // , Array('query'=>$q)); + foreach ( $code as $cmd ) + { + eval($cmd); + } + ?> +
+

+ Advanced Search +

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Advanced Search
Search for pages with any of these words:
with this exact phrase:
with none of these words:
with all of these words:
+ + + +
+ + +
+
+
+ footer(); +} + +function search_show_results($search_id, $start = 0) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $q = $db->sql_query('SELECT query,results,search_time FROM '.table_prefix.'search_cache WHERE search_id='.intval($search_id).';'); + if(!$q) + return $db->get_error('Error selecting cached search results'); + $row = $db->fetchrow(); + $db->free_result(); + $results = unserialize($row['results']); + search_render_results($results, $start, $row['query']); +} + +function search_render_results($results, $start = 0, $q = '') +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $nr1 = sizeof($results['page']); + $nr2 = sizeof($results['text']); + $nr = ( $nr1 > $nr2 ) ? $nr1 : $nr2; + $results['page'] = array_slice($results['page'], $start, SEARCH_RESULTS_PER_PAGE); + $results['text'] = array_slice($results['text'], $start, SEARCH_RESULTS_PER_PAGE); + + // Pagination + $pagination = ''; + if ( $nr1 > SEARCH_RESULTS_PER_PAGE || $nr2 > SEARCH_RESULTS_PER_PAGE ) + { + $pagination .= '
+ + + '; + $num_pages = ceil($nr / SEARCH_RESULTS_PER_PAGE); + $j = 0; + for ( $i = 1; $i <= $num_pages; $i++ ) + { + if ($j == $start) + $pagination .= ''; + else + $pagination .= ''; + $j = $j + SEARCH_RESULTS_PER_PAGE; + } + $pagination .= '
Page:' . $i . '' . $i . '
'; + } + + echo $pagination; + + if ( $nr1 >= $start ) + { + echo '

Page title matches

'; + if(count($results['page']) < 1) + { + echo '
No pages with a title that matched your search criteria could be found.
'; + } + else + { + echo '

'; + foreach($results['page'] as $page => $text) + { + echo ''.$paths->pages[$page]['name'].'
'; + } + echo '

'; + } + } + if ( $nr2 >= $start ) + { + echo '

Page text matches

'; + if(count($results['text']) < 1) + { + echo '
No page text that matched your search criteria could be found.
'; + } + else + { + foreach($results['text'] as $kpage => $text) + { + preg_match('#^ns=('.implode('|', array_keys($paths->nslist)).');pid=(.*?)$#i', $kpage, $matches); + $page = $paths->nslist[$matches[1]] . $matches[2]; + echo '

'.$paths->pages[$page]['name'].'
'.$text.'

'; + } + } + } + if(count($results['warn']) > 0) + echo '
Your search may not include all results.
The following errors were encountered during the search:
  • '.implode('
  • ', $results['warn']).'
'; + echo $pagination; +} + +function render_fulltext_result($result, $query) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + preg_match('#^ns=('.implode('|', array_keys($paths->nslist)).');pid=(.*?)$#i', $result['page_identifier'], $matches); + $page = $paths->nslist[$matches[1]] . $matches[2]; + //$score = round($result['score'] * 100, 1); + $score = number_format($result['score'], 2); + $char_length = $result['length']; + $result_template = << +

{TITLE}

+

{TEXT}

+

+ {NAMESPACE} - Relevance score: {SCORE} ({LENGTH} bytes) +

+
+TPLCODE; + $parser = $template->makeParserText($result_template); + + $pt =& $result['page_text']; + $space_chars = Array("\t", "\n", "\r", " "); + + $words = array_merge($query['any'], $query['req']); + $pt = htmlspecialchars($pt); + $words2 = array(); + + for ( $i = 0; $i < sizeof($words); $i++) + { + if(!empty($words[$i])) + $words2[] = preg_quote($words[$i]); + } + + $regex = '/(' . implode('|', $words2) . ')/i'; + $pt = preg_replace($regex, '\\1', $pt); + + $title = preg_replace($regex, '\\1', $paths->pages[$page]['name']); + + $cut_off = false; + + foreach ( $words as $word ) + { + // Boldface searched words + $ptlen = strlen($pt); + for ( $i = 0; $i < $ptlen; $i++ ) + { + $len = strlen($word); + if ( strtolower(substr($pt, $i, $len)) == strtolower($word) ) + { + $chunk1 = substr($pt, 0, $i); + $chunk2 = substr($pt, $i, $len); + $chunk3 = substr($pt, ( $i + $len )); + $pt = $chunk1 . $chunk2 . $chunk3; + $ptlen = strlen($pt); + // Cut off text to 150 chars or so + if ( !$cut_off ) + { + $cut_off = true; + if ( $i - 75 > 0 ) + { + // Navigate backwards until a space character is found + $chunk = substr($pt, 0, ( $i - 75 )); + $final_chunk = $chunk; + for ( $j = strlen($chunk); $j > 0; $j = $j - 1 ) + { + if ( in_array($chunk{$j}, $space_chars) ) + { + $final_chunk = substr($chunk, $j + 1); + break; + } + } + $mid_chunk = substr($pt, ( $i - 75 ), 75); + + $clipped = '...' . $final_chunk . $mid_chunk . $chunk2; + + $chunk = substr($pt, ( $i + strlen($chunk2) + 75 )); + $final_chunk = $chunk; + for ( $j = 0; $j < strlen($chunk); $j++ ) + { + if ( in_array($chunk{$j}, $space_chars) ) + { + $final_chunk = substr($chunk, 0, $j); + break; + } + } + + $end_chunk = substr($pt, ( $i + strlen($chunk2) ), 75 ); + + $clipped .= $end_chunk . $final_chunk . '...'; + + $pt = $clipped; + } + else if ( strlen($pt) > 200 ) + { + $mid_chunk = substr($pt, ( $i - 75 ), 75); + + $clipped = $chunk1 . $chunk2; + + $chunk = substr($pt, ( $i + strlen($chunk2) + 75 )); + $final_chunk = $chunk; + for ( $j = 0; $j < strlen($chunk); $j++ ) + { + if ( in_array($chunk{$j}, $space_chars) ) + { + $final_chunk = substr($chunk, 0, $j); + break; + } + } + + $end_chunk = substr($pt, ( $i + strlen($chunk2) ), 75 ); + + $clipped .= $end_chunk . $final_chunk . '...'; + + $pt = $clipped; + + } + break 2; + } + } + } + $cut_off = false; + } + + $parser->assign_vars(Array( + 'TITLE' => $title, + 'TEXT' => $pt, + 'NAMESPACE' => $matches[1], + 'SCORE' => $score, + 'LENGTH' => $char_length, + 'HREF' => makeUrl($page) + )); + + return $parser->run(); + +} + +function search_fetch_fulltext_results($search_id, $offset = 0) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $q = $db->sql_query('SELECT query,results,search_time FROM '.table_prefix.'search_cache WHERE search_id='.intval($search_id).';'); + if(!$q) + return $db->get_error('Error selecting cached search results'); + $row = $db->fetchrow(); + $db->free_result(); + $results = unserialize($row['results']); + search_render_fulltext_results($results, $offset, $row['query']); +} + +function search_render_fulltext_results($results, $offset = 0, $query) +{ + $num_results = sizeof($results); + $slice = array_slice($results, $offset, SEARCH_RESULTS_PER_PAGE); + + if ( $num_results < 1 ) + { + echo '
No pages that matched your search criteria could be found.
'; + return null; + } + + $html = paginate_array($results, sizeof($results), makeUrlNS('Special', 'Search', 'q=' . urlencode($query) . '&offset=%s'), $offset, 10); + echo $html . '
'; + +} + +?> diff -r 000000000000 -r 902822492a68 plugins/SpecialUpdownload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialUpdownload.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,300 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Upload file\', + \'urlname\'=>\'UploadFile\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Download file\', + \'urlname\'=>\'DownloadFile\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +function page_Special_UploadFile() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $mime_types; + if(getConfig('enable_uploads')!='1') { die_friendly('Access denied', '

File uploads are disabled this website.

'); } + if ( !$session->get_permissions('upload_files') ) + { + die_friendly('Access denied', '

File uploads are disabled for your user account or group.

'); + } + if(isset($_POST['doit'])) + { + if(isset($_FILES['data'])) + { + $file =& $_FILES['data']; + } + else + { + $file = false; + } + if(!is_array($file)) die_friendly('Upload failed', '

The server could not retrieve the array $_FILES[\'data\'].

'); + if($file['size'] == 0 || $file['size'] > (int)getConfig('max_file_size')) die_friendly('Upload failed', '

The file you uploaded is either too large or 0 bytes in length.

'); + /* + $allowed_mime_types = Array( + 'text/plain', + 'image/png', + 'image/jpeg', + 'image/tiff', + 'image/gif', + 'text/html', // Safe because the file is stashed in the database + 'application/x-bzip2', + 'application/x-gzip', + 'text/x-c++' + ); + if(function_exists('finfo_open') && $fi = finfo_open(FILEINFO_MIME, ENANO_ROOT.'/includes/magic')) // First try to use the fileinfo extension, this is the best way to determine the mimetype + { + if(!$fi) die_friendly('Upload failed', '

Enano was unable to determine the format of the uploaded file.

'.@finfo_file($fi, $file['tmp_name']).'

'); + $type = @finfo_file($fi, $file['tmp_name']); + @finfo_close($fi); + } + elseif(function_exists('mime_content_type')) + $type = mime_content_type($file['tmp_name']); // OK, no fileinfo function. Use a (usually) built-in PHP function + elseif(isset($file['type'])) + $type = $file['type']; // LAST RESORT: use the mimetype the browser sent us, though this is likely to be spoofed + else // DANG! Not even the browser told us. Bail out. + die_friendly('Upload failed', '

Enano was unable to determine the format of the uploaded file.

'); + */ + $types = fetch_allowed_extensions(); + $ext = substr($file['name'], strrpos($file['name'], '.')+1, strlen($file['name'])); + if(!isset($types[$ext]) || ( isset($types[$ext]) && !$types[$ext] ) ) + { + die_friendly('Upload failed', '

The file type ".'.$ext.'" is not allowed.

'); + } + $type = $mime_types[$ext]; + //$type = explode(';', $type); $type = $type[0]; + //if(!in_array($type, $allowed_mime_types)) die_friendly('Upload failed', '

The file type "'.$type.'" is not allowed.

'); + if($_POST['rename'] != '') + { + $filename = $_POST['rename']; + } + else + { + $filename = $file['name']; + } + $bad_chars = Array(':', '\\', '/', '<', '>', '|', '*', '?', '"', '#', '+'); + foreach($bad_chars as $ch) + { + if(strstr($filename, $ch) || preg_match('/^([ ]+)$/is', $filename)) die_friendly('Upload failed', '

The filename contains invalid characters.

'); + } + + if ( isset ( $paths->pages[ $paths->nslist['File'] . $filename ] ) && !isset ( $_POST['update'] ) ) + { + die_friendly('Upload failed', '

The file already exists. You can upload a new version of this file.

'); + } + else if ( isset($_POST['update']) && + ( !isset($paths->pages[$paths->nslist['File'].$filename]) || + (isset($paths->pages[$paths->nslist['File'].$filename]) && + $paths->pages[$paths->nslist['File'].$filename]['protected'] == 1 ) + ) + ) + { + die_friendly('Upload failed', '

Either the file does not exist (and therefore cannot be updated) or the file is protected.

'); + } + + $utime = time(); + + $filename = $db->escape($filename); + $ext = substr($filename, strrpos($filename, '.'), strlen($filename)); + $flen = filesize($file['tmp_name']); + + $comments = $db->escape(RenderMan::strip_php($_POST['comments'])); + $chartag = sha1(microtime()); + $urln = str_replace(' ', '_', $filename); + + $key = md5($filename . '_' . file_get_contents($file['tmp_name'])); + $targetname = ENANO_ROOT . '/files/' . $key . '_' . $utime . $ext; + + if(!@move_uploaded_file($file['tmp_name'], $targetname)) + { + die_friendly('Upload failed', '

Could not move uploaded file to the new location.

'); + } + + if(getConfig('file_history') != '1') + { + if(!$db->sql_query('DELETE FROM '.table_prefix.'files WHERE filename=\''.$filename.'\' LIMIT 1;')) $db->_die('The old file data could not be deleted.'); + } + if(!$db->sql_query('INSERT INTO '.table_prefix.'files(time_id,page_id,filename,size,mimetype,file_extension,file_key) VALUES('.$utime.', \''.$urln.'\', \''.$filename.'\', '.$flen.', \''.$type.'\', \''.$ext.'\', \''.$key.'\')')) $db->_die('The file data entry could not be inserted.'); + if(!isset($_POST['update'])) + { + if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.$utime.', \''.date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\');')) $db->_die('The page log could not be updated.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'pages(name,urlname,namespace,protected,delvotes,delvote_ips) VALUES(\''.$filename.'\', \''.$urln.'\', \'File\', 0, 0, \'\')')) $db->_die('The page listing entry could not be inserted.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text,char_tag) VALUES(\''.$urln.'\', \'File\', \''.$comments.'\', \''.$chartag.'\')')) $db->_die('The page text entry could not be inserted.'); + } + else + { + if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace,edit_summary) VALUES('.$utime.', \''.date('d M Y h:i a').'\', \'page\', \'reupload\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\', \''.$comments.'\');')) $db->_die('The page log could not be updated.'); + } + die_friendly('Upload complete', '

Your file has been uploaded successfully. View the file\'s page.

'); + } + else + { + $template->header(); + $fn = $paths->getParam(0); + if ( $fn && !$session->get_permissions('upload_new_version') ) + { + die_friendly('Access denied', '

Uploading new versions of files has been disabled for your user account or group.

'); + } + ?> +

Using this form you can upload a file to the site.

+

The maximum file size is = 1048576) + { + $fs = round($fs / 1048576, 1); + echo ' ('.$fs.' MB)'; + } + elseif($fs >= 1024) + { + $fs = round($fs / 1024, 1); + echo ' ('.$fs.' KB)'; + } + ?>.

+
+ + + + '; + else echo ''; + ?> + +
File:
Rename to: />
Comments:
(can be wiki-formatted)
Reason for uploading the new version:
+ '; + ?> + +
+
+ footer(); + } +} + +function page_Special_DownloadFile() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $do_gzip; + $filename = rawurldecode($paths->getParam(0)); + $timeid = $paths->getParam(1); + if($timeid && preg_match('#^([0-9]+)$#', (string)$timeid)) $tid = ' AND time_id='.$timeid; + else $tid = ''; + $filename = $db->escape($filename); + $q = $db->sql_query('SELECT page_id,size,mimetype,time_id,file_extension,file_key FROM '.table_prefix.'files WHERE filename=\''.$filename.'\''.$tid.' ORDER BY time_id DESC;'); + if(!$q) $db->_die('The file data could not be selected.'); + if($db->numrows() < 1) { header('HTTP/1.1 404 Not Found'); die_friendly('File not found', '

The file "'.$filename.'" cannot be found.

'); } + $row = $db->fetchrow(); + $db->free_result(); + + // Check permissions + $perms = $session->fetch_page_acl($row['page_id'], 'File'); + if ( !$perms->get_permissions('read') ) + { + die_friendly('Access denied', '

Access to the specified file is denied.

'); + } + + $fname = ENANO_ROOT . '/files/' . $row['file_key'] . '_' . $row['time_id'] . $row['file_extension']; + $data = file_get_contents($fname); + if(isset($_GET['preview']) && getConfig('enable_imagemagick')=='1' && file_exists(getConfig('imagemagick_path')) && substr($row['mimetype'], 0, 6) == 'image/') + { + $nam = tempnam('/tmp', $filename); + $h = @fopen($nam, 'w'); + if(!$h) die('Error opening '.$nam.' for writing'); + fwrite($h, $data); + fclose($h); + /* Make sure the request doesn't contain commandline injection - yow! */ + if(!isset($_GET['width' ]) || (isset($_GET['width'] ) && !preg_match('#^([0-9]+)$#', $_GET['width'] ))) $width = '320'; else $width = $_GET['width' ]; + if(!isset($_GET['height']) || (isset($_GET['height']) && !preg_match('#^([0-9]+)$#', $_GET['height'] ))) $height = '240'; else $height = $_GET['height']; + $cache_filename=ENANO_ROOT.'/cache/'.$filename.'-'.$row['time_id'].'-'.$width.'x'.$height.$row['file_extension']; + if(getConfig('cache_thumbs')=='1' && file_exists($cache_filename) && is_writable(ENANO_ROOT.'/cache')) { + $data = file_get_contents($cache_filename); + } elseif(getConfig('enable_imagemagick')=='1' && file_exists(getConfig('imagemagick_path'))) { + // Use ImageMagick to convert the image + //unlink($nam); + error_reporting(E_ALL); + $cmd = ''.getConfig('imagemagick_path').' "'.$nam.'" -resize "'.$width.'x'.$height.'>" "'.$nam.'.scaled'.$row['file_extension'].'"'; + system($cmd, $stat); + if(!file_exists($nam.'.scaled'.$row['file_extension'])) die('Failed to call ImageMagick (return value '.$stat.'), command line was:
'.$cmd); + $data = file_get_contents($nam.'.scaled'.$row['file_extension']); + // Be stingy about it - better to re-generate the image hundreds of times than to fail completely + if(getConfig('cache_thumbs')=='1' && !file_exists($cache_filename)) { + // Write the generated thumbnail to the cache directory + $h = @fopen($cache_filename, 'w'); + if(!$h) die('Error opening cache file "'.$cache_filename.'" for writing.'); + fwrite($h, $data); + fclose($h); + } + } + unlink($nam); + } + $len = strlen($data); + header('Content-type: '.$row['mimetype']); + if(isset($_GET['download'])) header('Content-disposition: attachment, filename="'.$filename.'";'); + header('Content-length: '.$len); + header('Last-Modified: '.date('r', $row['time_id'])); + echo($data); + + // + // Compress buffered output if required and send to browser + // + if ( $do_gzip ) + { + // + // Copied from phpBB, which was in turn borrowed from php.net + // + $gzip_contents = ob_get_contents(); + ob_end_clean(); + + $gzip_size = strlen($gzip_contents); + $gzip_crc = crc32($gzip_contents); + + $gzip_contents = gzcompress($gzip_contents, 9); + $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); + + header('Content-encoding: gzip'); + echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; + echo $gzip_contents; + echo pack('V', $gzip_crc); + echo pack('V', $gzip_size); + } + + exit; + +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialUpdownload.php~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialUpdownload.php~ Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,285 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Upload file\', + \'urlname\'=>\'UploadFile\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Download file\', + \'urlname\'=>\'DownloadFile\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +function page_Special_UploadFile() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $mime_types; + if(getConfig('enable_uploads')!='1') { die_friendly('Access denied', '

File uploads are disabled this website.

'); } + if ( !$session->get_permissions('upload_files') ) + { + die_friendly('Access denied', '

File uploads are disabled for your user account or group.

'); + } + if(isset($_POST['doit'])) + { + if(isset($_FILES['data'])) + { + $file =& $_FILES['data']; + } + else + { + $file = false; + } + if(!is_array($file)) die_friendly('Upload failed', '

The server could not retrieve the array $_FILES[\'data\'].

'); + if($file['size'] == 0 || $file['size'] > (int)getConfig('max_file_size')) die_friendly('Upload failed', '

The file you uploaded is either too large or 0 bytes in length.

'); + /* + $allowed_mime_types = Array( + 'text/plain', + 'image/png', + 'image/jpeg', + 'image/tiff', + 'image/gif', + 'text/html', // Safe because the file is stashed in the database + 'application/x-bzip2', + 'application/x-gzip', + 'text/x-c++' + ); + if(function_exists('finfo_open') && $fi = finfo_open(FILEINFO_MIME, ENANO_ROOT.'/includes/magic')) // First try to use the fileinfo extension, this is the best way to determine the mimetype + { + if(!$fi) die_friendly('Upload failed', '

Enano was unable to determine the format of the uploaded file.

'.@finfo_file($fi, $file['tmp_name']).'

'); + $type = @finfo_file($fi, $file['tmp_name']); + @finfo_close($fi); + } + elseif(function_exists('mime_content_type')) + $type = mime_content_type($file['tmp_name']); // OK, no fileinfo function. Use a (usually) built-in PHP function + elseif(isset($file['type'])) + $type = $file['type']; // LAST RESORT: use the mimetype the browser sent us, though this is likely to be spoofed + else // DANG! Not even the browser told us. Bail out. + die_friendly('Upload failed', '

Enano was unable to determine the format of the uploaded file.

'); + */ + $types = fetch_allowed_extensions(); + $ext = substr($file['name'], strrpos($file['name'], '.')+1, strlen($file['name'])); + if(!isset($types[$ext]) || ( isset($types[$ext]) && !$types[$ext] ) ) + { + die_friendly('Upload failed', '

The file type ".'.$ext.'" is not allowed.

'); + } + $type = $mime_types[$ext]; + //$type = explode(';', $type); $type = $type[0]; + //if(!in_array($type, $allowed_mime_types)) die_friendly('Upload failed', '

The file type "'.$type.'" is not allowed.

'); + if($_POST['rename'] != '') + { + $filename = $_POST['rename']; + } else { + $filename = $file['name']; + } + $bad_chars = Array(':', '\\', '/', '<', '>', '|', '*', '?', '"', '#', '+'); + foreach($bad_chars as $ch) + { + if(strstr($filename, $ch) || preg_match('/^([ ]+)$/is', $filename)) die_friendly('Upload failed', '

The filename contains invalid characters.

'); + } + + if(isset($paths->pages[$paths->nslist['File'].$filename]) && !isset($_POST['update'])) die_friendly('Upload failed', '

The file already exists. You can upload a new version of this file.

'); + elseif( isset($_POST['update']) && + (!isset($paths->pages[$paths->nslist['File'].$filename]) || + (isset($paths->pages[$paths->nslist['File'].$filename]) && + $paths->pages[$paths->nslist['File'].$filename]['protected']==1) + ) + ) + die_friendly('Upload failed', '

Either the file does not exist (and therefore cannot be updated) or the file is protected.

'); + + $utime = time(); + + $filename = $db->escape($filename); + $ext = substr($filename, strrpos($filename, '.'), strlen($filename)); + $flen = filesize($file['tmp_name']); + + $comments = $db->escape(RenderMan::strip_php($_POST['comments'])); + $chartag = sha1(microtime()); + $urln = str_replace(' ', '_', $filename); + + $key = md5($filename . '_' . file_get_contents($file['tmp_name'])); + $targetname = ENANO_ROOT . '/files/' . $key . '_' . $utime . $ext; + + if(!@move_uploaded_file($file['tmp_name'], $targetname)) + { + die_friendly('Upload failed', '

Could not move uploaded file to the new location.

'); + } + + if(getConfig('file_history') != '1') + if(!$db->sql_query('DELETE FROM '.table_prefix.'files WHERE filename=\''.$filename.'\' LIMIT 1;')) $db->_die('The old file data could not be deleted.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'files(time_id,page_id,filename,size,mimetype,file_extension,file_key) VALUES('.$utime.', \''.$urln.'\', \''.$filename.'\', '.$flen.', \''.$type.'\', \''.$ext.'\', \''.$key.'\')')) $db->_die('The file data entry could not be inserted.'); + if(!isset($_POST['update'])) + { + if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.$utime.', \''.date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\');')) $db->_die('The page log could not be updated.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'pages(name,urlname,namespace,protected,delvotes,delvote_ips) VALUES(\''.$filename.'\', \''.$urln.'\', \'File\', 0, 0, \'\')')) $db->_die('The page listing entry could not be inserted.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text,char_tag) VALUES(\''.$urln.'\', \'File\', \''.$comments.'\', \''.$chartag.'\')')) $db->_die('The page text entry could not be inserted.'); + } else { + if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace,edit_summary) VALUES('.$utime.', \''.date('d M Y h:i a').'\', \'page\', \'reupload\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\', \''.$comments.'\');')) $db->_die('The page log could not be updated.'); + } + die_friendly('Upload complete', '

Your file has been uploaded successfully. View the file\'s page.

'); + } else { + $template->header(); + $fn = $paths->getParam(0); + if ( $fn && !$session->get_permissions('upload_new_version') ) + { + die_friendly('Access denied', '

Uploading new versions of files has been disabled for your user account or group.

'); + } + ?> +

Using this form you can upload a file to the site.

+

The maximum file size is = 1048576) + { + $fs = round($fs / 1048576, 1); + echo ' ('.$fs.' MB)'; + } elseif($fs >= 1024) { + $fs = round($fs / 1024, 1); + echo ' ('.$fs.' KB)'; + } + ?>.

+
+ + + + '; + else echo ''; + ?> + +
File:
Rename to: />
Comments:
(can be wiki-formatted)
Reason for uploading the new version:
+ '; + ?> + +
+
+ footer(); + } +} + +function page_Special_DownloadFile() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $do_gzip; + $filename = rawurldecode($paths->getParam(0)); + $timeid = $paths->getParam(1); + if($timeid && preg_match('#^([0-9]+)$#', (string)$timeid)) $tid = ' AND time_id='.$timeid; + else $tid = ''; + $filename = $db->escape($filename); + $q = $db->sql_query('SELECT page_id,size,mimetype,time_id,file_extension,file_key FROM '.table_prefix.'files WHERE filename=\''.$filename.'\''.$tid.' ORDER BY time_id DESC;'); + if(!$q) $db->_die('The file data could not be selected.'); + if($db->numrows() < 1) { header('HTTP/1.1 404 Not Found'); die_friendly('File not found', '

The file "'.$filename.'" cannot be found.

'); } + $row = $db->fetchrow(); + $db->free_result(); + + // Check permissions + $perms = $session->fetch_page_acl($row['page_id'], 'File'); + if ( !$perms->get_permissions('read') ) + { + die_friendly('Access denied', '

Access to the specified file is denied.

'); + } + + $fname = ENANO_ROOT . '/files/' . $row['file_key'] . '_' . $row['time_id'] . $row['file_extension']; + $data = file_get_contents($fname); + if(isset($_GET['preview']) && getConfig('enable_imagemagick')=='1' && file_exists(getConfig('imagemagick_path')) && substr($row['mimetype'], 0, 6) == 'image/') + { + $nam = tempnam('/tmp', $filename); + $h = @fopen($nam, 'w'); + if(!$h) die('Error opening '.$nam.' for writing'); + fwrite($h, $data); + fclose($h); + /* Make sure the request doesn't contain commandline injection - yow! */ + if(!isset($_GET['width' ]) || (isset($_GET['width'] ) && !preg_match('#^([0-9]+)$#', $_GET['width'] ))) $width = '320'; else $width = $_GET['width' ]; + if(!isset($_GET['height']) || (isset($_GET['height']) && !preg_match('#^([0-9]+)$#', $_GET['height'] ))) $height = '240'; else $height = $_GET['height']; + $cache_filename=ENANO_ROOT.'/cache/'.$filename.'-'.$row['time_id'].'-'.$width.'x'.$height.$row['file_extension']; + if(getConfig('cache_thumbs')=='1' && file_exists($cache_filename) && is_writable(ENANO_ROOT.'/cache')) { + $data = file_get_contents($cache_filename); + } elseif(getConfig('enable_imagemagick')=='1' && file_exists(getConfig('imagemagick_path'))) { + // Use ImageMagick to convert the image + //unlink($nam); + error_reporting(E_ALL); + $cmd = ''.getConfig('imagemagick_path').' "'.$nam.'" -resize "'.$width.'x'.$height.'>" "'.$nam.'.scaled'.$row['file_extension'].'"'; + system($cmd, $stat); + if(!file_exists($nam.'.scaled'.$row['file_extension'])) die('Failed to call ImageMagick (return value '.$stat.'), command line was:
'.$cmd); + $data = file_get_contents($nam.'.scaled'.$row['file_extension']); + // Be stingy about it - better to re-generate the image hundreds of times than to fail completely + if(getConfig('cache_thumbs')=='1' && !file_exists($cache_filename)) { + // Write the generated thumbnail to the cache directory + $h = @fopen($cache_filename, 'w'); + if(!$h) die('Error opening cache file "'.$cache_filename.'" for writing.'); + fwrite($h, $data); + fclose($h); + } + } + unlink($nam); + } + $len = strlen($data); + header('Content-type: '.$row['mimetype']); + if(isset($_GET['download'])) header('Content-disposition: attachment, filename="'.$filename.'";'); + header('Content-length: '.$len); + header('Last-Modified: '.date('r', $row['time_id'])); + echo($data); + + // + // Compress buffered output if required and send to browser + // + if ( $do_gzip ) + { + // + // Copied from phpBB, which was in turn borrowed from php.net + // + $gzip_contents = ob_get_contents(); + ob_end_clean(); + + $gzip_size = strlen($gzip_contents); + $gzip_crc = crc32($gzip_contents); + + $gzip_contents = gzcompress($gzip_contents, 9); + $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); + + header('Content-encoding: gzip'); + echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; + echo $gzip_contents; + echo pack('V', $gzip_crc); + echo pack('V', $gzip_size); + } + + exit; + +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialUserFuncs.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialUserFuncs.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,875 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Log in\', + \'urlname\'=>\'Login\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Log out\', + \'urlname\'=>\'Logout\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Register\', + \'urlname\'=>\'Register\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Edit Profile\', + \'urlname\'=>\'Preferences\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Contributions\', + \'urlname\'=>\'Contributions\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Change style\', + \'urlname\'=>\'ChangeStyle\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Activate user account\', + \'urlname\'=>\'ActivateAccount\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Captcha\', + \'urlname\'=>\'Captcha\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Forgot password\', + \'urlname\'=>\'PasswordReset\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +// function names are IMPORTANT!!! The name pattern is: page__ + +$__login_status = ''; + +function page_Special_Login() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $__login_status; + + $pubkey = $session->rijndael_genkey(); + $challenge = $session->dss_rand(); + + if ( isset($_GET['act']) && $_GET['act'] == 'getkey' ) + { + $response = Array( + 'key' => $pubkey, + 'challenge' => $challenge + ); + $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); + $response = $json->encode($response); + echo $response; + return null; + } + + $level = ( isset($_GET['level']) && in_array($_GET['level'], array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') ) ) ? intval($_GET['level']) : USER_LEVEL_MEMBER; + if ( isset($_POST['login']) ) + { + if ( in_array($_POST['auth_level'], array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') ) ) + { + $level = intval($_POST['auth_level']); + } + } + + if ( $level > USER_LEVEL_MEMBER && !$session->user_logged_in ) + { + $level = USER_LEVEL_MEMBER; + } + $template->header(); + echo '
'; + $header = ( $level > USER_LEVEL_MEMBER ) ? 'Please re-enter your login details' : 'Please enter your username and password to log in.'; + if ( isset($_POST['login']) ) + { + echo '

'.$__login_status.'

'; + } + if ( $p = $paths->getAllParams() ) + { + echo ''; + } + else if ( isset($_POST['login']) && isset($_POST['return_to']) ) + { + echo ''; + } + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Logging in enables you to use your preferences and access member information. If you don\'t have a username and password here, you can create an account.

'; + } + else + { + echo '

You are requesting that a sensitive operation be performed. To continue, please re-enter your password to confirm your identity.

'; + } + ?> +
+ Username: + + user_logged_in ) + { + echo 'value="' . $session->username . '"'; + } + ?> /> + + Forgot your password? No problem.
+ Maybe you need to create an account.
+
Password:
+

Important note regarding cryptography: Some countries do not allow the import or use of cryptographic technology. If you live in one of the countries listed below, you should log in without using encryption.

+

This restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.

+
+
+ + + + + +
+ aes_javascript('loginform', 'pass', 'use_crypt', 'crypt_key', 'crypt_data', 'challenge_data'); + ?> + footer(); +} + +function page_Special_Login_preloader() // adding _preloader to the end of the function name calls the function before $session and $paths setup routines are called +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $__login_status; + if ( isset($_GET['act']) && $_GET['act'] == 'ajaxlogin' ) + { + $plugins->attachHook('login_password_reset', 'SpecialLogin_SendResponse_PasswordReset($row[\'user_id\'], $row[\'temp_password\']);'); + $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); + $data = $json->decode($_POST['params']); + $level = ( isset($data['level']) ) ? intval($data['level']) : USER_LEVEL_MEMBER; + $result = $session->login_with_crypto($data['username'], $data['crypt_data'], $data['crypt_key'], $data['challenge'], $level); + $session->start(); + //echo "$result\n$session->sid_super"; + //exit; + if ( $result == 'success' ) + { + $response = Array( + 'result' => 'success', + 'key' => $session->sid_super // ( ( $session->sid_super ) ? $session->sid_super : $session->sid ) + ); + } + else + { + $response = Array( + 'result' => 'error', + 'error' => $result + ); + } + $response = $json->encode($response); + echo $response; + $db->close(); + exit; + } + if(isset($_POST['login'])) { + if($_POST['use_crypt'] == 'yes') + { + $result = $session->login_with_crypto($_POST['username'], $_POST['crypt_data'], $_POST['crypt_key'], $_POST['challenge_data'], intval($_POST['auth_level'])); + } + else + { + $result = $session->login_without_crypto($_POST['username'], $_POST['pass'], false, intval($_POST['auth_level'])); + } + $session->start(); + $paths->init(); + if($result == 'success') + { + $template->load_theme($session->theme, $session->style); + if(isset($_POST['return_to'])) + { + $name = ( isset($paths->pages[$_POST['return_to']]['name']) ) ? $paths->pages[$_POST['return_to']]['name'] : $_POST['return_to']; + redirect( makeUrl($_POST['return_to']), 'Login successful', 'You have successfully logged into the '.getConfig('site_name').' site as "'.$session->username.'". Redirecting to ' . $name . '...' ); + } + else + { + $paths->main_page(); + } + } + else + { + $GLOBALS['__login_status'] = $result; + } + } +} + +function SpecialLogin_SendResponse_PasswordReset($user_id, $passkey) +{ + $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); + + $response = Array( + 'result' => 'success_reset', + 'user_id' => $user_id, + 'temppass' => $passkey + ); + + $response = $json->encode($response); + echo $response; + + $db->close(); + + exit; +} + +function page_Special_Logout() { + global $db, $session, $paths, $template, $plugins; // Common objects + $l = $session->logout(); + if($l == 'success') $paths->main_page(); + $template->header(); + echo '

An error occurred during the logout process.

'.$l.'

'; + $template->footer(); +} + +function page_Special_Register() { + global $db, $session, $paths, $template, $plugins; // Common objects + if(getConfig('account_activation') == 'disable' && ( ( $session->user_level >= USER_LEVEL_ADMIN && !isset($_GET['IWannaPlayToo']) ) || $session->user_level < USER_LEVEL_ADMIN || !$session->user_logged_in )) + { + $s = ($session->user_level >= USER_LEVEL_ADMIN) ? '

Oops...it seems that you are the administrator...hehe...you can also force account registration to work.

' : ''; + die_friendly('Registration disabled', '

The administrator has disabled new user registration on this site.

' . $s); + } + if(isset($_POST['submit'])) { + $captcharesult = $session->get_captcha($_POST['captchahash']); + if($captcharesult != $_POST['captchacode']) + $s = 'The confirmation code you entered was incorrect.'; + else + // CAPTCHA code was correct, create the account + $s = $session->create_user($_POST['username'], $_POST['password'], $_POST['email'], $_POST['real_name']); + if($s == 'success') + { + switch(getConfig('account_activation')) + { + case "none": + default: + $str = 'You may now log in with the username and password that you created.'; + break; + case "user": + $str = 'Because this site requires account activation, you have been sent an e-mail with further instructions. Please follow the instructions in that e-mail to continue your registration.'; + break; + case "admin": + $str = 'Because this site requires administrative account activation, you cannot use your account at the moment. A notice has been sent to the site administration team that will alert them that your account has been created.'; + break; + } + die_friendly('Registration successful', '

Thank you for registering, your user account has been created. '.$str.'

'); + } + } + $template->header(); + echo 'A user account enables you to have greater control over your browsing experience.'; + $session->kill_captcha(); + $captchacode = $session->make_captcha(); + ?> +

Create a user account

+
+
+ + + '; ?> + + + + '; ?> + + + + +
Please tell us a little bit about yourself.
'.$s.'
Preferred username:Good/bad icon
Password:Good/bad icon
Enter your password again to confirm.
E-mail address:An e-mail with an account activation key will be sent to this address, so please ensure that it is correct.Good/bad icon
Real name:
Giving your real name is totally optional. If you choose to provide your real name, it will be used to provide attribution for any edits or contributions you may make to this site.
Visual confirmation
Please enter the code shown in the image to the right into the text box. This process helps to ensure that this registration is not being performed by an automated bot. If the image to the right is illegible, you can generate a new image.

If you are visually impaired or otherwise cannot read the text shown to the right, please contact the site management and they will create an account for you.
CAPTCHA image
Code:
+
+
+ + footer(); +} + +/* +If you want the old preferences page back, be my guest. +function page_Special_Preferences() { + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + if(isset($_POST['submit'])) { + $data = $session->update_user($session->user_id, $_POST['username'], $_POST['current_pass'], $_POST['new_pass'], $_POST['email'], $_POST['real_name'], $_POST['sig']); + if($data == 'success') echo '

Information

Your profile has been updated. Return to the index page.

'; + else echo $data; + } else { + echo ' +

Edit your profile

+
+ + + + + + + + + +
Username:
Current Password:
You only need to enter your current password if you are changing your e-mail address or changing your password.
New Password:
E-mail:
Real Name:
Signature:
Your signature appears
below your comment posts.
+
+
+ '; + } + $template->footer(); +} +*/ + +function page_Special_Contributions() { + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + $user = $paths->getParam(); + if(!$user && isset($_GET['user'])) + { + $user = $_GET['user']; + } + elseif(!$user && !isset($_GET['user'])) + { + echo 'No user selected!'; + $template->footer(); + $db->close(); + exit; + } + + $user = $db->escape($user); + + $q = 'SELECT time_id,date_string,page_id,namespace,author,edit_summary,minor_edit,page_id,namespace FROM '.table_prefix.'logs WHERE author=\''.$user.'\' AND action=\'edit\' ORDER BY time_id DESC;'; + if(!$db->sql_query($q)) $db->_die('The history data for the page "'.$paths->cpage['name'].'" could not be selected.'); + echo 'History of edits and actions

Edits:

'; + if($db->numrows() < 1) echo 'No history entries in this category.'; + while($r = $db->fetchrow()) { + echo ''.$r['date_string'].' (revert) '.$paths->nslist[$r['namespace']].$r['page_id'].': '.$r['edit_summary']; + if($r['minor_edit']) echo ' - minor edit'; + echo '
'; + } + $db->free_result(); + echo '

Other changes:

'; + $q = 'SELECT log_type,time_id,action,date_string,page_id,namespace,author,edit_summary,minor_edit,page_id,namespace FROM '.table_prefix.'logs WHERE author=\''.$user.'\' AND action!=\'edit\' ORDER BY time_id DESC;'; + if(!$db->sql_query($q)) $db->_die('The history data for the page "'.$paths->cpage['name'].'" could not be selected.'); + if($db->numrows() < 1) echo 'No history entries in this category.'; + while($r = $db->fetchrow()) { + if($r['log_type']=='page') { + echo '(rollback) '.$r['date_string'].' '.$paths->nslist[$r['namespace']].$r['page_id'].': '; + if($r['action']=='prot') echo 'Protected page; reason: '.$r['edit_summary']; + elseif($r['action']=='unprot') echo 'Unprotected page; reason: '.$r['edit_summary']; + elseif($r['action']=='rename') echo 'Renamed page; old title was: '.$r['edit_summary']; + elseif($r['action']=='create') echo 'Created page'; + elseif($r['action']=='delete') echo 'Deleted page'; + if($r['minor_edit']) echo ' - minor edit'; + echo '
'; + } elseif($r['log_type']=='security') { + // Not implemented, and when it is, it won't be public + } + } + $db->free_result(); + $template->footer(); +} + +function page_Special_ChangeStyle() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if(!$session->user_logged_in) die_friendly('Access denied', '

You must be logged in to change your style. Spoofer.

'); + if(isset($_POST['theme']) && isset($_POST['style']) && isset($_POST['return_to'])) + { + $d = ENANO_ROOT . '/themes/' . $_POST['theme']; + $f = ENANO_ROOT . '/themes/' . $_POST['theme'] . '/css/' . $_POST['style'] . '.css'; + if(!file_exists($d) || !is_dir($d)) die('The directory "'.$d.'" does not exist.'); + if(!file_exists($f)) die('The file "'.$f.'" does not exist.'); + $d = $db->escape($_POST['theme']); + $f = $db->escape($_POST['style']); + $q = 'UPDATE '.table_prefix.'users SET theme=\''.$d.'\',style=\''.$f.'\' WHERE username=\''.$session->username.'\''; + if(!$db->sql_query($q)) + { + $db->_die('Your theme/style preferences were not updated.'); + } + else + { + redirect(makeUrl($_POST['return_to']), '', '', 0); + } + } + else + { + $template->header(); + $ret = ( isset($_POST['return_to']) ) ? $_POST['return_to'] : $paths->getParam(0); + if(!$ret) $ret = getConfig('main_page'); + ?> +
+ +

Please select a new theme:

+

+ +

+

+

+ +

Please select a stylesheet:

+

+ +

+

+ +

+ +
+ footer(); + } +} + +function page_Special_ActivateAccount() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $user = $paths->getParam(0); + if(!$user) die_friendly('Account activation error', '

The URL was incorrect.

'); + $key = $paths->getParam(1); + if(!$key) die_friendly('Account activation error', '

The URL was incorrect.

'); + $s = $session->activate_account(str_replace('_', ' ', $user), $key); + if($s > 0) die_friendly('Activation successful', '

Your account is now active. Thank you for registering.

'); + else die_friendly('Activation failed', '

The activation key was probably incorrect.

'); +} + +function page_Special_Captcha() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if($paths->getParam(0) == 'make') + { + $session->kill_captcha(); + echo $session->make_captcha(); + return; + } + $hash = $paths->getParam(0); + if(!$hash || !preg_match('#^([0-9a-f]*){32,32}$#i', $hash)) $paths->main_page(); + $code = $session->get_captcha($hash); + if(!$code) die('Invalid hash or IP address incorrect.'); + require(ENANO_ROOT.'/includes/captcha.php'); + $captcha = new captcha($code); + //header('Content-disposition: attachment; filename=autocaptcha.png'); + $captcha->make_image(); + exit; +} + +function page_Special_PasswordReset() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + if($paths->getParam(0) == 'stage2') + { + $user_id = intval($paths->getParam(1)); + $encpass = $paths->getParam(2); + if ( $user_id < 2 ) + { + echo '

Hacking attempt

'; + $template->footer(); + return false; + } + if(!preg_match('#^([a-f0-9]+)$#i', $encpass)) + { + echo '

Hacking attempt

'; + $template->footer(); + return false; + } + + $q = $db->sql_query('SELECT username,temp_password_time FROM '.table_prefix.'users WHERE user_id='.$user_id.' AND temp_password=\'' . $encpass . '\';'); + if($db->numrows() < 1) + { + echo '

Invalid credentials

'; + $template->footer(); + return false; + } + $row = $db->fetchrow(); + $db->free_result(); + + if ( ( intval($row['temp_password_time']) + 3600 * 24 ) < time() ) + { + echo '

Password has expired

'; + $template->footer(); + return false; + } + + if ( isset($_POST['do_stage2']) ) + { + $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); + if($_POST['use_crypt'] == 'yes') + { + $crypt_key = $session->fetch_public_key($_POST['crypt_key']); + if(!$crypt_key) + { + echo 'ERROR: Couldn\'t look up public key for decryption.'; + $template->footer(); + return false; + } + $crypt_key = hexdecode($crypt_key); + $data = $aes->decrypt($_POST['crypt_data'], $crypt_key, ENC_HEX); + if(strlen($data) < 6) + { + echo 'ERROR: Your password must be six characters or greater in length.'; + $template->footer(); + return false; + } + } + else + { + $data = $_POST['pass']; + $conf = $_POST['pass_confirm']; + if($data != $conf) + { + echo 'ERROR: The passwords you entered do not match.'; + $template->footer(); + return false; + } + if(strlen($data) < 6) + { + echo 'ERROR: Your password must be six characters or greater in length.'; + $template->footer(); + return false; + } + } + if(empty($data)) + { + echo 'ERROR: Sanity check failed!'; + $template->footer(); + return false; + } + $encpass = $aes->encrypt($data, $session->private_key, ENC_HEX); + $q = $db->sql_query('UPDATE '.table_prefix.'users SET password=\'' . $encpass . '\',temp_password=\'\',temp_password_time=0 WHERE user_id='.$user_id.';'); + + if($q) + { + $session->login_without_crypto($row['username'], $data); + echo '

Your password has been reset. Return to the main page.

'; + } + else + { + echo $db->get_error(); + } + + $template->footer(); + return false; + } + + // Password reset form + $pubkey = $session->rijndael_genkey(); + + ?> +
+
+
+ + + + + + + +
Reset password
Password:
Confirm:
+ + + + +
+
+
+ + footer(); + return true; + } + if(isset($_POST['do_reset'])) + { + if($session->mail_password_reset($_POST['username'])) + { + echo '

An e-mail has been sent to the e-mail address on file for your username with a new password in it. Please check your e-mail for further instructions.

'; + } + else + { + echo '

Error occured, your new password was not sent.

'; + } + $template->footer(); + return true; + } + echo '

Don\'t worry, it happens to the best of us.

+

To reset your password, just enter your username below, and a new password will be e-mailed to you.

+
+

Username: '.$template->username_field('username').'

+

+
'; + $template->footer(); +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialUserFuncs.php~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialUserFuncs.php~ Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,856 @@ +attachHook('base_classes_initted', ' + global $paths; + $paths->add_page(Array( + \'name\'=>\'Log in\', + \'urlname\'=>\'Login\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Log out\', + \'urlname\'=>\'Logout\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Register\', + \'urlname\'=>\'Register\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + $paths->add_page(Array( + \'name\'=>\'Edit Profile\', + \'urlname\'=>\'Preferences\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Contributions\', + \'urlname\'=>\'Contributions\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Change style\', + \'urlname\'=>\'ChangeStyle\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Activate user account\', + \'urlname\'=>\'ActivateAccount\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Captcha\', + \'urlname\'=>\'Captcha\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + + $paths->add_page(Array( + \'name\'=>\'Forgot password\', + \'urlname\'=>\'PasswordReset\', + \'namespace\'=>\'Special\', + \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', + )); + '); + +// function names are IMPORTANT!!! The name pattern is: page__ + +$__login_status = ''; + +function page_Special_Login() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $__login_status; + + $pubkey = $session->rijndael_genkey(); + $challenge = $session->dss_rand(); + + if ( isset($_GET['act']) && $_GET['act'] == 'getkey' ) + { + $response = Array( + 'key' => $pubkey, + 'challenge' => $challenge + ); + $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); + $response = $json->encode($response); + echo $response; + return null; + } + + $level = ( isset($_GET['level']) && in_array($_GET['level'], array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') ) ) ? intval($_GET['level']) : USER_LEVEL_MEMBER; + if ( isset($_POST['login']) ) + { + if ( in_array($_POST['auth_level'], array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') ) ) + { + $level = intval($_POST['auth_level']); + } + } + + if ( $level > USER_LEVEL_MEMBER && !$session->user_logged_in ) + { + $level = USER_LEVEL_MEMBER; + } + $template->header(); + echo '
'; + $header = ( $level > USER_LEVEL_MEMBER ) ? 'Please re-enter your login details' : 'Please enter your username and password to log in.'; + if ( isset($_POST['login']) ) + { + echo '

'.$__login_status.'

'; + } + if ( $p = $paths->getAllParams() ) + { + echo ''; + } + else if ( isset($_POST['login']) && isset($_POST['return_to']) ) + { + echo ''; + } + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Logging in enables you to use your preferences and access member information. If you don\'t have a username and password here, you can create an account.

'; + } + else + { + echo '

You are requesting that a sensitive operation be performed. To continue, please re-enter your password to confirm your identity.

'; + } + ?> +
+ Username: + + user_logged_in ) + { + echo 'value="' . $session->username . '"'; + } + ?> /> + + Forgot your password? No problem.
+ Maybe you need to create an account.
+
Password:
+

Important note regarding cryptography: Some countries do not allow the import or use of cryptographic technology. If you live in one of the countries listed below, you should log in without using encryption.

+

This restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.

+
+
+ + + + + +
+ aes_javascript('loginform', 'pass', 'use_crypt', 'crypt_key', 'crypt_data', 'challenge_data'); + ?> + footer(); +} + +function page_Special_Login_preloader() // adding _preloader to the end of the function name calls the function before $session and $paths setup routines are called +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $__login_status; + if ( isset($_GET['act']) && $_GET['act'] == 'ajaxlogin' ) + { + $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); + $data = $json->decode($_POST['params']); + $level = ( isset($data['level']) ) ? intval($data['level']) : USER_LEVEL_MEMBER; + $result = $session->login_with_crypto($data['username'], $data['crypt_data'], $data['crypt_key'], $data['challenge'], $level); + $session->start(); + //echo "$result\n$session->sid_super"; + //exit; + if ( $result == 'success' ) + { + $response = Array( + 'result' => 'success', + 'key' => $session->sid_super // ( ( $session->sid_super ) ? $session->sid_super : $session->sid ) + ); + } + else + { + $response = Array( + 'result' => 'error', + 'error' => $result + ); + } + $response = $json->encode($response); + echo $response; + $db->close(); + exit; + } + if(isset($_POST['login'])) { + if($_POST['use_crypt'] == 'yes') + { + $result = $session->login_with_crypto($_POST['username'], $_POST['crypt_data'], $_POST['crypt_key'], $_POST['challenge_data'], intval($_POST['auth_level'])); + } + else + { + $result = $session->login_without_crypto($_POST['username'], $_POST['pass'], false, intval($_POST['auth_level'])); + } + $session->start(); + $paths->init(); + if($result == 'success') + { + $template->load_theme($session->theme, $session->style); + if(isset($_POST['return_to'])) + { + $name = ( isset($paths->pages[$_POST['return_to']]['name']) ) ? $paths->pages[$_POST['return_to']]['name'] : $_POST['return_to']; + redirect( makeUrl($_POST['return_to']), 'Login successful', 'You have successfully logged into the '.getConfig('site_name').' site as "'.$session->username.'". Redirecting to ' . $name . '...' ); + } + else + { + $paths->main_page(); + } + } + else + { + $GLOBALS['__login_status'] = $result; + } + } +} + +function page_Special_Logout() { + global $db, $session, $paths, $template, $plugins; // Common objects + $l = $session->logout(); + if($l == 'success') $paths->main_page(); + $template->header(); + echo '

An error occurred during the logout process.

'.$l.'

'; + $template->footer(); +} + +function page_Special_Register() { + global $db, $session, $paths, $template, $plugins; // Common objects + if(getConfig('account_activation') == 'disable' && ( ( $session->user_level >= USER_LEVEL_ADMIN && !isset($_GET['IWannaPlayToo']) ) || $session->user_level < USER_LEVEL_ADMIN || !$session->user_logged_in )) + { + $s = ($session->user_level >= USER_LEVEL_ADMIN) ? '

Oops...it seems that you are the administrator...hehe...you can also force account registration to work.

' : ''; + die_friendly('Registration disabled', '

The administrator has disabled new user registration on this site.

' . $s); + } + if(isset($_POST['submit'])) { + $captcharesult = $session->get_captcha($_POST['captchahash']); + if($captcharesult != $_POST['captchacode']) + $s = 'The confirmation code you entered was incorrect.'; + else + // CAPTCHA code was correct, create the account + $s = $session->create_user($_POST['username'], $_POST['password'], $_POST['email'], $_POST['real_name']); + if($s == 'success') + { + switch(getConfig('account_activation')) + { + case "none": + default: + $str = 'You may now log in with the username and password that you created.'; + break; + case "user": + $str = 'Because this site requires account activation, you have been sent an e-mail with further instructions. Please follow the instructions in that e-mail to continue your registration.'; + break; + case "admin": + $str = 'Because this site requires administrative account activation, you cannot use your account at the moment. A notice has been sent to the site administration team that will alert them that your account has been created.'; + break; + } + die_friendly('Registration successful', '

Thank you for registering, your user account has been created. '.$str.'

'); + } + } + $template->header(); + echo 'A user account enables you to have greater control over your browsing experience.'; + $session->kill_captcha(); + $captchacode = $session->make_captcha(); + ?> +

Create a user account

+
+
+ + + '; ?> + + + + '; ?> + + + + +
Please tell us a little bit about yourself.
'.$s.'
Preferred username:Good/bad icon
Password:Good/bad icon
Enter your password again to confirm.
E-mail address:An e-mail with an account activation key will be sent to this address, so please ensure that it is correct.Good/bad icon
Real name:
Giving your real name is totally optional. If you choose to provide your real name, it will be used to provide attribution for any edits or contributions you may make to this site.
Visual confirmation
Please enter the code shown in the image to the right into the text box. This process helps to ensure that this registration is not being performed by an automated bot. If the image to the right is illegible, you can generate a new image.

If you are visually impaired or otherwise cannot read the text shown to the right, please contact the site management and they will create an account for you.
CAPTCHA image
Code:
+
+
+ + footer(); +} + +/* +If you want the old preferences page back, be my guest. +function page_Special_Preferences() { + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + if(isset($_POST['submit'])) { + $data = $session->update_user($session->user_id, $_POST['username'], $_POST['current_pass'], $_POST['new_pass'], $_POST['email'], $_POST['real_name'], $_POST['sig']); + if($data == 'success') echo '

Information

Your profile has been updated. Return to the index page.

'; + else echo $data; + } else { + echo ' +

Edit your profile

+
+ + + + + + + + + +
Username:
Current Password:
You only need to enter your current password if you are changing your e-mail address or changing your password.
New Password:
E-mail:
Real Name:
Signature:
Your signature appears
below your comment posts.
+
+
+ '; + } + $template->footer(); +} +*/ + +function page_Special_Contributions() { + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + $user = $paths->getParam(); + if(!$user && isset($_GET['user'])) + { + $user = $_GET['user']; + } + elseif(!$user && !isset($_GET['user'])) + { + echo 'No user selected!'; + $template->footer(); + $db->close(); + exit; + } + + $user = $db->escape($user); + + $q = 'SELECT time_id,date_string,page_id,namespace,author,edit_summary,minor_edit,page_id,namespace FROM '.table_prefix.'logs WHERE author=\''.$user.'\' AND action=\'edit\' ORDER BY time_id DESC;'; + if(!$db->sql_query($q)) $db->_die('The history data for the page "'.$paths->cpage['name'].'" could not be selected.'); + echo 'History of edits and actions

Edits:

'; + if($db->numrows() < 1) echo 'No history entries in this category.'; + while($r = $db->fetchrow()) { + echo ''.$r['date_string'].' (revert) '.$paths->nslist[$r['namespace']].$r['page_id'].': '.$r['edit_summary']; + if($r['minor_edit']) echo ' - minor edit'; + echo '
'; + } + $db->free_result(); + echo '

Other changes:

'; + $q = 'SELECT log_type,time_id,action,date_string,page_id,namespace,author,edit_summary,minor_edit,page_id,namespace FROM '.table_prefix.'logs WHERE author=\''.$user.'\' AND action!=\'edit\' ORDER BY time_id DESC;'; + if(!$db->sql_query($q)) $db->_die('The history data for the page "'.$paths->cpage['name'].'" could not be selected.'); + if($db->numrows() < 1) echo 'No history entries in this category.'; + while($r = $db->fetchrow()) { + if($r['log_type']=='page') { + echo '(rollback) '.$r['date_string'].' '.$paths->nslist[$r['namespace']].$r['page_id'].': '; + if($r['action']=='prot') echo 'Protected page; reason: '.$r['edit_summary']; + elseif($r['action']=='unprot') echo 'Unprotected page; reason: '.$r['edit_summary']; + elseif($r['action']=='rename') echo 'Renamed page; old title was: '.$r['edit_summary']; + elseif($r['action']=='create') echo 'Created page'; + elseif($r['action']=='delete') echo 'Deleted page'; + if($r['minor_edit']) echo ' - minor edit'; + echo '
'; + } elseif($r['log_type']=='security') { + // Not implemented, and when it is, it won't be public + } + } + $db->free_result(); + $template->footer(); +} + +function page_Special_ChangeStyle() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if(!$session->user_logged_in) die_friendly('Access denied', '

You must be logged in to change your style. Spoofer.

'); + if(isset($_POST['theme']) && isset($_POST['style']) && isset($_POST['return_to'])) + { + $d = ENANO_ROOT . '/themes/' . $_POST['theme']; + $f = ENANO_ROOT . '/themes/' . $_POST['theme'] . '/css/' . $_POST['style'] . '.css'; + if(!file_exists($d) || !is_dir($d)) die('The directory "'.$d.'" does not exist.'); + if(!file_exists($f)) die('The file "'.$f.'" does not exist.'); + $d = $db->escape($_POST['theme']); + $f = $db->escape($_POST['style']); + $q = 'UPDATE '.table_prefix.'users SET theme=\''.$d.'\',style=\''.$f.'\' WHERE username=\''.$session->username.'\''; + if(!$db->sql_query($q)) + { + $db->_die('Your theme/style preferences were not updated.'); + } + else + { + redirect(makeUrl($_POST['return_to']), '', '', 0); + } + } + else + { + $template->header(); + $ret = ( isset($_POST['return_to']) ) ? $_POST['return_to'] : $paths->getParam(0); + if(!$ret) $ret = getConfig('main_page'); + ?> +
+ +

Please select a new theme:

+

+ +

+

+

+ +

Please select a stylesheet:

+

+ +

+

+ +

+ +
+ footer(); + } +} + +function page_Special_ActivateAccount() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $user = $paths->getParam(0); + if(!$user) die_friendly('Account activation error', '

The URL was incorrect.

'); + $key = $paths->getParam(1); + if(!$key) die_friendly('Account activation error', '

The URL was incorrect.

'); + $s = $session->activate_account(str_replace('_', ' ', $user), $key); + if($s > 0) die_friendly('Activation successful', '

Your account is now active. Thank you for registering.

'); + else die_friendly('Activation failed', '

The activation key was probably incorrect.

'); +} + +function page_Special_Captcha() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + if($paths->getParam(0) == 'make') + { + $session->kill_captcha(); + echo $session->make_captcha(); + return; + } + $hash = $paths->getParam(0); + if(!$hash || !preg_match('#^([0-9a-f]*){32,32}$#i', $hash)) $paths->main_page(); + $code = $session->get_captcha($hash); + if(!$code) die('Invalid hash or IP address incorrect.'); + require(ENANO_ROOT.'/includes/captcha.php'); + $captcha = new captcha($code); + //header('Content-disposition: attachment; filename=autocaptcha.png'); + $captcha->make_image(); + exit; +} + +function page_Special_PasswordReset() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $template->header(); + if($paths->getParam(0) == 'stage2') + { + $user_id = intval($paths->getParam(1)); + $encpass = $paths->getParam(2); + if ( $user_id < 2 ) + { + echo '

Hacking attempt

'; + $template->footer(); + return false; + } + if(!preg_match('#^([a-f0-9]+)$#i', $encpass)) + { + echo '

Hacking attempt

'; + $template->footer(); + return false; + } + + $q = $db->sql_query('SELECT username,temp_password_time FROM '.table_prefix.'users WHERE user_id='.$user_id.' AND temp_password=\'' . $encpass . '\';'); + if($db->numrows() < 1) + { + echo '

Invalid credentials

'; + $template->footer(); + return false; + } + $row = $db->fetchrow(); + $db->free_result(); + + if ( ( intval($row['temp_password_time']) + 3600 * 24 ) < time() ) + { + echo '

Password has expired

'; + $template->footer(); + return false; + } + + if ( isset($_POST['do_stage2']) ) + { + $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); + if($_POST['use_crypt'] == 'yes') + { + $crypt_key = $session->fetch_public_key($_POST['crypt_key']); + if(!$crypt_key) + { + echo 'ERROR: Couldn\'t look up public key for decryption.'; + $template->footer(); + return false; + } + $crypt_key = hexdecode($crypt_key); + $data = $aes->decrypt($_POST['crypt_data'], $crypt_key, ENC_HEX); + if(strlen($data) < 6) + { + echo 'ERROR: Your password must be six characters or greater in length.'; + $template->footer(); + return false; + } + } + else + { + $data = $_POST['pass']; + $conf = $_POST['pass_confirm']; + if($data != $conf) + { + echo 'ERROR: The passwords you entered do not match.'; + $template->footer(); + return false; + } + if(strlen($data) < 6) + { + echo 'ERROR: Your password must be six characters or greater in length.'; + $template->footer(); + return false; + } + } + if(empty($data)) + { + echo 'ERROR: Sanity check failed!'; + $template->footer(); + return false; + } + $encpass = $aes->encrypt($data, $session->private_key, ENC_HEX); + $q = $db->sql_query('UPDATE '.table_prefix.'users SET password=\'' . $encpass . '\',temp_password=\'\',temp_password_time=0 WHERE user_id='.$user_id.';'); + + if($q) + { + $session->login_without_crypto($row['username'], $data); + echo '

Your password has been reset. Return to the main page.

'; + } + else + { + echo $db->get_error(); + } + + $template->footer(); + return false; + } + + // Password reset form + $pubkey = $session->rijndael_genkey(); + + ?> +
+
+
+ + + + + + + +
Reset password
Password:
Confirm:
+ + + + +
+
+
+ + footer(); + return true; + } + if(isset($_POST['do_reset'])) + { + if($session->mail_password_reset($_POST['username'])) + { + echo '

An e-mail has been sent to the e-mail address on file for your username with a new password in it. Please check your e-mail for further instructions.

'; + } + else + { + echo '

Error occured, your new password was not sent.

'; + } + $template->footer(); + return true; + } + echo '

Don\'t worry, it happens to the best of us.

+

To reset your password, just enter your username below, and a new password will be e-mailed to you.

+
+

Username: '.$template->username_field('username').'

+

+
'; + $template->footer(); +} + +?> \ No newline at end of file diff -r 000000000000 -r 902822492a68 plugins/SpecialUserPrefs.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/SpecialUserPrefs.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,462 @@ + $text, + 'link' => $link + ); + } + else + { + $userprefs_menu[$section] = Array(Array( + 'text' => $text, + 'link' => $link + )); + } +} + +function userprefs_menu_html() +{ + global $userprefs_menu; + global $userprefs_menu_links; + + $html = ''; + $quot = '"'; + + foreach ( $userprefs_menu as $section => $buttons ) + { + $html .= ( isset($userprefs_menu_links[$section]) ) ? "{$section}\n " : "{$section}\n "; + $html .= "
    \n "; + foreach ( $buttons as $button ) + { + $html .= "
  • {$button['text']}
  • \n "; + } + $html .= "
\n "; + } + + return $html; +} + +function userprefs_show_menu() +{ + echo ' +
+ '; +} + +function userprefs_menu_init() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $userprefs_menu_links; + + userprefs_menu_add('Profile/membership', 'Edit e-mail address and password', makeUrlNS('Special', 'Preferences/EmailPassword')); + userprefs_menu_add('Profile/membership', 'Edit signature', makeUrlNS('Special', 'Preferences/Signature')); + userprefs_menu_add('Profile/membership', 'Edit public profile', makeUrlNS('Special', 'Preferences/Profile')); + userprefs_menu_add('Private messages', 'Inbox', makeUrlNS('Special', 'PrivateMessages/Folder/Inbox')); + userprefs_menu_add('Private messages', 'Outbox', makeUrlNS('Special', 'PrivateMessages/Folder/Outbox')); + userprefs_menu_add('Private messages', 'Sent items', makeUrlNS('Special', 'PrivateMessages/Folder/Sent')); + userprefs_menu_add('Private messages', 'Drafts', makeUrlNS('Special', 'PrivateMessages/Folder/Drafts')); + userprefs_menu_add('Private messages', 'Archive', makeUrlNS('Special', 'PrivateMessages/Folder/Archive')); + + $userprefs_menu_links['Profile/membership'] = makeUrlNS('Special', 'Preferences'); + $userprefs_menu_links['Private messages'] = makeUrlNS('Special', 'PrivateMessages'); + + $code = $plugins->setHook('userprefs_jbox'); + foreach ( $code as $cmd ) + { + eval($cmd); + } +} + +$plugins->attachHook('session_started', 'userprefs_menu_init();'); + +function page_Special_Preferences() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + // We need a login to continue + if ( !$session->user_logged_in ) + redirect(makeUrlNS('Special', 'Login/' . $paths->page), 'Login required', 'You need to be logged in to access this page. Please wait while you are redirected to the login page.'); + + // User ID - later this will be specified on the URL, but hardcoded for now + $uid = intval($session->user_id); + + // Instanciate the AES encryptor + $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); + + // Basic user info + $q = $db->sql_query('SELECT username, password, email, real_name, signature, theme, style FROM '.table_prefix.'users WHERE user_id='.$uid.';'); + if ( !$q ) + $db->_die(); + + $row = $db->fetchrow(); + $db->free_result(); + + $section = $paths->getParam(0); + if ( !$section ) + { + $section = 'Home'; + } + + $errors = ''; + + switch ( $section ) + { + case 'EmailPassword': + // Require elevated privileges (well sortof) + if ( $session->auth_level < USER_LEVEL_CHPREF ) + { + redirect(makeUrlNS('Special', 'Login/' . $paths->fullpage, 'level=' . USER_LEVEL_CHPREF, true), 'Authentication required', 'You need to re-authenticate to access this page.', 0); + } + + if ( isset($_POST['submit']) ) + { + $email_changed = false; + // First do the e-mail address + if ( strlen($_POST['newemail']) > 0 ) + { + switch('foo') // Same reason as in the password code... + { + case 'foo': + if ( $_POST['newemail'] != $_POST['newemail_conf'] ) + { + $errors .= '
The e-mail addresses you entered did not match.
'; + break; + } + } + $q = $db->sql_query('SELECT password FROM '.table_prefix.'users WHERE user_id='.$session->user_id.';'); + if ( !$q ) + $db->_die(); + $row = $db->fetchrow(); + $db->free_result(); + $old_pass = $aes->decrypt($row['password'], $session->private_key, ENC_HEX); + + $new_email = $_POST['newemail']; + + $result = $session->update_user($session->user_id, false, $old_pass, false, $new_email); + if ( $result != 'success' ) + { + die_friendly('Error updating e-mail address', '

Session API returned error: ' . $result . '

'); + } + $email_changed = true; + } + // Obtain password + if ( $_POST['use_crypt'] == 'yes' && !empty($_POST['crypt_data']) ) + { + $key = $session->fetch_public_key($_POST['crypt_key']); + if ( !$key ) + die('Can\'t lookup key'); + $key = hexdecode($key); + $newpass = $aes->decrypt($_POST['crypt_data'], $key, ENC_HEX); + // At this point we know if we _want_ to change the password... + + // We can't check the password to see if it matches the confirmation + // because the confirmation was destroyed during the encryption. I figured + // this wasn't a big deal because if the encryption worked, then either + // the Javascript validated it or the user hacked the form. In the latter + // case, if he's smart enough to hack the encryption code, he's probably + // smart enough to remember his password. + + if ( strlen($newpass) > 0 ) + { + // Perform checks + if ( strlen($newpass) < 6 ) + $errors .= '
Password must be at least 6 characters. You hacked my script, darn you!
'; + // Encrypt new password + $newpass_enc = $aes->encrypt($newpass, $session->private_key, ENC_HEX); + // Perform the swap + $q = $db->sql_query('UPDATE '.table_prefix.'users SET password=\'' . $newpass_enc . '\' WHERE user_id=' . $session->user_id . ';'); + if ( !$q ) + $db->_die(); + // Log out and back in + $username = $session->username; + $session->logout(); + if ( $email_changed ) + { + if ( getConfig('account_activation') == 'user' ) + { + redirect(makeUrl(getConfig('main_page')), 'Profile changed', 'Your password and e-mail address have been changed. Since e-mail activation is required on this site, you will need to re-activate your account to continue. An e-mail has been sent to the new e-mail address with an activation link. You must click that link in order to log in again.', 19); + } + else if ( getConfig('account_activation') == 'admin' ) + { + redirect(makeUrl(getConfig('main_page')), 'Profile changed', 'Your password and e-mail address have been changed. Since administrative activation is requires on this site, a request has been sent to the administrators to activate your account for you. You will not be able to use your account until it is activated by an administrator.', 19); + } + } + $session->login_without_crypto($session->username, $newpass); + redirect(makeUrlNS('Special', 'Preferences'), 'Password changed', 'Your password has been changed, and you will now be redirected back to the user control panel.', 4); + } + } + else + { + switch('foo') // allow breaking out of our section...i can't wait until PHP6 (goto support!) + { + case 'foo': + $pass = $_POST['newpass']; + if ( $pass != $_POST['newpass_conf'] ) + { + $errors .= '
The passwords you entered did not match
'; + break; + } + + if ( $email_changed ) + { + if ( getConfig('account_activation') == 'user' ) + { + redirect(makeUrl(getConfig('main_page')), 'Profile changed', 'Your e-mail address has been changed. Since e-mail activation is required on this site, you will need to re-activate your account to continue. An e-mail has been sent to the new e-mail address with an activation link. You must click that link in order to log in again.', 19); + } + else if ( getConfig('account_activation') == 'admin' ) + { + redirect(makeUrl(getConfig('main_page')), 'Profile changed', 'Your e-mail address has been changed. Since administrative activation is requires on this site, a request has been sent to the administrators to activate your account for you. You will not be able to use your account until it is activated by an administrator.', 19); + } + else + { + redirect(makeUrlNS('Special', 'Preferences'), 'Password changed', 'Your e-mail address has been changed, and you will now be redirected back to the user control panel.', 4); + } + } + + return; + } + } + } + $template->tpl_strings['PAGE_NAME'] = 'Change E-mail Address or Password'; + break; + case 'Signature': + $template->tpl_strings['PAGE_NAME'] = 'Editing signature'; + break; + case 'Profile': + $template->tpl_strings['PAGE_NAME'] = 'Editing public profile'; + break; + } + + $template->header(); + + // Output the menu + // This is not templatized because it conforms to the jBox menu standard. + + userprefs_show_menu(); + + switch ( $section ) + { + case 'Home': + global $email; + $user_page = 'user page (comments)'; + $site_admin = $email->encryptEmail(getConfig('contact_email'), '', '', 'administrator'); + echo "

$session->username, welcome to your control panel

"; + echo "

Here you can make changes to your profile, view statistics on yourself on this site, and set your preferences.

+

If you have not already done so, you are encouraged to make a $user_page and tell the other members of this site a little about yourself.

+

Use the menu at the top to navigate around. If you have any questions, you may contact the $site_admin."; + break; + case 'EmailPassword': + + echo '

'; + + // Password change form + $pubkey = $session->rijndael_genkey(); + + echo '
+ Change password + Type a new password:
+ +
+
+ Type the password again to confirm:
+ +

+
+ Change e-mail address + New e-mail address:
+ +
+
+ Confirm e-mail address:
+ +
+ + + +
+
'; + + echo '
'; + + // ENCRYPTION CODE + ?> + + escape($sig); + $q = $db->sql_query('UPDATE '.table_prefix.'users SET signature=\'' . $sql_sig . '\' WHERE user_id=' . $session->user_id . ';'); + if ( !$q ) + $db->_die(); + $session->signature = $sig; + echo '
Your signature has been saved.
'; + } + echo '
'; + echo $template->tinymce_textarea('new_sig', $session->signature); + echo ''; + echo '
'; + break; + case "Profile": + if ( isset($_POST['submit']) ) + { + $real_name = htmlspecialchars($_POST['real_name']); + $real_name = $db->escape($real_name); + $q = $db->sql_query('UPDATE '.table_prefix."users SET real_name='$real_name' WHERE user_id=$session->user_id;"); + if ( !$q ) + $db->_die(); + + echo '
Your profile has been updated.
'; + } + echo '
'; + ?> +
+ + + + + + + + + + + + + + + + + + + + + +
Your public profile
Please note that all of the information you enter here will be publicly viewable. All of the fields on this page are optional and may be left blank if you so desire.
Real name:
Change theme:If you don't like the look of the site, need a visual break, or are just curious, we might have some different themes for you to try out! Change my theme...
More is coming soon - planned fields include AOL, WLM, Yahoo, and XMPP messenger fields, allow public display of e-mail address, allow private messages from users not on your buddy list, homepage, occupation, and location.
+ +
+
+ '; + break; + default: + $good = false; + $code = $plugins->setHook('userprefs_body'); + foreach ( $code as $cmd ) + { + if ( eval($code) ) + $good = true; + } + if ( !$good ) + { + echo '

Invalid module

+

Userprefs module "'.$section.'" not found.

'; + } + break; + } + + $template->footer(); +} + +?> diff -r 000000000000 -r 902822492a68 plugins/WhosOnline.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/WhosOnline.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,145 @@ +sql_query('DROP TABLE IF EXISTS '.table_prefix.'online;') + ) $db->_die('Could not clean out old who\'s-online table'); + // The key on username allows the REPLACE command later, to save queries + if(!$db->sql_query('CREATE TABLE '.table_prefix.'online( + entry_id int(12) UNSIGNED NOT NULL auto_increment, + user_id int(12) NOT NULL, + username varchar(63) NOT NULL, + last_load int(12) NOT NULL, + PRIMARY KEY ( entry_id ), + KEY ( username ) + );') + ) $db->_die('Could not create new who\'s-online table'); + if(!$db->sql_query('CREATE UNIQUE INDEX '.table_prefix.'onluser ON '.table_prefix.'online(username);')) + $db->_die('Could not create index on username column.'); + setConfig('whos_online_version', '0.1'); +} + +$plugins->attachHook('session_started', '__WhosOnline_UserCount();'); +$plugins->attachHook('login_success', '__WhosOnline_logonhandler();'); +$plugins->attachHook('logout_success', '__WhosOnline_logoffhandler($ou, $oid, $level);'); + +function __WhosOnline_UserCount() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $whos_online; + $whos_online = Array(); + $whos_online['users'] = Array(); + $whos_online['guests'] = Array(); + $q = $db->sql_query('REPLACE INTO '.table_prefix.'online SET user_id='.$session->user_id.',username=\''.$db->escape($session->username).'\',last_load='.time().';'); if(!$q) $db->_die(''); + $q = $db->sql_query('DELETE FROM '.table_prefix.'online WHERE last_load<'.( time() - 60*60*24 ).';'); if(!$q) $db->_die(''); + $q = $db->sql_query('SELECT o.username,o.user_id,u.user_level FROM '.table_prefix.'online AS o + LEFT JOIN '.table_prefix.'users AS u + ON u.user_id=o.user_id + WHERE last_load>'.( time() - 60*5 - 1 ).' ORDER BY username ASC'); if(!$q) $db->_die(''); + $num_guests = 0; + $num_users = 0; + $users = Array(); + while ( $row = $db->fetchrow() ) + { + ( $row['user_id'] == 1 ) ? $num_guests++ : $num_users++; + if($row['user_id'] > 1) + { + switch($row['user_level']) + { + case USER_LEVEL_MEMBER: + default: + $color = '303030'; + $weight = 'normal'; + break; + case USER_LEVEL_MOD: + $color = '00AA00'; + $weight = 'bold'; + break; + case USER_LEVEL_ADMIN: + $color = 'AA0000'; + $weight = 'bold'; + break; + } + $users[] = "{$row['username']}"; + $whos_online['users'][] = $row['username']; + } + else + { + $whos_online['guests'][] = $row['username']; + } + } + $total = $num_guests + $num_users; + $ms = ( $num_users == 1 ) ? '' : 's'; + $gs = ( $num_guests == 1 ) ? '' : 's'; + $ts = ( $total == 1 ) ? '' : 's'; + $is_are = ( $total == 1 ) ? 'is' : 'are'; + $users = implode(', ', $users); + $online_main = ( $num_users > 0 ) ? "
+ Users online right now: +
+ $users +
+ Legend:
Moderators :: Administrators" + : ''; + $html = "
+ + There $is_are $total user$ts online :: $num_guests guest$gs and $num_users member$ms + $online_main + +
"; + $template->sidebar_widget('Who\'s Online', $html); +} + +function __WhosOnline_logonhandler() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + $q = $db->sql_query('DELETE FROM '.table_prefix.'online WHERE user_id=1 AND username=\''.$db->escape($_SERVER['REMOTE_ADDR']).'\';'); + if(!$q) + echo $db->get_error(); + if(!$session->theme) + $session->register_guest_session(); + $template->load_theme($session->theme, $session->style); + __WhosOnline_UserCount(); +} + +function __WhosOnline_logoffhandler($username, $user_id, $level) +{ + if($level <= USER_LEVEL_MEMBER) + { + global $db, $session, $paths, $template, $plugins; // Common objects + $q = $db->sql_query('DELETE FROM '.table_prefix.'online WHERE user_id=\''.intval($user_id).'\' AND username=\''.$db->escape($username).'\';'); + if(!$q) + echo $db->get_error(); + $q = $db->sql_query('REPLACE INTO '.table_prefix.'online SET user_id=1,username=\''.$db->escape($_SERVER['REMOTE_ADDR']).'\',last_load='.time().';'); if(!$q) $db->_die(''); + if(!$q) + echo $db->get_error(); + } +} + +?> diff -r 000000000000 -r 902822492a68 plugins/ajim.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/ajim.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,107 @@ +'#FFF', + 'sb_color_foreground'=>'#000', + ); + if(defined('ENANO_INSTALLED') || defined('MIDGET_INSTALLED')) + { + if(!isset($_GET['admin'])) + { + $plugins->attachHook('compile_template', 'AjIM_SideBar();'); + $plugins->attachHook('acl_rule_init', 'global $session; $session->register_acl_type(\'ajim_post\', AUTH_ALLOW, \'Submit AjIM posts\');'); + include(ajimServerPath . '/ajim.php'); + + function AjIM_SideBar() + { + global $db, $session, $paths, $template, $plugins; // Common objects + global $__ajim_config; + $paths->addAdminNode('Plugin configuration', 'AjIM configuration', 'AjIM_Config'); + $dir = getcwd(); + chdir(ENANO_ROOT); + include('config.php'); + chdir($dir); + unset($dir); + if($session->user_level >= USER_LEVEL_ADMIN) + { + $r = $db->sql_query('SELECT password FROM '.table_prefix.'users WHERE username=\''.$session->username.'\''); + $p = $db->fetchrow_num($r); + $admin = $p[0]; + } + else + { + $admin = false; + } + $__ajim_config['db_connection_handle'] = $db->_conn; + if(!$session->user_logged_in) + { + $__ajim_config['cant_post_notice'] = 'The administrator requires that you log in to post messages.'; + } + else + { + $__ajim_config['cant_post_notice'] = 'The administrator has disallowed message posting for your user account.'; + } + $canpost = ( $session->get_permissions('ajim_post') ) ? true : false; + $ajim = new ajim($__ajim_config, table_prefix, scriptPath.'/plugins/ajim.php', $admin, false, $canpost, array('RenderMan', 'render')); + $template->sidebar_widget('Shoutbox', $ajim->html(ajimClientPath)); + $template->additional_headers .= ''; + } + } + } elseif(isset($_GET['ajimmode'])) { + global $db, $session, $paths, $template, $plugins, $dbhost, $dbname, $dbuser, $dbpasswd; + require_once('../includes/common.php'); + require_once(ajimServerPath . '/ajim.php'); + header('HTTP/1.1 200 OK'); + define('ajimClientPath', scriptPath.'/ajim'); + if($session->user_level >= 2) { + $admin = $session->grab_password_hash(); + } else $admin = false; + require('../config.php'); + $canpost = (getConfig('ajim_require_login') != '1' || $session->user_logged_in) ? true : false; + $__ajim_config['db_connection_handle'] = $db->_conn; + $__ajim_config['cant_post_notice'] = 'The administrator requires that you log in to post messages.'; + $__ajim_config['allow_looping'] = true; + $ajim = new ajim($__ajim_config, table_prefix, scriptPath.'/plugins/ajim.php', $admin, $_GET['id'], $canpost, array('RenderMan', 'render')); + $db->close(); + exit; + } + + function page_Admin_AjIM_Config() + { + global $db, $session, $paths, $template, $plugins; // Common objects + if(isset($_POST['_save'])) + { + setConfig('ajim_require_login', ( isset($_POST['ajim_require_login']) ) ? '1' : '0'); + } + echo ''; + ?> +

Configure AjIM, the Asynchronous Javascript Instant Messenger

+

Only one option right now...

+

+

+ '; + } +} +?> diff -r 000000000000 -r 902822492a68 plugins/ajim/ajim.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/ajim/ajim.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,825 @@ +'.$text); + } + /** + * Make a SQL query. This function contains some error correction that performs automatic database upgrades if needed. + * @param string $q - The query text to send to MySQL. + * @return resource - or, kills the connection and bails out if the query failed + */ + function sql($q) { + $r = mysql_query($q, $this->conn); + if(!$r) + { + if(strstr(mysql_error(), 'Unknown column \'time_id\'')) + { + $this->sql('ALTER TABLE '.$this->table_prefix.'ajim ADD COLUMN time_id int(11) NOT NULL DEFAULT 0;'); + $r = mysql_query($q, $this->conn); + } + elseif(strstr(mysql_error(), 'Unknown column \'sid\'')) + { + $this->sql('ALTER TABLE '.$this->table_prefix.'ajim ADD COLUMN sid varchar(40) NOT NULL DEFAULT \'\';'); + $r = mysql_query($q, $this->conn); + } + elseif(strstr(mysql_error(), 'Unknown column \'ip_addr\'')) + { + $this->sql('ALTER TABLE '.$this->table_prefix.'ajim ADD COLUMN ip_addr varchar(15) NOT NULL DEFAULT \'\';'); + $r = mysql_query($q, $this->conn); + } + $this->kill('Error during query:

'.htmlspecialchars($q).'

MySQL said: '.mysql_error().'

Depending on the error, AjIM may be able to automatically repair it. Just hang tight for about ten seconds. Whatever you do, don\'t close this browser window!'); + } + return $r; + } + /** + * Get the user's SID (unique ID used for editing authorization) or generate a new one. + * @return string + */ + function get_sid() + { + // Tag the user with a unique ID that can be used to edit posts + // This is used to essentially track users, but only for the purpose of letting them edit posts + if(!isset($_COOKIE['ajim_sid'])) + { + $hash = sha1(microtime()); + setcookie('ajim_sid', $hash, time()+60*60*24*365); // Cookies last for one year + } + else + $hash = $_COOKIE['ajim_sid']; + + return $hash; + } + /** + * Set the default value for a configuration field. + * @param string $key - name of the configuration key + * @param string $value - the default value + * @param array $confarray - needs to be the array passed as the first param on the constructor + */ + function config_default($key, $value, &$confarray) + { + if(!isset($confarray[$key])) + $confarray[$key] = $value; + } + /** + * Set up some basic vars and a database connection + * @param array $config - a configuration array, with either the key db_connection_handle (a valid MySQL connection resource) or the keys dbhost, dbname, dbuser, and dbpass + * @param string $table_prefix - the text prepended to the "ajim" table, should match ^([A-z0-9_]+)$ + * @param string $handler - URL to the backend script, for example in Enano this would be the plugin file plugins/ajim.php + * @param string $admin - string containing the MD5 hash of the user's password, IF AND ONLY IF the user should be allowed to use the moderation function. In all other cases this should be false. + * @param string $id - used to carry over the randomly generated instance ID between requests. Should be false if the class is being initialized for displaying the inital HTML, in all other cases should be the value of the class variable AjIM::$id + * @param bool $can_post - true if the user is allowed to post, false otherwise. Defaults to true. + * @param mixed $formatfunc - a string containing the name of a function that can be called to format text before posts are sent to the user. If you need to call a class method, this should be an array with key 0 being the class name and key 1 being the method name. + */ + function __construct($config, $table_prefix, $handler, $admin = false, $id = false, $can_post = true, $formatfunc = false) { + // CONFIGURATION + // $this->prune: a limit on the number of posts in the chat box. Usually this should be set to 40 or 50. Default is 40. + // Set to -1 to disable pruning. + $this->prune = -1; + + $this->get_sid(); + + if(!is_array($config)) + $this->kill('$config passed to the AjIM constructor should be an associative array with either the keys dbhost, dbname, dbuser, and dbpass, or the key db_connection_handle.'); + if(isset($config['db_connection_handle'])) + { + if(!is_resource($config['db_connection_handle'])) $this->kill('$config[\'db_connection_handle\'] is not a valid resource'); + $this->conn = $config['db_connection_handle']; + if(!$this->conn) $this->kill('Error verifying database connection: '.mysql_error()); + } elseif(isset($config['dbhost']) && isset($config['dbname']) && isset($config['dbuser']) && isset($config['dbpass'])) { + $this->conn = mysql_connect($config['dbhost'], $config['dbuser'], $config['dbpass']); + if(!$this->conn) $this->kill('Error connecting to the database: '.mysql_error()); + $this->sql('USE '.$config['dbname']); + } + + $this->bad_words = Array('viagra', 'phentermine', 'pharma', 'rolex', 'genital', 'penis', 'ranitidine', 'prozac', 'acetaminophen', 'acyclovir', 'ionamin', 'denavir', 'nizoral', 'zoloft', 'estradiol', 'didrex', 'aciphex', 'seasonale', 'allegra', 'lexapro', 'famvir', 'propecia', 'nasacort'); + if(isset($config['bad_words']) && is_array($config['bad_words'])) + { + $this->bad_words = array_values(array_merge($this->bad_words, $config['bad_words'])); + } + + // Don't change these values here - change them by passing values to the config array in this constructor's params! + $this->config_default('sb_color_background', '#FFFFFF', $config); + $this->config_default('sb_color_foreground', '#000000', $config); + $this->config_default('sb_color_editlink', '#00C000', $config); + $this->config_default('sb_color_deletelink', '#FF0000', $config); + $this->config_default('sb_color_userlink', '#0000FF', $config); + + $this->config = $config; + + if($id) $this->id = $id; + else $this->id = 'ajim_'.time(); + $this->admin = $admin; + $this->formatfunc = $formatfunc; + $this->can_post = $can_post; + $this->table_prefix = $table_prefix; + $this->sql('CREATE TABLE IF NOT EXISTS '.$this->table_prefix.'ajim( + post_id mediumint(8) NOT NULL auto_increment, + name text, + website text, + post text, + time_id int(11) NOT NULL DEFAULT 0, + PRIMARY KEY ( post_id ) + );'); + $this->iface = $handler; + if(isset($_GET['ajimmode'])) $this->handler(); + } + /** + * A dummy function used for PHP4 compatibility. + * @see AjIM::__construct() + */ + function ajim($config, $table_prefix, $handler, $admin = false, $id = false, $can_post = true, $formatfunc = false) { + $this->__construct($config, $table_prefix, $handler, $admin, $id, $can_post, $formatfunc); + } + /** + * Generates the initial HTML UI to be sent to the user, used internally. + * @access private + * @param string $ajimPath - path to the AjIM connector (not this file), relative to document root, with initial slash. + */ + function html($ajimPath) { + + $enstr = $this->can_post ? '' : ' disabled="disabled"'; + $html = ''; + $html .= ''; + if($this->admin) { + $html.= ''; + } + $html .= '
+
'; + // This is the post form div + if($this->can_post) + { + $html .= '
+ + + + + + + + '; + $html .= '
Name:
Website:
Message:

+ AjIM powered
+ '; + if($this->admin) { + $html .= '
Administration
'; + } + $html.='
'; + } else { + $html .= '
'; + if(isset($this->config['cant_post_notice'])) { + $html .= '
'.$this->config['cant_post_notice'].'
'; + } + $html .= '
'; + } + $html.=''; + + return $html; + } + /** + * Kills the database connection + */ + function destroy() { + mysql_close($this->conn); + } + /** + * Strips all traces of HTML, XML, and PHP from text, and prepares it for being inserted into a MySQL database. + * @access private + * @param string $text - the text to sanitize + * @return string + */ + function sanitize($text) { + $text = rawurldecode($text); + $text = preg_replace('#<(.*?)>#is', '<\\1>', $text); + $text = str_replace("\n", '
', $text); + $text = mysql_real_escape_string($text); + return $text; + } + /** + * Scrutinizes a string $text for any traces of the word $word, returns true if the text is clean. + * For example, if $word is "viagra" and the text contains "\/|@6r/\" this returns false, else you would get true. + * @access private + * @param string $text - the text to check + * @param string $word - word to look for. + * @return bool + */ + function spamcheck($text, $word) + { + // build an array, with each key containing one letter (equiv. to str_split() in PHP 5) + $chars = Array(); + for($i=0;$i'a|\/\\\\|@', + 'b'=>'b|\|o', + 'c'=>'c|\(|', + 'd'=>'d|o\|', + 'e'=>'e|3', + 'f'=>'f', + 'g'=>'g|6|9', + 'h'=>'h|\|n', + 'i'=>'i|\!|1|\|', + 'j'=>'j|\!|1|\|', + 'k'=>'k|\|<|\|<', + 'l'=>'l|\!|1|\|', + 'm'=>'m|nn|rn', + 'n'=>'n|h|u\\|\\\\\|', + 'o'=>'o|\(\)|0|@', + 'p'=>'p', + 'q'=>'q', + 'r'=>'r|\|\^', + 's'=>'s', + 't'=>'t|\+', + 'u'=>'u|n', + 'v'=>'v|\\\\\/', // "\/" + 'w'=>'w|vv|\\\\\/\\\\\/', // allows for "\/\/" + 'x'=>'x|><|><|><|><', + 'y'=>'y', + 'z'=>'z|\|\\\\\|' // |\| + ); + $regex = '#([\s]){0,1}'; + foreach($chars as $c) + { + $lc = strtolower($c); + if(isset($subs[$lc])) + { + $regex .= '('.$subs[$lc].')'; + } else { + die('0 $subs['.$lc.'] is not set'); + $regex .= preg_quote($c); + } + $regex .= '(.|)'; + } + $regex .= '([\s]){0,1}#is'; + //echo($word.': '.$regex.'
'); + if(preg_match($regex, $text)) return false; + return true; + } + /** + * Processes AJAX requests. Usually called if $_GET['ajimmode'] is set. + * @access private + */ + function handler() { + if(isset($_GET['ajimmode'])) { + switch($_GET['ajimmode']) { + default: + die(''); + break; + case 'getsource': + case 'getpost': + if(!preg_match('#^([0-9]+)$#', $_GET['p'])) die('SQL injection attempt'); + $q = $this->sql('SELECT post,sid,ip_addr FROM '.$this->table_prefix.'ajim WHERE post_id='.$_GET['p']); + $r = mysql_fetch_assoc($q); + if( ( ( isset($_GET['ajim_auth']) && (!$this->admin || ($this->admin != $_GET['ajim_auth']) ) ) || !isset($_GET['ajim_auth']) ) && ( $this->get_sid() != $r['sid'] || $_SERVER['REMOTE_ADDR'] != $r['ip_addr'] ) ) die('Hacking attempt'); + if($_GET['ajimmode']=='getpost') + if($this->formatfunc) + { + $p = @call_user_func($this->formatfunc, $r['post']); + if($p) $r['post'] = $p; + unset($p); // Free some memory + } + echo $r['post']; + break; + case "savepost": + if(!preg_match('#^([0-9]+)$#', $_POST['p'])) die('SQL injection attempt'); + $q = $this->sql('SELECT sid,ip_addr FROM '.$this->table_prefix.'ajim WHERE post_id='.$_POST['p']); + $r = mysql_fetch_assoc($q); + if( ( ( isset($_POST['ajim_auth']) && (!$this->admin || ($this->admin != $_POST['ajim_auth']) ) ) || !isset($_POST['ajim_auth']) ) && ( $this->get_sid() != $r['sid'] || $_SERVER['REMOTE_ADDR'] != $r['ip_addr'] ) ) die('Hacking attempt'); + $post = $this->sanitize($_POST['post']); + $post = $this->make_clickable($post); + $post = preg_replace('#_(.*?)_#is', '\\1', $post); + $post = preg_replace('#\*(.*?)\*#is', '\\1', $post); + $bad_words = Array('viagra', 'phentermine', 'pharma'); + foreach($bad_words as $w) + { + if(!$this->spamcheck($post, $w)) die('The word "'.$w.'" has been detected in your message and as a result your post has been blocked. Don\'t argue, that will only get you banned.'); + } + if(!$this->can_post) die('Access to posting messages has been denied because the administrator has set that you must be logged into this website in order to post.'); + + $this->sql('UPDATE '.$this->table_prefix.'ajim SET post=\''.$post.'\' WHERE post_id='.$_POST['p'].';'); + + if($this->formatfunc) + { + $p = @call_user_func($this->formatfunc, $post); + if($p) $post = $p; + unset($p); // Free some memory + } + die($post); + break; + case 'delete': + if(!preg_match('#^([0-9]+)$#', $_POST['p'])) die('SQL injection attempt'); + $q = $this->sql('SELECT sid,ip_addr FROM '.$this->table_prefix.'ajim WHERE post_id='.$_POST['p']); + $r = mysql_fetch_assoc($q); + if( ( ( isset($_POST['ajim_auth']) && (!$this->admin || ($this->admin != $_POST['ajim_auth']) ) ) || !isset($_POST['ajim_auth']) ) && ( $this->get_sid() != $r['sid'] || $_SERVER['REMOTE_ADDR'] != $r['ip_addr'] ) ) die('Hacking attempt'); + $this->sql('DELETE FROM '.$this->table_prefix.'ajim WHERE post_id='.$_POST['p']); + die('good'); + break; + case 'post': + if(!preg_match('#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)$#is', $_POST['website'])) $_POST['website']=''; + // Now for a clever anti-spam trick: blacklist the words "viagra" and "phentermine" using one wicked regex: + // #([\s]){1}(v|\\\\\/)(.*){1}(i|\||l|1)(.*){1}(a|@|\/\\\\)(.*){1}(g|6)(.*){1}r(.*){1}(a|@|\/\\\\)(\s){1}#is + $name = $this->sanitize($_POST['name']); + $website = $this->sanitize($_POST['website']); + $post = $this->sanitize($_POST['post']); + foreach($this->bad_words as $w) + { + if(!$this->spamcheck($post, $w)) die('The word "'.$w.'" has been detected in your message and as a result your post has been blocked. Don\'t argue, that will only get you banned.'); + } + $post = $this->make_clickable($post); + $post = preg_replace('#_(.*?)_#is', '\\1', $post); + $post = preg_replace('#\*(.*?)\*#is', '\\1', $post); + if(!$this->can_post) die('Access to posting messages has been denied because the administrator has set that you must be logged into this website in order to post.'); + $this->sql('INSERT INTO '.$this->table_prefix.'ajim ( name, website, post, time_id, sid, ip_addr ) VALUES(\''.$name.'\', \''.$website.'\', \''.$post.'\', '.time().', \''.mysql_real_escape_string($this->get_sid()).'\', \''.mysql_real_escape_string($_SERVER['REMOTE_ADDR']).'\');'); + case 'view': + // if(isset($_GET['ajim_auth'])) + // die('Auth: '.$_GET['ajim_auth']); // .'
Pw: '.$this->admin); + if(isset($_GET['latest']) && ( isset($this->config['allow_looping']) && $this->config['allow_looping'] == true )) + { + // Determine max execution time + $max_exec = intval(@ini_get('max_execution_time')); + if(!$max_exec) $max_exec = 30; + $time_left = $max_exec - 1; + } + $q = $this->sql('SELECT name, website, post, post_id, time_id, sid, ip_addr FROM '.$this->table_prefix.'ajim ORDER BY post_id;'); + if(mysql_num_rows($q) < 1) echo '0 No posts.'; + else { + // Prune the table + if($this->prune > 0) { + $nr = mysql_num_rows($q); + $nr = $nr - $this->prune; + if($nr > 0) $this->sql('DELETE FROM '.$this->table_prefix.'ajim LIMIT '.$nr.';'); + } + // Alright, what we want to do here is grab the entire table, load it into an array, and then display the posts in reverse order. + for($i = 1; $i<=mysql_num_rows($q); $i++) { + $t[$i] = mysql_fetch_object($q); + } + + $s = sizeof($t); + + if(isset($_GET['latest']) && ( isset($this->config['allow_looping']) && $this->config['allow_looping'] == true )) + { + // When I was coding this, I immediately thought "use labels and goto!" Here's hoping, PHP6 :-) + $latest_from_user = intval($_GET['latest']); + $latest_from_db = intval($t[$s]->time_id); + while(true) + { + if($latest_from_user == $latest_from_db && $time_left > 5) + { + $time_left = $time_left - 5; + sleep(5); + mysql_free_result($q); + $q = $this->sql('SELECT name, website, post, post_id, time_id, sid, ip_addr FROM '.$this->table_prefix.'ajim ORDER BY post_id;'); + $t = Array(); + for($i = 1; $i<=mysql_num_rows($q); $i++) { + $t[$i] = mysql_fetch_object($q); + } + $s = sizeof($t); + $latest_from_user = intval($_GET['latest']); + $latest_from_db = intval($t[$s]->time_id); + //echo (string)$latest_from_db.'
'; + //flush(); + //exit; + if($latest_from_user != $latest_from_db) + break; + continue; + } + elseif($latest_from_user == $latest_from_db && $time_left < 5) + { + die('[E] No new posts'); + } + break; + } + } + + echo $t[$s]->time_id . ' '; + + // This is my favorite array trick - it baffles everyone who looks at it :-D + // What it does is the same as for($i=0;$i 0; $i--) { + if($this->formatfunc) + { + $p = @call_user_func($this->formatfunc, $t[$i]->post); + if($p) $t[$i]->post = $p; + unset($p); // Free some memory + $good_tags = Array('b', 'i', 'u', 'br'); + $gt = implode('|', $good_tags); + + // Override any modifications that may have been made to the HTML + $t[$i]->post = preg_replace('#<('.$gt.')>([^.]+)</\\1>#is', '<\\1>\\2', $t[$i]->post); + $t[$i]->post = preg_replace('#<('.$gt.')([ ]*?)/>#is', '<\\1 />', $t[$i]->post); + $t[$i]->post = preg_replace('#<('.$gt.')>#is', '<\\1 />', $t[$i]->post); + } + echo '
'; + if($t[$i]->website != '') echo ''.$t[$i]->name.''; + else echo ''.$t[$i]->name.''; + echo ' '; + if( $this->can_post && ($t[$i]->sid == $this->get_sid() && $t[$i]->ip_addr == $_SERVER['REMOTE_ADDR'] ) || ( isset($_GET['ajim_auth']) && $_GET['ajim_auth']==$this->admin ) ) + echo 'Delete Edit'; + echo '
Posted on '.date('n/j, g:ia', $t[$i]->time_id).'
'; + echo '
'.$t[$i]->post.'
'; + echo '
'; + } + } + break; + case 'auth': + if($_POST['ajim_auth']==$this->admin) echo 'good'; + else echo 'The password you entered is invalid.'; + break; + } + } + } + + /** + * Replace URLs within a block of text with anchors + * Written by Nathan Codding, copyright (C) phpBB Group + * @param string $text - the text to process + * @return string + */ + function make_clickable($text) + { + $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text); + $ret = ' ' . $text; + $ret = preg_replace('#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is', '\\1\\2', $ret); + $ret = preg_replace("#(^|[\ n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", '\\1\\2', $ret); + $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", '\\1\\2@\\3', $ret); + $ret = substr($ret, 1); + return($ret); + } +} + +// The client-side javascript and CSS code + +if(isset($_GET['js']) && isset($_GET['id']) && isset($_GET['path']) && isset($_GET['pfx'])) { + header('Content-type: text/javascript'); + ?> + // + + {ADDITIONAL_HEADERS} + + + + + + + + + + + + + + + + + +
 
+
+  +
+

{PAGE_NAME}

+
diff -r 000000000000 -r 902822492a68 themes/admin/images/buttonbg.gif Binary file themes/admin/images/buttonbg.gif has changed diff -r 000000000000 -r 902822492a68 themes/admin/images/window-bottom.png Binary file themes/admin/images/window-bottom.png has changed diff -r 000000000000 -r 902822492a68 themes/admin/images/window-bottomcorners.png Binary file themes/admin/images/window-bottomcorners.png has changed diff -r 000000000000 -r 902822492a68 themes/admin/images/window-left.png Binary file themes/admin/images/window-left.png has changed diff -r 000000000000 -r 902822492a68 themes/admin/images/window-right.png Binary file themes/admin/images/window-right.png has changed diff -r 000000000000 -r 902822492a68 themes/admin/images/window-top.png Binary file themes/admin/images/window-top.png has changed diff -r 000000000000 -r 902822492a68 themes/admin/images/window-topcorners.png Binary file themes/admin/images/window-topcorners.png has changed diff -r 000000000000 -r 902822492a68 themes/admin/js/menu.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/admin/js/menu.js Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,52 @@ +var menuClicked = false; +var menuID = false; +var menuParent = false; +function adminOpenMenu(menu, parent) +{ + menuParent = parent; + if ( typeof(menu) == 'string' ) + { + menu = document.getElementById(menu); + } + if(!menu) + { + alert('Menu object is invalid'); + return false; + } + var off = fetch_offset(parent); + var dim = fetch_dimensions(parent); + var w = 200; + var top = off['top'] + dim['h']; + var left = off['left'] + dim['w'] - w; + menu.style.top = top + 'px'; + menu.style.left = left + 'px'; + menu.style.display = 'block'; + menuID = menu.id; + setTimeout('setMenuoffEvents();', 500); + //if(!IE) + // parent.onclick = eval('(function() { this.onclick = function() { adminOpenMenu(\'' + menu.id + '\', this); return false; }; return false; } )'); +} + +function adminMenuOff() +{ + if ( menuID ) + { + menu = document.getElementById(menuID); + menu.style.display = 'none'; + menu.onmousedown = false; + menu.onmouseup = false; + menuID = false; + document.onclick = false; + //menuParent.onclick(); + //menuParent = false; + } +} + +function setMenuoffEvents() +{ + menu = document.getElementById(menuID); + menu.onmousedown = function() { menuClicked = true; } + menu.onmouseup = function() { setTimeout('menuClicked = false;', 100); } + document.onclick = function() { if ( menuClicked ) return false; adminMenuOff(); } +} + diff -r 000000000000 -r 902822492a68 themes/admin/sidebar-editor.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/admin/sidebar-editor.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,58 @@ +
  • {TEXT}
  • + +
  • {HTML}
  • + + +
    + + + + + + +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
      + {CONTENT} +
    +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
    • + {CONTENT} +
    +
    +
    + + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/admin/simple-footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/admin/simple-footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,41 @@ +
    + +
    +
    +

    Your browser does not support CSS.

    +

    If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9.

    +

    Because of this, there are a few minor issues that you may experience while browsing this site, not the least of which is some visual elements below that would normally be hidden in most browsers. Please excuse these minor inconveniences.

    +
    + + + + + diff -r 000000000000 -r 902822492a68 themes/admin/simple-header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/admin/simple-header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,42 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + + + + + + + + + + +
     
    +
    +  +
    +

    {PAGE_NAME}

    +
    diff -r 000000000000 -r 902822492a68 themes/admin/theme.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/admin/theme.cfg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,18 @@ + diff -r 000000000000 -r 902822492a68 themes/boxart/acledit.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/acledit.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + +
    DenyDisallowWiki modeAllow
    {FIELD_DESC}
    +

    Permission types:

    +
      +
    • Allow means that the user is allowed to access the item
    • +
    • Wiki mode means the user can access the item if wiki mode is active (per-page wiki mode is taken into account)
    • +
    • Disallow means the user is denied access unless something allows it.
    • +
    • Deny means that the user is denied access to the item. This setting overrides all other permissions.
    • +
    +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/boxart/comment.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/comment.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,51 @@ +
    + + + + + + + + + + + + + + + + + + + + + +
    {DATETIME}
    + + + + + + + +
    + {NAME}
    + {USER_LEVEL} +
    + {SEND_PM_LINK} {ADD_BUDDY_LINK} +
    +
    + Subject: {SUBJECT} +
    +
    {DATA}
    + +
    + {SIGNATURE} + +
    + [ {EDIT_LINK} | {DELETE_LINK} ] +
    + Moderation options: {MOD_APPROVE_LINK} {MOD_DELETE_LINK} +
    +
    +
    diff -r 000000000000 -r 902822492a68 themes/boxart/css-simple/blackjack.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css-simple/blackjack.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,4 @@ +div#credits { text-align: center; background-color: #78837D; } +table#enano-main { margin: 0 auto; } +td#header-banner { background-color: #78837D; } +td#header-banner h1 { color: #C8D3CD; } diff -r 000000000000 -r 902822492a68 themes/boxart/css-simple/blueberry.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css-simple/blueberry.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,4 @@ +div#credits { text-align: center; background-color: #355788; } +table#enano-main { margin: 0 auto; } +td#header-banner { background-color: #355788; } +td#header-banner h1 { color: #C5E7FF; } diff -r 000000000000 -r 902822492a68 themes/boxart/css/#Untitled-2# --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css/#Untitled-2# Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,29 @@ +

    Welcome to my homepage.

    + +Please add more content here, including an introductory "Hi, my name is Debbie Fuhry", etc etc. +{| border="0" +|- +| [[:File:debbie1.jpg]] +Photo by Becky +| style="padding-left: 10px;" +===I am...=== + +A homeschool mom: I have two kids, Tim, age 13 and Becky, age 11. I've been homeschooling them since Tim was 5 years old. +An aspiring author: See the descriptions of [[Onesimus books|my books]], Free Indeed, hopefully to get published this year, and Faithful unto Death, which I'm still writing. + +===Contact me=== + +You can either e-mail me, or visit my [http://blogs.fuhrykitchentable.no-ip.org/debbie/ blog]. +Note: if your web browser is very old, the e-mail link may appear as a bunch of jumbled numbers or it may not work at all. This is because I use an encrypted e-mail link on this page in an effort to avoid spam. +|} + +===Verse of the month=== + +'''Proverbs 3:11-12''' +''"My son, do not despise the Lord's discipline and do not resent his rebuke, because the Lord disciplines those he loves, as a father the son he delights in."'' + +===Quote of the month=== + +''"Then from the dawn it seem'd there came, but faint As from beyond the limit of the world, Like the last echo born of a great cry Sounds, as if some fair city were one voice Around a king returning from his wars."'' + +Tennyson, __Idylls of the King__ on the death of Arthur diff -r 000000000000 -r 902822492a68 themes/boxart/css/_printable.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css/_printable.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,75 @@ +html,body { height: 100%; } +body { margin: 0; padding: 0; background: #FFFFFF font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444 } +div.pad { padding: 10px; } +table#title { margin: 0; padding: 0; height: 100px; background-color: #FFFFFF; text-align: center; border: 1px solid #000000; border-bottom: 0px solid #000000; } +td.mdgSidebarHolder { width: 0px; } +div.sidebar { display: none; width: 0px; background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px; } +div.sidebar .head { background-color: #F0F0F0; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar .head:hover { background-color: #F4F4F4; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar div.slideblock a { background-color: #DDD; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.sidebar div.slideblock a:hover { background-color: #EEE; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.recttop { display: none; width: 0px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/oxygen/images/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.rectbot { display: none; width: 0px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/oxygen/images/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock { overflow: hidden; } +div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; } +div#credits { margin: 0; padding: 10px; background-color: #FFFFFF; border: 1px solid #AAA; color: #AAA; font-size: 7pt; } +div#credits a { color: #888888; text-decoration: underline; } +div#credits a:hover { color: #888888; text-decoration: underline; } + +div#content h2 { border-bottom: 1px solid #666666; margin-bottom: 0; } +div#content h3 { font-size: 11pt; font-weight: bold; } +div#content p { margin-left: 1.0em; } +div#content { font-size: 9pt; } +div#content a { color: #000000; text-decoration: underline; } +div#content a:hover { color: #000000; text-decoration: underline; } +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #606060; } + +div#content a.wikilink-nonexistent { color: #B05020; } +div#content a.wikilink-nonexistent:hover { color: #D06030; } + +.mdg-comment { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +div.pagebar { background-color: #FFFFFF; margin-top: 0px; padding: 3px; font-size: 7pt; border: 1px solid #000000; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #606060; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #606060; background-color: #E0E0E0; } +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a { display: block; margin: 0; } + +/* Rounded corners on nearly everything */ +td#mdg-tl { width: 0px; height: 0px; } +td#mdg-tr { width: 0px; height: 0px; } +td#mdg-top { width: 0px; height: 0px; } +td#mdg-l { width: 0px; height: 0px; } +td#mdg-r { width: 0px; height: 0px; } +td#mdg-bl { width: 0px; height: 0px; } +td#mdg-br { width: 0px; height: 0px; } +td#mdg-ml { width: 0px; height: 0px; } +td#mdg-mr { width: 0px; height: 0px; } +td#mdg-brl { width: 0px; height: 0px; } +td#mdg-brr { width: 0px; height: 0px; } +td#mdg-btl { width: 0px; height: 0px; } +td#mdg-btr { width: 0px; height: 0px; } +td#mdg-btcl { width: 0px; height: 0px; } +td#mdg-btcr { width: 0px; height: 0px; } +td#mdg-btm { width: 0px; height: 0px; } +td#mdg-menu-tl { width: 0px; height: 0px; } +td#mdg-menu-tr { width: 0px; height: 0px; } +td#mdg-menu-bl { width: 0px; height: 0px; } +td#mdg-menu-br { width: 0px; height: 0px; } +td#mdg-menu-top { width: 0px; height: 0px; } +td#mdg-menu-btm { width: 0px; height: 0px; } + +input, textarea, select { border: 1px solid #606060; background-color: #FFFFFF; padding: 3px; } +input:hover, textarea:hover, select:hover { border: 1px solid #606060; background-color: #FFFFFF; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #606060; background-color: #FFFFFF; padding: 3px; } + +div.jswindow { border: 2px solid #7090B0; border-top: 5px solid #7090B0; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #7090B0; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0D0F0; background-color: #90B0D0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0D0F0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } diff -r 000000000000 -r 902822492a68 themes/boxart/css/blackjack.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css/blackjack.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,259 @@ +/** + * Box Art for Enano - make your website look like the old Enano, er, Midget, er, AdvancedArticles? + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background: #88938D; font-family: arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444; } +div.pad { padding: 10px; } +table#enano-master { height: 100%; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 156px; } +div.sidebar, .dbx-group { width: 154px; background-color: #88938D; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { font-family: Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #000000;background-color: #A7AFA7;color: #000000; margin: 0px 3px 2px 3px; padding: 3px 3px 5px 3px; text-decoration: none; display: block; } +div.sidebar .head:hover, .dbx-handle:hover { font-family: Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #000000;background-color: #A8B3AD;color: #000000; margin: 0px 3px 2px 3px; padding: 3px 3px 5px 3px; text-decoration: none; display: block; } +div.sidebar div.slideblock a , .dbx-content a { font-family: Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #575F57;background-color: #B8BDB8;color: #575F57; margin: 0px 3px 2px 7px; padding: 7px 3px 7px 5px; text-decoration: none; display: block; text-align: right; } +div.sidebar div.slideblock a:hover, .dbx-content a:hover { font-family: Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #272F27;background-color: #989D98;color: #000000; margin: 0px 3px 2px 7px; padding: 7px 3px 7px 5px; text-decoration: none; display: block; text-align: right; } +div.recttop { width: 156px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 156px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; } +div.slideblock2, .dbx-content2 { overflow: hidden; background-color: #88938D; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move; } + +/* The credits thingy at the bottom */ +div#credits { margin: 0; background-color: #88938D; color: #FFF; font-size: 7pt; text-align: right; padding: 3px; } +div#credits a { color: #A8B3AD; text-decoration: none; } +div#credits a:hover { color: #C8D3CD; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #406080; } + +#enanomain { background-color: #C8CDC8; color: #272F27; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #8E9B80; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li { list-style: url({SCRIPTPATH}/themes/boxart/images/bullet.gif); } +div.contentDiv p { margin-left: 1.0em; } +div.contentDiv blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv { font-size: 9pt; padding: 0px 10px 10px 10px; } +div.contentDiv a { color: #2E3B20; text-decoration: none; border-bottom: 1px dotted #666; border-top: 1px dotted #666; } +div.contentDiv a:hover { color: #8E9B80; text-decoration: none; border-bottom: 1px dotted #AAA; border-top: 1px dotted #AAA; } +div.contentDiv a[href ^="http://"] { color: #4E5B40; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]{ color: #4E5B40; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"] { color: #4E5B40; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/irc.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"] { color: #4E5B40; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="http://"]:hover { color: #6E7B60; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]:hover { color: #6E7B60; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"]:hover { color: #6E7B60; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"]:hover { color: #6E7B60; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Wikilinks to pages that don't exist */ +div.contentDiv a.wikilink-nonexistent { color: #B05020; } +div.contentDiv a.wikilink-nonexistent:hover { color: #D06030; } + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #D8DCDD; } +.tblholder { margin-left: 1em; padding: 0px; border: 1px solid #AAAAAA; background-color: #D8DCDD; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +.tblholder td.row1 { padding: 4px; background-color: #D8DDD8 !important; } +.tblholder td.row2 { padding: 4px; background-color: #E8EDE8 !important; } +.tblholder td.row3 { padding: 4px; background-color: #E0E6E0 !important; } +.tblholder th { padding: 4px; background-color: #68736D !important; font-weight: bold; text-align: center; color: #FFFFFF; } +.tblholder th.subhead { padding: 4px; background-color: #88938D !important; font-weight: bold; text-align: center; color: #FFFFFF; } +.tblholder table { background-color: #FFFFFF; } + +/* Same as mdg-comment, but without the cute comment icon. Mostly unused. */ +.mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #D8DCDD; } + +/* The "page tools" bar below the site logo but above the page content * / +div.pagebar { background-color: #A8B3AD; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #48534D; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #48534D; background-color: #C8D3CD; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E0F0FF; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0FF; } + +/* Tweaks for the popup menu version of the same thing * / +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a { display: block; margin: 0; } + +/* + * jBox menu system + */ + +div.menu { + background-color: #A8B3AD; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #48534D; + border-top-width: 0px !important; + border-bottom-width: 0px !important; +} +div.menu div.label { + color: #201000; + cursor: default; +} +div.menu span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover { + color: #281700; + background-color: #C8D3CD; +} +div.menu input[type ^="text"], div.menu input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 4px 5px; + max-width: 70px; + background-color: #C8CDC8; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover { + background-color: #D8DDD8; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus { + background-color: #E8EDE8; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover { + color: #402000; + background-color: #C8CDC8; +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0; + background-color: #A8B3AD; + border-width: 0; + min-width: 120px; +} +div.menu ul li { + list-style: none; +} +div.menu ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #48534D; background-color: #98A39D; padding: 3px; } +input:hover, textarea:hover, select:hover { border: 1px solid #68736D; background-color: #A8B3AD; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #98A39D; background-color: #C8D3CD; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } + +/* JWS window theming */ +div.jswindow { border: 2px solid #98A39D; border-top: 5px solid #98A39D; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #D8DCDD; } +div.titlebar { background-color: #98A39D; color: #272F27; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #272F27; background-color: #98A39D; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #474F47; background-color: #A8B3AD; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #D8DCDD; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url({SCRIPTPATH}/images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url({SCRIPTPATH}/images/info.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url({SCRIPTPATH}/images/warning.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url({SCRIPTPATH}/images/question.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url({SCRIPTPATH}/images/wait.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90B0D0; padding: 10px; overflow: auto; max-height: 150px; } + +/* + * Docking Boxes code (for the sidebar editor) + */ + +/* group container(s) */ +#sbedit { + margin: 0; + padding: 0; + /* position:relative; /* additional outer containers must also have position:relative */ +} +/* keyboard navigation tooltip */ +.dbx-tooltip { + display:block; + position:absolute; + margin:36px 0 0 125px; + width:185px; + border:1px solid #000; + background:#ffd; + color:#000; + font:normal normal normal 0.85em tahoma, arial, sans-serif; + padding:2px 4px 3px 5px; + text-align:left; + } +* html .dbx-tooltip { width:195px; } + +/* use CSS2 system colors in CSS2 browsers + but not safari, which doesn't support them */ +*[class="dbx-tooltip"]:lang(en) { + border-color:InfoText; + background:InfoBackground; + color:InfoText; + font:small-caption; + font-weight:normal; + } +/* additional clone styles */ +.dbx-clone { + opacity: 0.8; +} +.dbx-content ul { + margin: 0; padding: 0; list-style-type: none; +} +.dbx-content li a, .dbx-content li a:hover { + text-decoration: none; color: #666; +} +.dbx-content li, .dbx-content2 li { + list-style-type: none; +} +.dbx-content2 { + background-color: #DDD; margin: 0px 1px 0px 1px; +} + diff -r 000000000000 -r 902822492a68 themes/boxart/css/blueberry.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css/blueberry.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,255 @@ +/** + * Box Art for Enano - make your website look like the old Enano, er, Midget, er, AdvancedArticles? + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background: #456798; font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444; } +div.pad { padding: 10px; } +table#enano-master { height: 100%; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 156px; } +div.sidebar, .dbx-group { width: 154px; background-color: #456798; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border-right: 1px solid #95B7E8;border-bottom: 1px solid #95B7E8;border-left: 1px solid #254778;border-top: 1px solid #254778;background-color: #85A7D8;color: #000000; margin: 0px 3px 2px 3px; padding: 3px 3px 5px 3px; text-decoration: none; display: block; } +div.sidebar .head:hover, .dbx-handle:hover { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border-right: 1px solid #95B7E8;border-bottom: 1px solid #95B7E8;border-left: 1px solid #254778;border-top: 1px solid #254778;background-color: #B5D7FF;color: #000000; margin: 0px 3px 2px 3px; padding: 3px 3px 5px 3px; text-decoration: none; display: block; } +div.sidebar div.slideblock a , .dbx-content a { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #254778;background-color: #7597C8;color: #000000; margin: 0px 3px 2px 7px; padding: 7px 3px 7px 5px; text-decoration: none; display: block; text-align: right; } +div.sidebar div.slideblock a:hover, .dbx-content a:hover { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #254778;background-color: #A5C7F8;color: #000000; margin: 0px 3px 2px 7px; padding: 7px 3px 7px 5px; text-decoration: none; display: block; text-align: right; } +div.recttop { width: 156px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 156px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; } +div.slideblock2, .dbx-content2 { overflow: hidden; background-color: #456798; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move; } +/* The credits thingy at the bottom */ +div#credits { margin: 0; background-color: #456798; color: #FFF; font-size: 7pt; text-align: right; padding: 3px; } +div#credits a { color: #B5D7F8; text-decoration: none; } +div#credits a:hover { color: #D5F7FF; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #406080; } + +#enanomain { background-color: #FFFFFF; color: #000000; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #8E9B80; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li { list-style: url({SCRIPTPATH}/themes/boxart/images/bullet.gif); } +div.contentDiv p { margin-left: 1.0em; } +div.contentDiv blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv { font-size: 9pt; padding: 0px 10px 10px 10px; } +div.contentDiv a { color: #254778; text-decoration: none; } +div.contentDiv a:hover { color: #7597C8; text-decoration: none; } +div.contentDiv a[href ^="http://"] { color: #355788; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]{ color: #355788; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"] { color: #355788; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/irc.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"] { color: #355788; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="http://"]:hover { color: #85A7D8; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]:hover { color: #85A7D8; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"]:hover { color: #85A7D8; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"]:hover { color: #85A7D8; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Wikilinks to pages that don't exist */ +div.contentDiv a.wikilink-nonexistent { color: #B05020; } +div.contentDiv a.wikilink-nonexistent:hover { color: #D06030; } + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E0E0E0; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +.mdg-comment td.row1 { padding: 4px; background-color: #E0E0E0; } +.mdg-comment td.row2 { padding: 4px; background-color: #F0F0F0; } +.mdg-comment td.row3 { padding: 4px; background-color: #E8E8E8; } +.mdg-comment th { padding: 4px; background-color: #7080A0; font-weight: bold; text-align: center; color: #FFFFFF; } +.mdg-comment th.subhead { padding: 4px; background-color: #90A0B0; font-weight: bold; text-align: center; color: #FFFFFF; } +.mdg-comment table { background-color: #FFFFFF; } + +/* Same as mdg-comment, but without the cute comment icon. Mostly unused. */ +.mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #D8DCDD; } + +/* The "page tools" bar below the site logo but above the page content * / +div.pagebar { background-color: #85A7D8; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #254778; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #001748; background-color: #A5C7F8; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E0F0FF; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0FF; } + +/* Tweaks for the popup menu version of the same thing * / +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a { display: block; margin: 0; } + +/* + * jBox menu system + */ + +div.menu { + background-color: #85A7D8; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #254778; +} +div.menu div.label { + color: #001020; + cursor: default; +} +div.menu span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover { + color: #001748; + background-color: #A5C7F8; +} +div.menu input[type ^="text"], div.menu input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 4px 5px; + max-width: 70px; + background-color: #D0F0FF; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover { + background-color: #E0F0FF; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus { + background-color: #F0F0FF; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover { + color: #000040; + background-color: #FFFFFF; +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0; + background-color: #85A7D8; + border-width: 0; + min-width: 120px; +} +div.menu ul li { + list-style: none; +} +div.menu ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #406080; background-color: #F2F2F2; padding: 3px; } +input:hover, textarea:hover, select:hover { border: 1px solid #6080A0; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90B0D0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } + +/* JWS window theming */ +div.jswindow { border: 2px solid #7090B0; border-top: 5px solid #7090B0; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #7090B0; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0D0F0; background-color: #90B0D0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0D0F0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url({SCRIPTPATH}/images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url({SCRIPTPATH}/images/info.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url({SCRIPTPATH}/images/warning.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url({SCRIPTPATH}/images/question.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url({SCRIPTPATH}/images/wait.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90B0D0; padding: 10px; overflow: auto; max-height: 150px; } + +/* + * Docking Boxes code (for the sidebar editor) + */ + +/* group container(s) */ +#sbedit { + margin: 0; + padding: 0; + /* position:relative; /* additional outer containers must also have position:relative */ +} +/* keyboard navigation tooltip */ +.dbx-tooltip { + display:block; + position:absolute; + margin:36px 0 0 125px; + width:185px; + border:1px solid #000; + background:#ffd; + color:#000; + font:normal normal normal 0.85em tahoma, arial, sans-serif; + padding:2px 4px 3px 5px; + text-align:left; + } +* html .dbx-tooltip { width:195px; } + +/* use CSS2 system colors in CSS2 browsers + but not safari, which doesn't support them */ +*[class="dbx-tooltip"]:lang(en) { + border-color:InfoText; + background:InfoBackground; + color:InfoText; + font:small-caption; + font-weight:normal; + } +/* additional clone styles */ +.dbx-clone { + opacity: 0.8; +} +.dbx-content ul { + margin: 0; padding: 0; list-style-type: none; +} +.dbx-content li a, .dbx-content li a:hover { + text-decoration: none; color: #666; +} +.dbx-content li, .dbx-content2 li { + list-style-type: none; +} +.dbx-content2 { + background-color: #DDD; margin: 0px 1px 0px 1px; +} + diff -r 000000000000 -r 902822492a68 themes/boxart/css/mint.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/css/mint.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,170 @@ +/** + * Box Art for Enano - make your website look like the old Enano, er, Midget, er, AdvancedArticles? + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background: #459867; font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444; } +div.pad { padding: 10px; } +table#enano-master { height: 100%; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 156px; } +div.sidebar, .dbx-group { width: 154px; background-color: #459867; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border-right: 1px solid #95E8B7;border-bottom: 1px solid #95E8B7;border-left: 1px solid #257847;border-top: 1px solid #257847;background-color: #85D8A7;color: #000000; margin: 0px 3px 2px 3px; padding: 3px 3px 5px 3px; text-decoration: none; display: block; } +div.sidebar .head:hover, .dbx-handle:hover { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border-right: 1px solid #95E8B7;border-bottom: 1px solid #95E8B7;border-left: 1px solid #257847;border-top: 1px solid #257847;background-color: #B5FFD7;color: #000000; margin: 0px 3px 2px 3px; padding: 3px 3px 5px 3px; text-decoration: none; display: block; } +div.sidebar div.slideblock a , .dbx-content a { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #257847;background-color: #75C897;color: #000000; margin: 0px 3px 2px 7px; padding: 7px 3px 7px 5px; text-decoration: none; display: block; text-align: right; } +div.sidebar div.slideblock a:hover, .dbx-content a:hover { font-family: trebuchet ms, verdana, Arial, helvetica, sans-serif; font-size: 9pt; cursor: pointer; border: 1px solid #257847;background-color: #A5F8C7;color: #000000; margin: 0px 3px 2px 7px; padding: 7px 3px 7px 5px; text-decoration: none; display: block; text-align: right; } +div.recttop { width: 156px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 156px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url({SCRIPTPATH}/themes/boxart/images/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; } +div.slideblock2, .dbx-content2 { overflow: hidden; background-color: #459867; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move; } +/* The credits thingy at the bottom */ +div#credits { margin: 0; background-color: #459867; color: #FFF; font-size: 7pt; text-align: right; padding: 3px; } +div#credits a { color: #B5F8D7; text-decoration: none; } +div#credits a:hover { color: #D5FFF7; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #408060; } + +#enanomain { background-color: #FFFFFF; color: #000000; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #8E809B; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li { list-style: url({SCRIPTPATH}/themes/boxart/images/bullet.gif); } +div.contentDiv p { margin-left: 1.0em; } +div.contentDiv blockquote { background-color: #F4F4F4; border: 1px dotted #408060; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv { font-size: 9pt; padding: 0px 10px 10px 10px; } +div.contentDiv a { color: #257847; text-decoration: none; } +div.contentDiv a:hover { color: #75C897; text-decoration: none; } +div.contentDiv a[href ^="http://"] { color: #358857; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]{ color: #358857; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"] { color: #358857; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/irc.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"] { color: #358857; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="http://"]:hover { color: #85D8A7; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]:hover { color: #85D8A7; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"]:hover { color: #85D8A7; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"]:hover { color: #85D8A7; background: url({SCRIPTPATH}/themes/boxart/images/{STYLE_ID}/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Wikilinks to pages that don't exist */ +div.contentDiv a.wikilink-nonexistent { color: #B02050; } +div.contentDiv a.wikilink-nonexistent:hover { color: #D03060; } + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E0E0E0; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +.mdg-comment td.row1 { padding: 4px; background-color: #E0E0E0; } +.mdg-comment td.row2 { padding: 4px; background-color: #F0F0F0; } +.mdg-comment td.row3 { padding: 4px; background-color: #E8E8E8; } +.mdg-comment th { padding: 4px; background-color: #70A080; font-weight: bold; text-align: center; color: #FFFFFF; } +.mdg-comment th.subhead { padding: 4px; background-color: #90B0A0; font-weight: bold; text-align: center; color: #FFFFFF; } +.mdg-comment table { background-color: #FFFFFF; } + +/* Same as mdg-comment, but without the cute comment icon. Mostly unused. */ +.mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #D8DDDC; } + +/* The "page tools" bar below the site logo but above the page content */ +div.pagebar { background-color: #85D8A7; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #257847; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #004817; background-color: #A5F8C7; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #408060; background-color: #E0FFF0; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #408060; background-color: #D0FFF0; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #408060; background-color: #F0FFF0; } + +/* Tweaks for the popup menu version of the same thing */ +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a { display: block; margin: 0; } + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #408060; background-color: #F2F2F2; padding: 3px; } +input:hover, textarea:hover, select:hover { border: 1px solid #60A080; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90D0B0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } + +/* JWS window theming */ +div.jswindow { border: 2px solid #70B090; border-top: 5px solid #70B090; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #70B090; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0F0D0; background-color: #90D0B0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0F0D0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url({SCRIPTPATH}/images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url({SCRIPTPATH}/images/info.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url({SCRIPTPATH}/images/warning.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url({SCRIPTPATH}/images/question.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url({SCRIPTPATH}/images/wait.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90D0B0; padding: 10px; overflow: auto; max-height: 150px; } + +/* + * Docking Boxes code (for the sidebar editor) + */ + +/* group container(s) */ +#sbedit { + margin: 0; + padding: 0; + /* position:relative; /* additional outer containers must also have position:relative */ +} +/* keyboard navigation tooltip */ +.dbx-tooltip { + display:block; + position:absolute; + margin:36px 0 0 125px; + width:185px; + border:1px solid #000; + background:#ffd; + color:#000; + font:normal normal normal 0.85em tahoma, arial, sans-serif; + padding:2px 4px 3px 5px; + text-align:left; + } +* html .dbx-tooltip { width:195px; } + +/* use CSS2 system colors in CSS2 browsers + but not safari, which doesn't support them */ +*[class="dbx-tooltip"]:lang(en) { + border-color:InfoText; + background:InfoBackground; + color:InfoText; + font:small-caption; + font-weight:normal; + } +/* additional clone styles */ +.dbx-clone { + opacity: 0.8; +} +.dbx-content ul { + margin: 0; padding: 0; list-style-type: none; +} +.dbx-content li a, .dbx-content li a:hover { + text-decoration: none; color: #666; +} +.dbx-content li, .dbx-content2 li { + list-style-type: none; +} +.dbx-content2 { + background-color: #DDD; margin: 0px 1px 0px 1px; +} + diff -r 000000000000 -r 902822492a68 themes/boxart/elements.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/elements.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ +{TEXT}
    + +{HTML}
    + +
    {TEXT}
    + + +{TEXT} + +
    {TEXT}
    + +{TEXT} + +
  • {TEXT}
  • + +
  • {HTML}
  • + + + +
    +
    +

    + {TITLE}

    +
    +
    {CONTENT}
    +
    + + +
    +
    +

    + {TITLE}

    +
    +
    {CONTENT}
    +
    + diff -r 000000000000 -r 902822492a68 themes/boxart/footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,23 @@ +
    +
    +
    + +
    + + + + + + +
    + {COPYRIGHT} • Powered by Enano | Valid XHTML 1.1 | Valid CSS | [[Stats]] +
    + + + + + diff -r 000000000000 -r 902822492a68 themes/boxart/header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,96 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + {JS_DYNAMIC_VARS} + + + + {ADDITIONAL_HEADERS} + + +
    +
    Confirm Logout
    +
    +
    +
    +

    Are you sure you want to log out?

    + +
    +
    +
    +
    +
    +
    Change style
    +
    + If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9. +
    +
    +
    +
    Wiki formatting help
    +
    + Loading... +
    +
    + + + + + + + +
    {SITE_NAME}
    + + + + + + + + + + + +
    + +
    +
    +

    {PAGE_NAME}

    +
    diff -r 000000000000 -r 902822492a68 themes/boxart/images/blackjack/email.gif Binary file themes/boxart/images/blackjack/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blackjack/external.gif Binary file themes/boxart/images/blackjack/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blackjack/https.gif Binary file themes/boxart/images/blackjack/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blackjack/irc.gif Binary file themes/boxart/images/blackjack/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blueberry/email.gif Binary file themes/boxart/images/blueberry/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blueberry/external.gif Binary file themes/boxart/images/blueberry/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blueberry/https.gif Binary file themes/boxart/images/blueberry/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/blueberry/irc.gif Binary file themes/boxart/images/blueberry/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/logo-blackjack.png Binary file themes/boxart/images/logo-blackjack.png has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/logo-blueberry.png Binary file themes/boxart/images/logo-blueberry.png has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/logo-mint.png Binary file themes/boxart/images/logo-mint.png has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/mint/email.gif Binary file themes/boxart/images/mint/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/mint/external.gif Binary file themes/boxart/images/mint/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/mint/https.gif Binary file themes/boxart/images/mint/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/images/mint/irc.gif Binary file themes/boxart/images/mint/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/boxart/sidebar-editor.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/sidebar-editor.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ +
  • {TEXT}
  • + +
  • {HTML}
  • + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
      + {CONTENT} +
    +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
    • + {CONTENT} +
    +
    +
    + diff -r 000000000000 -r 902822492a68 themes/boxart/simple-footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/simple-footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,49 @@ +
    +
    +
    +
    +
    + +
    + Powered by Enano, © 2007  |  [[Stats]] +
    + +
    + +
    + +
    +
    Confirm Logout
    +
    +
    +
    +

    Are you sure you want to log out?

    + +
    +
    +
    +
    +
    +
    Change style
    +
    + If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9. +
    +
    +
    +
    Wiki formatting help
    +
    + Loading... +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/boxart/simple-header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/simple-header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,56 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + + {JS_DYNAMIC_VARS} + + + + {ADDITIONAL_HEADERS} + + + + + + + + + + + + + + + +
    + + + + + + +
    +

    {PAGE_NAME}

    +
    +
    +
    diff -r 000000000000 -r 902822492a68 themes/boxart/theme.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/boxart/theme.cfg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,18 @@ + diff -r 000000000000 -r 902822492a68 themes/connections/acledit.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/acledit.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + +
    DenyDisallowWiki modeAllow
    {FIELD_DESC}
    +

    Permission types:

    +
      +
    • Allow means that the user is allowed to access the item
    • +
    • Wiki mode means the user can access the item if wiki mode is active (per-page wiki mode is taken into account)
    • +
    • Disallow means the user is denied access unless something allows it.
    • +
    • Deny means that the user is denied access to the item. This setting overrides all other permissions.
    • +
    +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/connections/blogpost.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/blogpost.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,13 @@ + + + +
    + {CONTENT} +
    + diff -r 000000000000 -r 902822492a68 themes/connections/blogseparator.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/blogseparator.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,4 @@ + + diff -r 000000000000 -r 902822492a68 themes/connections/comment.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/comment.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,51 @@ +
    + + + + + + + + + + + + + + + + + + + + + +
    {DATETIME}
    + + + + + + + +
    + {NAME}
    + {USER_LEVEL} +
    + {SEND_PM_LINK} {ADD_BUDDY_LINK} +
    +
    + Subject: {SUBJECT} +
    +
    {DATA}
    + +
    + {SIGNATURE} + +
    + [ {EDIT_LINK} | {DELETE_LINK} ] +
    + Moderation options: {MOD_APPROVE_LINK} {MOD_DELETE_LINK} +
    +
    +
    diff -r 000000000000 -r 902822492a68 themes/connections/css/_printable.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/css/_printable.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,426 @@ +/* +Theme Name: Connections +Theme URI: http://www.patriciamuller.com/ +Version: 1.0 +Description: A Theme from wpthemes.Info +Author: Patricia Muller +Author URI: http://www.vanillamist.com/blog/ + +Port information: +Ported from: WordPress +Ported by: Dan Fuhry - http://midget.rgw-net.com/ +*/ +html,body { height: 100%; } +body { + margin:0; + padding:0; + font-family: 'Trebuchet MS',Georgia, Times, Times New Roman, sans-serif; + font-size: 0.9em; + text-align:center; + color:#333333; + line-height:1.3em; + background: #FFFFFF; +} +a { + color: #000000; + text-decoration:underline; +} +a:visited { + color: #000000; +} +a:hover { + color: #000000; + background-color: #EEE; + text-decoration:underline; +} +input, textarea +{ + background: #FFFFFF; + border: #000000 1px solid; +} +#rap +{ + background:#fff; + width:760px; + margin:0 auto; + padding:0px 8px; + text-align:left; + font-family: Trebuchet MS,Georgia, Arial, serif; + font-size: 0.9em; +} +#header { + background:#FFF; + height: 183px; + margin: 0 auto; + width:740px; + padding:0; + border:#000 1px solid; + border-bottom 0px solid #FFFFFF; +} +#main +{ + margin:0 auto; + padding:0; + background:#FFF; + width:740px; +} +#content { + width:510px; + float:left; + padding:5px; + margin:0; + overflow:auto; + display:inline; + text-align: left; +} +#sidebar { + width:186px; + float:right; + padding:0px 8px 10px 8px; + margin:0; + font-size:1em; + color:#333; + display:inline; +} +a img { + border: none; +} +acronym, abbr { + border-bottom: 1px dotted #000000; +} +acronym, abbr, span.caps { + cursor: help; + letter-spacing: .07em; +} +code { + font-size: 1em; + font-style: italic; +} +blockquote { + margin: 15px 30px 0 45px; + padding: 0 0 0 45px; + background: #FFF; + border: 1px solid #000; + font-style:italic; +} + +cite { + font-size: 0.9em; + font-style: normal; +} +h3 { + margin: 0; + padding: 0; + font-size:1.3em; +} +p { + margin: 0 0 1em; + padding: 0; + line-height: 1.5em; +} +h1, h2, h3, h4 { + font-family: Georgia, "Lucida Sans Unicode", lucida, Verdana, serif; + font-weight: normal; + letter-spacing: 1px; +} +#header h1 +{ + margin: 0; + font-size: 1.6em; + padding:10px 20px 0 0; + text-align:right; +} +#header h1 a +{ + color:#606060; + text-decoration:none; +} +#header h1 a:hover +{ + color:#606060; + text-decoration: underline; +} +#header #desc +{ + font-weight:normal; + font-size:1em; + color:#606060; + text-align:right; + margin:0; + padding:0 20px 0 0; +} +#sidebar div.heading { + margin: 0 0 0 0; + padding:2px; + font-size: 1em; + color: #000000; + text-align:center; + background:#DDDDDD; + border:#ccc 0px solid; + height:22px; + font-weight:bold; +} +#sidebar div.slider { + list-style-type: none; + margin: 0; + margin-top: 7px; + font-size: 0.9em; +} +#sidebar div.slideblock { + padding: 5px; + overflow: hidden; + background:#FFFFFF; + border: 1px solid #000000; + border-top 0px solid #FFFFFF; +} +#sidebar div.slideblock a { + display: block; + color: #333333; + padding: 4px; + text-decoration: none; +} +#sidebar div.slideblock a:hover { + display: block; + color: #333333; + background-color: #EEE; + padding: 4px; + text-decoration: none; +} +#pagenav +{ + list-style:none; +} +#sidebar ul li { + margin: 0.1em 0 0 0; + padding: 0; +} +#sidebar ul li a { + text-decoration: none; + border:none; +} +#sidebar ul li a:link { + color: #909D73; +} +#sidebar ul li a:visited { + color: #999999; +} +#sidebar ul li a:hover, #sidebar ul li a:active { + color: #990000; +} +#sidebar ul ul { + list-style-type: none; + padding: 5px; + margin: 0; + font-size: 1em; + background:none; + border:none; +} +#sidebar ul ul li +{ + margin:0; + padding:0; + padding-left:10px; + margin-left:10px; + background:url({TEMPLATE_DIR}/img/subcat_bullet.gif) no-repeat left; +} +#content ul { + margin-left: 0; + padding-left: 45px; + list-style-type: none; +} +#content ul li { + background: url({TEMPLATE_DIR}/img/bullet.gif) no-repeat 0 7px; + padding-left: 1.5em; +} +.post , .page +{ + margin:0 0 30px 0; +} +.page +{ + margin:25px -5px 0 27px; +} +.post-info, .page-info +{ + font-size:0.85em; + font-family: Verdana, Arial, Sans-Serif; + margin:0; + padding:0; + color:#333; +} +.page-info +{ + text-align:center; +} +.post-info a +{ + color:#990000; +} +.post-info a:hover +{ + color:#000; +} +.post-content, .page-content { + padding:10px 0; + margin:3px 0; + border-top:#CCCCCC 1px solid; + font-family: Georgia, Verdana, Arial, serif; + font-size:12px; +} +.page-content { + +} +.post-title, .page-title { + font-family:Georgia, Arial, Serif; + font-size:1.3em; + margin:0; + font-weight:bold; +} +.page-title +{ + font-size:1.6em; + font-weight:normal; +} +#content .page-title a, .post-title a:link, .post-title a:visited, .post-title a:hover, .post-title a:active +{ + text-decoration:none; + color:#666666; +} +.post-date { + float: left; + color: #BBC4A3; + font-family: Georgia,'Lucida sans ms', Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + text-align: center; + font-weight: bold; + margin: 3px 10px 0 0; + padding: 8px 3px; + width: 55px; + background: #E7EBDE; + line-height:1em; +} +.post-footer +{ + padding-top:20px; + background:url({TEMPLATE_DIR}/img/divider.gif) no-repeat center; +} +#footer { + margin:0 auto; + padding: 7px 0; + border-top:#CCCCCC 1px solid; + clear: both; + font-size: 0.8em; + color: #999; + text-align:center; + width:740px; +} +#footer a { +border:none; +color:#777777; +} + +.commentlist { + font-size:1em; + font-weight:normal; +} +#commentform +{ + margin:0 0 0 40px; +} +#commentform textarea { + width: 80%; +} +#commentform p { + margin: 0 0 1em; +} +#comments,#respond { + text-transform: uppercase; + margin: 3em 0 1em 40px; + color: #666666; + font: 0.9em verdana, helvetica, sans-serif; +} +.commentlist li +{ + margin:5px 0; + padding:10px 10px 20px 10px; + background:#FFFFFF; + border:#DDDDDD 1px solid; +} +.commentlist .alt +{ + +} +#topnav +{ + list-style:none; + font-size:0.9em; + margin:0; + padding:11px 20px 0 0; + text-align:right; + font-family:Verdana, Arial, Sans-Serif; +} +#topnav li +{ + list-style:none; + display:inline; + padding:0; + margin:0; + font-weight:bold; +} + +#topnav li a:link, #topnav li a:visited +{ + text-decoration:none; + color:#BBBBBB; + border-left: 1px solid #777777; + border-right: 1px solid #777777; + background-color: #777777; + padding: 3px; + margin: 0; +} +#topnav li a:hover, #topnav li a:focus +{ + color:#F0F0F0; + border-left: 1px solid #F0F0F0; + border-right: 1px solid #F0F0F0; + background-color: #A0A0A0; + padding-left: 3px; + padding-right: 3px; + padding-top: 3px; + padding-bottom: 5px; + margin: 0; +} + +div.jswindow { font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; list-style-type: none; + padding: 2px; + margin: 0; + margin-top: 7px; + font-size: 0.9em; + border:#E1D6c6 1px solid; + background:#F3F6ED; + } +div.titlebar { font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; cursor: default; margin: 0 0 0 0; + padding:2px; + margin: 2px; + + font-size: 1em; + color: #676E04; + text-align:center; + background: #e2ebda; + border:0px solid #ccc; + height:22px; + font-weight:bold; } +div.titlebar div.closebtn { width: 16px; height: 16px; background-color: #e2ebda; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; background-color: #F3F6ED; display: block; } + +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 5px; + overflow: hidden; + } + +div.pagebar { background-color: #FFFFFF; padding: 1px; font-size: 7pt; border: 1px solid #000000; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #606060; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #606060; background-color: #E0E0E0; } +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a { display: block; margin: 0; } +.mdg-comment { margin: 0; margin-left: 0.2in; padding: 10px; padding-left: 35px; border: 1px #000000 solid; margin-bottom: 10px; background: #FFFFFF; } diff -r 000000000000 -r 902822492a68 themes/connections/css/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/css/default.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,568 @@ +/* +Theme Name: Connections +Theme URI: http://www.patriciamuller.com/ +Version: 1.0 +Description: A Theme from wpthemes.Info +Author: Patricia Muller +Author URI: http://www.vanillamist.com/blog/ + +Port information: +Ported from: WordPress +Ported by: Dan Fuhry - http://enano.homelinux.org/ +*/ +html,body { height: 100%; } +body { + margin:0; + padding:0; + font-family: 'Trebuchet MS',Georgia, Times, Times New Roman, sans-serif; + font-size: 0.9em; + /* text-align:center; */ + color:#29303B; + line-height:1.3em; + background: #F3F6ED; +} +a { + color: #909D73; + text-decoration:none; +} +a:visited { + color: #8a3207; +} +a:hover { + color: #753206; + text-decoration:underline; +} +input, textarea +{ + background: #F3F6ED; + border: #E1D6C6 1px solid; +} +#rap +{ + background:#fff url(../img/rap.jpg) center repeat-y; + width:760px; + margin:0 auto; + padding:0px 8px; + text-align:left; + font-family: Trebuchet MS,Georgia, Arial, serif; + font-size: 0.9em; +} +#header { + background:#fff url(../img/top.jpg) no-repeat bottom; + height: 183px; + margin: 0 auto; + width:760px; + padding:0; + border:#fc9 0px solid; +} +#main +{ + margin:0 auto; + padding:0; + background:url(../img/content_bg.gif) repeat; + width:740px; +} +#content { + width:510px; + float:left; + padding:5px; + margin:0; + overflow:auto; + display:inline; + text-align: left; +} +#sidebar { + width:186px; + float:right; + padding:0px 8px 10px 8px; + margin:0; + font-size:1em; + color:#333; + display:inline; +} +a img { + border: none; +} +acronym, abbr { + border-bottom: 1px dotted #0c6bf0; +} +acronym, abbr, span.caps { + cursor: help; + letter-spacing: .07em; +} +code { + font-size: 1em; + font-style: italic; +} +blockquote { + margin: 15px 30px 0 45px; + padding: 0 0 0 45px; + background: url(../img/blockquote.gif) no-repeat left top; + font-style:italic; +} + +cite { + font-size: 0.9em; + font-style: normal; +} +h3 { + margin: 0; + padding: 0; + font-size:1.3em; +} +p { + margin: 0 0 1em; + padding: 0; + line-height: 1.5em; +} +h1, h2, h3, h4 { + font-family: Georgia, "Lucida Sans Unicode", lucida, Verdana, serif; + font-weight: normal; + letter-spacing: 1px; +} +#header h1 +{ + margin: 0; + font-size: 1.6em; + padding:10px 20px 0 0; + text-align:right; +} +#header h1 a +{ + color:#B5C09D; + text-decoration:none; +} +#header h1 a:hover +{ + color:#F7F3ED; +} +#header #desc +{ + font-weight:normal; + font-size:1em; + color:#B5C09D; + text-align:right; + margin:0; + padding:0 20px 0 0; +} +#sidebar div.heading { + margin: 0 0 0 0; + padding:2px; + font-size: 1em; + color: #676E04; + text-align:center; + background:url(../img/sidenav_top.jpg) no-repeat center; + border:#ccc 0px solid; + height:22px; + font-weight:bold; +} +#sidebar div.slider { + list-style-type: none; + padding: 0 2px 0 2px; + margin: 0; + margin-top: 7px; + font-size: 0.9em; + border:#E1D6c6 1px solid; + border-top:#f3f6ed 1px solid; +} +#sidebar div.slideblock { + padding: 5px; + padding-bottom: 3em; + overflow: hidden; + background:#F3F6ED url(../img/sidenav_bottom.jpg) no-repeat bottom; +} +#sidebar div.slideblock2 { + padding: 5px; + padding-bottom: 3em; + overflow: hidden; + background:#F3F6ED url(../img/sidenav_bottom.jpg) no-repeat bottom; +} +#sidebar div.slideblock a { + display: block; + color: #909D73; + padding: 4px; + text-decoration: none; +} +#sidebar div.slideblock a:hover { + display: block; + color: #909D73; + background-color: #e2ebda; + padding: 4px; + text-decoration: none; +} +#pagenav +{ + list-style:none; +} +#sidebar ul li { + margin: 0.1em 0 0 0; + padding: 0; +} +#sidebar ul li a { + text-decoration: none; + border:none; +} +#sidebar ul li a:link { + color: #909D73; +} +#sidebar ul li a:visited { + color: #999999; +} +#sidebar ul li a:hover, #sidebar ul li a:active { + color: #990000; +} +#sidebar ul ul { + list-style-type: none; + padding: 5px; + margin: 0; + font-size: 1em; + background:none; + border:none; +} +#sidebar ul ul li +{ + margin:0; + padding:0; + padding-left:10px; + margin-left:10px; + background:url(../img/subcat_bullet.gif) no-repeat left; +} +#content ul { + margin-left: 0; + padding-left: 1em; + list-style-type: none; +} +#content ul li { + background: url(../img/bullet.gif) no-repeat 0 7px; + padding-left: 1.5em; +} +#content p { + margin-left: 1em; +} +.post , .page +{ + margin:0 0 30px 0; +} +.page +{ + margin:25px -5px 0 27px; +} +.post-info, .page-info +{ + font-size:0.85em; + font-family: Verdana, Arial, Sans-Serif; + margin:0; + padding:0; + color:#333; +} +.page-info +{ + text-align:center; +} +.post-info a +{ + color:#990000; +} +.post-info a:hover +{ + color:#000; +} +.post-content, .page-content { + padding:10px 0; + margin:3px 0; + border-top:#BBC4A3 1px solid; + font-family: Georgia, Verdana, Arial, serif; + font-size:12px; +} +.page-content { + +} +.post-title, .page-title { + font-family:Georgia, Arial, Serif; + font-size:1.3em; + margin:0; + font-weight:bold; +} +.page-title +{ + font-size:1.6em; + font-weight:normal; +} +#content .page-title a, .post-title a:link, .post-title a:visited, .post-title a:hover, .post-title a:active +{ + text-decoration:none; + color:#676E04; +} +.post-date { + float: left; + color: #BBC4A3; + font-family: Georgia,'Lucida sans ms', Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + text-align: center; + font-weight: bold; + margin: 3px 10px 0 0; + padding: 8px 3px; + width: 55px; + background: #E7EBDE; + line-height:1em; +} +.post-footer +{ + padding-top:20px; + background:url(../img/divider.gif) no-repeat center; +} +#footer { + margin:0 auto; + padding: 7px 0; + border-top:#BBC4A3 1px solid; + clear: both; + font-size: 0.8em; + color: #999; + text-align:center; + width:740px; +} +#footer a { +border:none; +color:#7A7636; +} + +.commentlist { + font-size:1em; + font-weight:normal; +} +#commentform +{ + margin:0 0 0 40px; +} +#commentform textarea { + width: 80%; +} +#commentform p { + margin: 0 0 1em; +} +#comments,#respond { + text-transform: uppercase; + margin: 3em 0 1em 40px; + color: #676E04; + font: 0.9em verdana, helvetica, sans-serif; +} +.commentlist li +{ + margin:5px 0; + padding:10px 10px 20px 10px; + background:#F3F6ED url(../img/comments_bottom.jpg) repeat-x bottom; + border:#E1D6C6 1px solid; +} +.commentlist .alt +{ + +} +#topnav +{ + list-style:none; + font-size:0.9em; + margin:0; + padding:11px 20px 0 0; + text-align:right; + font-family:Verdana, Arial, Sans-Serif; +} +#topnav li +{ + list-style:none; + display:inline; + padding:0; + margin:0; + font-weight:bold; +} + +#topnav li.sep +{ + margin-left: 3px; + margin-right: 3px; + margin-top: 1px; + margin-bottom: 1px; + padding: 0; + padding-bottom: 2px; + border-left: 1px solid #3B4423; + border-right: 1px solid #F7F3ED; +} + +#topnav li a:link, #topnav li a:visited +{ + text-decoration:none; + color:#BBC4A3; + border-left: 1px solid #7D8B5A; + border-right: 1px solid #7D8B5A; + background-color: #7D8B5A; + padding: 3px; + margin: 0; +} +#topnav li a:hover, #topnav li a:focus +{ + color:#F7F3ED; + border-left: 1px solid #F7F3ED; + border-right: 1px solid #F7F3ED; + background-color: #BBC4A3; + padding-left: 3px; + padding-right: 3px; + padding-top: 3px; + padding-bottom: 5px; + margin: 0; +} + +div.jswindow { font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; list-style-type: none; + padding: 2px; + margin: 0; + margin-top: 7px; + font-size: 0.9em; + border:#E1D6c6 1px solid; + background:#F3F6ED; + } +div.titlebar { font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; cursor: default; margin: 0 0 0 0; + padding:2px; + margin: 2px; + + font-size: 1em; + color: #676E04; + text-align:center; + background: #e2ebda; + border:0px solid #ccc; + height:22px; + font-weight:bold; } +div.titlebar div.closebtn { width: 16px; height: 16px; background-color: #e2ebda; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; background-color: #F3F6ED; display: block; } + +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 5px; + overflow: hidden; + } + +div.pagebar { background-color: #F3F6ED; margin-top: 0px; padding: 3px; font-size: 7pt; text-align: left; font-family: arial, helvetica, sans-serif; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #909D73; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #990000; background-color: #BBC4A3; } +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a { display: block; margin: 0; } + +/* + * jBox menu system + */ + +/* Exception for Connections theme */ +div#pagebar_main { + margin: 0px 7px 0px 8px; +} + +div.menu { + background-color: #F3F6ED; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #909D73; +} +div.menu div.label { + color: #201000; + cursor: default; +} +div.menu span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover { + color: #990000; + background-color: #BBC4A3; +} +div.menu input[type ^="text"], div.menu input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 4px 5px; + max-width: 70px; + background-color: #E3E6DD; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover { + background-color: #ECEFF6; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus { + background-color: #FAFDF6; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover { + color: #400000; + background-color: transparent; + background-image: url(../img/content_bg.gif); +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0; + background-color: #F3F6ED; + border-width: 0; + min-width: 120px; +} +div.menu ul li { + list-style: none; +} +div.menu ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +.mdg-comment { margin: 0; margin-left: 0.2in; padding: 10px; border: 1px #E1D6C6 solid; margin-bottom: 10px; } +.tblholder { margin: 0; margin-left: 0.2in; padding: 0px; border: 1px #E1D6C6 solid; margin-bottom: 10px; } + +.tblholder th { padding: 4px; background-color: #C8D6A3 !important; color: #696E5B !important; } +.tblholder td.row1 { padding: 4px; background-color: #E3E6DD !important; } +.tblholder td.row2 { padding: 4px; background-color: #F3F6ED !important; } +.tblholder td.row3 { padding: 4px; background-color: #EBEDE6 !important; } +.tblholder table { background-color: #FFFFFF; } +.tblholder th.subhead { padding: 4px; background-color: #D0D4C7 !important; color: #696E5B !important; } + +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F3F6ED; } + +/* Information, warning, question, and error boxes */ +div.error-box { background-image: url(../../../images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #8a3207; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url(../../../images/info.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #8a3207; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url(../../../images/warning.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #8a3207; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url(../../../images/question.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #8a3207; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +table#stretcher { + width: 100%; + height: 100%; +} + +a.wikilink-nonexistent, a.wikilink-nonexistent:hover { + color: #B05020; + text-decoration: underline; + border-bottom: 1px dotted; +} +a.wikilink-nonexistent:hover { + color: #D06030; +} diff -r 000000000000 -r 902822492a68 themes/connections/elements.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/elements.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,38 @@ +{TEXT} + +
    {TEXT}
    + +{TEXT} + +
  • {TEXT}
  • + +
  • {HTML}
  • + +{TEXT}
    + +{HTML}
    + +
    {TEXT}
    + + + + +
    +
    +

    + {TITLE}

    +
    +
    {CONTENT}
    +
    + + +
    +
    +

    + {TITLE}

    +
    +
    {CONTENT}
    +
    + + + diff -r 000000000000 -r 902822492a68 themes/connections/footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,30 @@ + + +
    + + + + +
    + + + + + + + + + + + + + + diff -r 000000000000 -r 902822492a68 themes/connections/header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,61 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + +
    +
    Confirm Logout
    +
    +
    +
    +

    Are you sure you want to log out?

    + +
    +
    +
    +
    +
    +
    Change style
    +
    + If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9. +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + diff -r 000000000000 -r 902822492a68 themes/connections/img/blockquote.gif Binary file themes/connections/img/blockquote.gif has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/bullet.gif Binary file themes/connections/img/bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/comment.png Binary file themes/connections/img/comment.png has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/comments_bottom.jpg Binary file themes/connections/img/comments_bottom.jpg has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/content_bg.gif Binary file themes/connections/img/content_bg.gif has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/contentbg.jpg Binary file themes/connections/img/contentbg.jpg has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/divider.gif Binary file themes/connections/img/divider.gif has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/rap.jpg Binary file themes/connections/img/rap.jpg has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/sidenav_bottom.jpg Binary file themes/connections/img/sidenav_bottom.jpg has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/sidenav_top.jpg Binary file themes/connections/img/sidenav_top.jpg has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/sub-bullet.gif Binary file themes/connections/img/sub-bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/subcat_bullet.gif Binary file themes/connections/img/subcat_bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/connections/img/top.jpg Binary file themes/connections/img/top.jpg has changed diff -r 000000000000 -r 902822492a68 themes/connections/sidebar-editor.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/sidebar-editor.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,58 @@ +
  • {TEXT}
  • + +
  • {HTML}
  • + + +
    + + + + + + +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
      + {CONTENT} +
    +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
    • + {CONTENT} +
    +
    +
    + + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/connections/simple-footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/simple-footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,21 @@ + + +
    + + + + +
    + +
    + +
    + + +
    +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/connections/simple-header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/simple-header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,25 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + + + +
    +
    +
    +
    +
    + +
    + +
    + diff -r 000000000000 -r 902822492a68 themes/connections/theme.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/connections/theme.cfg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,19 @@ + diff -r 000000000000 -r 902822492a68 themes/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/index.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,13 @@ +perms['edit_page'] = AUTH_DENY; +$session->perms['view_source'] = AUTH_DENY; +$template->tpl_strings['PAGE_NAME'] = 'Access denied'; + +$template->header(); +echo '

    The administrator has flagged the page "' . $_SERVER['REQUEST_URI'] . '" so that it cannot be accessed from the web. Perhaps this is because this is a cache or includes directory and only needs to be accessed by scripts.

    HTTP error: 403 Forbidden

    '; +$template->footer(); +$db->close(); diff -r 000000000000 -r 902822492a68 themes/oxygen/acledit.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/acledit.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + +
    DenyDisallowWiki modeAllow
    {FIELD_DESC}
    +

    Permission types:

    +
      +
    • Allow means that the user is allowed to access the item
    • +
    • Wiki mode means the user can access the item if wiki mode is active (per-page wiki mode is taken into account)
    • +
    • Disallow means the user is denied access unless something allows it.
    • +
    • Deny means that the user is denied access to the item. This setting overrides all other permissions.
    • +
    +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/oxygen/comment.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/comment.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,51 @@ +
    + + + + + + + + + + + + + + + + + + + + + +
    {DATETIME}
    + + + + + + + +
    + {NAME}
    + {USER_LEVEL} +
    + {SEND_PM_LINK} {ADD_BUDDY_LINK} +
    +
    + Subject: {SUBJECT} +
    +
    {DATA}
    + +
    + {SIGNATURE} + +
    + [ {EDIT_LINK} | {DELETE_LINK} ] +
    + Moderation options: {MOD_APPROVE_LINK} {MOD_DELETE_LINK} +
    +
    +
    diff -r 000000000000 -r 902822492a68 themes/oxygen/css-simple/bleu.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/css-simple/bleu.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,136 @@ +/* + * Oxygen, but slightly more lightweight - used on minimalist pages + */ + +/* Basic definitions */ + +html, body { + height: 100%; + margin: 0; + padding: 0; +} + +body { + background-image: url(../images/bleu/bg.png); + font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; + font-size: 9pt; +} + +/* Dummy cells and backgrounds */ + +/* table#enano-main td { margin: 0; padding: 0; } */ +table#enano-main td#head-up-left { width: 12px; height: 12px; background-image: url(../images/bleu/border-tl.gif); } +table#enano-main td#head-up { height: 12px; background-image: url(../images/bleu/border-top.gif); } +table#enano-main td#head-up-right { width: 12px; height: 12px; background-image: url(../images/bleu/border-tr.gif); } +table#enano-main td#head-left { width: 12px; background-image: url(../images/bleu/border-l.gif); padding-bottom: 12px; } +table#enano-main td#head-main { background-color: #90B0D0; } +table#enano-main td#head-right { width: 12px; background-image: url(../images/bleu/border-r.gif); } +table#enano-main td#toolbar-left { width: 12px; background-image: url(../images/bleu/border-tb-l.gif); } +table#enano-main td#toolbar-right { width: 12px; background-image: url(../images/bleu/border-tb-r.gif); } +table#enano-main td#main-left { width: 12px; background-image: url(../images/bleu/border-m-l.gif); } +table#enano-main td#main-main { background-color: #FFFFFF; } +table#enano-main td#main-right { width: 12px; background-image: url(../images/bleu/border-m-r.gif); } +table#enano-main td#foot-left { width: 12px; background-image: url(../images/bleu/border-btm-l.gif); } +table#enano-main td#foot-main { background-color: #E8E8E8; padding-top: 12px; } +table#enano-main td#foot-right { width: 12px; background-image: url(../images/bleu/border-btm-r.gif); } +table#enano-main td#foot-btm-left { width: 12px; height: 12px; background-image: url(../images/bleu/border-bl.gif); } +table#enano-main td#foot-btm { height: 12px; background-image: url(../images/bleu/border-btm.gif); } +table#enano-main td#foot-btm-right { width: 12px; height: 12px; background-image: url(../images/bleu/border-br.gif); } + +/* Sidebar */ + +td.mdgSidebarHolder { width: 156px; } +div.sidebar, .dbx-group { width: 154px; background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { background-color: #F0F0F0; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar .head:hover, .dbx-handle:hover { background-color: #F4F4F4; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar div.slideblock a, .dbx-content li { background-color: #DDD; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; list-style-type: none; } +div.sidebar div.slideblock a:hover, .dbx-content li:hover { background-color: #EEE; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.recttop { width: 156px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 156px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url(../images/bleu/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; background-color: #FFF; } +div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move !important; } + +/* + * Docking Boxes code (for the sidebar editor) + */ + +/* group container(s) */#sbedit {margin: 0;padding: 0;/* position:relative; /* additional outer containers must also have position:relative */}/* keyboard navigation tooltip */.dbx-tooltip {display:block;position:absolute;margin:36px 0 0 125px;width:185px;border:1px solid #000;background:#ffd;color:#000;font:normal normal normal 0.85em tahoma, arial, sans-serif;padding:2px 4px 3px 5px;text-align:left;}* html .dbx-tooltip { width:195px; }/* use CSS2 system colors in CSS2 browsersbut not safari, which doesn't support them */*[class="dbx-tooltip"]:lang(en) {border-color:InfoText;background:InfoBackground;color:InfoText;font:small-caption;font-weight:normal;}/* additional clone styles */.dbx-clone {opacity: 0.8;}.dbx-content ul {margin: 0; padding: 0;}.dbx-content li a, .dbx-content li a:hover {text-decoration: none; color: #666;}.dbx-content2 {background-color: #DDD; margin: 0px 1px 0px 1px;}/* toolbar */div.toolbar {border-bottom: 1px solid #909090;background-color: #D0D0D0;padding: 2px 0;height: 22px;font-family: arial, sans-serif;font-size: 8pt;}div.toolbar ul {margin: 0;padding: 0;}div.toolbar ul li {list-style: none;margin: 0;float: left;}div.toolbar a img {opacity: 0.6;/*filter: alpha(opacity=60);*/}div.toolbar a:hover img {opacity: 1;/*filter: alpha(opacity=100);*/}div.toolbar a {display: block;padding: 2px;border: 1px solid transparent;cursor: default;width: auto;color: #000000;margin: 0 2px;max-height: 16px;text-decoration: none;}div.toolbar a:hover {border: 1px solid #202090;background-color: #ceceed;color: #000000;text-decoration: none;}div.toolbar a:active {border: 1px solid #A0A0A0;background-color: #E0E0E0;}div.toolbar img {margin: 0;padding: 0;display: inline;border-width: 0px;}div.toolbar a span {position: relative;top: -4px;}div.toolbar li span {padding-left: 2px;padding-right: 5px;}/* vertical toolbar */div.toolbar_vert {border: 1px solid #909090;background-color: #D0D0D0;padding: 2px 0;}div.toolbar_vert ul {margin: 0;padding: 0;}div.toolbar_vert ul li {list-style: none;margin: 0;}div.toolbar_vert a img {opacity: 0.6;/*filter: alpha(opacity=60);*/}div.toolbar_vert a:hover img {opacity: 1;/*filter: alpha(opacity=100);*/}div.toolbar_vert a {display: block;padding: 2px;border: 1px solid transparent;cursor: default;width: auto;color: #000000;margin: 0 2px;max-height: 16px;text-decoration: none;}div.toolbar_vert a:hover {border: 1px solid #202090;background-color: #ceceed;color: #000000;text-decoration: none;}div.toolbar_vert a:active {border: 1px solid #A0A0A0;background-color: #E0E0E0;}div.toolbar_vert img {margin: 0;padding: 0;display: inline;border-width: 0px;}div.toolbar_vert a span {position: relative;top: -4px;}div.toolbar_vert li span {padding-left: 2px;padding-right: 5px;} + +/* Header */ + +table#enano-main td#head-main { + text-align: center; +} + +table#enano-main td#head-main h1 { + font-size: 14pt; +} + +/* The "page tools" bar below the site logo but above the page content */ +div.pagebar { background-color: #B0D0F0; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; } +div.pagebar a.selected { background-color: #FFFFFF; color: #000040; font-weight: bold; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E0F0FF; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0FF; } + +/* Tweaks for the popup menu version of the same thing */ +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; overflow: hidden; } +div.pagebar#pagebarpopup a, div#pagebarpopup2 a { display: block; margin: 0; } + +/* Content area */ +table#enano-main td#main-main { + padding: 10px 0; +} + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) * / +table#enano-main td#main-main h2 { border-bottom: 1px solid #90B0D0; margin-bottom: 0; } +table#enano-main td#main-main h3 { font-size: 11pt; font-weight: bold; } +table#enano-main td#main-main li { list-style: url(../images/bullet.gif); } +table#enano-main td#main-main blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +table#enano-main td#main-main a { color: #7090B0; } +table#enano-main td#main-main a:hover { color: #90B0D0; } +table#enano-main td#main-main a[href ^="http://"] { color: #80A0C0; background: url(../images/bleu/external.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="https://"] { color: #80A0C0; background: url(../images/bleu/https.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="mailto:"] { color: #80A0C0; background: url(../images/bleu/email.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="irc://"] { color: #80A0C0; background: url(../images/bleu/irc.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="http://"]:hover { color: #A0C0E0; background: url(../images/bleu/external.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="https://"]:hover { color: #A0C0E0; background: url(../images/bleu/https.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="mailto:"]:hover { color: #A0C0E0; background: url(../images/bleu/email.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="irc://"]:hover { color: #A0C0E0; background: url(../images/bleu/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Footer */ + +table#enano-main td#foot-main { + color: #AAA; + font-size: 7pt; +} + +/* Styled boxes */ + +.mdg-comment, .mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* Tables */ + +.tblholder { margin: 10px 0 0 0; padding: 0; border: 1px solid #AAAAAA; background-color: #E8E8E8; } +div.tblholder td.row1 { padding: 4px; background-color: #E0E0E0; } +div.tblholder td.row2 { padding: 4px; background-color: #F0F0F0; } +div.tblholder td.row3 { padding: 4px; background-color: #E8E8E8; } +div.tblholder th { padding: 4px; background-color: #7080A0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder th.subhead { padding: 4px; background-color: #90A0B0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder table { background-color: #FFFFFF; width: 100%; } + +/* Buttons and textboxes - these settings are used almost everywhere */ + +input, textarea, select { border: 1px solid #406080; background-color: #F2F2F2; padding: 3px; font-family: arial, helvetica, sans-serif; font-size: 9pt; } +input:hover, textarea:hover, select:hover { border: 1px solid #6080A0; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90B0D0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } +input#pageheading { font-size: 14pt; border-bottom: 1px solid #90B0D0; margin-bottom: 0; } + diff -r 000000000000 -r 902822492a68 themes/oxygen/css/_printable.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/css/_printable.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,131 @@ +/** + * The original Oxygen theme for Enano + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background-color: #FFFFFF; font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444 } +div.pad { padding: 10px; } +table#title { margin: 0; padding: 0; height: 100px; background-color: #FFFFFF; text-align: center; border: 1px solid #000000; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 0px; } +div.sidebar { display: none; } +div.recttop, div.rectbot { display: none; } + +/* The credits thingy at the bottom */ +div#credits { margin: 0; padding: 10px; background-color: #FFFFFF; color: #AAA; font-size: 7pt; border: 1px solid #000000; } +div#credits a { color: #B0B0B0; text-decoration: underline; } +div#credits a:hover { color: #A0A0A0; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #406080; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #AAAAAA; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li { list-style: square; } +div.contentDiv p { margin-left: 1.0em; } +div.contentDiv blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv { font-size: 9pt; } +div.contentDiv a { color: #909090; } +div.contentDiv a:hover { color: #B0B0B0; } +div.contentDiv a[href ^="http://"] { color: #A0A0A0; } +div.contentDiv a[href ^="https://"] { color: #A0A0A0; } +div.contentDiv a[href ^="irc://"] { color: #A0A0A0; } +div.contentDiv a[href ^="mailto:"] { color: #A0A0A0; } +div.contentDiv a[href ^="http://"]:hover { color: #C0C0C0; } +div.contentDiv a[href ^="https://"]:hover { color: #C0C0C0; } +div.contentDiv a[href ^="mailto:"]:hover { color: #C0C0C0; } +div.contentDiv a[href ^="irc://"]:hover { color: #C0C0C0; } + +/* Wikilinks to pages that don't exist +div.contentDiv a.wikilink-nonexistent { color: #B05020; } +div.contentDiv a.wikilink-nonexistent:hover { color: #D06030; } */ + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +.mdg-comment td.row1 { padding: 4px; background-color: #FFFFFF; margin: 1px; border: 1px solid #CCCCCC; } +.mdg-comment td.row2 { padding: 4px; background-color: #FFFFFF; margin: 1px; border: 1px solid #CCCCCC; } +.mdg-comment td.row3 { padding: 4px; background-color: #FFFFFF; margin: 1px; border: 1px solid #CCCCCC; } +.mdg-comment th { padding: 4px; background-color: #FFFFFF; margin: 1px; border: 1px solid #CCCCCC; font-weight: bold; text-align: center; } +.mdg-comment th.subhead { padding: 4px; background-color: #FFFFFF; margin: 1px; border: 1px solid #CCCCCC; font-weight: bold; text-align: center; } +.mdg-comment table { background-color: #FFFFFF; } + +/* Same as mdg-comment, but without the cute comment icon. Mostly unused. */ +.mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* The "page tools" bar below the site logo but above the page content */ +div.pagebar { background-color: #FFFFFF; margin-top: 0px; padding: 3px; font-size: 7pt; border: 1px solid #000000; border-top: none; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #606060; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #606060; background-color: #F0F0F0; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E8E8E8; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0F0; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F8F8F8; } + +/* Tweaks for the popup menu version of the same thing */ +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; } +div.pagebar#pagebarpopup a, div#pagebarpopup2 a { display: block; margin: 0; } + +/* Rounded corners on nearly everything */ +td#mdg-tl { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-tr { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-top { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-l { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-r { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-bl { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-br { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-ml { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-mr { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-brl { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-brr { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-btl { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-btr { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-btcl { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-btcr { margin: 0; padding: 0; width: 0; height: 0; } +td#mdg-btm { margin: 0; padding: 0; width: 0; height: 0; } +td.mdg-menu-top { margin: 0; padding: 0; width: 0; height: 0; } +td.mdg-menu-tl { margin: 0; padding: 0; width: 0; height: 0; } +td.mdg-menu-tr { margin: 0; padding: 0; width: 0; height: 0; } +td.mdg-menu-bl { margin: 0; padding: 0; width: 0; height: 0; } +td.mdg-menu-br { margin: 0; padding: 0; width: 0; height: 0; } +td.mdg-menu-btm { margin: 0; padding: 0; width: 0; height: 0; } + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #406080; background-color: #F2F2F2; padding: 3px; } +input:hover, textarea:hover, select:hover { border: 1px solid #6080A0; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90B0D0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } + +/* JWS window theming */ +div.jswindow { border: 2px solid #7090B0; border-top: 5px solid #7090B0; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #7090B0; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0D0F0; background-color: #90B0D0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0D0F0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-color: #F0F0F0; border: 1px dashed #606060; padding: 10px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-color: #F0F0F0; border: 1px dashed #606060; padding: 10px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-color: #F0F0F0; border: 1px dashed #606060; padding: 10px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-color: #F0F0F0; border: 1px dashed #606060; padding: 10px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-color: #F0F0F0; border: 1px dashed #606060; padding: 10px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90B0D0; padding: 10px; overflow: auto; max-height: 150px; } + diff -r 000000000000 -r 902822492a68 themes/oxygen/css/bleu.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/css/bleu.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,372 @@ +/** + * The original Oxygen theme for Enano + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background: url(../images/bleu/bg.png); font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444 } +div.pad { padding: 10px; } +table#title { margin: 0; padding: 0; height: 100px; background-color: #90B0D0; text-align: center; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 140px; } +div.sidebar, .dbx-group { width: 138px; background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { background-color: #F0F0F0; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar .head:hover, .dbx-handle:hover { background-color: #F4F4F4; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar div.slideblock a, .dbx-content li { background-color: #DDD; display: block; margin: 0px 1px; border-bottom: 1px solid #FFF; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; list-style-type: none; } +div.sidebar div.slideblock a:hover, .dbx-content li:hover { background-color: #EEE; display: block; margin: 0px 1px; border-bottom: 1px solid #FFF; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.recttop { width: 140px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 140px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url(../images/bleu/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; background-color: #DDD; } +div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move !important; } + +/* The credits thingy at the bottom */ +div#credits { margin: 0; padding: 10px; padding-bottom: 0px; padding-top: 12px; background-color: #E8E8E8; color: #AAA; font-size: 7pt; } +div#credits a { color: #90B0D0; text-decoration: none; } +div#credits a:hover { color: #80A0C0; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #406080; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #90B0D0; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li , div#messageBox li { list-style: url(../images/bullet.gif); } +div.contentDiv p , div#messageBox p { margin-left: 1.0em; } +div.contentDiv blockquote , div#messageBox blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv , div#messageBox { font-size: 9pt; } +div.contentDiv a , div#messageBox a { color: #7090B0; } +div.contentDiv a:hover , div#messageBox a:hover { color: #90B0D0; } +div.contentDiv a[href ^="http://"] , div#messageBox a[href ^="http://"] { color: #80A0C0; background: url(../images/bleu/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"] , div#messageBox a[href ^="https://"] { color: #80A0C0; background: url(../images/bleu/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"] , div#messageBox a[href ^="mailto:"] { color: #80A0C0; background: url(../images/bleu/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"] , div#messageBox a[href ^="irc://"] { color: #80A0C0; background: url(../images/bleu/irc.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="http://"]:hover , div#messageBox a[href ^="http://"]:hover { color: #A0C0E0; background: url(../images/bleu/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]:hover, div#messageBox a[href ^="https://"]:hover { color: #A0C0E0; background: url(../images/bleu/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"]:hover , div#messageBox a[href ^="mailto:"]:hover { color: #A0C0E0; background: url(../images/bleu/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"]:hover , div#messageBox a[href ^="irc://"]:hover { color: #A0C0E0; background: url(../images/bleu/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Wikilinks to pages that don't exist */ +div.contentDiv a.wikilink-nonexistent { color: #B05020; } +div.contentDiv a.wikilink-nonexistent:hover { color: #D06030; } + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment, .mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +.tblholder { margin: 10px 0 0 0; padding: 0; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +div.tblholder td.row1 { padding: 4px; background-color: #E0E0E0; } +div.tblholder td.row2 { padding: 4px; background-color: #F0F0F0; } +div.tblholder td.row3 { padding: 4px; background-color: #E8E8E8; } +div.tblholder th { padding: 4px; background-color: #7080A0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder th.subhead { padding: 4px; background-color: #90A0B0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder table { background-color: #FFFFFF; width: 100%; } + +/* The "page tools" bar below the site logo but above the page content +div.pagebar { background-color: #B0D0F0; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; } +div.pagebar a.selected { background-color: #FFFFFF; color: #000040; font-weight: bold; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E0F0FF; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0FF; } +*/ + +/* + * jBox menu system + */ + +div.menu, div.menu_nojs { + background-color: #B0D0F0; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #406080; +} +div.menu_nojs a, div.menu_nojs div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + color: #406080; +} +div.menu div.label, div.menu_nojs div.label { + color: #001020; + cursor: default; +} +div.menu span.sep, div.menu_nojs span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts, div.menu_nojs div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label, div.menu_nojs div.multopts a, div.menu_nojs div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover, div.menu_nojs a.liteselected, div.menu_nojs a.liteselected:hover, div.menu_nojs a:hover { + color: #406080; + background-color: #D0F0FF; +} +div.menu input[type ^="text"], div.menu input[type ^="password"], div.menu_nojs input[type ^="text"], div.menu_nojs input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 2px 5px 3px 5px; + max-width: 70px; + background-color: #D0F0FF; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover, div.menu_nojs input[type ^="text"]:hover, div.menu_nojs input[type ^="password"]:hover { + background-color: #E0F0FF; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus, div.menu_nojs input[type ^="text"]:focus, div.menu_nojs input[type ^="password"]:focus { + background-color: #F0F0FF; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"], div.menu_nojs input[type ^="button"], div.menu_nojs input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover, div.menu_nojs a.current, div.menu_nojs a.current:hover, div.menu_nojs a.selected, div.menu_nojs a.selected:hover { + color: #000040; + background-color: #FFFFFF; +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0 !important; + background-color: #B0D0F0; + border-width: 0; + min-width: 120px; +} +div.menu_nojs ul { + display: block; + padding: 0; + margin: 0 0 0 1em; + background-color: #B0D0F0; + border-width: 0; + min-width: 120px; +} +div.menu ul li, div.menu_nojs ul li { + list-style: none; +} +div.menu ul a, div.menu_nojs ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +/* Rounded corners on nearly everything */ +td#mdg-tl { width: 12px; height: 12px; background: url(../images/bleu/border-tl.gif); } +td#mdg-tr { width: 12px; height: 12px; background: url(../images/bleu/border-tr.gif); } +td#mdg-top { background: url(../images/bleu/border-top.gif); } +td#mdg-l { width: 12px; height: 12px; background: url(../images/bleu/border-l.gif); } +td#mdg-r { width: 12px; height: 12px; background: url(../images/bleu/border-r.gif); } +td#mdg-bl { width: 12px; height: 12px; background: url(../images/bleu/border-tb-l.gif); } +td#mdg-br { width: 12px; height: 12px; background: url(../images/bleu/border-tb-r.gif); } +td#mdg-ml { width: 12px; height: 12px; background: url(../images/bleu/border-m-l.gif); } +td#mdg-mr { width: 12px; height: 12px; background: url(../images/bleu/border-m-r.gif); } +td#mdg-brl { width: 12px; height: 1px; background: url(../images/bleu/border-m-l.gif); } +td#mdg-brr { width: 12px; height: 1px; background: url(../images/bleu/border-m-r.gif); } +td#mdg-btl { width: 12px; height: 1px; background: url(../images/bleu/border-btm-l.gif); } +td#mdg-btr { width: 12px; height: 1px; background: url(../images/bleu/border-btm-r.gif); } +td#mdg-btcl { width: 12px; height: 12px; background: url(../images/bleu/border-bl.gif); } +td#mdg-btcr { width: 12px; height: 12px; background: url(../images/bleu/border-br.gif); } +td#mdg-btm { height: 12px; background: url(../images/bleu/border-btm.gif); } +td.mdg-menu-top { width: 84%; height: 12px; background: url(../images/bleu/border-menu-t.gif); margin: 0; padding: 0; background-repeat: repeat-x; font-size: 2px; } +td.mdg-menu-tl { width: 12px; height: 12px; background: url(../images/bleu/border-menu-l.gif); background-position: left top; background-repeat: no-repeat; } +td.mdg-menu-tr { width: 12px; height: 12px; background: url(../images/bleu/border-menu-r.gif); background-position: right top; background-repeat: no-repeat; } +td.mdg-menu-bl { width: 12px; height: 12px; background: url(../images/bleu/border-bl.gif); } +td.mdg-menu-br { width: 12px; height: 12px; background: url(../images/bleu/border-br.gif); } +td.mdg-menu-btm { height: 12px; background: url(../images/bleu/border-btm.gif); } + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #406080; background-color: #F2F2F2; padding: 3px; font-family: arial, helvetica, sans-serif; font-size: 8pt; } +input:hover, textarea:hover, select:hover { border: 1px solid #6080A0; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90B0D0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; font-family: arial, helvetica, sans-serif; font-size: 8pt; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } +input#pageheading { font-size: 14pt; border-bottom: 1px solid #90B0D0; margin-bottom: 0; } + +input[type ^="button"], input[type ^="submit"] { + background-image: url(../images/buttonbg.gif); + background-repeat: repeat-x; +} + +/* JWS window theming */ +div.jswindow { border: 2px solid #7090B0; border-top: 5px solid #7090B0; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #7090B0; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0D0F0; background-color: #90B0D0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0D0F0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url(../../../images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url(../../../images/info.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url(../../../images/warning.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url(../../../images/question.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url(../../../images/wait.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90B0D0; padding: 10px; overflow: auto; max-height: 150px; } + +/* Tables where diffs are shown */ +table.diff, td.diff-otitle, td.diff-ntitle { background-color: white; } +td.diff-addedline { background: #cfc; font-size: smaller; } +td.diff-deletedline { background: #ffa; font-size: smaller; } +td.diff-context { background: #eee; font-size: smaller; } +span.diffchange { color: red; font-weight: bold; } + +/* toolbar */ +div.toolbar { + border-bottom: 1px solid #909090; + background-color: #D0D0D0; + padding: 2px 0; + height: 22px; + font-family: arial, sans-serif; + font-size: 8pt; +} +div.toolbar ul { + margin: 0; + padding: 0; +} +div.toolbar ul li { + list-style: none; + margin: 0; + float: left; +} +div.toolbar a img { + opacity: 0.6; + /*filter: alpha(opacity=60);*/ +} +div.toolbar a:hover img { + opacity: 1; + /*filter: alpha(opacity=100);*/ +} +div.toolbar a { + display: block; + padding: 2px; + border: 1px solid transparent; + cursor: default; + width: auto; + color: #000000; + margin: 0 2px; + max-height: 16px; + text-decoration: none; +} +div.toolbar a:hover { + border: 1px solid #202090; + background-color: #ceceed; + color: #000000; + text-decoration: none; +} +div.toolbar a:active { + border: 1px solid #A0A0A0; + background-color: #E0E0E0; +} +div.toolbar img { + margin: 0; + padding: 0; + display: inline; + border-width: 0px; +} +div.toolbar a span { + position: relative; + top: -4px; +} +div.toolbar li span { + padding-left: 2px; + padding-right: 5px; +} + +/* vertical toolbar */ +div.toolbar_vert { + border: 1px solid #909090; + background-color: #D0D0D0; + padding: 2px 0; +} +div.toolbar_vert ul { + margin: 0; + padding: 0; +} +div.toolbar_vert ul li { + list-style: none; + margin: 0; +} +div.toolbar_vert a img { + opacity: 0.6; + /*filter: alpha(opacity=60);*/ +} +div.toolbar_vert a:hover img { + opacity: 1; + /*filter: alpha(opacity=100);*/ +} +div.toolbar_vert a { + display: block; + padding: 2px; + border: 1px solid transparent; + cursor: default; + width: auto; + color: #000000; + margin: 0 2px; + max-height: 16px; + text-decoration: none; +} +div.toolbar_vert a:hover { + border: 1px solid #202090; + background-color: #ceceed; + color: #000000; + text-decoration: none; +} +div.toolbar_vert a:active { + border: 1px solid #A0A0A0; + background-color: #E0E0E0; +} +div.toolbar_vert img { + margin: 0; + padding: 0; + display: inline; + border-width: 0px; +} +div.toolbar_vert a span { + position: relative; + top: -4px; +} +div.toolbar_vert li span { + padding-left: 2px; + padding-right: 5px; +} + diff -r 000000000000 -r 902822492a68 themes/oxygen/css/mint.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/css/mint.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,372 @@ +/** + * The original Oxygen theme for Enano + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background: url(../images/mint/bg.png); font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444 } +div.pad { padding: 10px; } +table#title { margin: 0; padding: 0; height: 100px; background-color: #90D0B0; text-align: center; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 140px; } +div.sidebar, .dbx-group { width: 138px; background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { background-color: #F0F0F0; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar .head:hover, .dbx-handle:hover { background-color: #F4F4F4; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar div.slideblock a, .dbx-content li { background-color: #DDD; display: block; margin: 0px 1px; border-bottom: 1px solid #FFF; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; list-style-type: none; } +div.sidebar div.slideblock a:hover, .dbx-content li:hover { background-color: #EEE; display: block; margin: 0px 1px; border-bottom: 1px solid #FFF; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.recttop { width: 140px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url(../images/mint/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url(../images/mint/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 140px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url(../images/mint/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; background-color: #DDD; } +div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move !important; } + +/* The credits thingy at the bottom */ +div#credits { margin: 0; padding: 10px; padding-bottom: 0px; padding-top: 12px; background-color: #E8E8E8; color: #AAA; font-size: 7pt; } +div#credits a { color: #90D0B0; text-decoration: none; } +div#credits a:hover { color: #80C0A0; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #408060; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #90D0B0; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li , div#messageBox li { list-style: url(../images/bullet.gif); } +div.contentDiv p , div#messageBox p { margin-left: 1.0em; } +div.contentDiv blockquote , div#messageBox blockquote { background-color: #F4F4F4; border: 1px dotted #408060; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv , div#messageBox { font-size: 9pt; } +div.contentDiv a , div#messageBox a { color: #70B090; } +div.contentDiv a:hover , div#messageBox a:hover { color: #90D0B0; } +div.contentDiv a[href ^="http://"] , div#messageBox a[href ^="http://"] { color: #80C0A0; background: url(../images/mint/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"] , div#messageBox a[href ^="https://"] { color: #80C0A0; background: url(../images/mint/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"] , div#messageBox a[href ^="mailto:"] { color: #80C0A0; background: url(../images/mint/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"] , div#messageBox a[href ^="irc://"] { color: #80C0A0; background: url(../images/mint/irc.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="http://"]:hover , div#messageBox a[href ^="http://"]:hover { color: #A0E0C0; background: url(../images/mint/external.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="https://"]:hover, div#messageBox a[href ^="https://"]:hover { color: #A0E0C0; background: url(../images/mint/https.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="mailto:"]:hover , div#messageBox a[href ^="mailto:"]:hover { color: #A0E0C0; background: url(../images/mint/email.gif) center right no-repeat; padding-right: 16px; } +div.contentDiv a[href ^="irc://"]:hover , div#messageBox a[href ^="irc://"]:hover { color: #A0E0C0; background: url(../images/mint/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Wikilinks to pages that don't exist */ +div.contentDiv a.wikilink-nonexistent { color: #B02050; } +div.contentDiv a.wikilink-nonexistent:hover { color: #D03060; } + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment, .mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +.tblholder { margin: 10px 0 0 0; padding: 0; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +div.tblholder td.row1 { padding: 4px; background-color: #E0E0E0; } +div.tblholder td.row2 { padding: 4px; background-color: #F0F0F0; } +div.tblholder td.row3 { padding: 4px; background-color: #E8E8E8; } +div.tblholder th { padding: 4px; background-color: #70A080; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder th.subhead { padding: 4px; background-color: #90B0A0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder table { background-color: #FFFFFF; width: 100%; } + +/* The "page tools" bar below the site logo but above the page content +div.pagebar { background-color: #B0F0D0; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #408060; } +div.pagebar a.selected { background-color: #FFFFFF; color: #004000; font-weight: bold; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #408060; background-color: #D0FFF0; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #408060; background-color: #E0FFF0; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #408060; background-color: #D0FFF0; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #408060; background-color: #F0FFF0; } +*/ + +/* + * jBox menu system + */ + +div.menu, div.menu_nojs { + background-color: #B0F0D0; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #408060; +} +div.menu_nojs a, div.menu_nojs div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + color: #408060; +} +div.menu div.label, div.menu_nojs div.label { + color: #002010; + cursor: default; +} +div.menu span.sep, div.menu_nojs span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts, div.menu_nojs div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label, div.menu_nojs div.multopts a, div.menu_nojs div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover, div.menu_nojs a.liteselected, div.menu_nojs a.liteselected:hover, div.menu_nojs a:hover { + color: #408060; + background-color: #D0FFF0; +} +div.menu input[type ^="text"], div.menu input[type ^="password"], div.menu_nojs input[type ^="text"], div.menu_nojs input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 4px 5px; + max-width: 70px; + background-color: #D0FFF0; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover, div.menu_nojs input[type ^="text"]:hover, div.menu_nojs input[type ^="password"]:hover { + background-color: #E0FFF0; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus, div.menu_nojs input[type ^="text"]:focus, div.menu_nojs input[type ^="password"]:focus { + background-color: #F0FFF0; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"], div.menu_nojs input[type ^="button"], div.menu_nojs input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover, div.menu_nojs a.current, div.menu_nojs a.current:hover, div.menu_nojs a.selected, div.menu_nojs a.selected:hover { + color: #004000; + background-color: #FFFFFF; +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0 !important; + background-color: #B0F0D0; + border-width: 0; + min-width: 120px; +} +div.menu_nojs ul { + display: block; + padding: 0; + margin: 0 0 0 1em; + background-color: #B0F0D0; + border-width: 0; + min-width: 120px; +} +div.menu ul li, div.menu_nojs ul li { + list-style: none; +} +div.menu ul a, div.menu_nojs ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +/* Rounded corners on nearly everything */ +td#mdg-tl { width: 12px; height: 12px; background: url(../images/mint/border-tl.gif); } +td#mdg-tr { width: 12px; height: 12px; background: url(../images/mint/border-tr.gif); } +td#mdg-top { background: url(../images/mint/border-top.gif); } +td#mdg-l { width: 12px; height: 12px; background: url(../images/mint/border-l.gif); } +td#mdg-r { width: 12px; height: 12px; background: url(../images/mint/border-r.gif); } +td#mdg-bl { width: 12px; height: 12px; background: url(../images/mint/border-tb-l.gif); } +td#mdg-br { width: 12px; height: 12px; background: url(../images/mint/border-tb-r.gif); } +td#mdg-ml { width: 12px; height: 12px; background: url(../images/mint/border-m-l.gif); } +td#mdg-mr { width: 12px; height: 12px; background: url(../images/mint/border-m-r.gif); } +td#mdg-brl { width: 12px; height: 1px; background: url(../images/mint/border-m-l.gif); } +td#mdg-brr { width: 12px; height: 1px; background: url(../images/mint/border-m-r.gif); } +td#mdg-btl { width: 12px; height: 1px; background: url(../images/mint/border-btm-l.gif); } +td#mdg-btr { width: 12px; height: 1px; background: url(../images/mint/border-btm-r.gif); } +td#mdg-btcl { width: 12px; height: 12px; background: url(../images/mint/border-bl.gif); } +td#mdg-btcr { width: 12px; height: 12px; background: url(../images/mint/border-br.gif); } +td#mdg-btm { height: 12px; background: url(../images/mint/border-btm.gif); } +td.mdg-menu-top { width: 84%; height: 12px; background: url(../images/mint/border-menu-t.gif); margin: 0; padding: 0; background-repeat: repeat-x; font-size: 2px; } +td.mdg-menu-tl { width: 12px; height: 12px; background: url(../images/mint/border-menu-l.gif); background-position: left top; background-repeat: no-repeat; } +td.mdg-menu-tr { width: 12px; height: 12px; background: url(../images/mint/border-menu-r.gif); background-position: right top; background-repeat: no-repeat; } +td.mdg-menu-bl { width: 12px; height: 12px; background: url(../images/mint/border-bl.gif); } +td.mdg-menu-br { width: 12px; height: 12px; background: url(../images/mint/border-br.gif); } +td.mdg-menu-btm { height: 12px; background: url(../images/mint/border-btm.gif); } + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #408060; background-color: #F2F2F2; padding: 3px; font-family: arial, helvetica, sans-serif; font-size: 8pt; } +input:hover, textarea:hover, select:hover { border: 1px solid #60A080; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90D0B0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; font-family: arial, helvetica, sans-serif; font-size: 8pt; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } +input#pageheading { font-size: 14pt; border-bottom: 1px solid #90D0B0; margin-bottom: 0; } + +input[type ^="button"], input[type ^="submit"] { + background-image: url(../images/buttonbg.gif); + background-repeat: repeat-x; +} + +/* JWS window theming */ +div.jswindow { border: 2px solid #70B090; border-top: 5px solid #70B090; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #70B090; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0F0D0; background-color: #90D0B0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0F0D0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url(../../../images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url(../../../images/info.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url(../../../images/warning.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url(../../../images/question.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url(../../../images/wait.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #408060; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90D0B0; padding: 10px; overflow: auto; max-height: 150px; } + +/* Tables where diffs are shown */ +table.diff, td.diff-otitle, td.diff-ntitle { background-color: white; } +td.diff-addedline { background: #cfc; font-size: smaller; } +td.diff-deletedline { background: #ffa; font-size: smaller; } +td.diff-context { background: #eee; font-size: smaller; } +span.diffchange { color: red; font-weight: bold; } + +/* toolbar */ +div.toolbar { + border-bottom: 1px solid #909090; + background-color: #D0D0D0; + padding: 2px 0; + height: 22px; + font-family: arial, sans-serif; + font-size: 8pt; +} +div.toolbar ul { + margin: 0; + padding: 0; +} +div.toolbar ul li { + list-style: none; + margin: 0; + float: left; +} +div.toolbar a img { + opacity: 0.6; + /*filter: alpha(opacity=60);*/ +} +div.toolbar a:hover img { + opacity: 1; + /*filter: alpha(opacity=100);*/ +} +div.toolbar a { + display: block; + padding: 2px; + border: 1px solid transparent; + cursor: default; + width: auto; + color: #000000; + margin: 0 2px; + max-height: 16px; + text-decoration: none; +} +div.toolbar a:hover { + border: 1px solid #209020; + background-color: #ceedce; + color: #000000; + text-decoration: none; +} +div.toolbar a:active { + border: 1px solid #A0A0A0; + background-color: #E0E0E0; +} +div.toolbar img { + margin: 0; + padding: 0; + display: inline; + border-width: 0px; +} +div.toolbar a span { + position: relative; + top: -4px; +} +div.toolbar li span { + padding-left: 2px; + padding-right: 5px; +} + +/* vertical toolbar */ +div.toolbar_vert { + border: 1px solid #909090; + background-color: #D0D0D0; + padding: 2px 0; +} +div.toolbar_vert ul { + margin: 0; + padding: 0; +} +div.toolbar_vert ul li { + list-style: none; + margin: 0; +} +div.toolbar_vert a img { + opacity: 0.6; + /*filter: alpha(opacity=60);*/ +} +div.toolbar_vert a:hover img { + opacity: 1; + /*filter: alpha(opacity=100);*/ +} +div.toolbar_vert a { + display: block; + padding: 2px; + border: 1px solid transparent; + cursor: default; + width: auto; + color: #000000; + margin: 0 2px; + max-height: 16px; + text-decoration: none; +} +div.toolbar_vert a:hover { + border: 1px solid #209020; + background-color: #ceedce; + color: #000000; + text-decoration: none; +} +div.toolbar_vert a:active { + border: 1px solid #A0A0A0; + background-color: #E0E0E0; +} +div.toolbar_vert img { + margin: 0; + padding: 0; + display: inline; + border-width: 0px; +} +div.toolbar_vert a span { + position: relative; + top: -4px; +} +div.toolbar_vert li span { + padding-left: 2px; + padding-right: 5px; +} + diff -r 000000000000 -r 902822492a68 themes/oxygen/elements.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/elements.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,64 @@ +{TEXT} + +
    {TEXT}
    + +{TEXT} + +
  • {TEXT}
  • + +
  • {HTML}
  • + +{TEXT}
    + +{HTML}
    + +
    {TEXT}
    + + +
    + + + + + + +
    +
    + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/oxygen/footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,80 @@ +
    +
    +
    +
    +
    + +
    + {COPYRIGHT}
    + Powered by Enano | Valid XHTML 1.1 | Valid CSS | [[Stats]] +
    + +
    + +
    + + +
    +
    +

    Your browser does not support CSS.

    +

    If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9.

    +

    Because of this, there are a few minor issues that you may experience while browsing this site, not the least of which is some visual elements below that would normally be hidden in most browsers. Please excuse these minor inconveniences.

    +
    + + + + + + diff -r 000000000000 -r 902822492a68 themes/oxygen/header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,141 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +

    {SITE_NAME}

    {SITE_DESC}

    +
    + +
    +
    +
    +  +
    +

    ondblclick="ajaxRenameInline();" title="Double-click to rename this page" id="h2PageName">{PAGE_NAME}

    +
    diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/bg.png Binary file themes/oxygen/images/bleu/bg.png has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-bl.gif Binary file themes/oxygen/images/bleu/border-bl.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-br.gif Binary file themes/oxygen/images/bleu/border-br.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-btm-l.gif Binary file themes/oxygen/images/bleu/border-btm-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-btm-r.gif Binary file themes/oxygen/images/bleu/border-btm-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-btm.gif Binary file themes/oxygen/images/bleu/border-btm.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-l.gif Binary file themes/oxygen/images/bleu/border-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-m-l.gif Binary file themes/oxygen/images/bleu/border-m-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-m-r.gif Binary file themes/oxygen/images/bleu/border-m-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-menu-l.gif Binary file themes/oxygen/images/bleu/border-menu-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-menu-r.gif Binary file themes/oxygen/images/bleu/border-menu-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-menu-t-h.gif Binary file themes/oxygen/images/bleu/border-menu-t-h.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-menu-t.gif Binary file themes/oxygen/images/bleu/border-menu-t.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-r.gif Binary file themes/oxygen/images/bleu/border-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-tb-l.gif Binary file themes/oxygen/images/bleu/border-tb-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-tb-r.gif Binary file themes/oxygen/images/bleu/border-tb-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-tl.gif Binary file themes/oxygen/images/bleu/border-tl.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-top.gif Binary file themes/oxygen/images/bleu/border-top.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/border-tr.gif Binary file themes/oxygen/images/bleu/border-tr.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/bullet.gif Binary file themes/oxygen/images/bleu/bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/email.gif Binary file themes/oxygen/images/bleu/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/external.gif Binary file themes/oxygen/images/bleu/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/https.gif Binary file themes/oxygen/images/bleu/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/bleu/irc.gif Binary file themes/oxygen/images/bleu/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/buttonbg.gif Binary file themes/oxygen/images/buttonbg.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/bg.png Binary file themes/oxygen/images/mint/bg.png has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-bl.gif Binary file themes/oxygen/images/mint/border-bl.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-br.gif Binary file themes/oxygen/images/mint/border-br.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-btm-l.gif Binary file themes/oxygen/images/mint/border-btm-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-btm-r.gif Binary file themes/oxygen/images/mint/border-btm-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-btm.gif Binary file themes/oxygen/images/mint/border-btm.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-l.gif Binary file themes/oxygen/images/mint/border-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-m-l.gif Binary file themes/oxygen/images/mint/border-m-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-m-r.gif Binary file themes/oxygen/images/mint/border-m-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-menu-l.gif Binary file themes/oxygen/images/mint/border-menu-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-menu-r.gif Binary file themes/oxygen/images/mint/border-menu-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-menu-t-h.gif Binary file themes/oxygen/images/mint/border-menu-t-h.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-menu-t.gif Binary file themes/oxygen/images/mint/border-menu-t.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-r.gif Binary file themes/oxygen/images/mint/border-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-tb-l.gif Binary file themes/oxygen/images/mint/border-tb-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-tb-r.gif Binary file themes/oxygen/images/mint/border-tb-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-tl.gif Binary file themes/oxygen/images/mint/border-tl.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-top.gif Binary file themes/oxygen/images/mint/border-top.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/border-tr.gif Binary file themes/oxygen/images/mint/border-tr.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/bullet.gif Binary file themes/oxygen/images/mint/bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/email.gif Binary file themes/oxygen/images/mint/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/external.gif Binary file themes/oxygen/images/mint/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/https.gif Binary file themes/oxygen/images/mint/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/images/mint/irc.gif Binary file themes/oxygen/images/mint/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/oxygen/sidebar-editor.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/sidebar-editor.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,58 @@ +
  • {TEXT}
  • + +
  • {HTML}
  • + + +
    + + + + + + +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
      + {CONTENT} +
    +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
    • + {CONTENT} +
    +
    +
    + + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/oxygen/simple-footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/simple-footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,25 @@ + +
    +
    + {COPYRIGHT} +
    +
    + + + diff -r 000000000000 -r 902822492a68 themes/oxygen/simple-header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/simple-header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,33 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    {PAGE_NAME}

    +
    +
    diff -r 000000000000 -r 902822492a68 themes/oxygen/theme.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/theme.cfg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,18 @@ + diff -r 000000000000 -r 902822492a68 themes/oxygen/toolbar.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/oxygen/toolbar.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,49 @@ + + + +
    + +
    + + + +
    + +
    + diff -r 000000000000 -r 902822492a68 themes/printable/acledit.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/acledit.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + +
    DenyDisallowWiki modeAllow
    {FIELD_DESC}
    +

    Permission types:

    +
      +
    • Allow means that the user is allowed to access the item
    • +
    • Wiki mode means the user can access the item if wiki mode is active (per-page wiki mode is taken into account)
    • +
    • Disallow means the user is denied access unless something allows it.
    • +
    • Deny means that the user is denied access to the item. This setting overrides all other permissions.
    • +
    +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/printable/comment.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/comment.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,51 @@ +
    + + + + + + + + + + + + + + + + + + + + + +
    {DATETIME}
    + + + + + + + +
    + {NAME}
    + {USER_LEVEL} +
    + {SEND_PM_LINK} {ADD_BUDDY_LINK} +
    +
    + Subject: {SUBJECT} +
    +
    {DATA}
    + +
    + {SIGNATURE} + +
    + [ {EDIT_LINK} | {DELETE_LINK} ] +
    + Moderation options: {MOD_APPROVE_LINK} {MOD_DELETE_LINK} +
    +
    +
    diff -r 000000000000 -r 902822492a68 themes/printable/css-simple/bleu.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/css-simple/bleu.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,136 @@ +/* + * Oxygen, but slightly more lightweight - used on minimalist pages + */ + +/* Basic definitions */ + +html, body { + height: 100%; + margin: 0; + padding: 0; +} + +body { + background-image: url(../images/bleu/bg.png); + font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; + font-size: 9pt; +} + +/* Dummy cells and backgrounds */ + +/* table#enano-main td { margin: 0; padding: 0; } */ +table#enano-main td#head-up-left { width: 12px; height: 12px; background-image: url(../images/bleu/border-tl.gif); } +table#enano-main td#head-up { height: 12px; background-image: url(../images/bleu/border-top.gif); } +table#enano-main td#head-up-right { width: 12px; height: 12px; background-image: url(../images/bleu/border-tr.gif); } +table#enano-main td#head-left { width: 12px; background-image: url(../images/bleu/border-l.gif); padding-bottom: 12px; } +table#enano-main td#head-main { background-color: #90B0D0; } +table#enano-main td#head-right { width: 12px; background-image: url(../images/bleu/border-r.gif); } +table#enano-main td#toolbar-left { width: 12px; background-image: url(../images/bleu/border-tb-l.gif); } +table#enano-main td#toolbar-right { width: 12px; background-image: url(../images/bleu/border-tb-r.gif); } +table#enano-main td#main-left { width: 12px; background-image: url(../images/bleu/border-m-l.gif); } +table#enano-main td#main-main { background-color: #FFFFFF; } +table#enano-main td#main-right { width: 12px; background-image: url(../images/bleu/border-m-r.gif); } +table#enano-main td#foot-left { width: 12px; background-image: url(../images/bleu/border-btm-l.gif); } +table#enano-main td#foot-main { background-color: #E8E8E8; padding-top: 12px; } +table#enano-main td#foot-right { width: 12px; background-image: url(../images/bleu/border-btm-r.gif); } +table#enano-main td#foot-btm-left { width: 12px; height: 12px; background-image: url(../images/bleu/border-bl.gif); } +table#enano-main td#foot-btm { height: 12px; background-image: url(../images/bleu/border-btm.gif); } +table#enano-main td#foot-btm-right { width: 12px; height: 12px; background-image: url(../images/bleu/border-br.gif); } + +/* Sidebar */ + +td.mdgSidebarHolder { width: 156px; } +div.sidebar, .dbx-group { width: 154px; background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { background-color: #F0F0F0; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar .head:hover, .dbx-handle:hover { background-color: #F4F4F4; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar div.slideblock a, .dbx-content li { background-color: #DDD; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; list-style-type: none; } +div.sidebar div.slideblock a:hover, .dbx-content li:hover { background-color: #EEE; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.recttop { width: 156px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 156px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url(../images/bleu/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; background-color: #FFF; } +div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move !important; } + +/* + * Docking Boxes code (for the sidebar editor) + */ + +/* group container(s) */#sbedit {margin: 0;padding: 0;/* position:relative; /* additional outer containers must also have position:relative */}/* keyboard navigation tooltip */.dbx-tooltip {display:block;position:absolute;margin:36px 0 0 125px;width:185px;border:1px solid #000;background:#ffd;color:#000;font:normal normal normal 0.85em tahoma, arial, sans-serif;padding:2px 4px 3px 5px;text-align:left;}* html .dbx-tooltip { width:195px; }/* use CSS2 system colors in CSS2 browsersbut not safari, which doesn't support them */*[class="dbx-tooltip"]:lang(en) {border-color:InfoText;background:InfoBackground;color:InfoText;font:small-caption;font-weight:normal;}/* additional clone styles */.dbx-clone {opacity: 0.8;}.dbx-content ul {margin: 0; padding: 0;}.dbx-content li a, .dbx-content li a:hover {text-decoration: none; color: #666;}.dbx-content2 {background-color: #DDD; margin: 0px 1px 0px 1px;}/* toolbar */div.toolbar {border-bottom: 1px solid #909090;background-color: #D0D0D0;padding: 2px 0;height: 22px;font-family: arial, sans-serif;font-size: 8pt;}div.toolbar ul {margin: 0;padding: 0;}div.toolbar ul li {list-style: none;margin: 0;float: left;}div.toolbar a img {opacity: 0.6;/*filter: alpha(opacity=60);*/}div.toolbar a:hover img {opacity: 1;/*filter: alpha(opacity=100);*/}div.toolbar a {display: block;padding: 2px;border: 1px solid transparent;cursor: default;width: auto;color: #000000;margin: 0 2px;max-height: 16px;text-decoration: none;}div.toolbar a:hover {border: 1px solid #202090;background-color: #ceceed;color: #000000;text-decoration: none;}div.toolbar a:active {border: 1px solid #A0A0A0;background-color: #E0E0E0;}div.toolbar img {margin: 0;padding: 0;display: inline;border-width: 0px;}div.toolbar a span {position: relative;top: -4px;}div.toolbar li span {padding-left: 2px;padding-right: 5px;}/* vertical toolbar */div.toolbar_vert {border: 1px solid #909090;background-color: #D0D0D0;padding: 2px 0;}div.toolbar_vert ul {margin: 0;padding: 0;}div.toolbar_vert ul li {list-style: none;margin: 0;}div.toolbar_vert a img {opacity: 0.6;/*filter: alpha(opacity=60);*/}div.toolbar_vert a:hover img {opacity: 1;/*filter: alpha(opacity=100);*/}div.toolbar_vert a {display: block;padding: 2px;border: 1px solid transparent;cursor: default;width: auto;color: #000000;margin: 0 2px;max-height: 16px;text-decoration: none;}div.toolbar_vert a:hover {border: 1px solid #202090;background-color: #ceceed;color: #000000;text-decoration: none;}div.toolbar_vert a:active {border: 1px solid #A0A0A0;background-color: #E0E0E0;}div.toolbar_vert img {margin: 0;padding: 0;display: inline;border-width: 0px;}div.toolbar_vert a span {position: relative;top: -4px;}div.toolbar_vert li span {padding-left: 2px;padding-right: 5px;} + +/* Header */ + +table#enano-main td#head-main { + text-align: center; +} + +table#enano-main td#head-main h1 { + font-size: 14pt; +} + +/* The "page tools" bar below the site logo but above the page content */ +div.pagebar { background-color: #B0D0F0; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; } +div.pagebar a.selected { background-color: #FFFFFF; color: #000040; font-weight: bold; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E0F0FF; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0FF; } + +/* Tweaks for the popup menu version of the same thing */ +div.pagebar#pagebarpopup { display: none; position: absolute; width: 150px; padding: 0; overflow: hidden; } +div.pagebar#pagebarpopup a, div#pagebarpopup2 a { display: block; margin: 0; } + +/* Content area */ +table#enano-main td#main-main { + padding: 10px 0; +} + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) * / +table#enano-main td#main-main h2 { border-bottom: 1px solid #90B0D0; margin-bottom: 0; } +table#enano-main td#main-main h3 { font-size: 11pt; font-weight: bold; } +table#enano-main td#main-main li { list-style: url(../images/bullet.gif); } +table#enano-main td#main-main blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +table#enano-main td#main-main a { color: #7090B0; } +table#enano-main td#main-main a:hover { color: #90B0D0; } +table#enano-main td#main-main a[href ^="http://"] { color: #80A0C0; background: url(../images/bleu/external.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="https://"] { color: #80A0C0; background: url(../images/bleu/https.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="mailto:"] { color: #80A0C0; background: url(../images/bleu/email.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="irc://"] { color: #80A0C0; background: url(../images/bleu/irc.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="http://"]:hover { color: #A0C0E0; background: url(../images/bleu/external.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="https://"]:hover { color: #A0C0E0; background: url(../images/bleu/https.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="mailto:"]:hover { color: #A0C0E0; background: url(../images/bleu/email.gif) center right no-repeat; padding-right: 16px; } +table#enano-main td#main-main a[href ^="irc://"]:hover { color: #A0C0E0; background: url(../images/bleu/irc.gif) center right no-repeat; padding-right: 16px; } + +/* Footer */ + +table#enano-main td#foot-main { + color: #AAA; + font-size: 7pt; +} + +/* Styled boxes */ + +.mdg-comment, .mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* Tables */ + +.tblholder { margin: 10px 0 0 0; padding: 0; border: 1px solid #AAAAAA; background-color: #E8E8E8; } +div.tblholder td.row1 { padding: 4px; background-color: #E0E0E0; } +div.tblholder td.row2 { padding: 4px; background-color: #F0F0F0; } +div.tblholder td.row3 { padding: 4px; background-color: #E8E8E8; } +div.tblholder th { padding: 4px; background-color: #7080A0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder th.subhead { padding: 4px; background-color: #90A0B0; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder table { background-color: #FFFFFF; width: 100%; } + +/* Buttons and textboxes - these settings are used almost everywhere */ + +input, textarea, select { border: 1px solid #406080; background-color: #F2F2F2; padding: 3px; font-family: arial, helvetica, sans-serif; font-size: 9pt; } +input:hover, textarea:hover, select:hover { border: 1px solid #6080A0; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90B0D0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } +input#pageheading { font-size: 14pt; border-bottom: 1px solid #90B0D0; margin-bottom: 0; } + diff -r 000000000000 -r 902822492a68 themes/printable/css-simple/printbits.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/css-simple/printbits.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,7 @@ +span.normallink { + display: none; +} +div.mdg-comment { + display: none; +} + diff -r 000000000000 -r 902822492a68 themes/printable/css/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/css/default.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,352 @@ +/** + * Printable page theme for Enano + * Designed by Dan Fuhry, (C) 2006 + * This theme is Free Software; see the file "GPL" included with this package for details. + */ + +/* The basics */ +html,body { height: 100%; } +body { margin: 0; padding: 0; background-color: #FFFFFF; font-family: trebuchet ms, verdana, arial, helvetica, sans-serif; font-size: 9pt; } +.holder { border: 1px solid #CCCCCC; padding: 1px; background-color: #FFFFFF; color: #444444 } +div.pad { padding: 10px; } +table#title { margin: 0; padding: 0; height: 100px; background-color: #90B0D0; text-align: center; } + +/* Sidebar */ +td.mdgSidebarHolder { width: 140px; } +div.sidebar, .dbx-group { width: 138px; background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px; } +div.sidebar .head, .dbx-handle { background-color: #F0F0F0; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar .head:hover, .dbx-handle:hover { background-color: #F4F4F4; display: block; margin: 0px 1px 1px 1px; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #111; padding: 5px; font-weight: bold; } +div.sidebar div.slideblock a, .dbx-content li { background-color: #DDD; display: block; margin: 0px 1px; border-bottom: 1px solid #FFF; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; list-style-type: none; } +div.sidebar div.slideblock a:hover, .dbx-content li:hover { background-color: #EEE; display: block; margin: 0px 1px; border-bottom: 1px solid #FFF; font-family: Trebuchet MS, Arial, helvetica, sans-serif; font-size: 7pt; cursor: pointer; text-decoration: none; color: #666; padding: 5px 5px 5px 9px; } +div.recttop { width: 140px; height: 12px; margin: 0; padding: 0; } +td.recttoptop { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +td.recttoptop:hover { width: 100%; height: 12px; background-image: url(../images/bleu/border-menu-t-h.gif); background-repeat: repeat-x; margin: 0; padding: 0; cursor: pointer; } +div.rectbot { width: 140px; height: 12px; margin: 0; padding: 0; } +td.rectbottop { width: 100%; height: 12px; background-image: url(../images/bleu/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; } +div.slideblock, .dbx-content { overflow: hidden; background-color: #DDD; } +div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; } +.dbx-handle { cursor: move !important; } + +/* The credits thingy at the bottom */ +div#credits { margin: 10px; border-top: 1px solid #C0C0C0; padding: 10px 0; color: #AAA; font-size: 7pt; } +div#credits a { color: #B0B0B0; text-decoration: underline; } +div#credits a:hover { color: #B0B0B0; text-decoration: underline; } + +/* The link hidden in plain "site" at the top of the page */ +td#mainhead a { text-decoration: none; color: #000000; } +td#mainhead a:hover { text-decoration: none; color: #000000; border-bottom: 1px dotted #406080; } + +/* Text, headings, and links inside the main div (usually #ajaxEditContainer but used some other places as well) */ +div.contentDiv h2 { border-bottom: 1px solid #B0B0B0; margin-bottom: 0; } +div.contentDiv h3 { font-size: 11pt; font-weight: bold; } +div.contentDiv li , div#messageBox li { list-style: url(../images/bullet.gif); } +div.contentDiv p , div#messageBox p { margin-left: 1.0em; } +div.contentDiv blockquote , div#messageBox blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; } +div.contentDiv , div#messageBox { font-size: 9pt; } +div.contentDiv a , div#messageBox a { color: #909090; } +div.contentDiv a:hover , div#messageBox a:hover { color: #B0B0B0; } +div.contentDiv a[href ^="http://"] , div#messageBox a[href ^="http://"] { color: #A0A0A0; } +div.contentDiv a[href ^="https://"] , div#messageBox a[href ^="https://"] { color: #A0A0A0; } +div.contentDiv a[href ^="mailto:"] , div#messageBox a[href ^="mailto:"] { color: #A0A0A0; } +div.contentDiv a[href ^="irc://"] , div#messageBox a[href ^="irc://"] { color: #A0A0A0; } +div.contentDiv a[href ^="http://"]:hover , div#messageBox a[href ^="http://"]:hover { color: #C0C0C0; } +div.contentDiv a[href ^="https://"]:hover, div#messageBox a[href ^="https://"]:hover { color: #C0C0C0; } +div.contentDiv a[href ^="mailto:"]:hover , div#messageBox a[href ^="mailto:"]:hover { color: #C0C0C0; } +div.contentDiv a[href ^="irc://"]:hover , div#messageBox a[href ^="irc://"]:hover { color: #C0C0C0; } + +/* Wikilinks to pages that don't exist */ +div.contentDiv a.wikilink-nonexistent { color: #707070; border-bottom: 1px dotted #B05020; text-decoration: none; } +div.contentDiv a.wikilink-nonexistent:hover { color: #707070; border-bottom: 1px dotted #B05020; text-decoration: none; } + +/* Well, not Midget and not comments (usually), but that's what the class is called ;-). Basically an informational window or used as a wrapper for tables. */ +.mdg-comment, .mdg-infobox { margin-left: 1em; padding: 7px; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +.tblholder { margin: 10px 0 0 0; padding: 0; border: 1px solid #AAAAAA; background-color: #E8E8E8; } + +/* The beautiful tables inside what may not obviously be mdg-comment divs */ +div.tblholder td.row1 { padding: 4px; border-color: #E0E0E0; border-width: 1px 1px 0 0; border-style: solid; background-color: #FFFFFF; } +div.tblholder td.row2 { padding: 4px; border-color: #F0F0F0; border-width: 1px 1px 0 0; border-style: solid; background-color: #FFFFFF; } +div.tblholder td.row3 { padding: 4px; border-color: #E8E8E8; border-width: 1px 1px 0 0; border-style: solid; background-color: #FFFFFF; } +div.tblholder th { padding: 4px; border-color: #7080A0; border-width: 1px 1px 0 0; border-style: solid; background-color: #FFFFFF; font-weight: bold; text-align: center; color: #000000; } +div.tblholder th.subhead { padding: 4px; border-color: #90A0B0; border-width: 1px 1px 0 0; border-style: solid; background-color: #FFFFFF; font-weight: bold; text-align: center; color: #000000; } +div.tblholder table { background-color: #FFFFFF; width: 100%; } + +/* The "page tools" bar below the site logo but above the page content +div.pagebar { background-color: #B0D0F0; margin-top: 0px; padding: 3px; font-size: 7pt; } +div.pagebar a { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; } +div.pagebar a.selected { background-color: #FFFFFF; color: #000040; font-weight: bold; } +div.pagebar a:hover { cursor: pointer; padding: 3px; margin-left: 3px; margin-right: 3px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #E0F0FF; } +div.pagebar input:hover { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #D0F0FF; } +div.pagebar input:focus { font-family: Bon Apetit, sans-serif; font-size: 7pt; border: 0; margin: 0px 0px 0px 0px; text-decoration: none; color: #406080; background-color: #F0F0FF; } +*/ + +/* + * jBox menu system + */ + +div.menu { + background-color: #B0D0F0; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #406080; +} +div.menu div.label { + color: #001020; + cursor: default; +} +div.menu span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover { + color: #406080; + background-color: #D0F0FF; +} +div.menu input[type ^="text"], div.menu input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 4px 5px; + max-width: 70px; + background-color: #D0F0FF; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover { + background-color: #E0F0FF; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus { + background-color: #F0F0FF; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover { + color: #000040; + background-color: #FFFFFF; +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0; + background-color: #B0D0F0; + border-width: 0; + min-width: 120px; +} +div.menu ul li { + list-style: none; +} +div.menu ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +/* Rounded corners on nearly everything */ +td#mdg-tl { width: 12px; height: 12px; background: url(../images/bleu/border-tl.gif); } +td#mdg-tr { width: 12px; height: 12px; background: url(../images/bleu/border-tr.gif); } +td#mdg-top { background: url(../images/bleu/border-top.gif); } +td#mdg-l { width: 12px; height: 12px; background: url(../images/bleu/border-l.gif); } +td#mdg-r { width: 12px; height: 12px; background: url(../images/bleu/border-r.gif); } +td#mdg-bl { width: 12px; height: 12px; background: url(../images/bleu/border-tb-l.gif); } +td#mdg-br { width: 12px; height: 12px; background: url(../images/bleu/border-tb-r.gif); } +td#mdg-ml { width: 12px; height: 12px; background: url(../images/bleu/border-m-l.gif); } +td#mdg-mr { width: 12px; height: 12px; background: url(../images/bleu/border-m-r.gif); } +td#mdg-brl { width: 12px; height: 1px; background: url(../images/bleu/border-m-l.gif); } +td#mdg-brr { width: 12px; height: 1px; background: url(../images/bleu/border-m-r.gif); } +td#mdg-btl { width: 12px; height: 1px; background: url(../images/bleu/border-btm-l.gif); } +td#mdg-btr { width: 12px; height: 1px; background: url(../images/bleu/border-btm-r.gif); } +td#mdg-btcl { width: 12px; height: 12px; background: url(../images/bleu/border-bl.gif); } +td#mdg-btcr { width: 12px; height: 12px; background: url(../images/bleu/border-br.gif); } +td#mdg-btm { height: 12px; background: url(../images/bleu/border-btm.gif); } +td.mdg-menu-top { width: 84%; height: 12px; background: url(../images/bleu/border-menu-t.gif); margin: 0; padding: 0; background-repeat: repeat-x; font-size: 2px; } +td.mdg-menu-tl { width: 12px; height: 12px; background: url(../images/bleu/border-menu-l.gif); background-position: left top; background-repeat: no-repeat; } +td.mdg-menu-tr { width: 12px; height: 12px; background: url(../images/bleu/border-menu-r.gif); background-position: right top; background-repeat: no-repeat; } +td.mdg-menu-bl { width: 12px; height: 12px; background: url(../images/bleu/border-bl.gif); } +td.mdg-menu-br { width: 12px; height: 12px; background: url(../images/bleu/border-br.gif); } +td.mdg-menu-btm { height: 12px; background: url(../images/bleu/border-btm.gif); } + +/* Buttons and textboxes - these settings are used almost everywhere */ +input, textarea, select { border: 1px solid #406080; background-color: #F2F2F2; padding: 3px; font-family: arial, helvetica, sans-serif; font-size: 9pt; } +input:hover, textarea:hover, select:hover { border: 1px solid #6080A0; background-color: #F8F8F8; padding: 3px; } +input:focus, textarea:focus, select:focus { border: 1px solid #90B0D0; background-color: #FFFFFF; padding: 3px; } +label { padding: 3px; cursor: pointer; } +label:hover { padding: 3px; cursor: pointer; background-color: #F0F0F0; } +input#pageheading { font-size: 14pt; border-bottom: 1px solid #90B0D0; margin-bottom: 0; } + +/* JWS window theming */ +div.jswindow { border: 2px solid #7090B0; border-top: 5px solid #7090B0; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #7090B0; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0D0F0; background-color: #90B0D0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0D0F0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url(../../../images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url(../../../images/info.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url(../../../images/warning.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url(../../../images/question.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url(../../../images/wait.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* This stuff is mostly unused, left in for compatibility */ +div#ajaxEditContainer table { border: 0px solid #FFFFFF; } +div#ajaxEditContainer td { margin: 1px; } +/* div#ajaxEditContainer { overflow: auto; } /* Makes ajaxEditContainer scroll horizontally in firefox if the content is too wide - prevents that ugly clipping effect */ +div#ajaxEditContainer pre { margin-left: 1em; background-color: #F8F8F8; border: 1px dashed #90B0D0; padding: 10px; overflow: auto; max-height: 150px; } + +/* Tables where diffs are shown */ +table.diff, td.diff-otitle, td.diff-ntitle { background-color: white; } +td.diff-addedline { background: #cfc; font-size: smaller; } +td.diff-deletedline { background: #ffa; font-size: smaller; } +td.diff-context { background: #eee; font-size: smaller; } +span.diffchange { color: red; font-weight: bold; } + +/* toolbar */ +div.toolbar { + border-bottom: 1px solid #909090; + background-color: #D0D0D0; + padding: 2px 0; + height: 22px; + font-family: arial, sans-serif; + font-size: 8pt; +} +div.toolbar ul { + margin: 0; + padding: 0; +} +div.toolbar ul li { + list-style: none; + margin: 0; + float: left; +} +div.toolbar a img { + opacity: 0.6; + /*filter: alpha(opacity=60);*/ +} +div.toolbar a:hover img { + opacity: 1; + /*filter: alpha(opacity=100);*/ +} +div.toolbar a { + display: block; + padding: 2px; + border: 1px solid transparent; + cursor: default; + width: auto; + color: #000000; + margin: 0 2px; + max-height: 16px; + text-decoration: none; +} +div.toolbar a:hover { + border: 1px solid #202090; + background-color: #ceceed; + color: #000000; + text-decoration: none; +} +div.toolbar a:active { + border: 1px solid #A0A0A0; + background-color: #E0E0E0; +} +div.toolbar img { + margin: 0; + padding: 0; + display: inline; + border-width: 0px; +} +div.toolbar a span { + position: relative; + top: -4px; +} +div.toolbar li span { + padding-left: 2px; + padding-right: 5px; +} + +/* vertical toolbar */ +div.toolbar_vert { + border: 1px solid #909090; + background-color: #D0D0D0; + padding: 2px 0; +} +div.toolbar_vert ul { + margin: 0; + padding: 0; +} +div.toolbar_vert ul li { + list-style: none; + margin: 0; +} +div.toolbar_vert a img { + opacity: 0.6; + /*filter: alpha(opacity=60);*/ +} +div.toolbar_vert a:hover img { + opacity: 1; + /*filter: alpha(opacity=100);*/ +} +div.toolbar_vert a { + display: block; + padding: 2px; + border: 1px solid transparent; + cursor: default; + width: auto; + color: #000000; + margin: 0 2px; + max-height: 16px; + text-decoration: none; +} +div.toolbar_vert a:hover { + border: 1px solid #202090; + background-color: #ceceed; + color: #000000; + text-decoration: none; +} +div.toolbar_vert a:active { + border: 1px solid #A0A0A0; + background-color: #E0E0E0; +} +div.toolbar_vert img { + margin: 0; + padding: 0; + display: inline; + border-width: 0px; +} +div.toolbar_vert a span { + position: relative; + top: -4px; +} +div.toolbar_vert li span { + padding-left: 2px; + padding-right: 5px; +} + diff -r 000000000000 -r 902822492a68 themes/printable/elements.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/elements.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,64 @@ +{TEXT} + +
    {TEXT}
    + +{TEXT} + +
  • {TEXT}
  • + +
  • {HTML}
  • + +{TEXT}
    + +{HTML}
    + +
    {TEXT}
    + + +
    + + + + + + +
    +
    + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/printable/footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,26 @@ +
    + + + +
    + {COPYRIGHT}
    + Powered by Enano | Valid XHTML 1.1 | Valid CSS | [[Stats]] +
    + + + + diff -r 000000000000 -r 902822492a68 themes/printable/header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,21 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + +
    + +

    {PAGE_NAME}

    +
    diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/bg.png Binary file themes/printable/images/bleu/bg.png has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-bl.gif Binary file themes/printable/images/bleu/border-bl.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-br.gif Binary file themes/printable/images/bleu/border-br.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-btm-l.gif Binary file themes/printable/images/bleu/border-btm-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-btm-r.gif Binary file themes/printable/images/bleu/border-btm-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-btm.gif Binary file themes/printable/images/bleu/border-btm.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-l.gif Binary file themes/printable/images/bleu/border-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-m-l.gif Binary file themes/printable/images/bleu/border-m-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-m-r.gif Binary file themes/printable/images/bleu/border-m-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-menu-l.gif Binary file themes/printable/images/bleu/border-menu-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-menu-r.gif Binary file themes/printable/images/bleu/border-menu-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-menu-t-h.gif Binary file themes/printable/images/bleu/border-menu-t-h.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-menu-t.gif Binary file themes/printable/images/bleu/border-menu-t.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-r.gif Binary file themes/printable/images/bleu/border-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-tb-l.gif Binary file themes/printable/images/bleu/border-tb-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-tb-r.gif Binary file themes/printable/images/bleu/border-tb-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-tl.gif Binary file themes/printable/images/bleu/border-tl.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-top.gif Binary file themes/printable/images/bleu/border-top.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/border-tr.gif Binary file themes/printable/images/bleu/border-tr.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/bullet.gif Binary file themes/printable/images/bleu/bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/email.gif Binary file themes/printable/images/bleu/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/external.gif Binary file themes/printable/images/bleu/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/https.gif Binary file themes/printable/images/bleu/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/bleu/irc.gif Binary file themes/printable/images/bleu/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/bg.png Binary file themes/printable/images/mint/bg.png has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-bl.gif Binary file themes/printable/images/mint/border-bl.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-br.gif Binary file themes/printable/images/mint/border-br.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-btm-l.gif Binary file themes/printable/images/mint/border-btm-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-btm-r.gif Binary file themes/printable/images/mint/border-btm-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-btm.gif Binary file themes/printable/images/mint/border-btm.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-l.gif Binary file themes/printable/images/mint/border-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-m-l.gif Binary file themes/printable/images/mint/border-m-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-m-r.gif Binary file themes/printable/images/mint/border-m-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-menu-l.gif Binary file themes/printable/images/mint/border-menu-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-menu-r.gif Binary file themes/printable/images/mint/border-menu-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-menu-t-h.gif Binary file themes/printable/images/mint/border-menu-t-h.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-menu-t.gif Binary file themes/printable/images/mint/border-menu-t.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-r.gif Binary file themes/printable/images/mint/border-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-tb-l.gif Binary file themes/printable/images/mint/border-tb-l.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-tb-r.gif Binary file themes/printable/images/mint/border-tb-r.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-tl.gif Binary file themes/printable/images/mint/border-tl.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-top.gif Binary file themes/printable/images/mint/border-top.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/border-tr.gif Binary file themes/printable/images/mint/border-tr.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/bullet.gif Binary file themes/printable/images/mint/bullet.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/email.gif Binary file themes/printable/images/mint/email.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/external.gif Binary file themes/printable/images/mint/external.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/https.gif Binary file themes/printable/images/mint/https.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/images/mint/irc.gif Binary file themes/printable/images/mint/irc.gif has changed diff -r 000000000000 -r 902822492a68 themes/printable/punbb/bleu.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/punbb/bleu.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,111 @@ +/****************************************************************/ +/* 1. BACKGROUND AND TEXT COLOURS */ +/****************************************************************/ + +/* 1.1 Default background colour and text colour */ + +BODY {BACKGROUND-COLOR: #FFF} + +.pun {COLOR: #333} + +DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} +#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} + +/* 1. 2 Darker background colours */ + +TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, +#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} + +/* 1.3 Main headers and navigation bar background and text colour */ + +.pun H2, #brdmenu {BACKGROUND-COLOR: #7090B0; COLOR: #FFF} + +/* 1.4 Table header rows */ + +.pun TH {BACKGROUND-COLOR: #D1D1D1} + +/* 1.5 Fieldset legend text colour */ + +.pun LEGEND {COLOR: #005CB1} + +/* 1.6 Highlighted text for various items */ + +.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} + +/****************************************************************/ +/* 2. POST BACKGROUNDS AND TEXT */ +/****************************************************************/ + +/* 2.1 This is the setup for posts. */ + +DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} +DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #f1f1f1} +DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} + +/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ + +DIV.blockpost H2 {BACKGROUND-COLOR: #7090B0} +DIV.blockpost H2 SPAN.conr {COLOR: #AABDCD} + +/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ + +.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} + +/****************************************************************/ +/* 3. BORDER COLOURS */ +/****************************************************************/ + +/* 3.1 All external borders */ + +DIV.box {BORDER-COLOR: #7090B0} + +/* 3.2 Makes the top border of posts match the colour used for post headers */ + +DIV.blockpost DIV.box {BORDER-COLOR: #7090B0 #7090B0 #7090B0} + +/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ + +.pun TD {BORDER-COLOR: #BBCEDE} +.pun TH {BORDER-COLOR: #D1D1D1} + +/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ + +.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} + +/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour +without interferring with IE's rather nice default */ + +.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} + +/****************************************************************/ +/* 4. LINK COLOURS */ +/****************************************************************/ + +/* 4.1 This is the default for all links */ + +.pun A:link, .pun A:visited {COLOR: #7090B0} +.pun A:hover {COLOR: #90B0D0} + +/* 4.2 This is the colour for links in header rows and the navigation bar */ + +.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} +.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} + +/* 4.3 This is for closed topics and "hot" links */ + +LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} +LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} +LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} +LI.maintenancelink A:hover {COLOR: #B42000} + +/****************************************************************/ +/* 5. POST STATUS INDICATORS */ +/****************************************************************/ + +/* These are the post status indicators which appear at the left of some tables. +.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and +.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ + +DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} +TR.iredirect DIV.icon {BORDER-COLOR: #76B696 #6EAE8E #5A9A7A #72B292} +DIV.inew {BORDER-COLOR: #7696B6 #6E8EAE #5A7A9A #7292B2} \ No newline at end of file diff -r 000000000000 -r 902822492a68 themes/printable/punbb/mint.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/punbb/mint.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,111 @@ +/****************************************************************/ +/* 1. BACKGROUND AND TEXT COLOURS */ +/****************************************************************/ + +/* 1.1 Default background colour and text colour */ + +BODY {BACKGROUND-COLOR: #FFF} + +.pun {COLOR: #333} + +DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} +#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} + +/* 1. 2 Darker background colours */ + +TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, +#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} + +/* 1.3 Main headers and navigation bar background and text colour */ + +.pun H2, #brdmenu {BACKGROUND-COLOR: #70B090; COLOR: #FFF} + +/* 1.4 Table header rows */ + +.pun TH {BACKGROUND-COLOR: #D1D1D1} + +/* 1.5 Fieldset legend text colour */ + +.pun LEGEND {COLOR: #00B15C} + +/* 1.6 Highlighted text for various items */ + +.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} + +/****************************************************************/ +/* 2. POST BACKGROUNDS AND TEXT */ +/****************************************************************/ + +/* 2.1 This is the setup for posts. */ + +DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} +DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #f1f1f1} +DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} + +/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ + +DIV.blockpost H2 {BACKGROUND-COLOR: #70B090} +DIV.blockpost H2 SPAN.conr {COLOR: #AACDBD} + +/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ + +.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} + +/****************************************************************/ +/* 3. BORDER COLOURS */ +/****************************************************************/ + +/* 3.1 All external borders */ + +DIV.box {BORDER-COLOR: #70B090} + +/* 3.2 Makes the top border of posts match the colour used for post headers */ + +DIV.blockpost DIV.box {BORDER-COLOR: #70B090 #70B090 #70B090} + +/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ + +.pun TD {BORDER-COLOR: #BBDECE} +.pun TH {BORDER-COLOR: #D1D1D1} + +/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ + +.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #AC99A8 #FFF #FFF #AC99A8} + +/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour +without interferring with IE's rather nice default */ + +.pun DIV>FIELDSET {BORDER-COLOR: #AC99A8} + +/****************************************************************/ +/* 4. LINK COLOURS */ +/****************************************************************/ + +/* 4.1 This is the default for all links */ + +.pun A:link, .pun A:visited {COLOR: #70B090} +.pun A:hover {COLOR: #90D0B0} + +/* 4.2 This is the colour for links in header rows and the navigation bar */ + +.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} +.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} + +/* 4.3 This is for closed topics and "hot" links */ + +LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} +LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} +LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B40020} +LI.maintenancelink A:hover {COLOR: #B40020} + +/****************************************************************/ +/* 5. POST STATUS INDICATORS */ +/****************************************************************/ + +/* These are the post status indicators which appear at the left of some tables. +.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and +.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ + +DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} +TR.iredirect DIV.icon {BORDER-COLOR: #7696B6 #6E8EAE #5A7A9A #7292B2} +DIV.inew {BORDER-COLOR: #76B696 #6EAE8E #5A9A7A #72B292} \ No newline at end of file diff -r 000000000000 -r 902822492a68 themes/printable/sidebar-editor.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/sidebar-editor.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,58 @@ +
  • {TEXT}
  • + +
  • {HTML}
  • + + +
    + + + + + + +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
      + {CONTENT} +
    +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
    • + {CONTENT} +
    +
    +
    + + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/printable/simple-footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/simple-footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,25 @@ + +
    +
    + {COPYRIGHT} +
    +
    + + + diff -r 000000000000 -r 902822492a68 themes/printable/simple-header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/simple-header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,33 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + + {JS_DYNAMIC_VARS} + + + {ADDITIONAL_HEADERS} + + + + + +
    + + + + + + + + + + + + + +
    +

    {PAGE_NAME}

    +
    +
    diff -r 000000000000 -r 902822492a68 themes/printable/theme.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/theme.cfg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,18 @@ + diff -r 000000000000 -r 902822492a68 themes/printable/toolbar.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/printable/toolbar.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,49 @@ + + + +
    + +
    + + + +
    + +
    + diff -r 000000000000 -r 902822492a68 themes/stpatty/acledit.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/acledit.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + +
    DenyDisallowWiki modeAllow
    {FIELD_DESC}
    +

    Permission types:

    +
      +
    • Allow means that the user is allowed to access the item
    • +
    • Wiki mode means the user can access the item if wiki mode is active (per-page wiki mode is taken into account)
    • +
    • Disallow means the user is denied access unless something allows it.
    • +
    • Deny means that the user is denied access to the item. This setting overrides all other permissions.
    • +
    +
    +
    + + diff -r 000000000000 -r 902822492a68 themes/stpatty/comment.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/comment.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,51 @@ +
    + + + + + + + + + + + + + + + + + + + + + +
    {DATETIME}
    + + + + + + + +
    + {NAME}
    + {USER_LEVEL} +
    + {SEND_PM_LINK} {ADD_BUDDY_LINK} +
    +
    + Subject: {SUBJECT} +
    +
    {DATA}
    + +
    + {SIGNATURE} + +
    + [ {EDIT_LINK} | {DELETE_LINK} ] +
    + Moderation options: {MOD_APPROVE_LINK} {MOD_DELETE_LINK} +
    +
    +
    diff -r 000000000000 -r 902822492a68 themes/stpatty/css-extra/ie-fixes.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/css-extra/ie-fixes.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,23 @@ +/* + * St. Patty theme for Enano + * Copyright (C) 2007 Dan Fuhry + * + * This theme is Free Software, available under the terms of the GNU General Public License. See the file "GPL" included with this + * package for details. + */ + +div#bg { + background-image: none; +} +div#title { + background-image: none; +} +div#rap { + background-image: url(../images/rap-ie.gif); +} +div#sidebar ul li a { + margin-bottom: -14px; +} +div#pagetools a { + padding: 4px 3px; +} diff -r 000000000000 -r 902822492a68 themes/stpatty/css-simple/shamrock.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/css-simple/shamrock.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,40 @@ +/* + * St. Patty theme for Enano + * Copyright (C) 2007 Dan Fuhry + * + * This theme is Free Software, available under the terms of the GNU General Public License. See the file "GPL" included with this + * package for details. + * + * Some ideas - most notably the hatching patterns and floating divs, were taken from Bittersweet + * No code or graphics were copied. + */ + +div#title h1 { + font-size: 16pt; + text-align: left; + font-weight: normal; + margin: 0 10px; + padding: 10px; +} + +div#maincontent h2#pagetitle { + font-size: 12pt; +} +div.footer { + min-height: 10px; +} + +table#stretcher { + width: 100%; + height: 100%; +} + +div#bg { + height: 100%; +} + +div#rap { + border-top: 1px solid #237000; + border-bottom: 1px solid #237000; +} + diff -r 000000000000 -r 902822492a68 themes/stpatty/css/shamrock.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/css/shamrock.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,426 @@ +/* + * St. Patty theme for Enano + * Copyright (C) 2007 Dan Fuhry + * + * This theme is Free Software, available under the terms of the GNU General Public License. See the file "GPL" included with this + * package for details. + * + * Some ideas - most notably the hatching patterns and floating divs, were taken from Bittersweet + * No code or graphics were copied. + */ + +html,body { + margin: 0; + padding: 0; + height: 100%; +} +body { + background-color: #101d14; + background-image: url(../images/bghatching.gif); + background-repeat: repeat; + font-family: "Lucida Sans Unicode", sans-serif; + font-size: 75%; +} +div#bg { + min-height: 500px; + width: 100%; + background-image: url(../images/bgfade.png); + background-repeat: repeat-x; +} +div#rap { + width: 760px; + padding: 0 10px; + margin: 0 auto; + background-image: url(../images/rap.png); +} +div#title { + margin: 0px; + padding: 0px; + background-color: #6abd2b; + background-image: url(../images/header.gif); + background-repeat: repeat-x; + border-bottom: 1px solid #237000; + vertical-align: middle; +} +div#title h1 { + margin: 0px 10px 10px 10px; + padding-top: 30px; + text-align: left; +} +div#title h2 { + margin: 0px 10px 0px 10px; + padding-bottom: 40px; + text-align: left; +} +div#title img#clover { + float: right; + margin-right: 10px; + margin-top: 10px; + + display: none; +} +div.straightaway { + clear: both; +} +/* Footer */ +div.footer { + min-height: 40px; + padding: 10px; + background-image: url(../images/footer.gif); + background-repeat: repeat-x; + background-color: #6fba38; + color: #FFF; +} +div.footer a { + color: #B3FF78; +} + +/* Content area */ +div#maincontent { + padding: 10px; + padding-right: 150px; +} +img#ajaxloadicon { + margin-top: 10px; +} +div#maincontent h2 { + color: #53a018; + margin: 10px 0; + padding: 0; + font-size: 16pt; +} +div#maincontent p { + margin-left: 1em; +} +div#maincontent h2#pagetitle { + margin: 0; + border-bottom: 1px solid #73c038; + font-size: 18pt; + color: #000000; +} +div#maincontent a:link, div#maincontent a:visited { + color: #237000; + text-decoration: none; +} +div#maincontent a:hover { + color: #033000; + border-bottom: 1px dotted #033000; +} +div#maincontent a.wikilink-nonexistent { + color: #AA0000; +} +div#maincontent a.wikilink-nonexistent:hover { + color: #BA2000; +} +div#maincontent ul { + list-style: square; +} +/* Sidebar */ +div#sidebar, div.dbx-box { + float: right; + width: 135px; +} +div#sidebar h4, div.dbx-handle { + margin: 0; + padding: 0 5px; + line-height: 25px; + color: #FFF; + background-color: #104715; + border-bottom: 1px solid #93e058; + font-weight: normal; + text-align: right; + text-transform: lowercase; +} +div.dbx-handle { + text-align: left; + cursor: move; +} +div#sidebar ul, .dbx-content ul { + margin: 0; + padding: 0; + list-style: none !important; +} +div#sidebar ul li, div.dbx-content ul li { + padding: 0; +} +div#sidebar ul li a, div.dbx-content ul li a { + line-height: 25px; + padding: 0 7px; + text-decoration: none; + color: #000; + background-color: #60A745; + display: block; + border-bottom: 1px solid #93e058; +} +div#sidebar ul li a:hover, div.dbx-content ul li a:hover { + background-color: #70B755; +} +div#sidebar div, div.dbx-content2 { + background-color: #60A745; + border-bottom: 1px solid #93e058; + width: 135px; + /* padding: 3px; */ +} +div#sidebar div ul { + margin-left: 2em; + list-style: square; +} +div#sidebar div ul a { + background-color: transparent; + display: inline; + border-bottom-width: 0px; + padding: 0; + color: #134000; +} +div#sidebar div ul a:hover { + background-color: transparent; + display: inline; + color: #033000; + border-bottom: 1px dotted #033000; +} +div#maincontent div.dbx-box a { + color: #000000; +} +div#sidebar div div { + background: transparent; + border-bottom-width: 0; + padding: 0; +} +/* Page toolbar */ +/* +div.pagetools { + background-color: #93e058; + line-height: 20px; + font-size: 75%; + padding: 0 5px; +} +div.pagetools a { + text-decoration: none; + padding: 3px; + color: #235000; +} +div.pagetools a:hover { + background-color: #A3F068; + height: 20px; +} +div.pagetools a.selected { + font-weight: bold; + background-color: #f4fff7; +} +div.pagetools#pagebarpopup { + display: none; + position: absolute; + width: 150px; + padding: 0; + overflow: hidden; +} +div.pagetools#pagebarpopup a { + display: block; +} +*/ + +/* + * jBox menu system + */ + +div.menu { + background-color: #93e058; + font-size: 7pt; + border-width: 0; +} +div.menu a, div.menu div.label { + padding: 2.5pt 5px; + margin-right: 3px; + text-decoration: none; + display: block; + float: left; + color: #235000; + border-bottom-width: 0 !important; +} +div.menu div.label { + color: #002010; + cursor: default; +} +div.menu span.sep { + display: block; + float: left; + width: 5px; +} +div.menu div.multopts { + line-height: 17pt; +} +div.menu div.multopts a, div.menu div.multopts div.label { + float: none; + display: inline; +} +div.menu a.liteselected, div.menu a.liteselected:hover, div.menu a:hover { + color: #235000; + background-color: #A3F068; +} +div.menu input[type ^="text"], div.menu input[type ^="password"] { + border-width: 0; + font-size: 9pt; + padding: 4px 5px; + max-width: 70px; + background-color: #A3F068; +} +div.menu input[type ^="text"]:hover, div.menu input[type ^="password"]:hover { + background-color: #AAF870; +} +div.menu input[type ^="text"]:focus, div.menu input[type ^="password"]:focus { + background-color: #B3FF78; +} +div.menu input[type ^="button"], div.menu input[type ^="submit"] { + border-width: 0; + font-size: 9pt; + padding: 3px 5px; + max-width: 70px; +} +div.menu a.current, div.menu a.current:hover, div.menu a.selected, div.menu a.selected:hover { + color: #000040; + background-color: #f4fff7; + font-weight: bold; +} +div.menu ul { + display: none; + position: absolute; + padding: 0; + margin: 0; + background-color: #93e058; + border-width: 0; + min-width: 120px; +} +div.menu ul li { + list-style: none; +} +div.menu ul a { + float: none; + margin: 0; +} +span.menuclear { + font-size: 1px; + height: 0px; + width: 0px; + clear: left; + line-height: 0px; + display: block; +} + +/* Other Enano-related stuff */ + +/* Tables */ +.tblholder { margin: 10px 0 0 0; padding: 0; border: 1px solid #AAAAAA; background-color: #E8E8E8; } +div.tblholder td.row1 { padding: 4px; background-color: #E0E0E0; } +div.tblholder td.row2 { padding: 4px; background-color: #F0F0F0; } +div.tblholder td.row3 { padding: 4px; background-color: #E8E8E8; } +div.tblholder th { padding: 4px; background-color: #73c038; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder th.subhead { padding: 4px; background-color: #93e058; font-weight: bold; text-align: center; color: #FFFFFF; } +div.tblholder table { background-color: #FFFFFF; width: 100%; } + +/* JWS window theming */ +div.jswindow { border: 2px solid #7090B0; border-top: 5px solid #7090B0; padding: 0px; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; display: none; position: absolute; background-color: #FFFFFF; } +div.titlebar { background-color: #7090B0; color: #FFFFFF; font-family: Trebuchet MS, tahoma, verdana, arial, sans-serif; font-size: 9pt; padding-bottom: 4px; cursor: default; } +div.titlebar div.closebtn { width: 16px; height: 16px; border: 1px solid #B0D0F0; background-color: #90B0D0; display: block; } +div.titlebar div.closebtn:hover { width: 16px; height: 16px; border: 1px solid #FFFFFF; background-color: #B0D0F0; display: block; } +div.titlebar table, div.titlebar td { margin: 0; padding: 0; } +div.jswindow div.content { padding: 10px; margin: 0; background-color: #FFFFFF; } + +/* The Wordpress-like fills behind checkboxes and their labels */ +.catCheck { padding: 3px; } +.catCheck:hover { padding: 3px; background-color: #F0F0F0; } + +/* Information, warning, question, error, and wait boxes */ +div.error-box { background-image: url(../../../images/error.png); background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.info-box { background-image: url(../../../images/info.png); background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.warning-box { background-image: url(../../../images/warning.png); background-repeat: no-repeat; background-color: #FFFFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.question-box { background-image: url(../../../images/question.png); background-repeat: no-repeat; background-color: #F4FFF4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } +div.wait-box { background-image: url(../../../images/wait.png); background-repeat: no-repeat; background-color: #FFF4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 1em; min-height: 25px; } + +/* Tables where diffs are shown */ +table.diff, td.diff-otitle, td.diff-ntitle { background-color: white; } +td.diff-addedline { background: #cfc; font-size: smaller; } +td.diff-deletedline { background: #ffa; font-size: smaller; } +td.diff-context { background: #eee; font-size: smaller; } +span.diffchange { color: red; font-weight: bold; } + +/* Bordered boxes */ +blockquote, .mdg-comment, .mdg-infobox { + background: #FFF; + border-bottom: 1px solid #EEE; + border-top: 1px solid #EEE; + color: #333; + display: block; + margin-bottom: 1.2em; + padding: 6px 12px; +} + +/* + * Docking Boxes code (for the sidebar editor) + */ + +/* group container(s) */ +#sbedit { + margin: 0; + padding: 0; + /* position:relative; /* additional outer containers must also have position:relative */ +} +/* keyboard navigation tooltip */ +.dbx-tooltip { + display:block; + position:absolute; + margin:36px 0 0 125px; + width:185px; + border:1px solid #000; + background:#ffd; + color:#000; + font:normal normal normal 0.85em tahoma, arial, sans-serif; + padding:2px 4px 3px 5px; + text-align:left; + } +* html .dbx-tooltip { width:195px; } + +/* use CSS2 system colors in CSS2 browsers + but not safari, which doesn't support them */ +*[class="dbx-tooltip"]:lang(en) { + border-color:InfoText; + background:InfoBackground; + color:InfoText; + font:small-caption; + font-weight:normal; + } +/* additional clone styles */ +.dbx-clone { + opacity: 0.8; +} +.dbx-content ul { + margin: 0; padding: 0; + list-style: none; +} +.dbx-content li a, .dbx-content li a:hover { + text-decoration: none; +} +.dbx-content2 { + margin: 0px 1px 0px 1px; +} + +/* inputs */ +input { + color: #555; + font: normal 1.1em "Lucida Sans Unicode",sans-serif; +} + +input, select, textarea { + background-color: #539018; + color: #FFF; + padding: 2px; + border: 1px solid #EEE; +} + +input:hover { + background-color: #73b038; +} + +input:active { + background-color: #83c048; +} + diff -r 000000000000 -r 902822492a68 themes/stpatty/elements.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/elements.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,40 @@ +{TEXT} + +
    {TEXT}
    + +{TEXT} + +
  • {TEXT}
  • + +
  • {HTML}
  • + +
  • {TEXT}
  • + +{HTML} + +

    {TEXT}

    + + + + +

    + {ADMIN_START} + {TITLE} + {ADMIN_END} +

    +
      + {CONTENT} +
    + + +

    + {ADMIN_START} + {TITLE} + {ADMIN_END} +

    +
    + {CONTENT} +
    + + + diff -r 000000000000 -r 902822492a68 themes/stpatty/footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,41 @@ +
    + + +
    + + + +
    +

    Your browser does not support CSS.

    +

    If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9.

    +

    Because of this, there are a few minor issues that you may experience while browsing this site, not the least of which is some visual elements below that would normally be hidden in most browsers. Please excuse these minor inconveniences.

    +
    + + + + + + diff -r 000000000000 -r 902822492a68 themes/stpatty/header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,102 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + {JS_DYNAMIC_VARS} + + + + + + + {ADDITIONAL_HEADERS} + + +
    +
    +
    +  +

    {SITE_NAME}

    +

    {SITE_DESC}

    +
    + + +
    +
    +  +
    +

    ondblclick="ajaxRenameInline();" title="Double-click to rename this page" >{PAGE_NAME}

    +
    + diff -r 000000000000 -r 902822492a68 themes/stpatty/images/bgfade.png Binary file themes/stpatty/images/bgfade.png has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/bghatching.gif Binary file themes/stpatty/images/bghatching.gif has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/bghatching.png Binary file themes/stpatty/images/bghatching.png has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/clover.png Binary file themes/stpatty/images/clover.png has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/footer.gif Binary file themes/stpatty/images/footer.gif has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/header-hilite.png Binary file themes/stpatty/images/header-hilite.png has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/header.gif Binary file themes/stpatty/images/header.gif has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/rap-ie.gif Binary file themes/stpatty/images/rap-ie.gif has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/images/rap.png Binary file themes/stpatty/images/rap.png has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/bgfade.xcf Binary file themes/stpatty/img-sources/bgfade.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/footer.xcf Binary file themes/stpatty/img-sources/footer.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/header.xcf Binary file themes/stpatty/img-sources/header.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/hilite.xcf Binary file themes/stpatty/img-sources/hilite.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/main-hatching.xcf Binary file themes/stpatty/img-sources/main-hatching.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/rap.xcf Binary file themes/stpatty/img-sources/rap.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/img-sources/sidebar-hatching.xcf Binary file themes/stpatty/img-sources/sidebar-hatching.xcf has changed diff -r 000000000000 -r 902822492a68 themes/stpatty/punbb/shamrock.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/punbb/shamrock.css Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,111 @@ +/****************************************************************/ +/* 1. BACKGROUND AND TEXT COLOURS */ +/****************************************************************/ + +/* 1.1 Default background colour and text colour */ + +BODY {BACKGROUND-COLOR: #FFF} + +.pun {COLOR: #333} + +DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} +#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} + +/* 1. 2 Darker background colours */ + +TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, +#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} + +/* 1.3 Main headers and navigation bar background and text colour */ + +.pun H2, #brdmenu {BACKGROUND-COLOR: #7090B0; COLOR: #FFF} + +/* 1.4 Table header rows */ + +.pun TH {BACKGROUND-COLOR: #D1D1D1} + +/* 1.5 Fieldset legend text colour */ + +.pun LEGEND {COLOR: #005CB1} + +/* 1.6 Highlighted text for various items */ + +.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} + +/****************************************************************/ +/* 2. POST BACKGROUNDS AND TEXT */ +/****************************************************************/ + +/* 2.1 This is the setup for posts. */ + +DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} +DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #f1f1f1} +DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} + +/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ + +DIV.blockpost H2 {BACKGROUND-COLOR: #7090B0} +DIV.blockpost H2 SPAN.conr {COLOR: #AABDCD} + +/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ + +.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} + +/****************************************************************/ +/* 3. BORDER COLOURS */ +/****************************************************************/ + +/* 3.1 All external borders */ + +DIV.box {BORDER-COLOR: #7090B0} + +/* 3.2 Makes the top border of posts match the colour used for post headers */ + +DIV.blockpost DIV.box {BORDER-COLOR: #7090B0 #7090B0 #7090B0} + +/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ + +.pun TD {BORDER-COLOR: #BBCEDE} +.pun TH {BORDER-COLOR: #D1D1D1} + +/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ + +.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} + +/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour +without interferring with IE's rather nice default */ + +.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} + +/****************************************************************/ +/* 4. LINK COLOURS */ +/****************************************************************/ + +/* 4.1 This is the default for all links */ + +.pun A:link, .pun A:visited {COLOR: #7090B0} +.pun A:hover {COLOR: #90B0D0} + +/* 4.2 This is the colour for links in header rows and the navigation bar */ + +.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} +.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} + +/* 4.3 This is for closed topics and "hot" links */ + +LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} +LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} +LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} +LI.maintenancelink A:hover {COLOR: #B42000} + +/****************************************************************/ +/* 5. POST STATUS INDICATORS */ +/****************************************************************/ + +/* These are the post status indicators which appear at the left of some tables. +.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and +.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ + +DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} +TR.iredirect DIV.icon {BORDER-COLOR: #76B696 #6EAE8E #5A9A7A #72B292} +DIV.inew {BORDER-COLOR: #7696B6 #6E8EAE #5A7A9A #7292B2} \ No newline at end of file diff -r 000000000000 -r 902822492a68 themes/stpatty/sidebar-editor.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/sidebar-editor.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,58 @@ +
  • {TEXT}
  • + +
  • {HTML}
  • + + +
    + + + + + + +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
      + {CONTENT} +
    +
    +
    + + +
    +
    + {ADMIN_START} + + {TITLE} + {ADMIN_END} + +
    +
    +
    • + {CONTENT} +
    +
    +
    + + +
    + + + + + + +
    +
    + diff -r 000000000000 -r 902822492a68 themes/stpatty/simple-footer.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/simple-footer.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,36 @@ +
    +
    + +
    + +
    +
    + +
    +

    Your browser does not support CSS.

    +

    If you can see this text, it means that your browser does not support Cascading Style Sheets (CSS). CSS is a fundemental aspect of XHTML, and as a result it is becoming very widely adopted by websites, including this one. You should consider switching to a more modern web browser, such as Mozilla Firefox or Opera 9.

    +

    Because of this, there are a few minor issues that you may experience while browsing this site, not the least of which is some visual elements below that would normally be hidden in most browsers. Please excuse these minor inconveniences.

    +
    + + + + + diff -r 000000000000 -r 902822492a68 themes/stpatty/simple-header.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/simple-header.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,78 @@ + + + + {PAGE_NAME} • {SITE_NAME} + + {JS_DYNAMIC_VARS} + + + + + + + {ADDITIONAL_HEADERS} + + +
    +
    +
    +
    +  +

    {PAGE_NAME}

    +
    + +
    +
    +  +
    +
    + diff -r 000000000000 -r 902822492a68 themes/stpatty/theme.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/theme.cfg Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,18 @@ + diff -r 000000000000 -r 902822492a68 themes/stpatty/toolbar.tpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/stpatty/toolbar.tpl Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,49 @@ + + + +
    + +
    + + + +
    + +
    + diff -r 000000000000 -r 902822492a68 upgrade.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/upgrade.php Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,671 @@ + Array('1.0b2'), + '1.0b2' => Array('1.0b3'), + '1.0b3' => Array('1.0b4'), + '1.0b4' => Array('1.0RC1'), + '1.0RC1' => Array('1.0RC2') + ); +$this_version = '1.0'; +$func_list = Array( + '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), + '1.0RC2' => Array('u_1_0_populate_userpage_comments') + ); + +if(!isset($_GET['mode'])) +{ + $_GET['mode'] = 'login'; +} + +function err($t) +{ + global $template; + echo $t; + $template->footer(); + exit; +} + +require(ENANO_ROOT.'/includes/template.php'); + +// Initialize the session manager +require(ENANO_ROOT.'/includes/functions.php'); +require(ENANO_ROOT.'/includes/dbal.php'); +require(ENANO_ROOT.'/includes/paths.php'); +require(ENANO_ROOT.'/includes/sessions.php'); +require(ENANO_ROOT.'/includes/plugins.php'); +require(ENANO_ROOT.'/includes/rijndael.php'); +require(ENANO_ROOT.'/includes/render.php'); +$db = new mysql(); +$db->connect(); + +$plugins = new pluginLoader(); + +if(!defined('ENANO_CONFIG_FETCHED')) +{ + // Select and fetch the site configuration + $e = $db->sql_query('SELECT config_name, config_value FROM '.table_prefix.'config;'); + if ( !$e ) + { + $db->_die('Some critical configuration information could not be selected.'); + } + else + { + define('ENANO_CONFIG_FETCHED', ''); // Used in die_semicritical to figure out whether to call getConfig() or not + } + + $enano_config = Array(); + while($r = $db->fetchrow()) + { + $enano_config[$r['config_name']] = $r['config_value']; + } + $db->free_result(); +} + +$v = enano_version(); +if(in_array($v, Array(false, '', '1.0b3', '1.0b4'))) +{ + $ul_admin = 2; + $ul_mod = 1; + $ul_member = 0; + $ul_guest = -1; +} +else +{ + $ul_admin = USER_LEVEL_ADMIN; + $ul_mod = USER_LEVEL_MOD; + $ul_member = USER_LEVEL_MEMBER; + $ul_guest = USER_LEVEL_GUEST; +} + +$_GET['title'] = 'unset'; + +$session = new sessionManager(); +$paths = new pathManager(); +$session->start(); + +$template = new template_nodb(); +$template->load_theme('oxygen', 'bleu', false); + +$modestrings = Array( + 'login' => 'Administrative login', + 'welcome' => 'Welcome', + 'setversion' => 'Select Enano version', + 'confirm' => 'Confirm upgrade', + 'upgrade' => 'Database installation', + 'finish' => 'Upgrade complete' + ); + +$sideinfo = ''; +$vars = $template->extract_vars('elements.tpl'); +$p = $template->makeParserText($vars['sidebar_button']); +foreach ( $modestrings as $id => $str ) +{ + if ( $_GET['mode'] == $id ) + { + $flags = 'style="font-weight: bold; text-decoration: underline;"'; + $this_page = $str; + } + else + { + $flags = ''; + } + $p->assign_vars(Array( + 'HREF' => '#', + 'FLAGS' => $flags . ' onclick="return false;"', + 'TEXT' => $str + )); + $sideinfo .= $p->run(); +} + +$template->init_vars(); + +function upg_assign_vars($schema) +{ + $schema = str_replace('{{SITE_NAME}}', mysql_real_escape_string(getConfig('site_name')), $schema); + $schema = str_replace('{{SITE_DESC}}', mysql_real_escape_string(getConfig('site_desc')), $schema); + $schema = str_replace('{{COPYRIGHT}}', mysql_real_escape_string(getConfig('copyright_notice')), $schema); + $schema = str_replace('{{TABLE_PREFIX}}', table_prefix, $schema); + if(getConfig('wiki_mode')=='1') $schema = str_replace('{{WIKI_MODE}}', '1', $schema); + else $schema = str_replace('{{WIKI_MODE}}', '0', $schema); + return $schema; +} + +/* Version-specific functions */ + +function u_1_0_RC1_update_user_ids() +{ + global $db; + // First, make sure this hasn't already been done + $q = $db->sql_query('SELECT username FROM '.table_prefix.'users WHERE user_id=1;'); + if ( !$q ) + $db->_die(); + $row = $db->fetchrow(); + if ( $row['username'] == 'Anonymous' ) + return true; + // Find the first unused user ID + $used = Array(); + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users'); + if ( !$q ) + $db->_die(); + $c = false; + while ( $row = $db->fetchrow() ) + { + $i = intval($row['user_id']); + $used[$i] = true; + if ( !isset($used[$i - 1]) && $c ) + { + $id = $i - 1; + break; + } + $c = true; + } + if ( !isset($id) ) + $id = $i + 1; + $db->free_result(); + + $q = $db->sql_query('UPDATE '.table_prefix.'users SET user_id=' . $id . ' WHERE user_id=1;'); + if(!$q) + $db->_die(); + $q = $db->sql_query('UPDATE '.table_prefix.'users SET user_id=1 WHERE user_id=-1 AND username=\'Anonymous\';'); + if(!$q) + $db->_die(); + +} + +function u_1_0_RC1_add_admins_to_group() +{ + global $db; + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE user_level=' . USER_LEVEL_ADMIN . ';'); + if ( !$q ) + $db->_die(); + $base = 'INSERT INTO '.table_prefix.'group_members(group_id,user_id) VALUES'; + $blocks = Array(); + while ( $row = $db->fetchrow($q) ) + { + $blocks[] = '(2,' . $row['user_id'] . ')'; + } + $blocks = implode(',', $blocks); + $sql = $base . $blocks . ';'; + if(!$db->sql_query($sql)) + $db->_die(); +} + +function u_1_0_RC1_alter_files_table() +{ + global $db; + if(!is_dir(ENANO_ROOT.'/files')) + @mkdir(ENANO_ROOT . '/files'); + if(!is_dir(ENANO_ROOT.'/files')) + die('ERROR: Couldn\'t create files directory'); + $q = $db->sql_unbuffered_query('SELECT * FROM '.table_prefix.'files;', $db->_conn); + if(!$q) $db->_die(); + while ( $row = $db->fetchrow() ) + { + $file_data = base64_decode($row['data']); + $path = ENANO_ROOT . '/files/' . md5( $row['filename'] . '_' . $file_data ) . '_' . $row['time_id'] . $row['file_extension']; + @unlink($path); + $handle = @fopen($path, 'w'); + if(!$handle) + die('fopen failed'); + fwrite($handle, $file_data); + fclose($handle); + + } + + $q = $db->sql_query('ALTER TABLE '.table_prefix.'files DROP PRIMARY KEY, ADD COLUMN file_id int(12) NOT NULL auto_increment FIRST, ADD PRIMARY KEY (file_id), ADD COLUMN file_key varchar(32) NOT NULL;'); + if(!$q) $db->_die(); + + $list = Array(); + $q = $db->sql_unbuffered_query('SELECT * FROM '.table_prefix.'files;', $db->_conn); + if(!$q) $db->_die(); + while ( $row = $db->fetchrow($q) ) + { + $file_data = base64_decode($row['data']); + $key = md5( $row['filename'] . '_' . $file_data ); + $list[] = 'UPDATE '.table_prefix.'files SET file_key=\'' . $key . '\' WHERE file_id=' . $row['file_id'] . ';'; + } + + foreach ( $list as $sql ) + { + if(!$db->sql_query($sql)) $db->_die(); + } + + if(!$db->sql_query('ALTER TABLE '.table_prefix.'files DROP data')) $db->_die(); + +} + +function u_1_0_RC1_destroy_session_cookie() +{ + unset($_COOKIE['sid']); + setcookie('sid', '', time()-3600*24, scriptPath); + setcookie('sid', '', time()-3600*24, scriptPath.'/'); +} + +function u_1_0_RC1_set_contact_email() +{ + global $db; + $q = $db->sql_query('SELECT email FROM '.table_prefix.'users WHERE user_level='.USER_LEVEL_ADMIN.' ORDER BY user_level ASC LIMIT 1;'); + if(!$q) + $db->_die(); + $row = $db->fetchrow(); + setConfig('contact_email', $row['email']); +} + +function u_1_0_RC1_update_page_text() +{ + global $db; + $q = $db->sql_unbuffered_query('SELECT page_id,namespace,page_text,char_tag FROM '.table_prefix.'page_text'); + if (!$q) + $db->_die(); + + $qs = array(); + + while ( $row = $db->fetchrow($q) ) + { + $row['page_text'] = str_replace(Array( + "{QUOT:{$row['char_tag']}}", + "{APOS:{$row['char_tag']}}", + "{SLASH:{$row['char_tag']}}" + ), Array( + '"', "'", '\\' + ), $row['page_text']); + $qs[] = 'UPDATE '.table_prefix.'page_text SET page_text=\'' . mysql_real_escape_string($row['page_text']) . '\' + WHERE page_id=\'' . mysql_real_escape_string($row['page_id']) . '\' AND + namespace=\'' . mysql_real_escape_string($row['namespace']) . '\';'; + } + + foreach($qs as $query) + { + if(!$db->sql_query($query)) + $db->_die(); + } +} + +function u_1_0_populate_userpage_comments() +{ + global $db; + $q = $db->sql_query('SELECT COUNT(c.comment_id) AS num_comments...'); + if ( !$q ) + $db->_die(); + + while ( $row = $db->fetchrow() ) + { + + } +} + +switch($_GET['mode']) +{ + case "login": + if($session->user_logged_in && $session->user_level >= $ul_admin) + { + if(isset($_POST['login'])) + { + $session->login_without_crypto($_POST['username'], $_POST['password'], false, $ul_admin); + if($session->sid_super) + { + header('Location: upgrade.php?mode=welcome&auth='.$session->sid_super); + exit; + } + } + $template->header(); + ?> +
    + + + + + '; + } + ?> + + + + + + + + +
    You must re-authenticate to perform this upgrade.

    Login failed. Bad password?

    Username:
    Password:
    +
    +
    + login_without_crypto($_POST['username'], $_POST['password'], false, $ul_member); + if($result == 'success') + { + header('Location: upgrade.php'); + exit; + } + } + $template->header(); + ?> +
    + + + + + '; + } + ?> + + + + + + + + +
    Please log in to continue with this upgrade.

    Login failed. Bad password?

    Username:
    Password:
    +
    +
    + sid_super) { $template->header(); echo '

    No admin session found! Please restart the upgrade.

    '; $template->footer(); exit; } + + // Just show a simple welcome page to display version information + $template->header(); + require('config.php'); + + ?> + +
    + [ Enano CMS Project logo ] +

    Welcome to the Enano upgrade wizard

    + You are about to upgrade to a NIGHTLY BUILD of Enano.
    Nightly builds CANNOT be re-upgraded to the final release. They may also contain serious flaws, security problems, or extraneous debugging information. Continuing this process on a production site is NOT recommended.
    '; + } + ?> +
    +
    +

    You are about to upgrade Enano to version . Before you continue, please ensure that:

    +
      +
    • You have completely backed up your database ()
    • +
    • You have backed up the entire Enano directory ()
    • +
    • You have reviewed the release notes for this version, and you
      are comfortable with any known bugs or issues
    • +
    +
    +
    +
    + +
    +
    + + sid_super) { $template->header(); echo '

    No admin session found! Please restart the upgrade.

    '; $template->footer(); exit; } + $v = ( function_exists('enano_version') ) ? enano_version() : ''; + if(!in_array($v, $valid_versions) && $v != '') + { + $template->header(); + ?> +

    Your version of Enano () can't be upgraded to this version ().

    + header(); + echo "
    "; + ?> +

    Sorry, we couldn't detect which version of Enano you're running on your server. Please select which version of Enano you have below, and make absolutely sure that you're correct.

    +

    +

    + +

    + `; + break; + } else { + header('Location: upgrade.php?mode=confirm&auth='.$session->sid_super); + } + break; + case "confirm": + $enano_version = ( isset($_POST['version']) ) ? $_POST['version'] : enano_version(); + + $template->header(); + if(!$session->sid_super) { echo '

    No admin session found! Please restart the upgrade.

    '; $template->footer(); exit; } + ?> + + + + + + + + +

    Are you sure you want to perform this upgrade?

    You can still cancel the upgrade process now. If
    the upgrade fails, you will need to roll back
    any actions made using manual SQL queries.

    Please clear your browser cache or
    shift-reload after the upgrade.

    If you fail to do so, some page elements may
    be broken.

    + + +
    +
    + header(); + if(!$session->sid_super) { echo '

    No admin session found! Please restart the upgrade.

    '; $template->footer(); exit; } + if(!isset($_POST['enano_version'])) { echo '

    Can\'t find the version information on the POST query, are you trying to do this upgrade directly? Please restart the upgrade.

    '; break; } + $enano_version = $_POST['enano_version']; + echo '

    Preparing for schema execution...'; + // Build an array of queries + $schema = file_get_contents('upgrade.sql'); + + // Strip out and process version blocks + preg_match_all('#---BEGIN ([0-9A-z\.\-]*?)---'."\n".'(.*?)'."\n".'---END \\1---#is', $schema, $matches); + + $from_list =& $matches[1]; + $query_list =& $matches[2]; + + foreach($matches[0] as $m) + { + $schema = str_replace($m, '', $schema); + } + $schema = explode("\n", $schema); + foreach($schema as $k => $q) + { + if(substr($q, 0, 2) == '--' || $q == '') + { + unset($schema[$k]); + //die('

    '.htmlspecialchars(print_r($schema, true)).'
    '); + } + else + { + $schema[$k] = upg_assign_vars($schema[$k]); + } + } + + foreach($query_list as $k => $q) + { + $query_list[$k] = explode("\n", $query_list[$k]); + foreach($query_list[$k] as $i => $s) + { + $tq =& $query_list[$k][$i]; + if(substr($s, 0, 2) == '--' || $s == '') + { + unset($query_list[$k][$i]); + //die('
    '.htmlspecialchars(print_r($schema, true)).'
    '); + } + else + { + $query_list[$k][$i] = upg_assign_vars($query_list[$k][$i]); + } + } + $query_list[$k] = array_values($query_list[$k]); + } + + $assoc_list = Array(); + + foreach($from_list as $i => $v) + { + $assoc_list[$v] = $query_list[$i]; + } + + $schema = array_values($schema); + + $deps_resolved = false; + $installing_versions = Array($enano_version); + + while(true) + { + $v = array_keys($deps_list); + foreach($v as $i => $ver) + { + if(in_array($ver, $installing_versions)) + { + // $ver is on the list of versions to be installed. Add its dependencies to the list of versions to install. + foreach($deps_list[$ver] as $dep) + { + if(!in_array($dep, $installing_versions)) + { + $installing_versions[] = $dep; + } + } + } + if($i == count($deps_list) - 1) + { + break 2; + } + } + } + + foreach($installing_versions as $this_ver) + { + $schema = array_merge($schema, $assoc_list[$this_ver]); + } + + // Time for some proper SQL syntax! + // Also check queries for so-called injection attempts to make + // sure that it doesn't fail during the upgrade process and + // leave the user with a half-upgraded database + foreach($schema as $s => $q) + { + if(substr($q, strlen($q)-1, 1) != ';') + { + $schema[$s] .= ';'; + } + if ( !$db->check_query($schema[$s]) ) + { + // Uh-oh, the check failed, bail out + // The DBAL runs sanity checks on all queries for safety, + // so if the check fails in mid-upgrade we are in deep + // dodo doo-doo. + echo 'Query failed sanity check, this should never happen and is a bug.

    Query was:

    '.$schema[$s].'
    '; + break 2; + } + } + + $schema = array_values($schema); + + // Used extensively for debugging + // echo '
    '.htmlspecialchars(print_r($schema, true)).'
    '; + // break; + + echo 'done!
    Executing upgrade schema...'; + + // OK, do the loop, baby!!! + foreach($schema as $q) + { + $r = $db->sql_query($q); + if(!$r) + { + echo $db->get_error(); + break 2; + } + } + + // Call any custom functions + foreach ( $installing_versions as $ver ) + { + if ( isset($func_list[$ver]) ) + { + foreach($func_list[$ver] as $function) + { + @call_user_func($function); + } + } + } + + echo 'done!

    '; + echo '

    You will be redirected shortly. If you aren\'t redirected, click here.

    + '; + break; +} +$template->footer(); + +?> diff -r 000000000000 -r 902822492a68 upgrade.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/upgrade.sql Wed Jun 13 16:03:00 2007 -0400 @@ -0,0 +1,84 @@ +-- Enano CMS - upgrade SQL +-- Variables are in the format {{VAR_NAME}} +-- ALL NON-SQL LINES, even otherwise blank lines, must start with "--" or they will get sent to MySQL! +-- Common tasks (version numbers) +DELETE FROM {{TABLE_PREFIX}}config WHERE config_name='enano_version' OR config_name='enano_beta_version' OR config_name='enano_alpha_version' OR config_name='enano_rc_version'; +INSERT INTO {{TABLE_PREFIX}}config (config_name, config_value) VALUES( 'enano_version', '1.0' ); +---BEGIN 1.0RC2--- +-- Add the "Moderators" group +UPDATE {{TABLE_PREFIX}}groups SET group_id=9999 WHERE group_id=3; +UPDATE {{TABLE_PREFIX}}group_members SET group_id=9999 WHERE group_id=3; +ALTER TABLE {{TABLE_PREFIX}}groups ADD COLUMN system_group tinyint(1) NOT NULL DEFAULT 0; +UPDATE {{TABLE_PREFIX}}groups SET system_group=1 WHERE group_id=1 OR group_id=2; +INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(3, 'Moderators', 3, 1); +-- ...and add the associated ACL rule +INSERT INTO {{TABLE_PREFIX}}acl(target_type,target_id,page_id,namespace,rules) VALUES(1,3,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=3;clear_logs=2;vote_delete=4;vote_reset=4;delete_page=4;set_wiki_mode=2;password_set=2;password_reset=2;mod_misc=2;edit_cat=4;even_when_protected=4;upload_files=2;upload_new_version=3;create_page=3;php_in_pages=2;edit_acl=2;'); +-- Create table with extra user information +CREATE TABLE users_extra( user_id mediumint(8) NOT NULL, user_aim varchar(63) default NULL, user_yahoo varchar(63) default NULL, user_msn varchar(255) default NULL, user_xmpp varchar(255) default NULL, user_homepage text, user_location text, user_job text, user_hobbies text, email_public tinyint(1) NOT NULL default '0', userpage_comments smallint(5) NOT NULL default '0', PRIMARY KEY ( user_id ) ); +---END 1.0RC2--- +---BEGIN 1.0RC1--- +-- Not too many DB changes in this release - that's a good sign ;-) +ALTER TABLE {{TABLE_PREFIX}}search_index MODIFY COLUMN word varbinary(64) NOT NULL; +CREATE FULLTEXT INDEX {{TABLE_PREFIX}}page_search_idx ON {{TABLE_PREFIX}}page_text(page_id,namespace,page_text); +UPDATE {{TABLE_PREFIX}}users SET user_level=3 WHERE user_level=2; +UPDATE {{TABLE_PREFIX}}sidebar SET block_content='[[$NS_USER$$USERNAME$|User page]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|My Contributions]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|Preferences]]\n[[$NS_SPECIAL$PrivateMessages|Private messages]]\n[[$NS_SPECIAL$Usergroups|Group control panel]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|Create an account]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|Private messages]]\n{/if}',block_name='$USERNAME$' WHERE block_name='$USERNAME' AND item_id=3; +---END 1.0RC1--- +---BEGIN 1.0b4--- +CREATE TABLE {{TABLE_PREFIX}}hits( hit_id bigint(20) NOT NULL auto_increment, username varchar(63) NOT NULL, time int(12) NOT NULL DEFAULT 0, page_id varchar(63), namespace varchar(63), PRIMARY KEY ( hit_id ) ); +CREATE TABLE {{TABLE_PREFIX}}search_index( word binary(32) NOT NULL, page_names text, PRIMARY KEY ( word ) ); +CREATE TABLE {{TABLE_PREFIX}}search_cache( search_id int(15) NOT NULL auto_increment, search_time int(11) NOT NULL, query text, results longblob, PRIMARY KEY ( search_id )); +CREATE TABLE {{TABLE_PREFIX}}acl( rule_id int(12) UNSIGNED NOT NULL auto_increment, target_type tinyint(1) UNSIGNED NOT NULL, target_id int(12) UNSIGNED NOT NULL, page_id varchar(255), namespace varchar(24), rules text, PRIMARY KEY ( rule_id ) ); +ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN old_encryption tinyint(1) NOT NULL DEFAULT 0; +ALTER TABLE {{TABLE_PREFIX}}users MODIFY COLUMN password text; +ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN temp_password text, ADD COLUMN temp_password_time int(12) NOT NULL DEFAULT 0; +UPDATE {{TABLE_PREFIX}}users SET old_encryption=1; +UPDATE {{TABLE_PREFIX}}users SET user_level=9 WHERE user_level=2; +UPDATE {{TABLE_PREFIX}}users SET user_level=5 WHERE user_level=1; +UPDATE {{TABLE_PREFIX}}users SET user_level=2 WHERE user_level=0; +UPDATE {{TABLE_PREFIX}}users SET user_level=1 WHERE user_level=-1; +-- Group system +CREATE TABLE {{TABLE_PREFIX}}groups( group_id mediumint(5) UNSIGNED NOT NULL auto_increment, group_name varchar(64), group_type tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY ( group_id ) ); +CREATE TABLE {{TABLE_PREFIX}}group_members( member_id int(12) UNSIGNED NOT NULL auto_increment, group_id mediumint(5) UNSIGNED NOT NULL, user_id int(12) NOT NULL, is_mod tinyint(1) NOT NULL DEFAULT 0, pending tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY ( member_id ) ); +INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type) VALUES(1, 'Everyone', 3),(2,'Administrators',3); +-- Sidebar updates +DELETE FROM {{TABLE_PREFIX}}sidebar WHERE item_id=5 AND block_name='Links'; +INSERT INTO {{TABLE_PREFIX}}sidebar(item_order, sidebar_id, block_name, block_type, block_content) VALUES(2, 2, 'Links', 4, 'Links'); +UPDATE {{TABLE_PREFIX}}sidebar SET block_content='[[$NS_USER$$USERNAME$|User page]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|My Contributions]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|Preferences]]\n[[$NS_SPECIAL$PrivateMessages|Private messages]]\n[[$NS_SPECIAL$Usergroups|Group control panel]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|Create an account]]\n[[$NS_SPECIAL$Login/$PAGE_URLNAME$|Log in]]\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|Private messages]]\n{/if}' WHERE block_name='$USERNAME$' AND item_id=3; +UPDATE {{TABLE_PREFIX}}sidebar SET block_name='$USERNAME$' WHERE block_name='$USERNAME'; +-- Set the default theme +INSERT INTO {{TABLE_PREFIX}}themes(theme_id,theme_name,theme_order,default_style,enabled) VALUES('stpatty', 'St. Patty', 1, 'shamrock.css', 1); +UPDATE {{TABLE_PREFIX}}themes SET theme_order=2 WHERE theme_id='oxygen'; +UPDATE {{TABLE_PREFIX}}users SET theme='stpatty',style='shamrock'; +---END 1.0b4--- +---BEGIN 1.0b3--- +INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ); +---END 1.0b3--- +---BEGIN 1.0b2--- +-- 10/1: Removed alterations to users table, moved to upgrade.php, to allow the session manager to work +CREATE TABLE {{TABLE_PREFIX}}privmsgs( message_id int(15) NOT NULL auto_increment, message_from varchar(63), message_to varchar(255), date int(12), subject varchar(63), message_text text, folder_name varchar(63), PRIMARY KEY (message_id) ); +CREATE TABLE {{TABLE_PREFIX}}buddies( buddy_id int(15) NOT NULL auto_increment, user_id mediumint(8), buddy_user_id mediumint(8), is_friend tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (buddy_id) ); +-- Fill 'em up with a basic sidebar - sometime there will be a migration script that will convert the old sidebar format to the new +CREATE TABLE {{TABLE_PREFIX}}sidebar( item_id smallint(3) NOT NULL auto_increment, item_order smallint(3) NOT NULL DEFAULT 0, sidebar_id smallint(3) NOT NULL DEFAULT 1, block_name varchar(63) NOT NULL, block_type tinyint(1) NOT NULL DEFAULT 0, item_enabled tinyint(1) NOT NULL DEFAULT 1, block_content text, PRIMARY KEY ( item_id )); +INSERT INTO {{TABLE_PREFIX}}sidebar(item_id, item_order, sidebar_id, block_name, block_type, block_content) VALUES (1, 1, 1, 'Navigation', 1, '[[Main Page|Home]]'),(2, 2, 1, 'Tools', 1, '[[Special:CreatePage|Create a page]]\n[[Special:UploadFile|Upload file]]\n[[Special:SpecialPages|Special pages]]\n{if auth_admin}\n[[Special:EditSidebar|Edit the sidebar]]\n[[Special:Administration|Administration]]\n{/if}'),(3, 3, 1, '$USERNAME$', 1, '[[User:$USERNAME$|User page]]\n[[Special:Contributions/$USERNAME$|My Contributions]]\n{if user_logged_in}\n[[Special:Preferences|Preferences]]\n[[Special:PrivateMessages|Private messages]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[Special:Register|Create an account]]\n[[Special:Login/$PAGE_URLNAME$|Log in]]\n[[Special:Login/Special:PrivateMessages|Private messages]]\n{/if}'),(4, 4, 1, 'Search', 1, '

    '),(5, 2, 2, 'Links', 3, '$ob = Array();\nif(getConfig(''sflogo_enabled'')==''1'')\n{\n $ob[] = ''SourceForge.net Logo'';\n}\nif(getConfig(''w3c_v32'') ==''1'') $ob[] = ''Valid HTML 3.2'';\nif(getConfig(''w3c_v40'') ==''1'') $ob[] = ''Valid HTML 4.0'';\nif(getConfig(''w3c_v401'') ==''1'') $ob[] = ''Valid HTML 4.01'';\nif(getConfig(''w3c_vxhtml10'')==''1'') $ob[] = ''Valid XHTML 1.0'';\nif(getConfig(''w3c_vxhtml11'')==''1'') $ob[] = ''Valid XHTML 1.1'';\nif(getConfig(''w3c_vcss'') ==''1'') $ob[] = ''Valid CSS'';\nif(getConfig(''dbd_button'') ==''1'') $ob[] = ''DRM technology restricts what you can do with your computer
    Protect your freedom >>
    '';\nif(count($ob) > 0) echo ''
    ''.implode(''
    '', $ob).''
    '';'); +ALTER TABLE {{TABLE_PREFIX}}banlist ADD COLUMN reason text; +-- Here's a tricky one for ya :-/ what we're trying to do is add an auto-increment primary key to a table, this was a first for me but it seemed to work, tested on MySQL 4.1.20 +ALTER TABLE {{TABLE_PREFIX}}comments ADD COLUMN comment_id int(12) NOT NULL auto_increment FIRST, ADD PRIMARY KEY ( comment_id ); +-- Session manager stuff +ALTER TABLE {{TABLE_PREFIX}}themes ADD COLUMN default_style varchar(63) NOT NULL DEFAULT ''; +ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN signature text; +ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN reg_time int(11) NOT NULL DEFAULT 0; +ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN account_active tinyint(1) NOT NULL DEFAULT 0; +ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN activation_key varchar(40) NOT NULL DEFAULT 0; +UPDATE {{TABLE_PREFIX}}users SET account_active=1; +UPDATE {{TABLE_PREFIX}}themes SET default_style='bleu.css' WHERE theme_id='oxygen'; +---END 1.0b2--- +---BEGIN 1.0b1--- +CREATE TABLE {{TABLE_PREFIX}}files( time_id int(12) NOT NULL, page_id varchar(63) NOT NULL, filename varchar(127), size bigint(15) NOT NULL, mimetype varchar(63), file_extension varchar(8), data longblob, PRIMARY KEY (time_id) ); +ALTER TABLE {{TABLE_PREFIX}}pages MODIFY COLUMN protected tinyint(1) NOT NULL DEFAULT 0; +ALTER TABLE {{TABLE_PREFIX}}pages ADD COLUMN wiki_mode tinyint(1) NOT NULL DEFAULT 2 AFTER protected; +ALTER TABLE {{TABLE_PREFIX}}pages ADD COLUMN password varchar(40) NOT NULL DEFAULT '' AFTER wiki_mode; +ALTER TABLE {{TABLE_PREFIX}}comments ADD COLUMN user_id mediumint(8) NOT NULL DEFAULT -1; +ALTER TABLE {{TABLE_PREFIX}}comments ADD COLUMN time int(12) NOT NULL default 0; +UPDATE {{TABLE_PREFIX}}pages SET wiki_mode=2; +UPDATE {{TABLE_PREFIX}}comments SET user_id=-1; +---END 1.0b1---