Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

initial git commit

  • Loading branch information...
commit 2b48ca641323b15a99d782b17a3fe524c70f8b1a 0 parents
Brett Stimmerman authored

Showing 39 changed files with 4,728 additions and 0 deletions. Show diff stats Hide diff stats

  1. +88 0 HISTORY
  2. +2 0  INSTALL
  3. +340 0 LICENSE
  4. +232 0 README
  5. +12 0 www/.htaccess
  6. +47 0 www/common.php
  7. +150 0 www/config.dist.php
  8. +153 0 www/config.php
  9. 0  www/data/activity.dat
  10. +21 0 www/data/index.php
  11. 0  www/data/lace.dat
  12. 0  www/data/log.dat
  13. +22 0 www/help/index.php
  14. BIN  www/images/check.gif
  15. BIN  www/images/external.gif
  16. +21 0 www/images/index.php
  17. BIN  www/images/pause.gif
  18. BIN  www/images/play.gif
  19. +94 0 www/index.php
  20. +35 0 www/lace.php
  21. +100 0 www/lib/classes/LaceActivity.php
  22. +152 0 www/lib/classes/LaceData.php
  23. +130 0 www/lib/includes/help.inc.php
  24. +20 0 www/lib/includes/index.php
  25. +51 0 www/lib/includes/lace.inc.php
  26. +39 0 www/lib/includes/log.inc.php
  27. +21 0 www/lib/index.php
  28. +326 0 www/lib/lib_filter.php
  29. +928 0 www/lib/lib_lace.php
  30. +274 0 www/lib/lib_utils.php
  31. +80 0 www/lib/mb_compat.php
  32. +26 0 www/logs/index.php
  33. +461 0 www/scripts/clientengine.js
  34. +21 0 www/scripts/index.php
  35. +59 0 www/scripts/intervalmanager.js
  36. +39 0 www/scripts/lace.js.php
  37. +113 0 www/scripts/startup.js
  38. +21 0 www/styles/index.php
  39. +650 0 www/styles/style.css
88 HISTORY
... ... @@ -0,0 +1,88 @@
  1 +Lace Changelog
  2 +--------------
  3 +
  4 +[+] New feature
  5 +[*] Changed/improved feature
  6 +[-] Bug fix
  7 +[!] Comment
  8 +
  9 +Version 0.1.5.1 (23 July 2006)
  10 +
  11 + [-] Fixed several Javascript issues
  12 + [-] Fixed several mb-*() issues
  13 + [-] Fixed lace.php's missing configuration for redirect
  14 + [-] Fixed malformed data corrupting output
  15 +
  16 +Version 0.1.5 (16 Apr 2006)
  17 +
  18 + [+] Basic IRC-ish /nick command
  19 + [*] Some problems characters have been made illegal
  20 + in nicknames: |<>!#%&*+
  21 + [*] Newlines in messages replaced with <br>, alleviating
  22 + some data corruption issues. A side-effect is
  23 + newlines within <code> tags are replaced as well.
  24 + [-] Missing multibyte functions no longer throw errors
  25 + (e.g., mb_internal_encoding())
  26 + [-] Fixed uniqid() parameters for PHP < 5
  27 + [-] Fixed class member initialization for PHP < 4.3
  28 + [-] Fixed blank (zero-length) names landing the data files
  29 + that caused "undefined offset" errors
  30 +
  31 +Version 0.1.4 (13 Mar 2006)
  32 +
  33 + [+] Scrollable message history
  34 + [+] Basic anti-flood protection
  35 + [+] Basic nickname hijack protection
  36 + [*] Partial JSON implementation
  37 + [*] Join/Part and Name Change messages are now
  38 + separately optional
  39 + [*] Removed most non-essential code (About, download, etc.)
  40 + [*] Live Preview removed (non-essential)
  41 + [*] HTML Buttons removed (non-essential)
  42 + [*] Many speed improvements
  43 + [-] UTF-8 Support fixes
  44 + [-] PHP 5.0.5 pass-by-reference fix ('Line 655' bug)
  45 +
  46 +
  47 +Version 0.1.3 (10 Oct 2005)
  48 +
  49 + [+] User List. See who's currently chatting, when they enter,
  50 + when they change their name, when they're idle, and when
  51 + they've left.
  52 + [*] Code and directory structure slightly reorganized.
  53 + [*] Removed reliance on ForceType via .htaccess; switched to
  54 + mod_rewrite for pretty URLs (optional).
  55 + [-] Lace form action attribute was hardcoded. It now honors
  56 + LACE_URL_REL.
  57 + [-] Several minor bugfixes/improvements.
  58 +
  59 +Version 0.1.2 (24 May 2005)
  60 +
  61 + [+] Duplicate posts are now prevented in the client engine.
  62 + [*] Action command now accepts forward or back slash:
  63 + /me likes Google is the same as \me likes Google.
  64 + [*] Idle confirmation OK and Cancel buttons now act as
  65 + expected.
  66 + [-] AutoLinks now support the https scheme.
  67 + [-] AutoLinks: URL characters are now run through
  68 + htmlentities() rather than urlencode(). This solves the
  69 + "%2F" trailing slash issue.
  70 + [-] Several server engine HTML filter issues resolved
  71 + [-] Client engine polling interval now begins a fresh cycle
  72 + when a message is posted.
  73 + [-] LivePreview and the actual posted message now share the
  74 + same maximum length as defined by LACE_MAX_TEXT_LENGTH in
  75 + config.php.
  76 + [-] Long names are now truncated to prevent layout overflow.
  77 + [!] Thanks to everyone who stopped by to help track these
  78 + issues down!
  79 +
  80 +Version 0.1.1 (23 May 2005)
  81 +
  82 + [-] Fixed HTML filter bug that allowed 'blank' messages to
  83 + cause display issues
  84 + [-] AutoLinks submitted without link text created 'empty' links
  85 +
  86 +Version 0.1.0 (17 May 2005)
  87 +
  88 + [!] Initial Release (gulp!)
2  INSTALL
... ... @@ -0,0 +1,2 @@
  1 +Installation and upgrade instructions can be found in the README
  2 +file.
340 LICENSE
... ... @@ -0,0 +1,340 @@
  1 + GNU GENERAL PUBLIC LICENSE
  2 + Version 2, June 1991
  3 +
  4 +Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  5 +59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  6 +Everyone is permitted to copy and distribute verbatim copies
  7 +of this license document, but changing it is not allowed.
  8 +
  9 + Preamble
  10 +
  11 + The licenses for most software are designed to take away your
  12 +freedom to share and change it. By contrast, the GNU General Public
  13 +License is intended to guarantee your freedom to share and change free
  14 +software--to make sure the software is free for all its users. This
  15 +General Public License applies to most of the Free Software
  16 +Foundation's software and to any other program whose authors commit to
  17 +using it. (Some other Free Software Foundation software is covered by
  18 +the GNU Library General Public License instead.) You can apply it to
  19 +your programs, too.
  20 +
  21 + When we speak of free software, we are referring to freedom, not
  22 +price. Our General Public Licenses are designed to make sure that you
  23 +have the freedom to distribute copies of free software (and charge for
  24 +this service if you wish), that you receive source code or can get it
  25 +if you want it, that you can change the software or use pieces of it
  26 +in new free programs; and that you know you can do these things.
  27 +
  28 + To protect your rights, we need to make restrictions that forbid
  29 +anyone to deny you these rights or to ask you to surrender the rights.
  30 +These restrictions translate to certain responsibilities for you if you
  31 +distribute copies of the software, or if you modify it.
  32 +
  33 + For example, if you distribute copies of such a program, whether
  34 +gratis or for a fee, you must give the recipients all the rights that
  35 +you have. You must make sure that they, too, receive or can get the
  36 +source code. And you must show them these terms so they know their
  37 +rights.
  38 +
  39 + We protect your rights with two steps: (1) copyright the software, and
  40 +(2) offer you this license which gives you legal permission to copy,
  41 +distribute and/or modify the software.
  42 +
  43 + Also, for each author's protection and ours, we want to make certain
  44 +that everyone understands that there is no warranty for this free
  45 +software. If the software is modified by someone else and passed on, we
  46 +want its recipients to know that what they have is not the original, so
  47 +that any problems introduced by others will not reflect on the original
  48 +authors' reputations.
  49 +
  50 + Finally, any free program is threatened constantly by software
  51 +patents. We wish to avoid the danger that redistributors of a free
  52 +program will individually obtain patent licenses, in effect making the
  53 +program proprietary. To prevent this, we have made it clear that any
  54 +patent must be licensed for everyone's free use or not licensed at all.
  55 +
  56 + The precise terms and conditions for copying, distribution and
  57 +modification follow.
  58 +
  59 + GNU GENERAL PUBLIC LICENSE
  60 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  61 +
  62 + 0. This License applies to any program or other work which contains
  63 +a notice placed by the copyright holder saying it may be distributed
  64 +under the terms of this General Public License. The "Program", below,
  65 +refers to any such program or work, and a "work based on the Program"
  66 +means either the Program or any derivative work under copyright law:
  67 +that is to say, a work containing the Program or a portion of it,
  68 +either verbatim or with modifications and/or translated into another
  69 +language. (Hereinafter, translation is included without limitation in
  70 +the term "modification".) Each licensee is addressed as "you".
  71 +
  72 +Activities other than copying, distribution and modification are not
  73 +covered by this License; they are outside its scope. The act of
  74 +running the Program is not restricted, and the output from the Program
  75 +is covered only if its contents constitute a work based on the
  76 +Program (independent of having been made by running the Program).
  77 +Whether that is true depends on what the Program does.
  78 +
  79 + 1. You may copy and distribute verbatim copies of the Program's
  80 +source code as you receive it, in any medium, provided that you
  81 +conspicuously and appropriately publish on each copy an appropriate
  82 +copyright notice and disclaimer of warranty; keep intact all the
  83 +notices that refer to this License and to the absence of any warranty;
  84 +and give any other recipients of the Program a copy of this License
  85 +along with the Program.
  86 +
  87 +You may charge a fee for the physical act of transferring a copy, and
  88 +you may at your option offer warranty protection in exchange for a fee.
  89 +
  90 + 2. You may modify your copy or copies of the Program or any portion
  91 +of it, thus forming a work based on the Program, and copy and
  92 +distribute such modifications or work under the terms of Section 1
  93 +above, provided that you also meet all of these conditions:
  94 +
  95 + a) You must cause the modified files to carry prominent notices
  96 + stating that you changed the files and the date of any change.
  97 +
  98 + b) You must cause any work that you distribute or publish, that in
  99 + whole or in part contains or is derived from the Program or any
  100 + part thereof, to be licensed as a whole at no charge to all third
  101 + parties under the terms of this License.
  102 +
  103 + c) If the modified program normally reads commands interactively
  104 + when run, you must cause it, when started running for such
  105 + interactive use in the most ordinary way, to print or display an
  106 + announcement including an appropriate copyright notice and a
  107 + notice that there is no warranty (or else, saying that you provide
  108 + a warranty) and that users may redistribute the program under
  109 + these conditions, and telling the user how to view a copy of this
  110 + License. (Exception: if the Program itself is interactive but
  111 + does not normally print such an announcement, your work based on
  112 + the Program is not required to print an announcement.)
  113 +
  114 +These requirements apply to the modified work as a whole. If
  115 +identifiable sections of that work are not derived from the Program,
  116 +and can be reasonably considered independent and separate works in
  117 +themselves, then this License, and its terms, do not apply to those
  118 +sections when you distribute them as separate works. But when you
  119 +distribute the same sections as part of a whole which is a work based
  120 +on the Program, the distribution of the whole must be on the terms of
  121 +this License, whose permissions for other licensees extend to the
  122 +entire whole, and thus to each and every part regardless of who wrote it.
  123 +
  124 +Thus, it is not the intent of this section to claim rights or contest
  125 +your rights to work written entirely by you; rather, the intent is to
  126 +exercise the right to control the distribution of derivative or
  127 +collective works based on the Program.
  128 +
  129 +In addition, mere aggregation of another work not based on the Program
  130 +with the Program (or with a work based on the Program) on a volume of
  131 +a storage or distribution medium does not bring the other work under
  132 +the scope of this License.
  133 +
  134 + 3. You may copy and distribute the Program (or a work based on it,
  135 +under Section 2) in object code or executable form under the terms of
  136 +Sections 1 and 2 above provided that you also do one of the following:
  137 +
  138 + a) Accompany it with the complete corresponding machine-readable
  139 + source code, which must be distributed under the terms of Sections
  140 + 1 and 2 above on a medium customarily used for software interchange; or,
  141 +
  142 + b) Accompany it with a written offer, valid for at least three
  143 + years, to give any third party, for a charge no more than your
  144 + cost of physically performing source distribution, a complete
  145 + machine-readable copy of the corresponding source code, to be
  146 + distributed under the terms of Sections 1 and 2 above on a medium
  147 + customarily used for software interchange; or,
  148 +
  149 + c) Accompany it with the information you received as to the offer
  150 + to distribute corresponding source code. (This alternative is
  151 + allowed only for noncommercial distribution and only if you
  152 + received the program in object code or executable form with such
  153 + an offer, in accord with Subsection b above.)
  154 +
  155 +The source code for a work means the preferred form of the work for
  156 +making modifications to it. For an executable work, complete source
  157 +code means all the source code for all modules it contains, plus any
  158 +associated interface definition files, plus the scripts used to
  159 +control compilation and installation of the executable. However, as a
  160 +special exception, the source code distributed need not include
  161 +anything that is normally distributed (in either source or binary
  162 +form) with the major components (compiler, kernel, and so on) of the
  163 +operating system on which the executable runs, unless that component
  164 +itself accompanies the executable.
  165 +
  166 +If distribution of executable or object code is made by offering
  167 +access to copy from a designated place, then offering equivalent
  168 +access to copy the source code from the same place counts as
  169 +distribution of the source code, even though third parties are not
  170 +compelled to copy the source along with the object code.
  171 +
  172 + 4. You may not copy, modify, sublicense, or distribute the Program
  173 +except as expressly provided under this License. Any attempt
  174 +otherwise to copy, modify, sublicense or distribute the Program is
  175 +void, and will automatically terminate your rights under this License.
  176 +However, parties who have received copies, or rights, from you under
  177 +this License will not have their licenses terminated so long as such
  178 +parties remain in full compliance.
  179 +
  180 + 5. You are not required to accept this License, since you have not
  181 +signed it. However, nothing else grants you permission to modify or
  182 +distribute the Program or its derivative works. These actions are
  183 +prohibited by law if you do not accept this License. Therefore, by
  184 +modifying or distributing the Program (or any work based on the
  185 +Program), you indicate your acceptance of this License to do so, and
  186 +all its terms and conditions for copying, distributing or modifying
  187 +the Program or works based on it.
  188 +
  189 + 6. Each time you redistribute the Program (or any work based on the
  190 +Program), the recipient automatically receives a license from the
  191 +original licensor to copy, distribute or modify the Program subject to
  192 +these terms and conditions. You may not impose any further
  193 +restrictions on the recipients' exercise of the rights granted herein.
  194 +You are not responsible for enforcing compliance by third parties to
  195 +this License.
  196 +
  197 + 7. If, as a consequence of a court judgment or allegation of patent
  198 +infringement or for any other reason (not limited to patent issues),
  199 +conditions are imposed on you (whether by court order, agreement or
  200 +otherwise) that contradict the conditions of this License, they do not
  201 +excuse you from the conditions of this License. If you cannot
  202 +distribute so as to satisfy simultaneously your obligations under this
  203 +License and any other pertinent obligations, then as a consequence you
  204 +may not distribute the Program at all. For example, if a patent
  205 +license would not permit royalty-free redistribution of the Program by
  206 +all those who receive copies directly or indirectly through you, then
  207 +the only way you could satisfy both it and this License would be to
  208 +refrain entirely from distribution of the Program.
  209 +
  210 +If any portion of this section is held invalid or unenforceable under
  211 +any particular circumstance, the balance of the section is intended to
  212 +apply and the section as a whole is intended to apply in other
  213 +circumstances.
  214 +
  215 +It is not the purpose of this section to induce you to infringe any
  216 +patents or other property right claims or to contest validity of any
  217 +such claims; this section has the sole purpose of protecting the
  218 +integrity of the free software distribution system, which is
  219 +implemented by public license practices. Many people have made
  220 +generous contributions to the wide range of software distributed
  221 +through that system in reliance on consistent application of that
  222 +system; it is up to the author/donor to decide if he or she is willing
  223 +to distribute software through any other system and a licensee cannot
  224 +impose that choice.
  225 +
  226 +This section is intended to make thoroughly clear what is believed to
  227 +be a consequence of the rest of this License.
  228 +
  229 + 8. If the distribution and/or use of the Program is restricted in
  230 +certain countries either by patents or by copyrighted interfaces, the
  231 +original copyright holder who places the Program under this License
  232 +may add an explicit geographical distribution limitation excluding
  233 +those countries, so that distribution is permitted only in or among
  234 +countries not thus excluded. In such case, this License incorporates
  235 +the limitation as if written in the body of this License.
  236 +
  237 + 9. The Free Software Foundation may publish revised and/or new versions
  238 +of the General Public License from time to time. Such new versions will
  239 +be similar in spirit to the present version, but may differ in detail to
  240 +address new problems or concerns.
  241 +
  242 +Each version is given a distinguishing version number. If the Program
  243 +specifies a version number of this License which applies to it and "any
  244 +later version", you have the option of following the terms and conditions
  245 +either of that version or of any later version published by the Free
  246 +Software Foundation. If the Program does not specify a version number of
  247 +this License, you may choose any version ever published by the Free Software
  248 +Foundation.
  249 +
  250 + 10. If you wish to incorporate parts of the Program into other free
  251 +programs whose distribution conditions are different, write to the author
  252 +to ask for permission. For software which is copyrighted by the Free
  253 +Software Foundation, write to the Free Software Foundation; we sometimes
  254 +make exceptions for this. Our decision will be guided by the two goals
  255 +of preserving the free status of all derivatives of our free software and
  256 +of promoting the sharing and reuse of software generally.
  257 +
  258 + NO WARRANTY
  259 +
  260 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  261 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
  262 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  263 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  264 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  265 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
  266 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
  267 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  268 +REPAIR OR CORRECTION.
  269 +
  270 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  271 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  272 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  273 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  274 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  275 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  276 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  277 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  278 +POSSIBILITY OF SUCH DAMAGES.
  279 +
  280 + END OF TERMS AND CONDITIONS
  281 +
  282 + How to Apply These Terms to Your New Programs
  283 +
  284 + If you develop a new program, and you want it to be of the greatest
  285 +possible use to the public, the best way to achieve this is to make it
  286 +free software which everyone can redistribute and change under these terms.
  287 +
  288 + To do so, attach the following notices to the program. It is safest
  289 +to attach them to the start of each source file to most effectively
  290 +convey the exclusion of warranty; and each file should have at least
  291 +the "copyright" line and a pointer to where the full notice is found.
  292 +
  293 + <one line to give the program's name and a brief idea of what it does.>
  294 + Copyright (C) <year> <name of author>
  295 +
  296 + This program is free software; you can redistribute it and/or modify
  297 + it under the terms of the GNU General Public License as published by
  298 + the Free Software Foundation; either version 2 of the License, or
  299 + (at your option) any later version.
  300 +
  301 + This program is distributed in the hope that it will be useful,
  302 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  303 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  304 + GNU General Public License for more details.
  305 +
  306 + You should have received a copy of the GNU General Public License
  307 + along with this program; if not, write to the Free Software
  308 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  309 +
  310 +
  311 +Also add information on how to contact you by electronic and paper mail.
  312 +
  313 +If the program is interactive, make it output a short notice like this
  314 +when it starts in an interactive mode:
  315 +
  316 + Gnomovision version 69, Copyright (C) year name of author
  317 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  318 + This is free software, and you are welcome to redistribute it
  319 + under certain conditions; type `show c' for details.
  320 +
  321 +The hypothetical commands `show w' and `show c' should show the appropriate
  322 +parts of the General Public License. Of course, the commands you use may
  323 +be called something other than `show w' and `show c'; they could even be
  324 +mouse-clicks or menu items--whatever suits your program.
  325 +
  326 +You should also get your employer (if you work as a programmer) or your
  327 +school, if any, to sign a "copyright disclaimer" for the program, if
  328 +necessary. Here is a sample; alter the names:
  329 +
  330 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  331 + `Gnomovision' (which makes passes at compilers) written by James Hacker.
  332 +
  333 + <signature of Ty Coon>, 1 April 1989
  334 + Ty Coon, President of Vice
  335 +
  336 +This General Public License does not permit incorporating your program into
  337 +proprietary programs. If your program is a subroutine library, you may
  338 +consider it more useful to permit linking proprietary applications with the
  339 +library. If this is what you want to do, use the GNU Library General
  340 +Public License instead of this License.
232 README
... ... @@ -0,0 +1,232 @@
  1 +Lace Readme
  2 +-----------
  3 +
  4 +Copyright (C) 2005-2006 Brett Stimmerman <brettstimmerman@gmail.com>
  5 +Redistribution of this file is permitted under the terms of the GPL
  6 +
  7 +Table of Contents
  8 +-----------------
  9 +0. Disclaimer
  10 +1. General Information
  11 +2. How does it work?
  12 +3. Requirements
  13 +4. Installing Lace
  14 +5. Upgrading Lace
  15 +6. Support
  16 +7. Todo
  17 +8. Credits
  18 +
  19 +
  20 +0. Disclaimer
  21 +-------------
  22 +Lace is experimental. It is nothing more than several components
  23 +haphazardly smashed together and forced to play nice.
  24 +
  25 +Feel free to modify it in any way; but if you do, please send your
  26 +changes to brettstimmerman@gmail.com for consideration for next
  27 +official release.
  28 +
  29 +
  30 +1. General Information
  31 +----------------------
  32 +Lace is a free, lightweight Ajaxian communications engine written
  33 +in PHP, Javascript, XHTML and CSS. Lace takes advantage of
  34 +XMLHttpRequest if it is present, and degrades gracefully if it is
  35 +not.
  36 +
  37 +The latest version of Lace can be found at:
  38 +
  39 + http://www.socket7.net/lace/
  40 +
  41 +Lace is released under the terms of the GPL. See the LICENSE file
  42 +for more information.
  43 +
  44 +
  45 +2. How does it work?
  46 +--------------------
  47 +Lace has two major components: the client engine and the server
  48 +engine.
  49 +
  50 +Lace's client engine is written in Javascript and is
  51 +completely optional. If enabled, DOM compliant browsers that
  52 +support XMLHttpRequest get a great user experience: speedy updates
  53 +on the fly with no browser refreshes necessary. Sweet!
  54 +
  55 +Lace's server engine is written in PHP and provides flat-file data
  56 +access and a hook for the XMLHttpRequest object, if present. If
  57 +XMLHttpRequest is not present for whatever reason, the server
  58 +engine handles submissions like a 'traditional' web application so
  59 +that Lace remains usable - from nearly any browser.
  60 +
  61 +The client engine is made up of Javascript files found in the
  62 +/scripts/ directory.
  63 +
  64 +The server engine is made of PHP libraries found in /lib/; the main
  65 +library is lib_lace.php. The XMLHttpRequest hook is lace.php in
  66 +the root folder.
  67 +
  68 +
  69 +3. Requirements
  70 +---------------
  71 +Browsers
  72 +
  73 +So far, Lace seems to work just fine with:
  74 +
  75 + Firefox
  76 + IE5.5+ (including IE7)
  77 + Opera 8
  78 + Safari
  79 +
  80 +IE/Mac and IE5.0/Win work with several limitations: IE/Mac doesn't
  81 +support XMLHttpRequest and IE5.0/Win doesn't support the
  82 +encodeURIComponent Javascript method, which means that the client
  83 +engine won't work properly in either browser. In addition, they
  84 +each mangle the CSS a little differently.
  85 +
  86 +At a minimum, Lace should function to some degree in most browsers
  87 +with or without Javascript or CSS support.
  88 +
  89 +Servers
  90 +
  91 +Lace was built on top of Apache 1.3.xx and PHP 4.3.10, and runs
  92 +fine on Apache 2.x and PHP 5. Please email me any configurations
  93 +it does (or doesn't) seem to work with.
  94 +
  95 +As of 0.1.3, Lace can optionally utilize mod_rewrite to provide
  96 +pretty URLs.
  97 +
  98 +Lace requires PHP be compiled with multibyte character support
  99 +(--enable-mbstring) in order to support character sets like
  100 +Japanse and Chinese. You can verify your PHP supports this by
  101 +looking for the 'mbstring' section of the output of phpinfo().
  102 +
  103 +If you do not have the mbstring extension, Lace might mangle
  104 +multibyte characters.
  105 +
  106 +
  107 +4. Installing Lace
  108 +------------------
  109 +1. Copy the contents of the /www directory to your web server.
  110 +
  111 +2. chmod 644 (or whatever works best for you) the following
  112 + files and directories:
  113 +
  114 + /data
  115 + /data/activity.dat
  116 + /data/lace.dat
  117 + /data/log.dat
  118 + /data/logs/
  119 +
  120 + If you aren't familiar with chmod, you need to set the proper
  121 + permissions on the above files that allow PHP to read and write
  122 + to them. This can usually be done from within your FTP program.
  123 +
  124 + Important
  125 + ---------
  126 + Lace can optionally use .htaccess and mod_rewrite to simulate
  127 + dirified URLs. If Lace will be hosted by a hosting company,
  128 + there should be no problem. If you are setting Lace up on your
  129 + own personal server, be sure to allow .htaccess files by making
  130 + the proper changes to httpd.conf, if you haven't done so
  131 + already.
  132 +
  133 +3. Open config.php and make sure to set the following at a
  134 + minimum:
  135 +
  136 + LACE_URL_ABS
  137 + LACE_URL_REL
  138 +
  139 + Other settings you may want to change are:
  140 +
  141 + LACE_SITENAME
  142 + LACE_SITE_DESCRIPTION
  143 + LACE_TIMEOUT
  144 + LACE_MAX_TEXT_LENGTH
  145 + LACE_LOGS_DIRIFIED
  146 +
  147 + Have a look at the rest of the settings, to see what else you
  148 + may want to change. All settings have a brief description of
  149 + what they are/do.
  150 +
  151 + If you ever mess up a setting, or need to remember what it was
  152 + originally set to, you can use the config.dist.php file for
  153 + reference.
  154 +
  155 +4. If you're using LACE_LOGS_DIRIFIED, edit .htaccess and change
  156 + RewriteBase to the setting you used for LACE_URL_REL. In other
  157 + words, RewriteBase should be the relative URL to your Lace
  158 + installation (e.g. /lace/).
  159 +
  160 +5. Lace ships with a pre-configured version of Cal Henderson's
  161 + lib_filter found in /lib/, and it's pretty strict. It only allows
  162 + a, b, code, i, em and strong tags. You may want to modify the
  163 + default settings to allow for more tags.
  164 +
  165 +6. The layout is mostly customizable, and much of it can be changed
  166 + by modifying /styles/style.css.
  167 +
  168 +
  169 +5. Upgrading Lace
  170 +-----------------
  171 +1. Copy the new files from the Lace distribution to your web
  172 + server, taking care not to overwrite any files you may have
  173 + modified (e.g. config.php), and more importantly, the /data/
  174 + directory.
  175 +
  176 + During these early stages of development, some files may change
  177 + names or directories, or features may change between versions.
  178 + As Lace matures, such changes will become much less frequent.
  179 +
  180 +2. Look for configuration changes in the new config.dist.php. If
  181 + there are any changes, use your favorite text editor to copy the
  182 + changes to your old config.php by hand.
  183 +
  184 +
  185 +6. Support
  186 +----------
  187 +This release has only been tested on my development and 'production' servers.
  188 +I cannot guarantee that it will work with your configuration.
  189 +
  190 +If you are having a problem, search the Lace Forum
  191 +(http://socket7.net/lace/forum/) for a solution, or post your problem and
  192 +someone will do their best to help.
  193 +
  194 +If you have fixed an issue yourself, please post your solution to the forum
  195 +or send me an email so that I can consider it for the next release.
  196 +
  197 +Send any questions, comments or fixes to brettstimmerman@gmail.com.
  198 +
  199 +
  200 +7. Todo
  201 +-------
  202 +This release of Lace is experimental. There are many aspects of
  203 +the application that need tending to if it is ever going to fly.
  204 +
  205 +Some of Lace's immediate needs might be:
  206 +
  207 + - Refactor and streamline entire codebase. It's currently a
  208 + massive hodge-podge with a blatant disregard for any sensible
  209 + order
  210 + - Streamline XHTML and CSS
  211 + - Improve component abstraction
  212 + - Drop certain hard-coded features in favor of a plug-in
  213 + architecture
  214 +
  215 +Completed items:
  216 +
  217 + - Consider mod_rewrite in place of ForceType for pretty URLs
  218 + (0.1.3)
  219 +
  220 +
  221 +8. Credits
  222 +----------
  223 +Lace is originally based on a small portion of Ryan Grove's
  224 +PHPSlice, and includes tiny snips of Ryan's other project,
  225 +Poseidon.
  226 +PHPSlice Copyright (C) 2001 - 2002 Ryan Grove
  227 +Poseidon Copyright (C) 2003 - 2005 Ryan Grove
  228 +http://wiki.wonko.com/software
  229 +
  230 +Lace uses Cal Henderson's lib_filter library.
  231 +Copyright (C) 2001-2004 Cal Henderson
  232 +http://code.iamcal.com
12 www/.htaccess
... ... @@ -0,0 +1,12 @@
  1 +<IfModule mod_rewrite.c>
  2 + RewriteEngine On
  3 + Options +FollowSymLinks
  4 + Options +SymLinksIfOwnerMatch
  5 + # Set RewriteBase below to the absolute path
  6 + # to your Lace installation (e.g. /lace/)
  7 + RewriteBase /lace/
  8 + RewriteRule ^logs/(.[^\/]+)/$ logs/?date=$1 [L]
  9 +</IfModule>
  10 +
  11 +ErrorDocument 403 ./index.php
  12 +ErrorDocument 404 ./index.php
47 www/common.php
... ... @@ -0,0 +1,47 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms of the GNU General Public License as published by the
  6 + * Free Software Foundation; either version 2 of the License, or (at your
  7 + * option) any later version.
  8 + *
  9 + * This program is distributed in the hope that it will be useful, but
  10 + * WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  12 + * Public License for more details.
  13 + *
  14 + * You should have received a copy of the GNU General Public License along
  15 + * with this program; if not, write to the Free Software Foundation, Inc.,
  16 + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17 + */
  18 +
  19 +error_reporting(E_ALL);
  20 +
  21 +define('LACE_VERSION', '0.1.5');
  22 +
  23 +require_once('config.php');
  24 +
  25 +// Load core libraries
  26 +require_once('lib/classes/LaceData.php');
  27 +require_once('lib/classes/LaceActivity.php');
  28 +require_once('lib/lib_utils.php');
  29 +require_once('lib/lib_filter.php');
  30 +require_once('lib/lib_lace.php');
  31 +require_once('lib/mb_compat.php');
  32 +
  33 +mb_internal_encoding('UTF-8');
  34 +
  35 +// Create the activity object
  36 +$A = &new LaceActivity();
  37 +
  38 +fixMagicQuotes();
  39 +validateSession();
  40 +
  41 +// Feeble attempt at preventing caching
  42 +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
  43 +header('Last-Modified: '.gmdate('D, d M Y H:i:s').'GMT');
  44 +header('Cache-Control: no-store, no-cache, must-revalidate');
  45 +header('Cache-Control: post-check=0, pre-check=0', false);
  46 +header('Pragma: no-cache');
  47 +?>
150 www/config.dist.php
... ... @@ -0,0 +1,150 @@
  1 +<?php
  2 +
  3 +# 'Branding' Options
  4 +
  5 +/** The name you'd like to appear in the main header, and anywhere
  6 + the name of the chatroom is displayed. */
  7 +define('LACE_SITE_NAME', 'Lace');
  8 +
  9 +/** A description of your chatroom; appears only as part of the
  10 + <title> tag. */
  11 +define('LACE_SITE_DESCRIPTION', '');
  12 +
  13 +
  14 +# Lace Client Engine Settings
  15 +
  16 +/** Default polling interval used when IntervalManager is disabled
  17 + (in seconds). */
  18 +define('LACE_INTERVAL', 3);
  19 +
  20 +/** Timeout threshold after which Lace will stop its XMLHttpRequest
  21 + cycle (in minutes) */
  22 +define('LACE_TIMEOUT', 10);
  23 +
  24 +
  25 +# URL Settings
  26 +
  27 +/** Absolute URL to Lace including trailing slash
  28 + (e.g. 'http://www.myserver.com/lace/' */
  29 +define('LACE_URL_ABS', 'http://www.myserver.com/lace/');
  30 +
  31 +/** Relative URL to Lace including trailing slash
  32 + (e.g. '/lace/' or simply '/') */
  33 +define('LACE_URL_REL', '/lace/');
  34 +
  35 +/** Use dirified (pretty) URLs for the logs?
  36 + (Requires mod_rewrite)
  37 +
  38 + NOTE: If LACE_LOGS_DIRIFIED is set to TRUE,
  39 + you should configure mod_rewrite's RewriteBase
  40 + (in .htaccess) to match LACE_URL_REL */
  41 +define('LACE_LOGS_DIRIFIED', false);
  42 +
  43 +
  44 +# Cookie Settings
  45 +
  46 +/** Name Lace's session cookie */
  47 +define('LACE_SESSION_COOKIE', 'Lace');
  48 +
  49 +/** Name Lace's nickname cookie */
  50 +define('LACE_NAME_COOKIE', LACE_SESSION_COOKIE.'_name');
  51 +
  52 +/** Name Lace's flood data cookie */
  53 +define('LACE_FLOOD_COOKIE', LACE_SESSION_COOKIE.'_flood');
  54 +
  55 +/** Secret word that's hashed as part of a unique cookie value */
  56 +define('LACE_SECRET_WORD', 'LaceSecretWord');
  57 +
  58 +
  59 +# Flood Settings
  60 +
  61 +/** Maximum number of posts allowed in 10 seconds
  62 + (higher settings are more leniant) */
  63 +define('LACE_FLOOD_POST_COUNT', 8);
  64 +
  65 +
  66 +# Lace Components
  67 +
  68 +/** Turn the Javascript client engine on of off.
  69 +
  70 + When turned on, Lace employs XMLHttpRequest where
  71 + available. For browsers lacking XMLHttpRequest support,
  72 + Lace will function as a 'traditional' web application
  73 + where form submissions cause the entire page to refresh.
  74 +
  75 + When turned off, Lace will function as a 'traditional'
  76 + web application in every browser.
  77 +
  78 + Disabling the client engine disables all client-side
  79 + functions of Lace. */
  80 +define('LACE_ENABLE_CLIENT_ENGINE', true);
  81 +
  82 +/** Enable IntervalManager for throttling XMLHttpRequests.
  83 +
  84 + If IntervalManager is disabled, Lace will poll at the
  85 + interval specified in LACE_INTERVAL, and cannot be
  86 + throttled or stopped. */
  87 +define('LACE_ENABLE_INTERVAL_MANAGER', true);
  88 +
  89 +
  90 +# Data file handling
  91 +
  92 +/** Maximum number of posts (lines) to display on the main page */
  93 +define('LACE_FILE_MAX_SIZE', 35);
  94 +
  95 +/** Maximum age (in days) of logged conversations */
  96 +define('LACE_ARCHIVE_DAYS', 8);
  97 +
  98 +/** Use MD5 change detection?
  99 +
  100 + If set enabled, Lace uses a (much slower) MD5 hashing
  101 + instead of file modification time and file size to detect
  102 + changes in the main data file.
  103 +
  104 + Use MD5 hashing only if file mod time and size cannot be
  105 + trusted */
  106 +define('LACE_HASH_MD5', false);
  107 +
  108 +
  109 +# Message Settings
  110 +
  111 +/** Whether to log and display system generated join/part
  112 + messages. (Can be a nuisance on a public server with
  113 + not much chatter going on.) */
  114 +define('LACE_SHOW_JOIN_PART', false);
  115 +
  116 +/** Whether to log and display nickname change messages.
  117 + (Can be a nuisance like LACE_SHOW_JOIN_PART.) */
  118 +define('LACE_SHOW_NAME_CHANGE', false);
  119 +
  120 +/** Whether to show hourly timestamps on the main page */
  121 +define('LACE_SHOW_HOUR', true);
  122 +
  123 +/** Limit messages to this many characters
  124 + NOTE: Keep in mind HTML markup counts towards message length */
  125 +define('LACE_MAX_TEXT_LENGTH', 750);
  126 +
  127 +
  128 +# Data File Locations
  129 +
  130 +/** Filesystem location of the datafile directory including trailing
  131 + slash. Default is the /data directory beneath the directory
  132 + this configuration file is in.
  133 +
  134 + Note: this is the filesystem path, not the URL. */
  135 +define('LACE_DATADIR', dirname(__FILE__).'/data/');
  136 +
  137 +/** Location of the archived data files (logs) including
  138 + trailing slash. */
  139 +define('LACE_LOGDIR', LACE_DATADIR.'logs/');
  140 +
  141 +/** Location and filename of the main data file. */
  142 +define('LACE_FILE', LACE_DATADIR.'lace.dat');
  143 +
  144 +/** Location and filename of the current log data file */
  145 +define('LACE_LOGFILE', LACE_DATADIR.'log.dat');
  146 +
  147 +/** Location and filename of the activity (user list) file */
  148 +define('LACE_ACTIVITY_FILE', LACE_DATADIR.'activity.dat');
  149 +
  150 +?>
153 www/config.php
... ... @@ -0,0 +1,153 @@
  1 +<?php
  2 +
  3 +# 'Branding' Options
  4 +
  5 +/** The name you'd like to appear in the main header, and anywhere
  6 + the name of the chatroom is displayed. */
  7 +define('LACE_SITE_NAME', 'Lace');
  8 +
  9 +/** A description of your chatroom; appears only as part of the
  10 + <title> tag. */
  11 +define('LACE_SITE_DESCRIPTION', '');
  12 +
  13 +
  14 +# Lace Client Engine Settings
  15 +
  16 +/** Default polling interval used when IntervalManager is disabled
  17 + (in seconds). */
  18 +define('LACE_INTERVAL', 3);
  19 +
  20 +/** Timeout threshold after which Lace will stop its XMLHttpRequest
  21 + cycle (in minutes) */
  22 +define('LACE_TIMEOUT', 10);
  23 +
  24 +
  25 +# URL Settings
  26 +
  27 +/** Absolute URL to Lace including trailing slash
  28 + (e.g. 'http://www.myserver.com/lace/' */
  29 +define('LACE_URL_ABS', 'http://www.myserver.com/lace/');
  30 +
  31 +/** Relative URL to Lace including trailing slash
  32 + (e.g. '/lace/' or simply '/') */
  33 +define('LACE_URL_REL', '/lace/');
  34 +
  35 +/** Use dirified (pretty) URLs for the logs?
  36 + (Requires mod_rewrite)
  37 +
  38 + NOTE: If LACE_LOGS_DIRIFIED is set to TRUE,
  39 + you should configure mod_rewrite's RewriteBase
  40 + (in .htaccess) to match LACE_URL_REL */
  41 +define('LACE_LOGS_DIRIFIED', false);
  42 +
  43 +
  44 +# Cookie Settings
  45 +
  46 +/** Name Lace's session cookie */
  47 +define('LACE_SESSION_COOKIE', 'Lace');
  48 +
  49 +/** Name Lace's nickname cookie */
  50 +define('LACE_NAME_COOKIE', LACE_SESSION_COOKIE.'_name');
  51 +
  52 +/** Name Lace's flood data cookie */
  53 +define('LACE_FLOOD_COOKIE', LACE_SESSION_COOKIE.'_flood');
  54 +
  55 +/** Secret word that's hashed as part of a unique cookie value */
  56 +define('LACE_SECRET_WORD', 'LaceSecretWord');
  57 +
  58 +
  59 +# Flood Settings
  60 +
  61 +/** Maximum number of posts allowed in 10 seconds
  62 + (higher settings are more leniant) */
  63 +define('LACE_FLOOD_POST_COUNT', 8);
  64 +
  65 +
  66 +# Lace Components
  67 +
  68 +/** Turn the Javascript client engine on of off.
  69 +
  70 + When turned on, Lace employs XMLHttpRequest where
  71 + available. For browsers lacking XMLHttpRequest support,
  72 + Lace will function as a 'traditional' web application
  73 + where form submissions cause the entire page to refresh.
  74 +
  75 + When turned off, Lace will function as a 'traditional'
  76 + web application in every browser.
  77 +
  78 + Disabling the client engine disables all client-side
  79 + functions of Lace
  80 + */
  81 +define('LACE_ENABLE_CLIENT_ENGINE', true);
  82 +
  83 +/** Enable IntervalManager for throttling XMLHttpRequests.
  84 +
  85 + If IntervalManager is disabled, Lace will poll at the
  86 + interval specified in LACE_INTERVAL, and cannot be
  87 + throttled or stopped.
  88 + */
  89 +define('LACE_ENABLE_INTERVAL_MANAGER', true);
  90 +
  91 +
  92 +# Data file handling
  93 +
  94 +/** Maximum number of posts (lines) to display on the main page */
  95 +define('LACE_FILE_MAX_SIZE', 35);
  96 +
  97 +/** Maximum age (in days) of logged conversations */
  98 +define('LACE_ARCHIVE_DAYS', 8);
  99 +
  100 +/** Use MD5 change detection?
  101 +
  102 + If set enabled, Lace uses a (much slower) MD5 hashing
  103 + instead of file modification time and file size to detect
  104 + changes in the main data file.
  105 +
  106 + Use MD5 hashing only if file mod time and size cannot be
  107 + trusted */
  108 +define('LACE_HASH_MD5', false);
  109 +
  110 +
  111 +# Message Settings
  112 +
  113 +/** Whether to log and display system generated join/part
  114 + messages. (Can be a nuisance on a public server with
  115 + not much chatter going on.) */
  116 +define('LACE_SHOW_JOIN_PART', false);
  117 +
  118 +/** Whether to log and display nickname change messages.
  119 + (Can be a nuisance like LACE_SHOW_JOIN_PART.) */
  120 +define('LACE_SHOW_NAME_CHANGE', false);
  121 +
  122 +/** Whether to show hourly timestamps on the main page */
  123 +define('LACE_SHOW_HOUR', true);
  124 +
  125 +/** Limit messages to this many characters
  126 + NOTE: Keep in mind HTML markup counts towards
  127 + message length */
  128 +define('LACE_MAX_TEXT_LENGTH', 750);
  129 +
  130 +
  131 +# Data File Locations
  132 +
  133 +/** Filesystem location of the datafile directory including trailing
  134 + slash. Default is the /data directory beneath the directory
  135 + this configuration file is in.
  136 +
  137 + Note: this is the filesystem path, not the URL. */
  138 +define('LACE_DATADIR', dirname(__FILE__).'/data/');
  139 +
  140 +/** Location of the archived data files (logs) including
  141 + trailing slash. */
  142 +define('LACE_LOGDIR', LACE_DATADIR.'logs/');
  143 +
  144 +/** Location and filename of the main data file. */
  145 +define('LACE_FILE', LACE_DATADIR.'lace.dat');
  146 +
  147 +/** Location and filename of the current log data file */
  148 +define('LACE_LOGFILE', LACE_DATADIR.'log.dat');
  149 +
  150 +/** Location and filename of the activity (user list) file */
  151 +define('LACE_ACTIVITY_FILE', LACE_DATADIR.'activity.dat');
  152 +
  153 +?>
0  www/data/activity.dat
No changes.
21 www/data/index.php
... ... @@ -0,0 +1,21 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms of the GNU General Public License as published by the
  6 + * Free Software Foundation; either version 2 of the License, or (at your
  7 + * option) any later version.
  8 + *
  9 + * This program is distributed in the hope that it will be useful, but
  10 + * WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  12 + * Public License for more details.
  13 + *
  14 + * You should have received a copy of the GNU General Public License along
  15 + * with this program; if not, write to the Free Software Foundation, Inc.,
  16 + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17 + */
  18 +
  19 +require_once('../config.php');
  20 +header('Location: '.LACE_URL_ABS);
  21 +?>
0  www/data/lace.dat
No changes.
0  www/data/log.dat
No changes.
22 www/help/index.php
... ... @@ -0,0 +1,22 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms of the GNU General Public License as published by the
  6 + * Free Software Foundation; either version 2 of the License, or (at your
  7 + * option) any later version.
  8 + *
  9 + * This program is distributed in the hope that it will be useful, but
  10 + * WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  12 + * Public License for more details.
  13 + *
  14 + * You should have received a copy of the GNU General Public License along
  15 + * with this program; if not, write to the Free Software Foundation, Inc.,
  16 + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17 + */
  18 +
  19 +$_POST['op'] = 'help';
  20 +require_once('../index.php');
  21 +
  22 +?>
BIN  www/images/check.gif
BIN  www/images/external.gif
21 www/images/index.php
... ... @@ -0,0 +1,21 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms of the GNU General Public License as published by the
  6 + * Free Software Foundation; either version 2 of the License, or (at your
  7 + * option) any later version.
  8 + *
  9 + * This program is distributed in the hope that it will be useful, but
  10 + * WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  12 + * Public License for more details.
  13 + *
  14 + * You should have received a copy of the GNU General Public License along
  15 + * with this program; if not, write to the Free Software Foundation, Inc.,
  16 + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17 + */
  18 +
  19 +require_once('../config.php');
  20 +header('Location: '.LACE_URL_ABS);
  21 +?>
BIN  www/images/pause.gif
BIN  www/images/play.gif
94 www/index.php
... ... @@ -0,0 +1,94 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms of the GNU General Public License as published by the
  6 + * Free Software Foundation; either version 2 of the License, or (at your
  7 + * option) any later version.
  8 + *
  9 + * This program is distributed in the hope that it will be useful, but
  10 + * WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  12 + * Public License for more details.
  13 + *
  14 + * You should have received a copy of the GNU General Public License along
  15 + * with this program; if not, write to the Free Software Foundation, Inc.,
  16 + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17 + */
  18 +
  19 +// Initialize the form's name value to
  20 +// be overridden during session init.
  21 +global $name;
  22 +$name = '';
  23 +
  24 +require_once('common.php');
  25 +
  26 +if ($name == '')
  27 + $name = getName();
  28 +
  29 +// This is only ever used if XMLHttpRequest is
  30 +// not accessible (JavaScript disabled, etc.)
  31 +// Otherwise, Lace just passes through it unaffected.
  32 +laceListener(false);
  33 +
  34 +// Front Controller dirty work
  35 +$op = postVar('op', false);
  36 +switch ($op)
  37 +{
  38 + case 'log':
  39 + $id = 'log';
  40 + $include = 'log.inc.php';
  41 + $title = LACE_SITE_NAME.' Logs';
  42 + break;
  43 + case 'help':
  44 + $id = 'help';
  45 + $include = 'help.inc.php';
  46 + $title = LACE_SITE_NAME.' Tips';
  47 + break;
  48 + default:
  49 + if ($_SERVER['REQUEST_URI'] != LACE_URL_REL
  50 + && $_SERVER['REQUEST_URI'] != LACE_URL_REL.basename(__FILE__))
  51 + {
  52 + // Redirect invalid URLs to the main page
  53 + header('Location: ' . LACE_URL_ABS);
  54 + exit;
  55 + }
  56 + $id = 'home';
  57 + $include = 'lace.inc.php';
  58 + $title = LACE_SITE_NAME;
  59 + $title .= (LACE_SITE_DESCRIPTION) ? ' - '.LACE_SITE_DESCRIPTION : '';
  60 + break;
  61 +}
  62 +?>
  63 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  64 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  65 +<head>
  66 + <title><?php echo $title; ?></title>
  67 + <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  68 + <style type="text/css" media="all"> @import "<?php echo LACE_URL_REL; ?>styles/style.css"; </style>
  69 + <?php require_once('scripts/lace.js.php'); ?>
  70 +</head>
  71 +
  72 +<body id="<?php echo $id; ?>">
  73 +<div id="wrapper">
  74 + <div id="nav">
  75 + <ul>
  76 + <li id="nav-home"><a href="<?php echo LACE_URL_REL; ?>" title="<?php echo LACE_SITE_NAME; ?> Lobby">Lobby</a></li>
  77 + <li id="nav-log"><a href="<?php echo LACE_URL_REL; ?>logs/" title="Previously on <?php echo LACE_SITE_NAME; ?>">Logs</a></li>
  78 + <li id="nav-help"><a href="<?php echo LACE_URL_REL; ?>help/" title="<?php echo LACE_SITE_NAME; ?> Help">Help</a></li>
  79 + </ul>
  80 + </div>
  81 +
  82 + <div id="content">
  83 + <?php
  84 + // Include the content file.
  85 + require_once('lib/includes/'.$include);
  86 + ?>
  87 + </div>
  88 +
  89 + <div id="poweredBy">
  90 + Powered by <a href="http://socket7.net/lace/">Lace</a>
  91 + </div>
  92 +</div>
  93 +</body>
  94 +</html>
35 www/lace.php
... ... @@ -0,0 +1,35 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms of the GNU General Public License as published by the
  6 + * Free Software Foundation; either version 2 of the License, or (at your
  7 + * option) any later version.
  8 + *
  9 + * This program is distributed in the hope that it will be useful, but
  10 + * WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  12 + * Public License for more details.
  13 + *
  14 + * You should have received a copy of the GNU General Public License along