Initial revision.

darcs-hash:20050112202454-9977f-60936f24fe2092a30223627e0683de2df61d0c4a.gz
This commit is contained in:
andi 2005-01-12 21:24:54 +01:00
commit f3f0262c48
438 changed files with 24736 additions and 0 deletions

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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.
GNU GENERAL PUBLIC LICENSE
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:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) 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.
c) 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:
a) 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,
b) 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,
c) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library General
Public License instead of this License.

9
README Normal file
View File

@ -0,0 +1,9 @@
All documentation for DokuWiki is available online
at http://www.splitbrain.org/dokuwiki/wiki:dokuwiki
For Installation Instructions see
http://www.splitbrain.org/dokuwiki/wiki:install
DokuWiki - 2004 (c) by Andreas Gohr <andi@splitbrain.org>
See COPYING for license info

3
conf/.htaccess Normal file
View File

@ -0,0 +1,3 @@
## no access to the conf directory
order allow,deny
deny from all

11
conf/acl.auth.dist Normal file
View File

@ -0,0 +1,11 @@
# Access Control
#
# none 0
# read 1
# edit 2
# create 4
# upload 8
# grant 255 #not used yet
* @admin 255
* @ALL 4

137
conf/acronyms.conf Normal file
View File

@ -0,0 +1,137 @@
# Acronyms.
AFAICS As far as I can see
AFAIK As far as I know
ACL Access Control List
AIM AOL (America Online) Instant Messenger
AOL America Online
API Application Programming Interface
ASAP As soon as possible
ASCII American Standard Code for Information Interchange
ASP Active Server Pages
BTW By the way
CGI Common Gateway Interface
CMS Content Management System
CSS Cascading Style Sheets
CVS Concurrent Versions System
DBA Database Administrator
DHTML Dynamic HyperText Markup Language
DMCA Digital Millenium Copyright Act
DNS Domain Name Server
DOM Document Object Model
DTD Document Type Definition
EOF End of file
EOL End of line
EOM End of message
EOT End of text
ESMTP Extended Simple Mail Transfer Protocol
FAQ Frequently Asked Questions
FDL GNU Free Documentation License
FTP File Transfer Protocol
FOSS Free & Open-Source Software
FLOSS Free/Libre and Open Source Software
FUD Fear, Uncertainty, and Doubt
GB Gigabyte
GHz Gigahertz
GIF Graphics Interchange Format
GPL GNU General Public License
GUI Graphical User Interface
HTML HyperText Markup Language
HTTP Hyper Text Transfer Protocol
IANAL I am not a lawyer (but)
ICANN Internet Corporation for Assigned Names and Numbers
ICQ I seek you (Instant Messenger)
IE5 Internet Explorer 5
IE6 Internet Explorer 6
IE Internet Explorer
IIRC If I remember correctly
IIS Internet Information Services
IMAP Internet Message Access Protocol
IMHO In my humble opinion
IMO In my opinion
IOW In other words
IRC Internet Relay Chat
IRL In real life
ISO International Organization for Standardization
ISP Internet Service Provider
JDK Java Development Kit
JPEG Joint Photographics Experts Group
JPG Joint Photographics Experts Group
JS JavaScript
KISS Keep it simple stupid
LGPL GNU Lesser General Public License
LOL Laughing out loud
MathML Mathematical Markup Language
MB Megabyte
MHz Megahertz
MIME Multipurpose Internet Mail Extension
MIT Massachusetts Institute of Technology
MML Mathematical Markup Language
MP3 Motion Picture Experts Group Layer 3
MPEG Motion Picture Experts Group
MSDN Microsoft Developer Network
MS Microsoft
NS4.7 Netscape 4.7
NS4 Netscape 4
NS6 Netscape 6
NS7 Netscape 7
OMG Oh my God
OPML Outline Processor Markup Language
OS Operating System
OSS Open Source Software
OTOH On the other hand
P2P Peer to Peer
PDA Personal Digital Assistant
PDF Portable Document Format
Perl Practical Extraction and Report Language
PERL Practical Extraction and Report Language
PHP Hypertext Preprocessor
PICS Platform for Internet Content Selection
PIN Personal Identification Number
PITA Pain in the Ass
PNG Portable Network Graphics
POP3 Post Office Protocol 3
POP Post Office Protocol
QoS Quality of Service
RAID Redundant Array of Inexpensive Disks
RDF Rich Data File
ROTFL Rolling on the floor laughing
RPC Remote Procedure Call
RSS Rich Site Summary
RTFM Read The Fine Manual
RTF Rich Text File
SCSI Small Computer System Interface
SDK Software Development Kit
SGML Standard General Markup Language
SMIL Synchronized Multimedia Integration Language
SMTP Simple Mail Transfer Protocol
SOAP Simple Object Access Protocol
spec specification
SQL Structured Query Language
SSH Secure Shell
SSI Server Side Includes
SSL Secure Sockets Layer
SVG Scalable Vector Graphics
TIA Thanks in advance
TIFF Tagged Image File Format
TLD Top Level Domain
TOC Table of Contents
URI Uniform Resource Identifier
URL Uniform Resource Locator
URN Uniform Resource Name
VBA Visual Basic for Applications
VB Visual Basic
W3C World Wide Web Consortium
WAN Wide Area Network
WAP Wireless Access Protocol
WML Wireless Markup Language
WTF? What the f***
WWW World Wide Web
WYSIWYG What You See Is What You Get
XHTML Extensible HyperText Markup Language
XML Extensible Markup Language
XSD XML (Extensible Markup Language) Schema Definition
XSL Extensible Stylesheet Language
XSLT Extensible Stylesheet Language Transformations
XUL XML User Interface Language
YMMV Your mileage may vary

6
conf/custom.conf Normal file
View File

@ -0,0 +1,6 @@
# This file contains custom text replacements configured by you.
#
# Some examples:
#/foo/i 'bar'
#/(\b)GUI(\b)/ '\1<acronym title="Graphical User Interface">GUI</acronym>\1'

86
conf/dokuwiki.php Normal file
View File

@ -0,0 +1,86 @@
<?
/**
* This is DokuWiki's Main Configuration file
* This is a piece of PHP code so PHP syntax applies!
*
* For help with the configuration see http://www.splitbrain.org/dokuwiki/wiki:config
*/
/* Datastorage and Permissions */
$conf['umask'] = 0111; //set the umask for new files
$conf['dmask'] = 0000; //directory mask accordingly
$conf['lang'] = 'en'; //your language
$conf['datadir'] = './data'; //where to store the data
$conf['olddir'] = './attic'; //where to store old revisions
$conf['mediadir'] = './media'; //where to store media files
$conf['mediaweb'] = 'media'; //access to media from the web
$conf['changelog'] = './changes.log'; //change log
$conf['uploadtypes'] = 'gif|jpe?g|png|zip|pdf|tar(\.gz)?|tgz'; //regexp of allowed filetypes to upload
/* Display Options */
$conf['start'] = 'start'; //name of start page
$conf['title'] = 'DokuWiki'; //what to show in the title
$conf['fullpath'] = 0; //show full path of the document or relative to datadir only? 0|1
$conf['recent'] = 20; //how many entries to show in recent
$conf['breadcrumbs'] = 10; //how many recent visited pages to show
$conf['typography'] = 1; //convert quotes, dashes and stuff to typographic equivalents? 0|1
$conf['htmlok'] = 0; //may raw HTML be embedded? This may break layout and XHTML validity 0|1
$conf['phpok'] = 0; //may PHP code be embedded? Never do this on the internet! 0|1
$conf['dformat'] = 'Y/m/d H:i'; //dateformat accepted by PHPs date() function
$conf['signature'] = ' --- //[[@MAIL@|@NAME@]] @DATE@//'; //signature see wiki:config for details
$conf['maxtoclevel'] = 3; //Up to which level include into AutoTOC (max. 5)
$conf['maxseclevel'] = 3; //Up to which level create editable sections (max. 5)
$conf['camelcase'] = 0; //Use CamelCase for linking? (I don't like it) 0|1
$conf['localnames'] = 0; //Allow non-ASCII chars in pagenames (0|1)
//You need a correct locale for this!
/* Antispam Features */
$conf['usewordblock']= 1; //block spam based on words? 0|1
$conf['mailguard'] = 'hex'; //obfuscate email addresses against spam harvesters?
//valid entries are:
// 'visible' - replace @ with [at], . with [dot] and - with [dash]
// 'hex' - use hex entities to encode the mail address
// 'none' - do not obfuscate addresses
/* Authentication Options */
$conf['useacl'] = 0; //Use Access Control Lists to restrict access?
$conf['openregister']= 1; //Should users to be allowed to register?
$conf['authtype'] = 'plain'; //which authentication DB should be used (currently plain only)
$conf['defaultgroup']= 'user'; //Default groups new Users are added to
//LDAP auth specific stuff (see wiki:auth_ldap)
$conf['auth']['ldap']['server'] = 'localhost';
$conf['auth']['ldap']['usertree'] = 'ou=people, dc=my, dc=home';
$conf['auth']['ldap']['grouptree'] = 'ou=group, dc=my, dc=home';
$conf['auth']['ldap']['userfilter'] = '(&(uid=%u)(objectClass=posixAccount))';
/* Advanced Options */
$conf['userewrite'] = 0; //this makes nice URLs but you need to enable it in .htaccess first 0|1
$conf['useslash'] = 0; //use slash instead of colon? only when rewrite is on
$conf['canonical'] = 0; //Should all URLs use full canonical http://... style?
$conf['autoplural'] = 0; //try (non)plural form of nonexisting files?
$conf['usegzip'] = 1; //gzip old revisions?
$conf['cachetime'] = 60*60*24; //maximum age for cachefile in seconds (defaults to a day)
$conf['purgeonadd'] = 1; //purge cache when a new file is added (needed for up to date links)
$conf['locktime'] = 15*60; //maximum age for lockfiles (defaults to 15 minutes)
$conf['notify'] = ''; //send change info to this email (leave blank for nobody)
$conf['mailfrom'] = ''; //use this email when sending mails
//Set target to use when creating links - leave empty for same window
$conf['target']['wiki'] = '';
$conf['target']['interwiki'] = '_blank';
$conf['target']['extern'] = '_blank';
$conf['target']['media'] = '';
$conf['target']['windows'] = '';
//this includes a local config file if exist which make upgrading more easy - just don't touch this
@include("conf/local.php");
//a small bugfix for some browsers/proxies just don't touch this either
$lang = array();
?>

121
conf/interwiki.conf Normal file
View File

@ -0,0 +1,121 @@
# Each URL may contain one of the placeholders {URL} or {NAME}
# {URL} is replaced by the URL encoded representation of the wikiname
# this is the right thing to do in most cases
# {NAME} this is replaced by the wikiname as given in the document
# no further encoding is done
# If no placeholder is defined the urlencoded name is appended to the URL
# You can add more InterWiki shortcuts here.
wp http://en.wikipedia.org/wiki/
wpde http://de.wikipedia.org/wiki/
wpmeta http://meta.wikipedia.org/wiki/
schoki http://www.schokilade.de/doku.php?id=
doku http://wiki.splitbrain.org/
freecache http://freecache.org/{NAME}
rfc http://www.cs.ccu.edu.tw/~chm91u/rfc2html.php?loc=remote&amp;number=
sb http://www.splitbrain.org/go/
amazon http://www.amazon.com/exec/obidos/ASIN/
amazon.de http://www.amazon.de/exec/obidos/ASIN/{URL}/ballermannsyndic/
amazon.uk http://www.amazon.co.uk/exec/obidos/ASIN/
google.de http://www.google.de/search?q=
man http://man.splitbrain.org/index.php/man/
phpfn http://www.php.net/manual/en/function.{NAME}.php
go http://www.google.com/search?q={URL}&amp;btnI=lucky
bug http://bugs.splitbrain.org/index.php?do=details&amp;id=
# Standards from http://usemod.com/intermap.txt follow
AbbeNormal http://www.ourpla.net/cgi-bin/pikie.cgi?
AcadWiki http://xarch.tu-graz.ac.at/autocad/wiki/
Acronym http://www.acronymfinder.com/af-query.asp?String=exact&amp;Acronym=
Advogato http://www.advogato.org/
AIWiki http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?
ALife http://news.alife.org/wiki/index.php?
AndStuff http://andstuff.org/wiki.php?
Annotation http://bayle.stanford.edu/crit/nph-med.cgi/
AnnotationWiki http://www.seedwiki.com/page.cfm?wikiid=368&amp;doc=
AwarenessWiki http://taoriver.net/aware/
BenefitsWiki http://www.benefitslink.com/cgi-bin/wiki.cgi?
BridgesWiki http://c2.com/w2/bridges/
C2find http://c2.com/cgi/wiki?FindPage&amp;value=
Cache http://www.google.com/search?q=cache:
CLiki http://ww.telent.net/cliki/
CmWiki http://www.ourpla.net/cgi-bin/wiki.pl?
CreationMatters http://www.ourpla.net/cgi-bin/wiki.pl?
DejaNews http://www.deja.com/=dnc/getdoc.xp?AN=
DeWikiPedia http://www.wikipedia.de/wiki.cgi?
Dictionary http://www.dict.org/bin/Dict?Database=*&amp;Form=Dict1&amp;Strategy=*&amp;Query=
DiveIntoOsx http://diveintoosx.org/
DocBook http://docbook.org/wiki/moin.cgi/
DolphinWiki http://www.object-arts.com/wiki/html/Dolphin/
EfnetCeeWiki http://purl.net/wiki/c/
EfnetCppWiki http://purl.net/wiki/cpp/
EfnetPythonWiki http://purl.net/wiki/python/
EfnetXmlWiki http://purl.net/wiki/xml/
EljWiki http://elj.sourceforge.net/phpwiki/index.php/
EmacsWiki http://www.emacswiki.org/cgi-bin/wiki.pl?
FinalEmpire http://final-empire.sourceforge.net/cgi-bin/wiki.pl?
Foldoc http://www.foldoc.org/foldoc/foldoc.cgi?
FoxWiki http://fox.wikis.com/wc.dll?Wiki~
FreeBSDman http://www.FreeBSD.org/cgi/man.cgi?apropos=1&amp;query=
Google http://www.google.com/search?q=
GoogleGroups http://groups.google.com/groups?q=
GreenCheese http://www.greencheese.org/
HammondWiki http://www.dairiki.org/HammondWiki/index.php3?
Haribeau http://wiki.haribeau.de/cgi-bin/wiki.pl?
IAWiki http://www.IAwiki.net/
IMDB http://us.imdb.com/Title?
JargonFile http://sunir.org/apps/meta.pl?wiki=JargonFile&amp;redirect=
JiniWiki http://www.cdegroot.com/cgi-bin/jini?
JspWiki http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=
KmWiki http://www.voght.com/cgi-bin/pywiki?
KnowHow http://www2.iro.umontreal.ca/~paquetse/cgi-bin/wiki.cgi?
LanifexWiki http://opt.lanifex.com/cgi-bin/wiki.pl?
LegoWiki http://www.object-arts.com/wiki/html/Lego-Robotics/
LinuxWiki http://www.linuxwiki.de/
LugKR http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?
MathSongsWiki http://SeedWiki.com/page.cfm?wikiid=237&amp;doc=
MbTest http://www.usemod.com/cgi-bin/mbtest.pl?
MeatBall http://www.usemod.com/cgi-bin/mb.pl?
MetaWiki http://sunir.org/apps/meta.pl?
MetaWikiPedia http://meta.wikipedia.com/wiki/
MoinMoin http://purl.net/wiki/moin/
MuWeb http://www.dunstable.com/scripts/MuWebWeb?
NetVillage http://www.netbros.com/?
OpenWiki http://openwiki.com/?
OrgPatterns http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns?
PangalacticOrg http://www.pangalactic.org/Wiki/
PersonalTelco http://www.personaltelco.net/index.cgi/
PhpWiki http://phpwiki.sourceforge.net/phpwiki/index.php?
Pikie http://pikie.darktech.org/cgi/pikie?
PPR http://c2.com/cgi/wiki?
PurlNet http://purl.oclc.org/NET/
PythonInfo http://www.python.org/cgi-bin/moinmoin/
PythonWiki http://www.pythonwiki.de/
PyWiki http://www.voght.com/cgi-bin/pywiki?
SeaPig http://www.seapig.org/
SeattleWireless http://seattlewireless.net/?
SenseisLibrary http://senseis.xmp.net/?
Shakti http://cgi.algonet.se/htbin/cgiwrap/pgd/ShaktiWiki/
SourceForge http://sourceforge.net/{NAME}
Squeak http://minnow.cc.gatech.edu/squeak/
StrikiWiki http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl?
SVGWiki http://www.protocol7.com/svg-wiki/default.asp?
Tavi http://tavi.sourceforge.net/index.php?
TmNet http://www.technomanifestos.net/?
TMwiki http://www.EasyTopicMaps.com/?page=
TWiki http://twiki.org/cgi-bin/view/{NAME}
TwistedWiki http://purl.net/wiki/twisted/
Unreal http://wiki.beyondunreal.com/wiki/
UseMod http://www.usemod.com/cgi-bin/wiki.pl?
VisualWorks http://wiki.cs.uiuc.edu/VisualWorks/
WebDevWikiNL http://www.promo-it.nl/WebDevWiki/index.php?page=
WebSeitzWiki http://webseitz.fluxent.com/wiki/
Why http://clublet.com/c/c/why?
Wiki http://c2.com/cgi/wiki?
WikiPedia http://www.wikipedia.com/wiki/
WikiWorld http://WikiWorld.com/wiki/index.php/
YpsiEyeball http://sknkwrks.dyndns.org:1957/writewiki/wiki.pl?
ZWiki http://www.zwiki.org/

28
conf/smileys.conf Normal file
View File

@ -0,0 +1,28 @@
# Smileys configured here will be replaced by the
# configured images in the smiley directory
8-) icon_cool.gif
8-O icon_eek.gif
8-o icon_eek.gif
:-( icon_sad.gif
:-) icon_smile.gif
=) icon_smile2.gif
:-/ icon_doubt.gif
:-\ icon_doubt2.gif
:-? icon_confused.gif
:-D icon_biggrin.gif
:-P icon_razz.gif
:-o icon_surprised.gif
:-O icon_surprised.gif
:-x icon_silenced.gif
:-X icon_silenced.gif
:-| icon_neutral.gif
;-) icon_wink.gif
^_^ icon_fun.gif
:?: icon_question.gif
:!: icon_exclaim.gif
LOL icon_lol.gif
FIXME fixme.gif
DELETEME delete.gif
#;&lt;P icon_kaddi.gif

6
conf/users.auth.dist Normal file
View File

@ -0,0 +1,6 @@
# Userfile
#
# Format:
#
# user:MD5password:Real Name:email:groups,comma,seperated

786
conf/wordblock.conf Normal file
View File

@ -0,0 +1,786 @@
https?://[^/]*s-e-x
https?://[^/]*-sex
https?://[^/]*zoofilia
https?://[^/]*xqit
https?://[^/]*ganzaoji
https?://[^/]*aotubang
https?://[^/]*aotebang
https?://[^/]*sonnerie
https?://[^/]*viagra
https?://[^/]*sexyongpin
https?://[^/]*grusskarte
https?://[^/]*geburtstagskarten
https?://[^/]*animalsex
https?://[^/]*sex-with
https?://[^/]*dogsex
https?://[^/]*adultchat
https?://[^/]*adultlive
https?://[^/]*adultsex
https?://[^/]*camsex
https?://[^/]*sexcam
https?://[^/]*livesex
https?://[^/]*sexchat
https?://[^/]*chatsex
https?://[^/]*onlinesex
https?://[^/]*adultporn
https?://[^/]*adultvideo
https?://[^/]*adultweb
https?://[^/]*hardcoresex
https?://[^/]*hardcoreporn
https?://[^/]*teenporn
https?://[^/]*xxxporn
https?://[^/]*lesbiansex
https?://[^/]*livegirl
https?://[^/]*livenude
https?://[^/]*livesex
https?://[^/]*livevideo
https?://[^/]*camgirl
https?://[^/]*spycam
https?://[^/]*voyeursex
https?://[^/]*nigritude
https?://[^/]*casino-online
https?://[^/]*online-casino
https?://[^/]*kontaktlinsen
https?://[^/]*cheapest-phone
https?://[^/]*laser-eye
https?://[^/]*eye-laser
https?://[^/]*fuelcellmarket
https?://[^/]*lasikclinic
https?://[^/]*cragrats-
https?://[^/]*cragratstraining
https?://[^/]*parishilton
https?://[^/]*paris-hilton
https?://[^/]*paris-tape
https?://[^/]*janet-jackson
https?://[^/]*sibel-kekilli
https?://[^/]*2large
https?://[^/]*oa274
https?://[^/]*-horoskop
https?://[^/]*latex-
https?://[^/]*fuel-dispenser
https?://[^/]*fueling-dispenser
https?://[^/]*515315\.
https?://[^/]*huojia
https?://[^/]*1211234\.
https?://[^/]*jinxinghj
https?://[^/]*telematicsone
https?://[^/]*telematiksone
https?://[^/]*a-mortgage
https?://[^/]*1stop-
https?://[^/]*diamondabrasives
https?://[^/]*reuterbrook
https?://[^/]*sex-plugin
https?://[^/]*sex-zone
https?://[^/]*lazy-stars
https?://[^/]*eblja
https?://[^/]*ynkm-trip\.com
https?://[^/]*euyn\.com
https?://[^/]*e-fanyi\.com
https?://[^/]*huangshan\.com
https?://[^/]*hssight\.com
https?://[^/]*changyuansh\.com
https?://[^/]*ynsw\.com
https?://[^/]*datianmachine\.com
https?://[^/]*ad-ope\.com
https?://[^/]*ama-son\.com
https?://[^/]*microzovd\.com
https?://[^/]*-pics\.com
https?://[^/]*smut\.com
https?://[^/]*bulk-pics\.com
https?://[^/]*\.4t\.com
https?://[^/]*haugeprint\.co\.uk
https?://[^/]*logical-planet\.co\.uk
https?://[^/]*-luxuries\.co\.uk
https?://[^/]*playbest\.de
https?://[^/]*ja-ac\.com
https?://[^/]*attapulgite\.org
https?://[^/]*international-pharma\.com
https?://[^/]*51crab\.com
https?://[^/]*touchcn\.net
https?://[^/]*click\.com\.es
https?://[^/]*cmd365\.com
https?://[^/]*0086371\.com
https?://[^/]*sensmagnets\.com
https?://[^/]*cnliandong\.com
https?://[^/]*szsuun\.com
https?://[^/]*blueattain\.com
https?://[^/]*color4day\.com
https?://[^/]*rorta\.com
https?://[^/]*worldinternational\.co\.uk
https?://[^/]*abiao\.name
https?://[^/]*0030\.net
https?://[^/]*aaff\.net
https?://[^/]*aagg\.net
https?://[^/]*atb\.name
https?://[^/]*attapulgite\.com
https?://[^/]*yucaibooks\.com
https?://[^/]*bjicp\.net
https?://[^/]*[0-9]+epson\.com
https?://[^/]*newboyu\.com
https?://[^/]*[0-9]+books\.com
https?://[^/]*digital-projector\.net
https?://[^/]*ponytest\.com
https?://[^/]*[0-9]+flower\.com
https?://[^/]*11126\.com
https?://[^/]*nbflashlights\.com
https?://[^/]*-bidet\.com
https?://[^/]*google163\.net
https?://[^/]*geciwu\.com
https?://[^/]*enjoyguilin\.com
https?://[^/]*burningcar\.net
https?://[^/]*life-insurance-company\.biz
https?://[^/]*casino-site\.biz
https?://[^/]*csetouch\.com
https?://[^/]*lvhang\.com
https?://[^/]*cnttec\.com
https?://[^/]*sinosyn\.com
https?://[^/]*8555\.net
https?://[^/]*black-eyes\.net
https?://[^/]*86ieta\.com
https?://[^/]*bjyiwang\.com
https?://[^/]*reputek\.com
https?://[^/]*autumncom\.com
https?://[^/]*sun-sand-sea\.com
https?://[^/]*jiatugz\.com
https?://[^/]*chenguang-cn\.com
https?://[^/]*shangguanhong\.com
https?://[^/]*payono\.com
https?://[^/]*anttm\.com
https?://[^/]*sharella\.com
https?://[^/]*8959\.com
https?://[^/]*yesmeaning\.com
https?://[^/]*bj-dzjp\.com
https?://[^/]*cn-fireplace\.com
https?://[^/]*si-bay\.com
https?://[^/]*overseas-edu\.com
https?://[^/]*iron-world\.com
https?://[^/]*cnyunge\.com
https?://[^/]*cnwinch\.com
https?://[^/]*rongpeng\.com
https?://[^/]*pasco-stationery\.com
https?://[^/]*accessories-car\.com
https?://[^/]*chinese-suppliers\.com
https?://[^/]*chinalifting\.com
https?://[^/]*blogletters\.com
https?://[^/]*shop\.tc
https?://[^/]*uvinewine\.co\.uk
https?://[^/]*couponmountain\.com
https?://[^/]*hukuki\.net
https?://[^/]*gift800\.net
https?://[^/]*mmyou\.com
https?://[^/]*chinamimi\.net
https?://[^/]*7csun\.com
https?://[^/]*fimdainternet\.com\.br
https?://[^/]*allwoodoxford\.com
https?://[^/]*cornishholidaysuk\.com
https?://[^/]*169xp.com
https?://[^/]*silberhochzeit\.de\.nr
https?://[^/]*-diaeten\.de\.vu
https?://[^/]*-testen\.de\.ms
https?://[^/]*malvorlagen\.de\.ms
https?://[^/]*-kochrezepte\.de\.vu
https?://[^/]*abnehmen\.freeweb-hosting\.com
https?://[^/]*hintergrundbilder\.us\.ms
https?://[^/]*waycn\.com
https?://[^/]*dealcn\.com
https?://[^/]*artsdeal\.com
https?://[^/]*stonedeal\.com
https?://[^/]*decorationsexport\.com
https?://[^/]*nikeproduct\.com
https?://[^/]*shoesbuynow\.com
https?://[^/]*seekcn\.net
https?://[^/]*tupianwu\.com
https?://[^/]*ling8\.com
https?://[^/]*ok8\.org
https?://[^/]*dirhot\.com
https?://[^/]*kan365\.com
https?://[^/]*yuding\.org
https?://[^/]*sex-fu\.com
https?://[^/]*geneostar\.com
https?://[^/]*princess-mononoke\.com
https?://[^/]*girlza\.com
https?://[^/]*a--e\.com
https?://[^/]*445566\.com
https?://[^/]*card-lottery\.org
https?://[^/]*nikeshoesshop\.com
https?://[^/]*nikesupplier\.com
https?://[^/]*top-point\.net
https?://[^/]*ukex\.net
https?://[^/]*yedian\.com
https?://[^/]*contake\.com
https?://[^/]*ulcer\.by\.ru
https?://[^/]*ulcer\.ws
https?://[^/]*loverussianwife\.com
https?://[^/]*gt-lite\.com
https?://[^/]*flowerwish\.com
https?://[^/]*sec-battery\.co\.uk
https?://[^/]*-hire\.co\.uk
https?://[^/]*tcom-control\.co\.uk
https?://[^/]*parkersexecutivecar\.co\.uk
https?://[^/]*beaumont-bar\.co\.uk
https?://[^/]*owaceilings\.co\.uk
https?://[^/]*jgc-network\.co\.uk
https?://[^/]*execsoft-software\.co\.uk
https?://[^/]*bodet-clocks\.co\.uk
https?://[^/]*buzz-hotels\.co\.uk
https?://[^/]*longcrossgroup\.co\.uk
https?://[^/]*reuterbrook\.co\.uk
https?://[^/]*pantandsocks\.co\.uk
https?://[^/]*bjrealcolor\.com
https?://[^/]*efuchina\.com
https?://[^/]*21cnmanager\.com
https?://[^/]*xunte\.com
https?://[^/]*aclas\.com
https?://[^/]*radi-instrument\.com
https?://[^/]*wbzj\.com
https?://[^/]*marketingbetter\.com
https?://[^/]*51\.net
https?://[^/]*topcel-battery\.com
https?://[^/]*23mr\.com
https?://[^/]*bennettchina\.com
https?://[^/]*luckyarn\.com
https?://[^/]*shgoto\.com
https?://[^/]*battery-oem\.com
https?://[^/]*shgoto\.com
https?://[^/]*kingview\.com
https?://[^/]*hlhologram\.com
https?://[^/]*haiz\.com
https?://[^/]*jiasongmachine\.com
https?://[^/]*fiporter\.com
https?://[^/]*brightking\.com
https?://[^/]*lily-bearing\.com
https?://[^/]*waysvalves\.com
https?://[^/]*hy-chem\.net
https?://[^/]*58447575\.com
https?://[^/]*v2tech\.com
https?://[^/]*pumpvalveworld\.com
https?://[^/]*flashfun\.com
https?://[^/]*eastdb\.com
https?://[^/]*[0-9]+fang\.com
https?://[^/]*\.omnia\.co\.uk
https?://[^/]*shopper-jobs\.us
https?://[^/]*-outlet\.de
https?://[^/]*-spiele\.de
https?://[^/]*-kaufen\.de
https?://[^/]*-partner\.nl
https?://[^/]*-partner\.de
https?://[^/]*-partner\.se
https?://[^/]*bjedin\.com
https?://[^/]*vivaful\.com
https?://[^/]*googlead\.com
https?://[^/]*21cnbj\.com
https?://[^/]*packmc\.com
https?://[^/]*dnsvhost\.com
https?://[^/]*2kdata\.com
https?://[^/]*raiddata\.com
https?://[^/]*nactech\.com
https?://[^/]*markemiah\.com
https?://[^/]*jobbnu\.com
https?://[^/]*ifamen\.com
https?://[^/]*hrbyly\.com
https?://[^/]*firmasiden\.com
https?://[^/]*bpzj\.com
https?://[^/]*bnuteacher\.com
https?://[^/]*datasoon\.com
https?://[^/]*butianshi\.com
https?://[^/]*iqwork\.com
https?://[^/]*uswebdata\.com
https?://[^/]*bnuol\.com
https?://[^/]*hddata\.com
https?://[^/]*by-and-by\.com
https?://[^/]*egyway\.com
https?://[^/]*xxx\.biz
https?://[^/]*-reservations\.biz
https?://[^/]*bucuo\.net
https?://[^/]*-china\.com
https?://[^/]*cqhyjx\.com
https?://[^/]*qjfy\.com
https?://[^/]*guilintour\.net
https?://[^/]*56114\.net
https?://[^/]*360e\.net
https?://[^/]*chinajack\.com
https?://[^/]*17178\.com
https?://[^/]*jiefo\.com
https?://[^/]*web136\.net
https?://[^/]*hyey\.com
https?://[^/]*china-crestron\.com
https?://[^/]*fif-relay\.com
https?://[^/]*power-steering-pump\.com
https?://[^/]*xiaogang\.com
https?://[^/]*happysport\.com
https?://[^/]*cn006\.com
https?://[^/]*web136\.net
https?://[^/]*ittea\.net
https?://[^/]*mysunmun\.com
https?://[^/]*luck-star\.com
https?://[^/]*hailuo\.net
https?://[^/]*jnjlnet\.com
https?://[^/]*.sx98\.com
https?://[^/]*21cnbj\.com
https?://[^/]*cnsepm\.com
https?://[^/]*pdjt\.com
https?://[^/]*hjbt\.com
https?://[^/]*jsags\.com
https?://[^/]*bzsf\.com
https?://[^/]*cn-mzc\.com
https?://[^/]*yi-tong\.com
https?://[^/]*runtudyes\.com
https?://[^/]*cghyjx\.com
https?://[^/]*hegao\.com
https?://[^/]*star-machinery\.net
https?://[^/]*jitianmachine\.com
https?://[^/]*fultrust\.com
https?://[^/]*wx-e\.com
https?://[^/]*nahoku\.com
https?://[^/]*blogeasy\.com
https?://[^/]*paidsurveysforall\.com
https?://[^/]*isourceindia\.com
https?://[^/]*thuriam\.com
https?://[^/]*swellongtools\.com
https?://[^/]*tlup\.com
https?://[^/]*szhicom\.net
https?://[^/]*inflatables-china\.com
https?://[^/]*yourgoogle\.com
https?://[^/]*transcosmo\.com
https?://[^/]*ty9run\.com
https?://[^/]*ad-www\.com
https?://[^/]*10000s\.com
https?://[^/]*allwally.com
https?://[^/]*togoogle\.net
https?://[^/]*jiayinte\.com
https?://[^/]*pkuyy\.com
https?://[^/]*ebani\.com
https?://[^/]*52wenxue\.com
https?://[^/]*casino-online-on-line\.com
https?://[^/]*eczz\.com
https?://[^/]*211\.157\.35\.153
https?://[^/]*musica\.org\.es
https?://[^/]*y365\.com
https?://[^/]*99919\.com
https?://[^/]*-cam\.us
https?://[^/]*-cam-chat\.com
https?://[^/]*-chat-room\.us
https?://[^/]*-chat-live\.com
https?://[^/]*-chat-room\.com
https?://[^/]*-cams\.com
https?://[^/]*-amateur\.com
https?://[^/]*-webcams\.com
https?://[^/]*-show\.com
https?://[^/]*-cam\.com
https?://[^/]*-chat\.com
https?://[^/]*xyzdown\.com
https?://[^/]*boxget\.net
https?://[^/]*swan-storage\.com
https?://[^/]*china57\.com
https?://[^/]*touch168\.com
https?://[^/]*fly-sky\.com
https?://[^/]*ancientmoods\.com
https?://[^/]*zhanao\.com
https?://[^/]*easthome\.com
https?://[^/]*putixin\.com
https?://[^/]*d-secure\.com
https?://[^/]*dadaposter\.com
https?://[^/]*gongsizhuce\.com
https?://[^/]*huifu\.com
https?://[^/]*cnnttm\.com
https?://[^/]*soonlink\.net
https?://[^/]*cnbjflower\.com
https?://[^/]*huojia315\.com
https?://[^/]*sexeach\.com
https?://[^/]*branson-china\.com
https?://[^/]*lycos\.co\.uk/elo575
https?://[^/]*lycos\.es/migmigmig
https?://[^/]*lycos\.nl/pierre141
https?://[^/]*easyspace\.com/hkl
https?://[^/]*lj5\.net
https?://[^/]*beijingxinfa\.com
https?://[^/]*88888\.net
https?://[^/]*xzyrack\.com
https?://[^/]*sinrui\.com
https?://[^/]*bjjingtu\.com
https?://[^/]*dfrog\.be
https?://[^/]*-frauentag\.de\.sr
https?://[^/]*zonemu\.com
https?://[^/]*hot3smut\.com
https?://[^/]*bulk-pics\.com
https?://[^/]*strong-free-smut\.com
https?://[^/]*horny-photo-pics\.com
https?://[^/]*sex-plugins\.com
https?://[^/]*sex-plugin\.com
https?://[^/]*3sex-zone\.com
https?://[^/]*lazy-stars\.com
https?://[^/]*eblja\.com
https?://[^/]*sexy-eblja\.com
https?://[^/]*microzovd\.com
https?://[^/]*ama-son\.com
https?://[^/]*ad-ope\.com
https?://[^/]*lariska-porn\.com
https?://[^/]*brone-sex\.com
https?://[^/]*-topliste\.com
https?://[^/]*tintenpatronen\.tv
https?://[^/]*strapse\.tv
https?://[^/]*4t\.com
https?://[^/]*zhongzhibiotech\.com
https?://[^/]*creator-cg\.com
https?://[^/]*sfcomm\.com
https?://[^/]*telogis\.com
https?://[^/]*dnsasp\.com
https?://[^/]*100free\.com
https?://[^/]*sixmarklhc\.org
https?://[^/]*-casino-chips\.com
https?://[^/]*pv365\.com
https?://[^/]*365pv\.com
https?://[^/]*pump365\.com
https?://[^/]*valve365\.com
https?://[^/]*bengfawang\.com
https?://[^/]*magnus-automation\.com
https?://[^/]*thaistudy\.net
https?://[^/]*think-t\.com
https?://[^/]*newstyle-w\.com
https?://[^/]*writerlw\.com
https?://[^/]*ly-yufeng\.com
https?://[^/]*lnhbsb\.com
https?://[^/]*dfhb\.com
https?://[^/]*xinpushihua\.com
https?://[^/]*casters-net\.com
https?://[^/]*amwaypower\.com
https?://[^/]*vita-biotech\.com
https?://[^/]*google123\.net
https?://[^/]*900house\.com
https?://[^/]*globalfbc\.com
https?://[^/]*xiloo\.com
https?://[^/]*xagoogle\.com
https?://[^/]*518815\.com
https?://[^/]*dvdcn\.net
https?://[^/]*xiaji\.net
https?://[^/]*guilinhotel\.info
https?://[^/]*nanting\.com
https?://[^/]*news123\.org
https?://[^/]*midiwu\.com
https?://[^/]*huola\.com
https?://[^/]*bjhsdx\.com
https?://[^/]*51zhengxing\.net
https?://[^/]*dongdao\.net
https?://[^/]*0090\.net
https?://[^/]*kredit-magazin\.com
https?://[^/]*dprktime\.com
https?://[^/]*lookupcars\.co\.uk
https?://[^/]*china2house\.com
https?://[^/]*buch5\.com
https?://[^/]*-watch-china\.org
https?://[^/]*dacash\.com
https?://[^/]*omeida\.com
https?://[^/]*ck100\.com
https?://[^/]*huihualin\.com
https?://[^/]*chindata\.com
https?://[^/]*tonzh\.com
https?://[^/]*51zhengxing\.net
https?://[^/]*raise-win\.com
https?://[^/]*approachina\.com
https?://[^/]*bjacca\.com
https?://[^/]*tmrr\.com
https?://[^/]*1annonce\.com
https?://[^/]*sunstar\.ws
https?://[^/]*cock\.ws
https?://[^/]*adp6\.co\.uk
https?://[^/]*0020\.net
https?://[^/]*5778\.com
https?://[^/]*gatewaytotheorient\.com
https?://[^/]*domesticgear\.com
https?://[^/]*aajj\.net
https?://[^/]*aauu\.net
https?://[^/]*kykdz\.com
https?://[^/]*china-crawfish\.com
https?://[^/]*in-net\.ws
https?://[^/]*yahoo\.com/a1likostar
https?://[^/]*yahoo\.com/a0cany_2004
https?://[^/]*yahoo\.com/a00poleroid
https?://[^/]*yahoo\.com/a00asaz
https?://[^/]*yahoo\.com/a0_00leksa
https?://[^/]*yahoo\.com/stoons_cartoon
https?://[^/]*yahoo\.com/skystarpilot
https?://[^/]*yahoo\.com/klirinc
https?://[^/]*yahoo\.com/fhkdfohjdfhk
https?://[^/]*yahoo\.com/freekeramika
https?://[^/]*yahoo\.com/aikishot
https?://[^/]*les-mas-de-provence\.com
https?://[^/]*mp3prof\.com
https?://[^/]*fullhentaimovies\.net
https?://[^/]*-hentai\.net
https?://[^/]*tartkartong\.com
https?://[^/]*-cartoon\.com
https?://[^/]*macdostu\.com
https?://[^/]*disney-toons\.com
https?://[^/]*cn4e\.com
https?://[^/]*hzsaite\.com
https?://[^/]*shjiajiao\.com
https?://[^/]*myetang\.com
https?://[^/]*locloso\.com
https?://[^/]*bzzt\.net
https?://[^/]*zoosex\.net
https?://[^/]*fuck\.org
https?://[^/]*knasweb\.se
https?://[^/]*marnkad\.nu
https?://[^/]*84g\.com
https?://[^/]*4acn\.com
https?://[^/]*in-sexstory\.com
https?://[^/]*pics69\.com
https?://[^/]*rp-story\.com
https?://[^/]*-preisvergleich\.de
https?://[^/]*price-comparison\.com
https?://[^/]*cupfart\.net
https?://[^/]*categoryshop\.com
https?://[^/]*rake-back\.com
https?://[^/]*clubducati\.com
https?://[^/]*virgoans\.co\.uk
https?://[^/]*grandads\.co\.uk
https?://[^/]*5p\.org\.uk
https?://[^/]*4mg\.com
https?://[^/]*noisybrain\.tv
https?://[^/]*3xx\.org
https?://[^/]*baby-sleep\.us
https?://[^/]*eq-1\.usrecipes
https?://[^/]*online-web-detective\.com
https?://[^/]*pop-the-question\.us
https?://[^/]*gooddy-images\.com
https?://[^/]*catering\.better-living\.us
https?://[^/]*ultrawiredsex\.com
https?://[^/]*apache-stuff\.com
https?://[^/]*css-stuff\.com
https?://[^/]*pythoninfo\.com
https?://[^/]*thehun\.net
https?://[^/]*ushummingbirds
https?://[^/]*usfederal-firearms-license
https?://[^/]*black-sex-teen\.com
https?://[^/]*wislearn\.tv
https?://[^/]*popkalaset\.nu
https?://[^/]*tgpoverdose\.com
https?://[^/]*porrposten\.com
https?://[^/]*helena\.lindskog\.ws
https?://[^/]*vscorp\.com
https?://[^/]*realestatecds\.com
https?://[^/]*letscompareit\.com
https?://[^/]*archive4mail\.com
https?://[^/]*funeral-planning\.us
https?://[^/]*spytek\.tv
https?://[^/]*annonsplatsen\.nu
https?://[^/]*internet-world\.nu
https?://[^/]*de-lete\.tv
https?://[^/]*puttel\.com
https?://[^/]*vastra\.nu
https?://[^/]*quality\.nu
https?://[^/]*nudotnetguy
https?://[^/]*save-money\.ws
https?://[^/]*brig\.nu
https?://[^/]*helena\.lindskog\.ws
https?://[^/]*pics-of\.com
https?://[^/]*pics-of\.org
https?://[^/]*pictures-free\.org
https?://[^/]*wic\.nu
https?://[^/]*xvil\.tv
https?://[^/]*vetskapskoltema\.nu
https?://[^/]*mauraders\.nu
https?://[^/]*usstop-your-divorce
https?://[^/]*etrafik\.com
https?://[^/]*everythingonweb\.net
https?://[^/]*a-z-how-to\.us
https?://[^/]*day0\.comcatch-a-cheat
https?://[^/]*states\.hostrocket\.com
https?://[^/]*sew-roman-shades\.com
https?://[^/]*medica-center\.com
https?://[^/]*google8\.net
https?://[^/]*websitedesigningpromotion\.com
https?://[^/]*bahraichfun\.com
https?://[^/]*thewebbrains\.com
https?://[^/]*overseaspharmacy\.com
https?://[^/]*biztravels\.com
https?://[^/]*ceramic-mugs\.com
https?://[^/]*governmentgrants-us\.com
https?://[^/]*justsweatshirts\.com
https?://[^/]*tmlawoffices\.com
https?://[^/]*gccgle\.com
https?://[^/]*lingeriesex\.org
https?://[^/]*monolove\.org
https?://[^/]*sweetadultpics\.com
https?://[^/]*pansat2300\.com
https?://[^/]*dvbcardgroup\.com
https?://[^/]*bsdseek\.com
https?://[^/]*flashworm\.com
https?://[^/]*kkktv\.com
https?://[^/]*qqbug\.com
https?://[^/]*drusearch\.com
https?://[^/]*gopages\.net
https?://[^/]*pornxxxsearch\.com
https?://[^/]*divaporn\.com
https?://[^/]*virginsplanet\.com
https?://[^/]*porn\.com
https?://[^/]*porn\.biz
https?://[^/]*porn\.us
https?://[^/]*realyoungboy\.com
https?://[^/]*olderlady\.net
https?://[^/]*dominatrix-domination\.com
https?://[^/]*mailorder-steroids\.com
https?://[^/]*contactlensesprice\.com
https?://[^/]*merkey\.net
https?://[^/]*countrycheck\.com
https?://[^/]*xmyyz\.com
https?://[^/]*lct3000\.com
https?://[^/]*wuyue\.cn
https?://[^/]*curtainnet\.com
https?://[^/]*fabric-fur
https?://[^/]*insect-china\.com
https?://[^/]*adanov\.com
https?://[^/]*mdpub\.com
https?://[^/]*swing-in-golf\.com
https?://[^/]*golf-slice\.com
https?://[^/]*help-tip\.com
https?://[^/]*sanya-window\.net
https?://[^/]*go\.nease\.net
https?://[^/]*timescooter\.com
https?://[^/]*sbt-scooter\.com
https?://[^/]*dlctc\.com
https?://[^/]*com\.cn
https?://[^/]*sh\.cn
https?://[^/]*frhpcn\.com
https?://[^/]*zzwz\.net
https?://[^/]*ktawebdesign\.com
https?://[^/]*freewebpage\.org
https?://[^/]*webtechin\.com
https?://[^/]*tpmschina\.com
https?://[^/]*sandwiki\.com
https?://[^/]*vonagediscount\.com
https?://[^/]*qinbo\.com
https?://[^/]*online-poker\.com
https?://[^/]*tveasy\.co\.uk
https?://[^/]*easyinkz\.co\.uk
https?://[^/]*diet-program\.com
https?://[^/]*debt-relief\.com
https?://[^/]*gargin\.com
https?://[^/]*doorhangers\.com
https?://[^/]*outer-court\.com
https?://[^/]*hostgold\.com\.br
https?://[^/]*yolanda3\.dynalias\.org
https?://[^/]*71space\.com
https?://[^/]*71space\.net
https?://[^/]*greensalmon\.co\.uk
https?://[^/]*creditcards\.com
https?://[^/]*ink-cartridges\.com
https?://[^/]*internet-dial-up\.com
https?://[^/]*1stop-mens-magazines\.com
https?://[^/]*1stop-penguins\.com
https?://[^/]*1stop
https?://[^/]*casinowatchdogs\.com
https?://[^/]*gamblingmethods\.com
https?://[^/]*bslh\.net
https?://[^/]*trainque\.com
https?://[^/]*infoweb\.co\.nz
https?://[^/]*newmediadesigns\.co\.uk
https?://[^/]*neue\.co\.uk
https?://[^/]*aarrss\.com
https?://[^/]*wowfactor\.co\.uk
https?://[^/]*123mortgagecentre\.co\.uk
https?://[^/]*yorkshireradiatorcovers\.co\.uk
https?://[^/]*manways\.co\.uk
https?://[^/]*jacksontextiles\.co\.uk
https?://[^/]*sicl\.co\.uk
https?://[^/]*tsbooker\.co\.uk
https?://[^/]*abmdot\.com
https?://[^/]*summitconsultants\.co\.uk
https?://[^/]*pollutionprevention\.co\.uk
https?://[^/]*willowtechnology\.com
https?://[^/]*crashjobs\.com
https?://[^/]*googlefans\.cn
https?://[^/]*hsbaoli\.net
https?://[^/]*cnnttm\.com
https?://[^/]*webrank\.cn
https?://[^/]*xrio\.com
https?://[^/]*in-quito\.com
https?://[^/]*onlyher\.net
https?://[^/]*honourable\.net
https?://[^/]*inkhouse\.com\.au
https?://[^/]*mlapower\.com\.au
https?://[^/]*messagesonhold\.com\.au
https?://[^/]*eurogem\.com\.au
https?://[^/]*printerking\.com\.au
https?://[^/]*babyoliverboutique\.com
https?://[^/]*tuttibella\.com
https?://[^/]*ccc-cn\.org
https?://[^/]*hostmerit\.com
https?://[^/]*lj8\.net
https?://[^/]*myrice\.com
https?://[^/]*webcam\.ws
https?://[^/]*mba8\.com
https?://[^/]*d9d\.net
https?://[^/]*vipwww\.com
https?://[^/]*agreatserver\.com
https?://[^/]*angelfire\.com
https?://[^/]*hostrocket\.com
https?://[^/]*51asa\.com
https?://[^/]*finetisp\.com
https?://[^/]*finet\.net\.cn
https?://[^/]*knowsky\.com
https?://[^/]*pikou\.com
https?://[^/]*searcher\.cn
https?://[^/]*sooyi\.com
https?://[^/]*hion\.cn
https?://[^/]*idchinese\.com
https?://[^/]*garment-china\.com
https?://[^/]*huakeclean\.com
https?://[^/]*chinafuturesound\.com
https?://[^/]*nice-beauty\.com
https?://[^/]*well-neng\.com
https?://[^/]*shengdagaoke\.com
https?://[^/]*china-maowang\.com
https?://[^/]*coverer\.com
https?://[^/]*witze\.eu\.com
https?://[^/]*99986\.com
https?://[^/]*148-law\.com
https?://[^/]*zt148\.com
https?://[^/]*bj-sd\.com
https?://[^/]*cstarcom\.com
https?://[^/]*fashuo300\.com
https?://[^/]*rampoint\.com
https?://[^/]*kangxin\.com
https?://[^/]*bjkhp\.com
https?://[^/]*sanyastar\.com
https?://[^/]*hisensors\.com
https?://[^/]*chinahr\.com
https?://[^/]*bjzufang\.com
https?://[^/]*ccxx\.net
https?://[^/]*dstmedia\.com
https?://[^/]*gyhx\.com
https?://[^/]*bbell\.com
https?://[^/]*cambridge-group\.org
https?://[^/]*glory-vision\.com
https?://[^/]*bjerwai\.com
https?://[^/]*melucky\.com
https?://[^/]*peak-e\.com
https?://[^/]*gotooa\.com
https?://[^/]*211\.157\.35\.153
https?://[^/]*cfeenet\.com
https?://[^/]*tsinghua\.edu\.cn
https?://[^/]*longsuncard\.com
https?://[^/]*ychzn\.com
https?://[^/]*sxcoal\.com
https?://[^/]*join-2008\.com
https?://[^/]*multivision\.com\.hk
https?://[^/]*creativewatch\.cn
https?://[^/]*googlepromotion\.com
https?://[^/]*gogoogle\.net
https?://[^/]*watch-china\.org
https?://[^/]*usedpchub\.com
https?://[^/]*sonnerie\.net
https?://[^/]*tonportable\.com
https?://[^/]*buup114\.net
https?://[^/]*aotubangshi\.com
https?://[^/]*dlctc\.com
https?://[^/]*hion\.cn
https?://[^/]*now8\.org
https?://[^/]*searcher\.cn
https?://[^/]*51asa\.com
https?://[^/]*chinafuturesound\.com
https?://[^/]*catsky\.com
https?://[^/]*dhxy\.net
https?://[^/]*diylabel\.com
https?://[^/]*zappmedia\.de
https?://[^/]*cashmerebiz\.com

2
data/.htaccess Normal file
View File

@ -0,0 +1,2 @@
order allow,deny
deny from all

161
doku.php Normal file
View File

@ -0,0 +1,161 @@
<?php
define('DOKUWIKIVERSION','2004-01-12');
ini_set('short_open_tag',"1");
require_once("conf/dokuwiki.php");
require_once("inc/common.php");
require_once("inc/html.php");
require_once("inc/parser.php");
require_once("lang/en/lang.php");
require_once("lang/".$conf['lang']."/lang.php");
setCorrectLocale();
require_once("inc/auth.php");
//import variables
$QUERY = trim($_REQUEST['id']);
$ID = cleanID($_REQUEST['id']);
$REV = $_REQUEST['rev'];
$ACT = $_REQUEST['do'];
$IDX = $_REQUEST['idx'];
$DATE = $_REQUEST['date'];
$RANGE = $_REQUEST['lines'];
$HIGH = $_REQUEST['s'];
if(empty($HIGH)) $HIGH = getGoogleQuery();
$TEXT = cleanText($_POST['wikitext']);
$PRE = cleanText($_POST['prefix']);
$SUF = cleanText($_POST['suffix']);
$SUM = $_REQUEST['summary'];
//we accept the do param as HTTP header, too:
if(!empty($_SERVER['HTTP_X_DOKUWIKI_DO'])){
$ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
}
if(!empty($IDX)) $ACT='index';
//set defaults
if(empty($ID)) $ID = $conf['start'];
if(empty($ACT)) $ACT = 'show';
header('Content-Type: text/html; charset='.$lang['encoding']);
if($ACT == 'debug'){
html_debug();
exit;
}
//already logged in?
if($_SERVER['REMOTE_USER'] && $ACT=='login') $ACT='show';
//handle logout
if($ACT=='logout'){
auth_logoff();
$ACT='login';
}
//handle register
if($ACT=='register' && register()){
$ACT='login';
}
//do saving after spam- and conflictcheck
if($ACT == $lang['btn_save'] && auth_quickaclcheck($ID)){
if(checkwordblock()){
//spam detected
$ACT = 'wordblock';
}elseif($DATE != 0 && @filemtime(wikiFN($ID)) > $DATE ){
//newer version available -> ask what to do
$ACT = 'conflict';
}else{
//save it
saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM); //use pretty mode for con
//unlock it
unlock($id);
//show it
header("Location: ".wl($ID, '','doku.php',true));
exit();
}
}
//make infos about current page available
$INFO = pageinfo();
//Editing: check if locked by anyone - if not lock for my self
if(($ACT == 'edit' || $ACT == $lang['btn_preview'])){# && $INFO['editable']){
$lockedby = checklock($ID);
if($lockedby){
$ACT = 'locked';
}else{
lock($ID);
}
}else{
//try to unlock
unlock($ID);
}
//display some infos
if($ACT == 'check'){
check();
$ACT = 'show';
}
//check which permission is needed
if(in_array($ACT,array('preview','wordblock','conflict','lockedby'))){
if($INFO['exists']){
$permneed = AUTH_EDIT;
}else{
$permneed = AUTH_CREATE;
}
}elseif(in_array($ACT,array('revisions','show','edit'))){
$permneed = AUTH_READ;
}else{
$permneed = AUTH_NONE;
}
//start output
if(substr($ACT,0,6) != 'export') html_header();
if(html_acl($permneed)){
if($ACT == 'edit'){
html_edit();
}elseif($ACT == $lang['btn_preview']){
html_edit($TEXT);
html_show($TEXT);
}elseif($ACT == 'wordblock'){
html_edit($TEXT,'wordblock');
}elseif($ACT == 'search' && !empty($QUERY)){
html_search();
}elseif($ACT == 'revisions'){
html_revisions();
}elseif($ACT == 'diff'){
html_diff();
}elseif($ACT == 'recent'){
html_recent();
}elseif($ACT == 'index'){
html_index($IDX);
}elseif($ACT == 'backlink'){
html_backlinks();
}elseif($ACT == 'conflict'){
html_conflict(con($PRE,$TEXT,$SUF),$SUM);
html_diff(con($PRE,$TEXT,$SUF),false);
}elseif($ACT == 'locked'){
html_locked($lockedby);
}elseif($ACT == 'login'){
html_login();
}elseif($ACT == 'register' && $conf['openregister']){
html_register();
}elseif($ACT == 'export_html'){
html_head();
print "<body>\n";
print parsedWiki($ID,$REV,false);
print "</body>\n</html>\n";
}elseif($ACT == 'export_raw'){
header("Content-Type: text/plain");
print rawWiki($ID,$REV);
}else{
$ACT='show';
html_show();
}
}
if(substr($ACT,0,6) != 'export') html_footer();
?>

65
feed.css Normal file
View File

@ -0,0 +1,65 @@
rss channel, feed, RDF {
font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
background-color: White;
color: Black;
margin: 0;
padding: 0;
}
link, description, language, managingEditor, copyright, lastBuildDate, date,
pubDate, generator, webMaster, ttl, docs, tagline, author, copyright,
generator, content, created, issued, modified, subject, id, format, creator,
category {
display: none;
}
item link, entry id {
display: block;
background: transparent url(images/link_icon.gif) 0px 1px no-repeat;
padding: 1px 0px 1px 16px;
color:#436976;
text-decoration:underline;
}
channel title, feed title {
display: block;
font-size:200%;
font-weight:bolder;
color:#436976;
text-decoration:none;
border-bottom: 20px solid #dee7ec;
}
:root:before, :root:before {
content: "This data file is meant to be read in a XML feed reader. See document source."
}
item, entry {
display: block;
margin: 1em 180px 1em 1em;
border-bottom: 1px solid #8cacbb;
padding-bottom: 1em;
}
item title, entry title {
display: block;
background: transparent none;
border: 0px solid #ffffff;
padding: 0;
color: #222;
font-size: 1.4em;
font-weight: bold;
}
item pubDate, entry modified, item date {
display: inline;
color: #AAA;
font: 1em trebuchet ms, arial, helvetica, sans-serif;
}
item description, entry summary {
display: block;
clear: both;
padding-top: 0.5em;
}

121
feed.php Normal file
View File

@ -0,0 +1,121 @@
<?php
ini_set('short_open_tag',"1");
require_once("inc/common.php");
require_once("inc/parser.php");
require_once("inc/feedcreator.class.php");
require_once("inc/auth.php");
//set auth header for login
if($_REQUEST['login'] && !isset($_SERVER['PHP_AUTH_USER'])){
header('WWW-Authenticate: Basic realm="'.$conf['title'].'"');
header('HTTP/1.0 401 Unauthorized');
auth_logoff();
}
$num = $_REQUEST['num'];
$type = $_REQUEST['type'];
$mode = $_REQUEST['mode'];
$ns = $_REQUEST['ns'];
switch ($type){
case 'rss':
$type = 'RSS0.9';
break;
case 'rss2':
$type = 'RSS2.0';
break;
case 'atom':
$type = 'ATOM0.3';
break;
default:
$type = 'RSS1.0';
}
//some defaults for the feed
$CACHEGROUP = 'feed';
$conf['typography'] = false;
$conf['canonical'] = true;
$parser['toc'] = false;
$rss = new UniversalFeedCreator();
$rss = new DokuWikiFeedCreator();
$rss->title = $conf['title'];
$rss->link = wl();
$rss->syndicationURL = getBaseURL().'/feed.php';
$rss->cssStyleSheet = getBaseURL().'/feed.css';
if($mode == 'list'){
rssListNamespace($rss,$ns);
}else{
rssRecentChanges($rss,$num);
}
header('Content-Type: application/xml; charset='.$lang['encoding']);
print $rss->createFeed($type,$lang['encoding']);
/* some functions */
function rssRecentChanges(&$rss,$num){
$recents = getRecents($num);
foreach(array_keys($recents) as $id){
$desc = cleanDesc(parsedWiki($id));
if(!empty($recents[$id]['sum'])){
$desc = '['.strip_tags($recents[$id]['sum']).'] '.$desc;
}
$item = new FeedItem();
$item->title = $id;
$item->link = wl($id,'rev='.$recents[$id]['date']);
$item->description = $desc;
$item->date = date('r',$recents[$id]['date']);
if(strpos($id,':')!==false){
$item->category = substr($id,0,strrpos($id,':'));
}
if($recents[$id]['user']){
$item->author = $recents[$id]['user'].'@';
}else{
$item->author = 'anonymous@';
}
$item->author .= $recents[$id]['ip'];
$rss->addItem($item);
}
}
function rssListNamespace(&$rss,$ns){
require_once("inc/search.php");
global $conf;
$ns=':'.cleanID($ns);
$ns=str_replace(':','/',$ns);
$data = array();
sort($data);
search($data,$conf['datadir'],'search_list','',$ns);
foreach($data as $row){
$id = $row['id'];
$date = filemtime(wikiFN($id));
$desc = cleanDesc(parsedWiki($id));
$item = new FeedItem();
$item->title = $id;
$item->link = wl($id,'rev='.$date);
$item->description = $desc;
$item->date = date('r',$date);
$rss->addItem($item);
}
}
function cleanDesc($desc){
//remove TOC
$desc = strip_tags($desc);
$desc = preg_replace('/[\n\r\t]/',' ',$desc);
$desc = preg_replace('/ /',' ',$desc);
$desc = substr($desc,0,250);
$desc = $desc.'...';
return $desc;
}
?>

BIN
images/blank.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 B

BIN
images/bold.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
images/bullet.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 B

BIN
images/button-cc.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/button-css.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

BIN
images/button-donate.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

BIN
images/button-dw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

BIN
images/button-php.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

BIN
images/button-rss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

BIN
images/button-xhtml.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

BIN
images/code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

BIN
images/empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
images/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

BIN
images/extlink.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

BIN
images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
images/fonth1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

BIN
images/fonth2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

BIN
images/fonth3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

BIN
images/fonth4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

BIN
images/fonth5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

BIN
images/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

BIN
images/info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

BIN
images/interwiki.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

BIN
images/italic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

BIN
images/larger.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

BIN
images/link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

BIN
images/link_icon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

BIN
images/list.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
images/list_ul.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
images/mail_icon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

BIN
images/rule.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

BIN
images/sig.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

BIN
images/smaller.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

BIN
images/thumbup.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

BIN
images/tocdot2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

BIN
images/underline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

BIN
images/windows.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

1057
inc/DifferenceEngine.php Normal file

File diff suppressed because it is too large Load Diff

290
inc/auth.php Normal file
View File

@ -0,0 +1,290 @@
<?
require_once("inc/common.php");
require_once("inc/io.php");
# load the the auth functions
require_once('inc/auth_'.$conf['authtype'].'.php');
# some ACL level defines
define('AUTH_NONE',0);
define('AUTH_READ',1);
define('AUTH_EDIT',2);
define('AUTH_CREATE',4);
define('AUTH_UPLOAD',8);
define('AUTH_GRANT',255);
if($conf['useacl']){
auth_login($_REQUEST['u'],$_REQUEST['p']);
# load ACL into a global array
$AUTH_ACL = file('conf/acl.auth');
}
/**
* This tries to login the user based on the sent auth credentials
*
* The authentication works like this: if a username was given
* a new login is assumed and user/password are checked - if they
* are correct a random authtoken is created which is stored in
* the session _and_ in a cookie.
* The user stays logged in as long as the session and the cookie
* match. This still isn't the securest method but requires an
* attacker to steal an existing session _and_ the authtoken
* cookie. The actual password is only transfered once per login.
*
* On a successful login $_SERVER[REMOTE_USER] and $USERINFO
* are set.
*/
function auth_login($user,$pass){
global $USERINFO;
global $conf;
global $lang;
$cookie = $_COOKIE['AUTHTOKEN'];
$session = $_SESSION[$conf['title']]['authtoken'];
if(isset($user)){
if (auth_checkPass($user,$pass)){
//make username available as REMOTE_USER
$_SERVER['REMOTE_USER'] = $user;
//set global user info
$USERINFO = auth_getUserData($user);
//set authtoken
$token = md5(uniqid(rand(), true));
$_SESSION[$conf['title']]['user'] = $user;
$_SESSION[$conf['title']]['authtoken'] = $token;
setcookie('AUTHTOKEN', $token);
}else{
//invalid credentials - log off
msg($lang['badlogin'],-1);
auth_logoff();
}
}elseif(isset($cookie) && isset($session)){
if($cookie == $session){
//make username available as REMOTE_USER
$_SERVER['REMOTE_USER'] = $_SESSION[$conf['title']]['user'];
//set global user info
$USERINFO = auth_getUserData($_SERVER['REMOTE_USER']);
}else{
//bad token
auth_logoff();
}
}else{
//just to be sure
auth_logoff();
}
}
/**
* This clears all authenticationdata and thus log the user
* off
*/
function auth_logoff(){
global $conf;
global $USERINFO;
unset($_SESSION[$conf['title']]['authtoken']);
unset($_SESSION[$conf['title']]['user']);
unset($_SERVER['REMOTE_USER']);
$USERINFO=null;
}
/**
* Convinience function for auth_aclcheck
*/
function auth_quickaclcheck($id){
global $conf;
global $USERINFO;
# if no ACL is used always return upload rights
if(!$conf['useacl']) return AUTH_UPLOAD;
return auth_aclcheck($id,$_SERVER['REMOTE_USER'],$USERINFO['grps']);
}
/**
* Returns the maximum rights a user has for
* the given ID or its namespace
*/
function auth_aclcheck($id,$user,$groups){
global $conf;
global $AUTH_ACL;
# if no ACL is used always return upload rights
if(!$conf['useacl']) return AUTH_UPLOAD;
$ns = getNS($id);
$perm = -1;
if($user){
//prepend groups with @
for($i=0; $i<count($groups); $i++){
$groups[$i] = '@'.$groups[$i];
}
//add ALL group
$groups[] = '@ALL';
//add User
$groups[] = $user;
//build regexp
$regexp = join('|',$groups);
}else{
$regexp = '@ALL';
}
//check exact match first
$matches = preg_grep('/^'.$id.'\s+('.$regexp.')\s+/',$AUTH_ACL);
if(count($matches)){
foreach($matches as $match){
$match = preg_replace('/#.*$/','',$match); //ignore comments
$acl = preg_split('/\s+/',$match);
if($acl[2] > $perm){
$perm = $acl[2];
}
}
if($perm > -1){
//we had a match - return it
return $perm;
}
}
//still here? do the namespace checks
if($ns){
$path = $ns.':\*';
}else{
$path = '\*'; //root document
}
do{
$matches = preg_grep('/^'.$path.'\s+('.$regexp.')\s+/',$AUTH_ACL);
if(count($matches)){
foreach($matches as $match){
$match = preg_replace('/#.*$/','',$match); //ignore comments
$acl = preg_split('/\s+/',$match);
if($acl[2] > $perm){
$perm = $acl[2];
}
}
//we had a match - return it
return $perm;
}
//get next higher namespace
$ns = getNS($ns);
if($path != '\*'){
$path = $ns.':\*';
if($path == ':\*') $path = '\*';
}else{
//we did this already
//looks like there is something wrong with the ACL
//break here
return $perm;
}
}while(1); //this should never loop endless
}
/**
* Create a pronouncable password
*
* @see: http://www.phpbuilder.com/annotate/message.php3?id=1014451
*/
function auth_pwgen(){
$pw = '';
$c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones
$v = 'aeiou'; //vowels
$a = $c.$v; //both
//use two syllables...
for($i=0;$i < 2; $i++){
$pw .= $c[rand(0, strlen($c)-1)];
$pw .= $v[rand(0, strlen($v)-1)];
$pw .= $a[rand(0, strlen($a)-1)];
}
//... and add a nice number
$pw .= rand(10,99);
return $pw;
}
/**
* Sends a password to the given user
*
* returns true on success
*/
function auth_sendPassword($user,$password){
global $conf;
global $lang;
$users = auth_loadUserData();
$hdrs = '';
if(!$users[$user]['mail']) return false;
$text = rawLocale('password');
$text = str_replace('@DOKUWIKIURL@',getBaseURL(true),$text);
$text = str_replace('@FULLNAME@',$users[$user]['name'],$text);
$text = str_replace('@LOGIN@',$user,$text);
$text = str_replace('@PASSWORD@',$password,$text);
$text = str_replace('@TITLE@',$conf['title'],$text);
if (!empty($conf['mailfrom'])) {
$hdrs = 'From: '.$conf['mailfrom']."\n";
}
return @mail($users[$user]['mail'],$lang['regpwmail'],$text,$hdrs);
}
/**
* The new user registration - we get our info directly from
* $_POST
*
* It returns true on success and false on any error
*/
function register(){
global $lang;
global $conf;
if(!$_POST['save']) return false;
if(!$conf['openregister']) return false;
//clean username
$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);
$_POST['login'] = cleanID($_POST['login']);
//clean fullname and email
$_POST['fullname'] = trim(str_replace(':','',$_POST['fullname']));
$_POST['email'] = trim(str_replace(':','',$_POST['email']));
if( empty($_POST['login']) ||
empty($_POST['fullname']) ||
empty($_POST['email']) ){
msg($lang['regmissing'],-1);
return false;
}
//check mail
if(!isvalidemail($_POST['email'])){
msg($lang['regbadmail'],-1);
return false;
}
//okay try to create the user
$pass = auth_createUser($_POST['login'],$_POST['fullname'],$_POST['email']);
if(empty($pass)){
msg($lang['reguexists'],-1);
return false;
}
//send him the password
if (auth_sendPassword($_POST['login'],$pass)){
msg($lang['regsuccess'],1);
return true;
}else{
msg($lang['regmailfail'],-1);
return false;
}
}
/**
* Uses a regular expresion to check if a given mail address is valid
*
* @see http://www.webmasterworld.com/forum88/135.htm
*
* May not be completly RFC conform!
*/
function isvalidemail($email){
return eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email);
}
?>

137
inc/auth_ldap.php Normal file
View File

@ -0,0 +1,137 @@
<?php
/**
* This is used to authenticate against an LDAP server
*
* tested with openldap 2.x on Debian only
*
* PHPs LDAP extension is needed
*/
/**
* connects to the ldap server and holds the connection
* in global scope for multiple use
*/
function auth_ldap_connect(){
global $LDAP_CONNECTION;
global $conf;
$cnf = $conf['auth']['ldap'];
if(!$LDAP_CONNECTION){
$LDAP_CONNECTION = @ldap_connect($cnf['server']);
if(!$LDAP_CONNECTION){
msg("LDAP: couldn't connect to LDAP server",-1);
return false;
}
if($cnf['version']){
if(!@ldap_set_option($LDAP_CONNECTION,
LDAP_OPT_PROTOCOL_VERSION,
$cnf['version'])){
msg('Setting LDAP Protocol version '.$cnf['version'].' failed',-1);
}
}
}
return $LDAP_CONNECTION;
}
/**
* required auth function
*
* Checks if the given user exists and the given
* plaintext password is correct
*
* It does so by trying to connect to the LDAP server
*/
function auth_checkPass($user,$pass){
global $conf;
$cnf = $conf['auth']['ldap'];
//connect to LDAP Server
$conn = auth_ldap_connect();
if(!$conn) return false;
//get dn for given user
$info = auth_getUserData($user);
$dn = $info['dn'];
if(!$dn) return false;
//try to bind with dn
if(@ldap_bind($conn,$dn,$pass)){
return true;
}
return false;
}
/**
* Required auth function
*
* Returns info about the given user needs to contain
* at least these fields:
*
* name string full name of the user
* mail string email addres of the user
* grps array list of groups the user is in
*
* This LDAP specific function returns the following
* addional fields
*
* dn string distinguished name (DN)
* uid string Posix User ID
*/
function auth_getUserData($user){
global $conf;
$cnf = $conf['auth']['ldap'];
//connect to LDAP Server
$conn = auth_ldap_connect();
if(!$conn) return false;
//anonymous bind to lookup userdata
if(!@ldap_bind($conn)){
msg("LDAP: can not bind anonymously",-1);
return false;
}
//get info for given user
$filter = str_replace('%u',$user,$cnf['userfilter']);
$base = str_replace('%u',$user,$cnf['usertree']);
$sr = ldap_search($conn, $base, $filter);;
$result = ldap_get_entries($conn, $sr);
if($result['count'] != 1){
return false; //user not found
}
//general user info
$info['dn'] = $result[0]['dn'];
$info['mail']= $result[0]['mail'][0];
$info['name']= $result[0]['cn'][0];
$info['uid'] = $result[0]['uid'][0];
//primary group id
$gid = $result[0]['gidnumber'][0];
//get groups for given user
$filter = "(&(objectClass=posixGroup)(|(gidNumber=$gid)(memberUID=".$info['uid'].")))";
$sr = @ldap_search($conn, $cnf['grouptree'], $filter);
if(!$sr){
msg("LDAP: Reading group memberships failed",-1);
return false;
}
$result = ldap_get_entries($conn, $sr);
foreach($result as $grp){
if(!empty($grp['cn'][0]))
$info['grps'][] = $grp['cn'][0];
}
return $info;
}
/**
* Required auth function
*
* Not implemented
*/
function auth_createUser($user,$name,$mail){
msg("Sorry. Creating users is not supported by the LDAP backend",-1);
return null;
}
?>

98
inc/auth_mysql.php Normal file
View File

@ -0,0 +1,98 @@
<?php
/**
* This is used to authenticate against an MySQL server
*
* PHPs MySQL extension is needed
*/
/**
* Executes SQL statements and returns the results as list
* of hashes. Returns false on error. Returns auto_increment
* IDs on INSERT statements.
*/
function auth_mysql_runsql($sql_string) {
global $conf;
$cnf = $conf['auth']['mysql'];
$link = @mysql_connect ($cnf['server'], $cnf['user'], $cnf['password']);
if(!$link){
msg('MySQL: Connection to database failed!',-1);
return false;
}
$result = @mysql_db_query($cnf['database'],$sql_string,$link);
if(!$result){
msg('MySQL: '.mysql_error($link));
return false;
}
//mysql_db_query returns 1 on a insert statement -> no need to ask for results
if ($result != 1) {
for($i=0; $i< mysql_num_rows($result); $i++) {
$temparray = mysql_fetch_assoc($result);
$resultarray[]=$temparray;
}
mysql_free_result ($result);
}
if (mysql_insert_id($link)) {
$resultarray = mysql_insert_id($link); //give back ID on insert
}
mysql_close ($link);
return $resultarray;
}
/**
* required auth function
*
* Checks if a user with the given password exists
*/
function auth_checkPass($user,$pass){
global $conf;
$cnf = $conf['auth']['mysql'];
$sql = str_replace('%u',addslashes($user),$cnf['passcheck']);
$sql = str_replace('%p',addslashes($pass),$sql);
$result = auth_mysql_runsql($sql);
return(count($result));
}
/**
* Required auth function
*
* Returns info about the given user needs to contain
* at least these fields:
*
* name string full name of the user
* mail string email addres of the user
* grps array list of groups the user is in
*
*/
function auth_getUserData($user){
global $conf;
$cnf = $conf['auth']['mysql'];
$sql = str_replace('%u',addslashes($user),$cnf['userinfo']);
$result = auth_mysql_runsql($sql);
if(!count($result)) return false;
$info = $result[0];
$sql = str_replace('%u',addslashes($user),$cnf['groups']);
$result = auth_mysql_runsql($sql);
if(!count($result)) return false;
foreach($result as $row){
$info['grps'][] = $row['group'];
}
return $info;
}
/**
* Required auth function
*
* Not implemented
*/
function auth_createUser($user,$name,$mail){
msg("Sorry. Creating users is not supported by the MySQL backend, yet",-1);
return null;
}
?>

100
inc/auth_plain.php Normal file
View File

@ -0,0 +1,100 @@
<?php
/**
* If you want to authenticate against something
* else then the builtin flatfile auth system
* you have to reimplement the "required auth
* functions"
*/
/**
* required auth function
*
* Checks if the given user exists and the given
* plaintext password is correct
*/
function auth_checkPass($user,$pass){
$users = auth_loadUserData();
$pass = md5($pass); //encode pass
if($users[$user]['pass'] == $pass){
return true;
}else{
return false;
}
}
/**
* Required auth function
*
* Returns info about the given user needs to contain
* at least these fields:
*
* name string full name of the user
* mail string email addres of the user
* grps array list of groups the user is in
*/
function auth_getUserData($user){
$users = auth_loadUserData();
return $users[$user];
}
/**
* Required auth function
*
* Creates a new user.
*
* Returns false if the user already exists, null when an error
* occured and the cleartext password of the new user if
* everything went well.
*
* The new user HAS TO be added to the default group by this
* function!
*/
function auth_createUser($user,$name,$mail){
global $conf;
$users = auth_loadUserData();
if(isset($users[$user])) return false;
$pass = auth_pwgen();
$userline = join(':',array($user,
md5($pass),
$name,
$mail,
$conf['defaultgroup']));
$userline .= "\n";
$fh = fopen('conf/users.auth','a');
if($fh){
fwrite($fh,$userline);
fclose($fh);
return $pass;
}
msg('The users.auth file is not writable. Please inform the Wiki-Admin',-1);
return null;
}
/**
* used by the plaintext auth functions
* loads the user file into a datastructure
*/
function auth_loadUserData(){
$data = array();
$lines = file('conf/users.auth');
foreach($lines as $line){
$line = preg_replace('/#.*$/','',$line); //ignore comments
$line = trim($line);
if(empty($line)) continue;
$row = split(":",$line,5);
$groups = split(",",$row[4]);
$data[$row[0]]['pass'] = $row[1];
$data[$row[0]]['name'] = urldecode($row[2]);
$data[$row[0]]['mail'] = $row[3];
$data[$row[0]]['grps'] = $groups;
}
return $data;
}
?>

831
inc/common.php Normal file
View File

@ -0,0 +1,831 @@
<?
require_once("conf/dokuwiki.php");
require_once("inc/io.php");
//set up error reporting to sane values
error_reporting(E_ALL ^ E_NOTICE);
//make session rewrites XHTML compliant
ini_set('arg_separator.output', '&amp;');
//init session
session_name("DokuWiki");
session_start();
//kill magic quotes
if (get_magic_quotes_gpc()) {
if (!empty($_GET)) remove_magic_quotes($_GET);
if (!empty($_POST)) remove_magic_quotes($_POST);
if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE);
if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST);
if (!empty($_SESSION)) remove_magic_quotes($_SESSION);
ini_set('magic_quotes_gpc', 0);
}
set_magic_quotes_runtime(0);
ini_set('magic_quotes_sybase',0);
function remove_magic_quotes(&$array) {
foreach (array_keys($array) as $key) {
if (is_array($array[$key])) {
remove_magic_quotes($array[$key]);
}else {
$array[$key] = stripslashes($array[$key]);
}
}
}
//disable gzip if not available
if($conf['usegzip'] && !function_exists('gzopen')){
$conf['usegzip'] = 0;
}
/* ---------------------------------------------------------------------------------- */
/**
* This returns the full absolute URL to the directory where
* DokuWiki is installed in (includes a trailing slash)
*/
function getBaseURL($abs=false){
global $conf;
//if canonical url enabled always return absolute
if($conf['canonical']) $abs = true;
//relative URLs are easy
if(!$abs){
$dir = dirname($_SERVER['PHP_SELF']).'/';
$dir = preg_replace('#//#','/',$dir);
$dir = preg_replace('#\/$#','/',$dir); #bugfix for weird WIN behaviour
return $dir;
}
$port = ':'.$_SERVER['SERVER_PORT'];
//remove port from hostheader as sent by IE
$host = preg_replace('/:.*$/','',$_SERVER['HTTP_HOST']);
// see if HTTPS is enabled - apache leaves this empty when not available,
// IIS sets it to 'off', 'false' and 'disabled' are just guessing
if (preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){
$proto = 'http://';
if ($_SERVER['SERVER_PORT'] == '80') {
$port='';
}
}else{
$proto = 'https://';
if ($_SERVER['SERVER_PORT'] == '443') {
$port='';
}
}
$dir = (dirname($_SERVER['PHP_SELF'])).'/';
$dir = preg_replace('#//#','/',$dir);
$dir = preg_replace('#\/$#','/',$dir); #bugfix for weird WIN behaviour
return $proto.$host.$port.$dir;
}
/**
* Returns info about the current document as associative
* array.
*/
function pageinfo(){
global $ID;
global $REV;
global $USERINFO;
global $conf;
if($_SERVER['REMOTE_USER']){
$info['user'] = $_SERVER['REMOTE_USER'];
$info['userinfo'] = $USERINFO;
$info['perm'] = auth_quickaclcheck($ID);
}else{
$info['user'] = '';
$info['perm'] = auth_aclcheck($ID,'',null);
}
$info['namespace'] = getNS($ID);
$info['locked'] = checklock($ID);
$info['filepath'] = realpath(wikiFN($ID,$REV));
$info['exists'] = @file_exists($info['filepath']);
if($REV && !$info['exists']){
//check if current revision was meant
$cur = wikiFN($ID);
if(@file_exists($cur) && (@filemtime($cur) == $REV)){
$info['filepath'] = realpath($cur);
$info['exists'] = true;
$REV = '';
}
}
if($info['exists']){
$info['writable'] = (is_writable($info['filepath']) &&
($info['perm'] >= AUTH_EDIT));
}else{
$info['writable'] = ($info['perm'] >= AUTH_CREATE);
}
$info['editable'] = ($info['writable'] && empty($info['lock']));
$info['lastmod'] = @filemtime($info['filepath']);
return $info;
}
/**
* adds a message to the global message array
*
* Levels can be:
*
* -1 error
* 0 info
* 1 success
*/
function msg($message,$lvl=0){
global $MSG;
$errors[-1] = 'error';
$errors[0] = 'info';
$errors[1] = 'success';
if(!isset($MSG)) $MSG = array();
$MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message);
}
/**
* This builds the breadcrumbstrail and returns it as array
*/
function breadcrumbs(){
global $ID;
global $ACT;
global $conf;
$crumbs = $_SESSION[$conf['title']]['bc'];
//first visit?
if (!is_array($crumbs)){
$crumbs = array();
}
//we only save on show and existing wiki documents
if($ACT != 'show' || !@file_exists(wikiFN($ID))){
$_SESSION[$conf['title']]['bc'] = $crumbs;
return $crumbs;
}
//remove ID from array
$pos = array_search($ID,$crumbs);
if($pos !== false && $pos !== null){
array_splice($crumbs,$pos,1);
}
//add to array
$crumbs[] =$ID;
//reduce size
while(count($crumbs) > $conf['breadcrumbs']){
array_shift($crumbs);
}
//save to session
$_SESSION[$conf['title']]['bc'] = $crumbs;
return $crumbs;
}
/**
* This is run on a ID before it is outputted somewhere
* currently used to replace the colon with something else
* on Windows systems and to have proper URL encoding
*/
function idfilter($id){
global $conf;
if ($conf['useslash'] && $conf['userewrite']){
$id = strtr($id,':','/');
}elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
$conf['userewrite']) {
$id = strtr($id,':',';');
}
$id = urlencode($id);
$id = str_replace('%3A',':',$id); //keep as colon
$id = str_replace('%2F','/',$id); //keep as slash
return $id;
}
/**
* This builds a link to a wikipage (using getBaseURL)
*/
function wl($id='',$more='',$script='doku.php',$canonical=false){
global $conf;
$more = str_replace(',','&amp;',$more);
$id = idfilter($id);
$xlink = getBaseURL($canonical);
if(!$conf['userewrite']){
$xlink .= $script;
$xlink .= '?id='.$id;
if($more) $xlink .= '&amp;'.$more;
}else{
$xlink .= $id;
if($more) $xlink .= '?'.$more;
}
return $xlink;
}
/**
* Just builds a link to a script
*/
function script($script='doku.php'){
$link = getBaseURL();
$link .= $script;
return $link;
}
/**
* Return namespacepart of a wiki ID
*/
function getNS($id){
if(strpos($id,':')!==false){
return substr($id,0,strrpos($id,':'));
}
return false;
}
/**
* Returns the id without the namespace
*/
function noNS($id){
return preg_replace('/.*:/','',$id);
}
/**
* Checks the wikitext against a list of blocked expressions
* returns true if the text contains any bad words
*/
function checkwordblock(){
global $TEXT;
global $conf;
if(!$conf['usewordblock']) return false;
$blocks = file('conf/wordblock.conf');
$re = array();
#build regexp from blocks
foreach($blocks as $block){
$block = preg_replace('/#.*$/','',$block);
$block = trim($block);
if(empty($block)) continue;
$re[] = $block;
}
if(preg_match('#('.join('|',$re).')#si',$TEXT)) return true;
return false;
}
/**
* Returns the IP of the client including X-Forwarded-For
* Proxy Headers
*/
function clientIP(){
$my = $_SERVER['REMOTE_ADDR'];
if($_SERVER['HTTP_X_FORWARDED_FOR']){
$my .= ' ('.$_SERVER['HTTP_X_FORWARDED_FOR'].')';
}
return $my;
}
/**
* Checks if a given page is currently locked by anyone for editing.
* removes stale lockfiles
*/
function checklock($id){
global $conf;
$lock = wikiFN($id).'.lock';
//no lockfile
if(!@file_exists($lock)) return false;
//lockfile expired
if((time() - filemtime($lock)) > $conf['locktime']){
unlink($lock);
return false;
}
//my own lock
$ip = io_readFile($lock);
if( ($ip == clientIP()) || ($ip == $_SERVER['REMOTE_USER']) ){
return false;
}
return $ip;
}
/**
* Locks a page for editing
*/
function lock($id){
$lock = wikiFN($id).'.lock';
if($_SERVER['REMOTE_USER']){
io_saveFile($lock,$_SERVER['REMOTE_USER']);
}else{
io_saveFile($lock,clientIP());
}
}
/**
* Unlocks a page if it was locked by the user
*
* return true if a lock was removed
*/
function unlock($id){
$lock = wikiFN($id).'.lock';
if(@file_exists($lock)){
$ip = io_readFile($lock);
if( ($ip == clientIP()) || ($ip == $_SERVER['REMOTE_USER']) ){
@unlink($lock);
return true;
}
}
return false;
}
/**
* Cleans a given ID to only use allowed characters. Accented characters are
* converted to unaccented ones
*/
function cleanID($id){
global $conf;
global $lang;
$id = trim($id);
$id = strtolower($id);
//alternative namespace seperator
$id = strtr($id,';',':');
$id = strtr($id,'/',':');
if(!$conf['localnames']){
if($lang['encoding'] == 'iso-8859-15'){
// replace accented chars with unaccented ones
// this may look strange on your terminal - just don't touch
$id = strtr(
strtr($id,
'ŠŽšžŸÀÁÂÃÅÇÈÉÊËÌÍÎÏÑÒÓÔÕØÙÚÛÝàáâãåçèéêëìíîïñòóôõøùúûýÿ',
'szszyaaaaaceeeeiiiinooooouuuyaaaaaceeeeiiiinooooouuuyy'),
array('Þ' => 'th', 'þ' => 'th', 'Ð' => 'dh', 'ð' => 'dh', 'ß' => 'ss',
'Œ' => 'oe', 'œ' => 'oe', 'Æ' => 'ae', 'æ' => 'ae', 'µ' => 'u',
'ü' => 'ue', 'ö' => 'oe', 'ä' => 'ae', 'Ü' => 'ue', 'Ö' => 'ö',
'Ä' => 'ae'));
}
$WORD = 'a-z';
}else{
$WORD = '\w';
}
//special chars left will be converted to _
$id = preg_replace('#[^'.$WORD.'0-9:\-\.]#','_',$id);
$id = preg_replace('#__#','_',$id);
$id = preg_replace('#:+#',':',$id);
$id = trim($id,':._-');
$id = preg_replace('#:[:\._\-]+#',':',$id);
return($id);
}
/**
* returns the full path to the datafile specified by ID and
* optional revision
*/
function wikiFN($id,$rev=''){
global $conf;
$id = cleanID($id);
$id = str_replace(':','/',$id);
if(empty($rev)){
return $conf['datadir'].'/'.$id.'.txt';
}else{
$fn = $conf['olddir'].'/'.$id.'.'.$rev.'.txt';
if(!$conf['usegzip'] || @file_exists($fn)){
//return plaintext if exists or gzip is disabled
return $fn;
}else{
return $fn.'.gz';
}
}
}
/**
* Returns the full filepath to a localized textfile if local
* version isn't found the english one is returned
*/
function localeFN($id){
global $conf;
$file = './lang/'.$conf['lang'].'/'.$id.'.txt';
if(!@file_exists($file)){
//fall back to english
$file = './lang/en/'.$id.'.txt';
}
return cleanText($file);
}
/**
* convert line ending to unix format
*
* @see: formText() for 2crlf conversion
*/
function cleanText($text){
$text = preg_replace("/(\015\012)|(\015)/","\012",$text);
return $text;
}
/**
* Prepares text for print in Webforms by encoding special chars.
* It also converts line endings to Windows format which is
* pseudo standard for webforms.
*
* @see: cleanText() for 2unix conversion
*/
function formText($text){
$text = preg_replace("/\012/","\015\012",$text);
return htmlspecialchars($text);
}
/**
* Returns the specified textfile in parsed format
*/
function parsedLocale($id){
//disable section editing
global $parser;
$se = $parser['secedit'];
$parser['secedit'] = false;
//fetch parsed locale
$html = io_cacheParse(localeFN($id));
//reset section editing
$parser['secedit'] = $se;
return $html;
}
/**
* Returns the specified textfile in parsed format
*/
function rawLocale($id){
return io_readFile(localeFN($id));
}
/**
* Returns the parsed Wikitext for the given id and revision. If $excuse
* is true an explanation is returned if the file wasn't found
*/
function parsedWiki($id,$rev='',$excuse=true){
$file = wikiFN($id,$rev);
$ret = '';
//ensure $id is in global $ID (needed for parsing)
global $ID;
$ID = $id;
if($rev){
if(@file_exists($file)){
$ret = parse(io_readFile($file));
}elseif($excuse){
$ret = parsedLocale('norev');
}
}else{
if(@file_exists($file)){
$ret = io_cacheParse($file);
}elseif($excuse){
$ret = parsedLocale('newpage');
}
}
return $ret;
}
/**
* Returns the raw WikiText
*/
function rawWiki($id,$rev=''){
return io_readFile(wikiFN($id,$rev));
}
/**
* Returns the raw Wiki Text in three slices. The range parameter
* Need to have the form "from-to" and gives the range of the section.
* The returned order is prefix, section and suffix.
*/
function rawWikiSlices($range,$id,$rev=''){
list($from,$to) = split('-',$range,2);
$text = io_readFile(wikiFN($id,$rev));
$text = split("\n",$text);
if(!$from) $from = 0;
if(!$to) $to = count($text);
$slices[0] = join("\n",array_slice($text,0,$from));
$slices[1] = join("\n",array_slice($text,$from,$to + 1 - $from));
$slices[2] = join("\n",array_slice($text,$to+1));
return $slices;
}
/**
* function to join the text slices with correct lineendings again.
* When the pretty parameter is set to true it adds additional empty
* lines between sections if needed (used on saving).
*/
function con($pre,$text,$suf,$pretty=false){
if($pretty){
if($pre && substr($pre,-1) != "\n") $pre .= "\n";
if($suf && substr($text,-1) != "\n") $text .= "\n";
}
if($pre) $pre .= "\n";
if($suf) $text .= "\n";
return $pre.$text.$suf;
}
/**
* little function to print the content of a var
*/
function dbg($msg,$hidden=false){
(!$hidden) ? print '<pre class="dbg">' : print "<!--\n";
print_r($msg);
(!$hidden) ? print '</pre>' : print "\n-->";
}
/**
* Add's an entry to the changelog
*/
function addLogEntry($id,$summary=""){
global $conf;
$id = cleanID($id);
$date = time();
$remote = $_SERVER['REMOTE_ADDR'];
$user = $_SERVER['REMOTE_USER'];
$logline = join("\t",array($date,$remote,$id,$user,$summary))."\n";
$fh = fopen($conf['changelog'],'a');
if($fh){
fwrite($fh,$logline);
fclose($fh);
}
}
/**
* returns an array of recently changed files using the
* changelog
*/
function getRecents($num=0,$incdel=false){
global $conf;
$recent = array();
if(!$num) $num = $conf['recent'];
$loglines = file($conf['changelog']);
rsort($loglines); //reverse sort on timestamp
foreach ($loglines as $line){
$line = rtrim($line); //remove newline
if(empty($line)) continue; //skip empty lines
$info = split("\t",$line); //split into parts
//add id if not in yet and file still exists and is allowed to read
if(!$recent[$info[2]] &&
(@file_exists(wikiFN($info[2])) || $incdel) &&
(auth_quickaclcheck($info[2]) >= AUTH_READ)
){
$recent[$info[2]]['date'] = $info[0];
$recent[$info[2]]['ip'] = $info[1];
$recent[$info[2]]['user'] = $info[3];
$recent[$info[2]]['sum'] = $info[4];
$recent[$info[2]]['del'] = !@file_exists(wikiFN($info[2]));
}
if(count($recent) >= $num){
break; //finish if enough items found
}
}
return $recent;
}
/**
* Saves a wikitext by calling io_saveFile
*/
function saveWikiText($id,$text,$summary){
global $conf;
global $lang;
umask($conf['umask']);
// ignore if no changes were made
if($text == rawWiki($id,'')){
return;
}
$file = wikiFN($id);
$old = saveOldRevision($id);
if (empty($text)){
// remove empty files
@unlink($file);
$del = true;
$summary = $lang['deleted']; //autoset summary on deletion
}else{
// save file (datadir is created in io_saveFile)
io_saveFile($file,$text);
$del = false;
}
addLogEntry($id,$summary);
notify($id,$old,$summary);
//purge cache on add by updating the purgefile
if($conf['purgeonadd'] && (!$old || $del)){
io_saveFile($conf['datadir'].'/.cache/purgefile',time());
}
}
/**
* moves the current version to the attic and returns its
* revision date
*/
function saveOldRevision($id){
global $conf;
umask($conf['umask']);
$oldf = wikiFN($id);
if(!@file_exists($oldf)) return '';
$date = filemtime($oldf);
$newf = wikiFN($id,$date);
if(substr($newf,-3)=='.gz'){
io_saveFile($newf,rawWiki($id));
}else{
io_makeFileDir($newf);
copy($oldf, $newf);
}
return $date;
}
/**
* Sends a notify mail to the wikiadmin when a page was
* changed
*/
function notify($id,$rev="",$summary=""){
global $lang;
global $conf;
$hdrs ='';
if(empty($conf['notify'])) return; //notify enabled?
$text = rawLocale('mailtext');
$text = str_replace('@DATE@',date($conf['dformat']),$text);
$text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text);
$text = str_replace('@IPADDRESS@',$_SERVER['REMOTE_ADDR'],$text);
$text = str_replace('@HOSTNAME@',gethostbyaddr($_SERVER['REMOTE_ADDR']),$text);
$text = str_replace('@NEWPAGE@',wl($id,'','',true),$text);
$text = str_replace('@DOKUWIKIURL@',getBaseURL(true),$text);
$text = str_replace('@SUMMARY@',$summary,$text);
if($rev){
$subject = $lang['mail_changed'].' '.$id;
$text = str_replace('@OLDPAGE@',wl($id,"rev=$rev",'',true),$text);
require_once("inc/DifferenceEngine.php");
$df = new Diff(split("\n",rawWiki($id,$rev)),
split("\n",rawWiki($id)));
$dformat = new UnifiedDiffFormatter();
$diff = $dformat->format($df);
}else{
$subject=$lang['mail_newpage'].' '.$id;
$text = str_replace('@OLDPAGE@','none',$text);
$diff = rawWiki($id);
}
$text = str_replace('@DIFF@',$diff,$text);
if (!empty($conf['mailfrom'])) {
$hdrs = 'From: '.$conf['mailfrom']."\n";
}
@mail($conf['notify'],$subject,$text,$hdrs);
}
function getRevisions($id){
$revd = dirname(wikiFN($id,'foo'));
$revs = array();
$clid = cleanID($id);
if(strrpos($clid,':')) $clid = substr($clid,strrpos($clid,':')+1); //remove path
if (is_dir($revd) && $dh = opendir($revd)) {
while (($file = readdir($dh)) !== false) {
if (is_dir($revd.'/'.$file)) continue;
if (preg_match('/^'.$clid.'\.(\d+)\.txt(\.gz)?$/',$file,$match)){
$revs[]=$match[1];
}
}
closedir($dh);
}
rsort($revs);
return $revs;
}
/**
* downloads a file from the net and saves it to the given location
*/
function download($url,$file){
$fp = @fopen($url,"rb");
if(!$fp) return false;
while(!feof($fp)){
$cont.= fread($fp,1024);
}
fclose($fp);
$fp2 = @fopen($file,"w");
if(!$fp2) return false;
fwrite($fp2,$cont);
fclose($fp2);
return true;
}
/**
* extracts the query from a google referer
*/
function getGoogleQuery(){
$url = parse_url($_SERVER['HTTP_REFERER']);
if(!preg_match("#google\.#i",$url['host'])) return '';
$query = array();
parse_str($url['query'],$query);
return $query['q'];
}
/**
* This function tries the locales given in the
* language file
*/
function setCorrectLocale(){
global $conf;
global $lang;
$enc = strtoupper($lang['encoding']);
foreach ($lang['locales'] as $loc){
//try locale
if(@setlocale(LC_ALL,$loc)) return;
//try loceale with encoding
if(@setlocale(LC_ALL,"$loc.$enc")) return;
}
//still here? try to set from environment
@setlocale(LC_ALL,"");
}
/**
* Return the human readable size of a file
*
* @param int $size A file size
* @param int $dec A number of decimal places
* @author Martin Benjamin <b.martin@cybernet.ch>
* @author Aidan Lister <aidan@php.net>
* @version 1.0.0
*/
function filesize_h($size, $dec = 1)
{
$sizes = array('B', 'KB', 'MB', 'GB');
$count = count($sizes);
$i = 0;
while ($size >= 1024 && ($i < $count - 1)) {
$size /= 1024;
$i++;
}
return round($size, $dec) . ' ' . $sizes[$i];
}
function check(){
global $conf;
global $INFO;
if(is_writable($conf['changelog'])){
msg('Changelog is writable',1);
}else{
msg('Changelog is not writable',-1);
}
if(is_writable($conf['datadir'])){
msg('Datadir is writable',1);
}else{
msg('Datadir is not writable',-1);
}
if(is_writable($conf['olddir'])){
msg('Attic is writable',1);
}else{
msg('Attic is not writable',-1);
}
if(is_writable($conf['mediadir'])){
msg('Mediadir is writable',1);
}else{
msg('Mediadir is not writable',-1);
}
if(is_writable('conf/users.auth')){
msg('conf/users.auth is writable',1);
}else{
msg('conf/users.auth is not writable',0);
}
msg('Your current permission for this page is '.$INFO['perm'],0);
if(is_writable($INFO['filepath'])){
msg('The current page is writable by the webserver',0);
}else{
msg('The current page is not writable by the webserver',0);
}
if($INFO['writable']){
msg('The current page is writable by you',0);
}else{
msg('The current page is not writable you',0);
}
}
?>

1548
inc/feedcreator.class.php Normal file

File diff suppressed because it is too large Load Diff

475
inc/format.php Normal file
View File

@ -0,0 +1,475 @@
<?
require_once("conf/dokuwiki.php");
require_once("inc/common.php");
/**
* Assembles all parts defined by the link formater below
* Returns HTML for the link
*/
function format_link_build($link){
//make sure the url is XHTML compliant
$link['url'] = str_replace('&','&amp;',$link['url']);
$link['url'] = str_replace('&amp;amp;','&amp;',$link['url']);
$ret = '';
$ret .= $link['pre'];
$ret .= '<a href="'.$link['url'].'"';
if($link['class']) $ret .= ' class="'.$link['class'].'"';
if($link['target']) $ret .= ' target="'.$link['target'].'"';
if($link['title']) $ret .= ' title="'.$link['title'].'"';
if($link['style']) $ret .= ' style="'.$link['style'].'"';
if($link['more']) $ret .= ' '.$link['more'];
$ret .= '>';
$ret .= $link['name'];
$ret .= '</a>';
$ret .= $link['suf'];
return $ret;
}
/**
* Link Formaters
*
* Each of these functions need to set
*
* $link['url'] URL to use in href=""
* $link['name'] HTML to enclose in <a> with proper special char encoding
* $link['class'] CSS class to set on link
* $link['target'] which target to use (blank) for current window
* $link['style'] Additonal style attribute set with style=""
* $link['title'] Title to set with title=""
* $link['pre'] HTML to prepend to link
* $link['suf'] HTML to append to link
* $link['more'] Additonal HTML to include into the anchortag
*
*/
function format_link_wiki($link){
global $conf;
global $ID; //we use this to get the current namespace
//obvious setup
$link['target'] = $conf['target']['wiki'];
$link['style'] = '';
$link['pre'] = '';
$link['suf'] = '';
$link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
//if links starts with . add current namespace if any
if(strpos($link['url'],'.')===0){
$ns = substr($ID,0,strrpos($ID,':')); #get current ns
$link['url'] = $ns.':'.substr($link['url'],1);
}
//if link contains no namespace. add current namespace (if any)
if(strpos($ID,':')!==false && strpos($link['url'],':') === false){
$ns = substr($ID,0,strrpos($ID,':')); #get current ns
$link['url'] = $ns.':'.$link['url'];
}
//keep hashlink if exists
list($link['url'],$hash) = split('#',$link['url'],2);
$hash = cleanID($hash);
//use link without namespace as name
if(empty($link['name'])) $link['name'] = preg_replace('/.*:/','',$link['url']);
$link['name'] = htmlspecialchars($link['name']);
$link['url'] = cleanID($link['url']);
$link['title'] = $link['url'];
//set class depending on existance
$file = wikiFN($link['url']);
if(@file_exists($file)){
$link['class']="wikilink1";
}else{
if($conf['autoplural']){
//try plural/nonplural
if(substr($link['url'],-1) == 's'){
$try = substr($link['url'],0,-1);
}else{
$try = $link['url'].'s';
}
$file = wikiFN($try);
//check if the other form exists
if(@file_exists($file)){
$link['class']="wikilink1";
$link['url'] = $try;
}else{
$link['class']="wikilink2";
}
}else{
//no autoplural is wanted
$link['class']="wikilink2";
}
}
//construct the full link
$link['url'] = wl($link['url']);
//add hash if exists
if($hash) $link['url'] .= '#'.$hash;
return $link;
}
function format_link_externalurl($link){
global $conf;
//simple setup
$link['class'] = 'urlextern';
$link['target'] = $conf['target']['extern'];
$link['pre'] = '';
$link['suf'] = '';
$link['style'] = '';
$link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
$link['url'] = $link['url']; //keep it
$link['title'] = htmlspecialchars($link['url']);
if(!$link['name']) $link['name'] = htmlspecialchars($link['url']);
//thats it :-)
return $link;
}
//this only works in IE :-(
function format_link_windows($link){
global $conf;
global $lang;
//simple setup
$link['class'] = 'windows';
$link['target'] = $conf['target']['windows'];
$link['pre'] = '';
$link['suf'] = '';
$link['style'] = '';
//Display error on browsers other than IE
$link['more'] = 'onclick="if(document.all == null){alert(\''.htmlspecialchars($lang['nosmblinks'],ENT_QUOTES).'\');}" onkeypress="if(document.all == null){alert(\''.htmlspecialchars($lang['nosmblinks'],ENT_QUOTES).'\');}"';
if(!$link['name']) $link['name'] = htmlspecialchars($link['url']);
$link['title'] = htmlspecialchars($link['url']);
$link['url'] = str_replace('\\','/',$link['url']);
$link['url'] = 'file:///'.$link['url'];
return $link;
}
function format_link_email($link){
global $conf;
//simple setup
$link['class'] = 'mail';
$link['target'] = '';
$link['pre'] = '';
$link['suf'] = '';
$link['style'] = '';
$link['more'] = '';
$link['name'] = htmlspecialchars($link['name']);
//shields up
if($conf['mailguard']=='visible'){
//the mail name gets some visible encoding
$link['url'] = str_replace('@',' [at] ',$link['url']);
$link['url'] = str_replace('.',' [dot] ',$link['url']);
$link['url'] = str_replace('-',' [dash] ',$link['url']);
}elseif($conf['mailguard']=='hex'){
for ($x=0; $x < strlen($link['url']); $x++) {
$encode .= '&#x' . bin2hex($link['url'][$x]).';';
}
$link['url'] = $encode;
}
$link['title'] = $link['url'];
if(!$link['name']) $link['name'] = $link['url'];
$link['url'] = 'mailto:'.$link['url'];
return $link;
}
function format_link_interwiki($link){
global $conf;
//obvious ones
$link['class'] = 'interwiki';
$link['target'] = $conf['target']['interwiki'];
$link['pre'] = '';
$link['suf'] = '';
$link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
//get interwiki short name
list($wiki,$link['url']) = split('>',$link['url'],2);
$wiki = strtolower(trim($wiki)); //always use lowercase
$link['url'] = trim($link['url']);
if(!$link['name']) $link['name'] = $link['url'];
//encode special chars
$link['name'] = htmlspecialchars($link['name']);
//set default to google
$url = 'http://www.google.com/search?q=';
$ico = 'google';
//load interwikilinks
//FIXME: loading this once may enhance speed a little bit
$iwlinks = file('conf/interwiki.conf');
//add special case 'this'
$iwlinks[] = 'this '.getBaseURL(true).'{NAME}';
//go through iwlinks and find URL for wiki
foreach ($iwlinks as $line){
$line = preg_replace('/#.*/','',$line); //skip comments
$line = trim($line);
list($iw,$iwurl) = preg_split('/\s+/',$line);
if(!$iw or !$iwurl) continue; //skip broken or empty lines
//check for match
if(strtolower($iw) == $wiki){
$ico = $wiki;
$url = $iwurl;
break;
}
}
//if ico exists set additonal style
if(@file_exists('interwiki/'.$ico.'.png')){
$link['style']='background: transparent url('.getBaseURL().'interwiki/'.$ico.'.png) 0px 1px no-repeat;';
}elseif(@file_exists('interwiki/'.$ico.'.gif')){
$link['style']='background: transparent url('.getBaseURL().'interwiki/'.$ico.'.gif) 0px 1px no-repeat;';
}
//do we stay at the same server? Use local target
if( strpos($url,getBaseURL(true)) === 0 ){
$link['target'] = $conf['target']['wiki'];
}
//replace placeholder
if(strstr($url,'{URL}') !== false){
$link['url'] = str_replace('{URL}',urlencode($link['url']),$url);
}elseif(strstr($url,'{NAME}') !== false){
$link['url'] = str_replace('{NAME}',$link['url'],$url);
}else{
$link['url'] = $url.urlencode($link['url']);
}
$link['title'] = htmlspecialchars($link['url']);
//done :-)
return $link;
}
function format_link_media($link){
global $conf;
$link['class'] = 'media';
$link['style'] = '';
$link['pre'] = '';
$link['suf'] = '';
$link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
$class = 'media';
list($link['name'],$title) = split('\|',$link['name'],2);
$t = htmlspecialchars($title);
//set alignment from spaces
if(substr($link['name'],0,1)==' ' && substr($link['name'],-1,1)==' '){
$link['pre'] = "</p>\n<div align=\"center\">";
$link['suf'] = "</div>\n<p>";
}elseif(substr($link['name'],0,1)==' '){
#$a = ' align="right"';
$class = 'mediaright';
}elseif(substr($link['name'],-1,1)==' '){
#$a = ' align="left"';
$class = 'medialeft';
}else{
$a = ' align="middle"';
}
$link['name'] = trim($link['name']);
//split into src and parameters
list($src,$param) = split('\?',$link['name'],2);
//parse width and height
if(preg_match('#(\d*)(x(\d*))?#i',$param,$size)){
if($size[1]) $w = $size[1];
if($size[3]) $h = $size[3];
}
//check for nocache param
$nocache = preg_match('/nocache/i',$param);
//do image caching, resizing and src rewriting
$cache = $src;
$isimg = img_cache($cache,$src,$w,$h,$nocache);
//set link to src if none given
if(!$link['url']){
$link['url'] = $src;
$link['target'] = $conf['target']['media'];
}
//prepare name
if($isimg){
$link['name'] = '<img src="'.getBaseURL().$cache.'"';
if($w) $link['name'] .= ' width="'.$w.'"';
if($h) $link['name'] .= ' height="'.$h.'"';
if($t) $link['name'] .= ' title="'.$t.'"';
if($a) $link['name'] .= $a;
$link['name'] .= ' class="'.$class.'" border="0" alt="'.$t.'" />';
}else{
if($t){
$link['name'] = $t;
}else{
$link['name'] = basename($src);
}
}
return $link;
}
/**
* Builds an URL list from a RSS feed
*/
function format_rss($url){
global $lang;
define('MAGPIE_DIR', 'inc/magpie/');
require_once(MAGPIE_DIR.'/rss_fetch.inc');
//disable warning while fetching
$elvl = error_reporting(E_ERROR);
$rss = fetch_rss($url);
error_reporting($elvl);
$ret = '<ul class="rss">';
if($rss){
foreach ($rss->items as $item ) {
$link = array();
$link['url'] = $item['link'];
$link['name'] = $item['title'];
$link = format_link_externalurl($link);
$ret .= '<li>'.format_link_build($link).'</li>';
}
}else{
$link['url'] = $url;
$link = format_link_externalurl($link);
$ret .= '<li>';
$ret .= '<em>'.$lang['rssfailed'].'</em>';
$ret .= format_link_build($link);
$ret .= '</li>';
}
$ret .= '</ul>';
return $ret;
}
function img_cache(&$csrc,&$src,&$w,&$h,$nocache){
global $conf;
//container for various paths
$f['full']['web'] = $src;
$f['resz']['web'] = $src;
$f['full']['fs'] = $src;
$f['resz']['fs'] = $src;
//generate cachename
$md5 = md5($src);
//check if it is an image
if(preg_match('#\.(jpe?g|gif|png)$#i',$src,$match)){
$ext = strtolower($match[1]);
$isimg = true;
}
//check if it is external or a local mediafile
if(preg_match('#^([a-z0-9]+?)://#i',$src)){
$isurl = true;
}else{
$src = str_replace(':','/',$src);
$f['full']['web'] = $conf['mediaweb'].'/'.$src;
$f['resz']['web'] = $conf['mediaweb'].'/'.$src;
$f['full']['fs'] = $conf['mediadir'].'/'.$src;
$f['resz']['fs'] = $conf['mediadir'].'/'.$src;
}
//download external images if allowed
if($isurl && $isimg && !$nocache){
$cache = $conf['mediadir']."/.cache/$md5.$ext";
if (@file_exists($cache) || download($src,$cache)){
$f['full']['web'] = $conf['mediaweb']."/.cache/$md5.$ext";
$f['resz']['web'] = $conf['mediaweb']."/.cache/$md5.$ext";
$f['full']['fs'] = $conf['mediadir']."/.cache/$md5.$ext";
$f['resz']['fs'] = $conf['mediadir']."/.cache/$md5.$ext";
$isurl = false;
}
}
//for local images (cached or media) do resizing
if($isimg && (!$isurl) && $w){
$info = getImageSize($f['full']['fs']);
//if $h not given calcualte it with correct aspect ratio
if(!$h){
$h = round(($w * $info[1]) / $info[0]);
}
$cache = $conf['mediadir'].'/.cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext;
//delete outdated cachefile
if(@file_exists($cache) && (filemtime($cache)<filemtime($f['full']['fs']))){
unlink($cache);
}
//check if a resized cachecopy exists else create one
if(@file_exists($cache) || img_resize($ext,$f['full']['fs'],$info[0],$info[1],$cache,$w,$h)){
$f['resz']['web'] = $conf['mediaweb'].'/.cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext;
$f['resz']['fs'] = $conf['mediadir'].'/.cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext;
}
}elseif($isimg && (!$isurl)){
//if no new size was given just return the img size
$info = getImageSize($f['full']['fs']);
$w = $info[0];
$h = $info[1];
}
//set srcs
$src = $f['full']['web'];
$csrc = $f['resz']['web'];
return $isimg;
}
function img_resize($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){
// create cachedir
io_makeFileDir($to);
// create an image of the given filetype
if ($ext == 'jpg' || $ext == 'jpeg'){
if(!function_exists("imagecreatefromjpeg")) return false;
$image = @imagecreateFromjpeg($from);
}elseif($ext == 'png') {
if(!function_exists("imagecreatefrompng")) return false;
$image = @imagecreatefrompng($from);
}elseif($ext == 'gif') {
if(!function_exists("imagecreatefromgif")) return false;
$image = @imagecreatefromgif($from);
}
if(!$image) return false;
if(function_exists("imagecreatetruecolor")){
$newimg = @imagecreatetruecolor ($to_w, $to_h);
}
if(!$newimg) $newimg = @imagecreate($to_w, $to_h);
if(!$newimg) return false;
//try resampling first
if(function_exists("imagecopyresampled")){
if(!@imagecopyresampled($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h)) {
imagecopyresized($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h);
}
}else{
imagecopyresized($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h);
}
if ($ext == 'jpg' || $ext == 'jpeg'){
if(!function_exists("imagejpeg")) return false;
return imagejpeg($newimg, $to, 70);
}elseif($ext == 'png') {
if(!function_exists("imagepng")) return false;
return imagepng($newimg, $to);
}elseif($ext == 'gif') {
if(!function_exists("imagegif")) return false;
return imagegif($newimg, $to);
}
return false;
}
?>

2413
inc/geshi.php Normal file

File diff suppressed because it is too large Load Diff

199
inc/geshi/actionscript.php Normal file
View File

@ -0,0 +1,199 @@
<?php
/*************************************************************************************
* actionscript.php
* ----------------
* Author: Steffen Krause (Steffen.krause@muse.de)
* Copyright: (c) 2004 Steffen Krause, Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/20
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Actionscript language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Actionscript',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'#include', 'for', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'dowhile',
'endwhile', 'endif', 'switch', 'case', 'endswitch', 'return', 'break', 'continue', 'in'
),
2 => array(
'null', 'false', 'true', 'var',
'default', 'function', 'class',
'new', '_global'
),
3 => array(
'#endinitclip', '#initclip', '__proto__', '_accProps', '_alpha', '_currentframe',
'_droptarget', '_focusrect', '_framesloaded', '_height', '_highquality', '_lockroot',
'_name', '_parent', '_quality', '_root', '_rotation', '_soundbuftime', '_target', '_totalframes',
'_url', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale', 'abs',
'Accessibility', 'acos', 'activityLevel', 'add', 'addListener', 'addPage', 'addProperty',
'addRequestHeader', 'align', 'allowDomain', 'allowInsecureDomain', 'and', 'appendChild',
'apply', 'Arguments', 'Array', 'asfunction', 'asin', 'atan', 'atan2', 'attachAudio', 'attachMovie',
'attachSound', 'attachVideo', 'attributes', 'autosize', 'avHardwareDisable', 'background',
'backgroundColor', 'BACKSPACE', 'bandwidth', 'beginFill', 'beginGradientFill', 'blockIndent',
'bold', 'Boolean', 'border', 'borderColor', 'bottomScroll', 'bufferLength', 'bufferTime',
'builtInItems', 'bullet', 'Button', 'bytesLoaded', 'bytesTotal', 'call', 'callee', 'caller',
'Camera', 'capabilities', 'CAPSLOCK', 'caption', 'catch', 'ceil', 'charAt', 'charCodeAt',
'childNodes', 'chr', 'clear', 'clearInterval', 'cloneNode', 'close', 'Color', 'concat',
'connect', 'condenseWhite', 'constructor', 'contentType', 'ContextMenu', 'ContextMenuItem',
'CONTROL', 'copy', 'cos', 'createElement', 'createEmptyMovieClip', 'createTextField',
'createTextNode', 'currentFps', 'curveTo', 'CustomActions', 'customItems', 'data', 'Date',
'deblocking', 'delete', 'DELETEKEY', 'docTypeDecl', 'domain', 'DOWN',
'duplicateMovieClip', 'duration', 'dynamic', 'E', 'embedFonts', 'enabled',
'END', 'endFill', 'ENTER', 'eq', 'Error', 'ESCAPE(Konstante)', 'escape(Funktion)', 'eval',
'exactSettings', 'exp', 'extends', 'finally', 'findText', 'firstChild', 'floor',
'flush', 'focusEnabled', 'font', 'fps', 'fromCharCode', 'fscommand',
'gain', 'ge', 'get', 'getAscii', 'getBeginIndex', 'getBounds', 'getBytesLoaded', 'getBytesTotal',
'getCaretIndex', 'getCode', 'getCount', 'getDate', 'getDay', 'getDepth', 'getEndIndex', 'getFocus',
'getFontList', 'getFullYear', 'getHours', 'getInstanceAtDepth', 'getLocal', 'getMilliseconds',
'getMinutes', 'getMonth', 'getNewTextFormat', 'getNextHighestDepth', 'getPan', 'getProgress',
'getProperty', 'getRGB', 'getSeconds', 'getSelected', 'getSelectedText', 'getSize', 'getStyle',
'getStyleNames', 'getSWFVersion', 'getText', 'getTextExtent', 'getTextFormat', 'getTextSnapshot',
'getTime', 'getTimer', 'getTimezoneOffset', 'getTransform', 'getURL', 'getUTCDate', 'getUTCDay',
'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
'getVersion', 'getVolume', 'getYear', 'globalToLocal', 'goto', 'gotoAndPlay', 'gotoAndStop',
'hasAccessibility', 'hasAudio', 'hasAudioEncoder', 'hasChildNodes', 'hasEmbeddedVideo', 'hasMP3',
'hasPrinting', 'hasScreenBroadcast', 'hasScreenPlayback', 'hasStreamingAudio', 'hasStreamingVideo',
'hasVideoEncoder', 'height', 'hide', 'hideBuiltInItems', 'hitArea', 'hitTest', 'hitTestTextNearPos',
'HOME', 'hscroll', 'html', 'htmlText', 'ID3', 'ifFrameLoaded', 'ignoreWhite', 'implements',
'import', 'indent', 'index', 'indexOf', 'Infinity', '-Infinity', 'INSERT', 'insertBefore', 'install',
'instanceof', 'int', 'interface', 'isActive', 'isDebugger', 'isDown', 'isFinite', 'isNaN', 'isToggled',
'italic', 'join', 'Key', 'language', 'lastChild', 'lastIndexOf', 'le', 'leading', 'LEFT', 'leftMargin',
'length', 'level', 'lineStyle', 'lineTo', 'list', 'LN10', 'LN2', 'load', 'loadClip', 'loaded', 'loadMovie',
'loadMovieNum', 'loadSound', 'loadVariables', 'loadVariablesNum', 'LoadVars', 'LocalConnection',
'localFileReadDisable', 'localToGlobal', 'log', 'LOG10E', 'LOG2E', 'manufacturer', 'Math', 'max',
'MAX_VALUE', 'maxChars', 'maxhscroll', 'maxscroll', 'mbchr', 'mblength', 'mbord', 'mbsubstring', 'menu',
'message', 'Microphone', 'min', 'MIN_VALUE', 'MMExecute', 'motionLevel', 'motionTimeOut', 'Mouse',
'mouseWheelEnabled', 'moveTo', 'Movieclip', 'MovieClipLoader', 'multiline', 'muted', 'name', 'names', 'NaN',
'ne', 'NEGATIVE_INFINITY', 'NetConnection', 'NetStream', 'newline', 'nextFrame',
'nextScene', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', 'not', 'Number', 'Object',
'on', 'onActivity', 'onChanged', 'onClipEvent', 'onClose', 'onConnect', 'onData', 'onDragOut',
'onDragOver', 'onEnterFrame', 'onID3', 'onKeyDown', 'onKeyUp', 'onKillFocus', 'onLoad', 'onLoadComplete',
'onLoadError', 'onLoadInit', 'onLoadProgress', 'onLoadStart', 'onMouseDown', 'onMouseMove', 'onMouseUp',
'onMouseWheel', 'onPress', 'onRelease', 'onReleaseOutside', 'onResize', 'onRollOut', 'onRollOver',
'onScroller', 'onSelect', 'onSetFocus', 'onSoundComplete', 'onStatus', 'onUnload', 'onUpdate', 'onXML',
'or(logischesOR)', 'ord', 'os', 'parentNode', 'parseCSS', 'parseFloat', 'parseInt', 'parseXML', 'password',
'pause', 'PGDN', 'PGUP', 'PI', 'pixelAspectRatio', 'play', 'playerType', 'pop', 'position',
'POSITIVE_INFINITY', 'pow', 'prevFrame', 'previousSibling', 'prevScene', 'print', 'printAsBitmap',
'printAsBitmapNum', 'PrintJob', 'printNum', 'private', 'prototype', 'public', 'push', 'quality',
'random', 'rate', 'registerClass', 'removeListener', 'removeMovieClip', 'removeNode', 'removeTextField',
'replaceSel', 'replaceText', 'resolutionX', 'resolutionY', 'restrict', 'reverse', 'RIGHT',
'rightMargin', 'round', 'scaleMode', 'screenColor', 'screenDPI', 'screenResolutionX', 'screenResolutionY',
'scroll', 'seek', 'selectable', 'Selection', 'send', 'sendAndLoad', 'separatorBefore', 'serverString',
'set', 'setvariable', 'setBufferTime', 'setClipboard', 'setDate', 'setFocus', 'setFullYear', 'setGain',
'setHours', 'setInterval', 'setMask', 'setMilliseconds', 'setMinutes', 'setMode', 'setMonth',
'setMotionLevel', 'setNewTextFormat', 'setPan', 'setProperty', 'setQuality', 'setRate', 'setRGB',
'setSeconds', 'setSelectColor', 'setSelected', 'setSelection', 'setSilenceLevel', 'setStyle',
'setTextFormat', 'setTime', 'setTransform', 'setUseEchoSuppression', 'setUTCDate', 'setUTCFullYear',
'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setVolume',
'setYear', 'SharedObject', 'SHIFT(Konstante)', 'shift(Methode)', 'show', 'showMenu', 'showSettings',
'silenceLevel', 'silenceTimeout', 'sin', 'size', 'slice', 'smoothing', 'sort', 'sortOn', 'Sound', 'SPACE',
'splice', 'split', 'sqrt', 'SQRT1_2', 'SQRT2', 'Stage', 'start', 'startDrag', 'static', 'status', 'stop',
'stopAllSounds', 'stopDrag', 'String', 'StyleSheet(Klasse)', 'styleSheet(Eigenschaft)', 'substr',
'substring', 'super', 'swapDepths', 'System', 'TAB', 'tabChildren', 'tabEnabled', 'tabIndex',
'tabStops', 'tan', 'target', 'targetPath', 'tellTarget', 'text', 'textColor', 'TextField', 'TextFormat',
'textHeight', 'TextSnapshot', 'textWidth', 'this', 'throw', 'time', 'toggleHighQuality', 'toLowerCase',
'toString', 'toUpperCase', 'trace', 'trackAsMenu', 'try', 'type', 'typeof', 'undefined',
'underline', 'unescape', 'uninstall', 'unloadClip', 'unloadMovie', 'unLoadMovieNum', 'unshift', 'unwatch',
'UP', 'updateAfterEvent', 'updateProperties', 'url', 'useCodePage', 'useEchoSuppression', 'useHandCursor',
'UTC', 'valueOf', 'variable', 'version', 'Video', 'visible', 'void', 'watch', 'width',
'with', 'wordwrap', 'XML', 'xmlDecl', 'XMLNode', 'XMLSocket'
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #0066CC;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
2 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(),
'HIGHLIGHT_STRICT_BLOCK' => array()
);
?>

136
inc/geshi/ada.php Normal file
View File

@ -0,0 +1,136 @@
<?php
/*************************************************************************************
* ada.php
* -------
* Author: Tux (tux@inmail.cz)
* Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/29
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Ada language file for GeSHi.
* Words are from SciTe configuration file
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Removed apostrophe as string delimiter
* - Added URL support
* 2004/08/05 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Ada',
'COMMENT_SINGLE' => array(1 => '--'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if',
'is', 'loop', 'while', 'then', 'is', 'end', 'select', 'case', 'while', 'until',
'goto', 'return'
),
2 => array(
'abs', 'and', 'mod', 'not', 'or', 'rem', 'xor'
),
3 => array(
'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array', 'at', 'body',
'constant', 'delay', 'delta', 'digits', 'entry', 'exit',
'function', 'generic', 'in', 'limited', 'new', 'null', 'of', 'others', 'out', 'package', 'pragma',
'private', 'procedure', 'protected', 'raise', 'range', 'record', 'renames', 'requeue', 'reverse',
'separate', 'subtype', 'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with'
)
),
'SYMBOLS' => array(
'(', ')'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #00007f;',
2 => 'color: #0000ff;',
3 => 'color: #46aa03; font-weight:bold;',
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'COMMENTS' => array(
1 => 'color: #adadad; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #7f007f;'
),
'NUMBERS' => array(
0 => 'color: #ff0000;'
),
'METHODS' => array(
1 => 'color: #202020;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

174
inc/geshi/apache.php Normal file
View File

@ -0,0 +1,174 @@
<?php
/*************************************************************************************
* apache.php
* ----------
* Author: Tux (tux@inmail.cz)
* Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/29/07
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Apache language file for GeSHi.
* Words are from SciTe configuration file
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Added support for URLs
* 2004/08/05 (1.0.0)
* - First Release
*
* TODO (updated 2004/07/29)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Apache',
'COMMENT_SINGLE' => array(1 => '#'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
/*keywords*/
1 => array(
'accessconfig','accessfilename','action','addalt',
'addaltbyencoding','addaltbytype','addcharset',
'adddefaultcharset','adddescription',
'addencoding','addhandler','addicon','addiconbyencoding',
'addiconbytype','addlanguage','addmodule','addmoduleinfo',
'addtype','agentlog','alias','aliasmatch',
'allow','allowconnect','allowoverride','anonymous',
'anonymous_authoritative','anonymous_logemail','anonymous_mustgiveemail',
'anonymous_nouserid','anonymous_verifyemail','authauthoritative',
'authdbauthoritative','authdbgroupfile','authdbmauthoritative',
'authdbmgroupfile','authdbmgroupfile','authdbuserfile','authdbmuserfile',
'authdigestfile','authgroupfile','authname','authtype',
'authuserfile','bindaddress','browsermatch','browsermatchnocase',
'bs2000account','cachedefaultexpire','cachedirlength','cachedirlevels',
'cacheforcecompletion','cachegcinterval','cachelastmodifiedfactor','cachemaxexpire',
'cachenegotiateddocs','cacheroot','cachesize','checkspelling',
'clearmodulelist','contentdigest','cookieexpires','cookielog',
'cookielog','cookietracking','coredumpdirectory','customlog',
'defaulticon','defaultlanguage','defaulttype','define',
'deny','directory','directorymatch','directoryindex',
'documentroot','errordocument','errorlog','example',
'expiresactive','expiresbytype','expiresdefault','extendedstatus',
'fancyindexing','files','filesmatch','forcetype',
'group','header','headername','hostnamelookups',
'identitycheck','ifdefine','ifmodule','imapbase',
'imapdefault','imapmenu','include','indexignore',
'indexoptions','keepalive','keepalivetimeout','languagepriority',
'limit','limitexcept','limitrequestbody','limitrequestfields',
'limitrequestfieldsize','limitrequestline','listen','listenbacklog',
'loadfile','loadmodule','location','locationmatch',
'lockfile','logformat','loglevel','maxclients',
'maxkeepaliverequests','maxrequestsperchild','maxspareservers','metadir',
'metafiles','metasuffix','mimemagicfile','minspareservers',
'mmapfile','namevirtualhost','nocache','options','order',
'passenv','pidfile','port','proxyblock','proxydomain',
'proxypass','proxypassreverse','proxyreceivebuffersize','proxyremote',
'proxyrequests','proxyvia','qsc','readmename',
'redirect','redirectmatch','redirectpermanent','redirecttemp',
'refererignore','refererlog','removehandler','require',
'resourceconfig','rewritebase','rewritecond','rewriteengine',
'rewritelock','rewritelog','rewriteloglevel','rewritemap',
'rewriteoptions','rewriterule','rlimitcpu','rlimitmem',
'rlimitnproc','satisfy','scoreboardfile','script',
'scriptalias','scriptaliasmatch','scriptinterpretersource','scriptlog',
'scriptlogbuffer','scriptloglength','sendbuffersize',
'serveradmin','serveralias','servername','serverpath',
'serverroot','serversignature','servertokens','servertype',
'setenv','setenvif','setenvifnocase','sethandler',
'singlelisten','startservers','threadsperchild','timeout',
'transferlog','typesconfig','unsetenv','usecanonicalname',
'user','userdir','virtualhost','virtualdocumentroot',
'virtualdocumentrootip','virtualscriptalias','virtualscriptaliasip',
'xbithack','from','all'
),
/*keyords 2*/
2 => array(
'on','off','standalone','inetd',
'force-response-1.0','downgrade-1.0','nokeepalive',
'ndexes','includes','followsymlinks','none',
'x-compress','x-gzip'
)
),
'SYMBOLS' => array(
'(', ')'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #00007f;',
2 => 'color: #0000ff;',
),
'COMMENTS' => array(
1 => 'color: #adadad; font-style: italic;',
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #7f007f;'
),
'NUMBERS' => array(
0 => 'color: #ff0000;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

200
inc/geshi/asm.php Normal file
View File

@ -0,0 +1,200 @@
<?php
/*************************************************************************************
* asm.php
* -------
* Author: Tux (tux@inmail.cz)
* Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/27
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* x86 Assembler language file for GeSHi.
* Words are from SciTe configuration file (based on NASM syntax)
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Added support for URLs
* - Added binary and hexadecimal regexps
* 2004/08/05 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'assembler',
'COMMENT_SINGLE' => array(1 => ';'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
/*CPU*/
1 => array(
'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp',
'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc',
'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp',
'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz',
'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop',
'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov',
'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf',
'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw',
'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat',
'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw',
'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr',
'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf',
'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd',
'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae',
'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe',
'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp',
'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock',
'rep','repe','repne','repnz','repz'
),
/*FPU*/
2 => array(
'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp',
'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv',
'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1',
'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul',
'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv',
'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave',
'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp',
'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1',
'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos',
'fstenvd','fucom','fucomp','fucompp'
),
/*registers*/
3 => array(
'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl',
'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx',
'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7'
),
/*Directive*/
4 => array(
'186','286','286c','286p','287','386','386c','386p','387','486','486p',
'8086','8087','alpha','break','code','const','continue','cref','data','data?',
'dosseg','else','elseif','endif','endw','err','err1','err2','errb',
'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef',
'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall',
'listif','listmacro','listmacroall',' model','no87','nocref','nolist',
'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack',
'startup','tfcond','type','until','untilcxz','while','xall','xcref',
'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dosseg','dq',
'dt','dup','dw','echo','else','elseif','elseif1','elseif2','elseifb','elseifdef','elseifdif',
'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end',
'endif','endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for',
'forc','ge','goto','group','high','highword','if','if1','if2','ifb','ifdef','ifdif',
'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke',
'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset',
'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out',
'page','popcontext','proc','proto','ptr','public','purge','pushcontext','record',
'repeat','rept','seg','segment','short','size','sizeof','sizestr','struc','struct',
'substr','subtitle','subttl','textequ','this','title','type','typedef','union','while','width',
'.model', '.stack', '.code', '.data'
),
/*Operands*/
5 => array(
'@b','@f','addr','basic','byte','c','carry?','dword',
'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword',
'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte',
'vararg','word','zero?','flat','near32','far32',
'abs','all','assumes','at','casemap','common','compact',
'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack','flat',
'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory',
'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique',
'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing',
'notpublic','oldmacros','oldstructs','os_dos','para','private','prologue','radix',
'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses'
)
),
'SYMBOLS' => array(
'[', ']', '(', ')'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #00007f;',
2 => 'color: #0000ff;',
3 => 'color: #46aa03; font-weight:bold;',
4 => 'color: #0000ff;',
5 => 'color: #0000ff;'
),
'COMMENTS' => array(
1 => 'color: #adadad; font-style: italic;',
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #7f007f;'
),
'NUMBERS' => array(
0 => 'color: #ff0000;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #ff0000;',
1 => 'color: #ff0000;'
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
0 => '[0-9a-fA-F][0-9a-fA-F]*[hH]',
1 => '[01][01]*[bB]'
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

153
inc/geshi/asp.php Normal file
View File

@ -0,0 +1,153 @@
<?php
/*************************************************************************************
* asp.php
* --------
* Author: Amit Gupta (http://blog.igeek.info/)
* Copyright: (c) 2004 Amit Gupta (http://blog.igeek.info/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/13
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* ASP language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Added support for URLs
* 2004/08/13 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Include all the functions, keywords etc that I have missed
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'ASP',
'COMMENT_SINGLE' => array(1 => "'", 2 => '//'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => 0,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'include', 'file', 'Dim', 'Option', 'Explicit', 'Implicit', 'Set', 'Select', 'ReDim', 'Preserve',
'ByVal', 'ByRef', 'End', 'Private', 'Public', 'If', 'Then', 'Else', 'ElseIf', 'Case', 'With', 'NOT',
'While', 'Wend', 'For', 'Loop', 'Do', 'Request', 'Response', 'Server', 'ADODB', 'Session', 'Application',
'Each', 'In', 'Get', 'Next', 'INT', 'CINT', 'CBOOL', 'CDATE', 'CBYTE', 'CCUR', 'CDBL', 'CLNG', 'CSNG',
'CSTR', 'Fix', 'Is', 'Sgn', 'String', 'Boolean', 'Currency', 'Me', 'Single', 'Long', 'Integer', 'Byte',
'Variant', 'Double', 'To', 'Let', 'Xor', 'Resume', 'On', 'Error', 'Imp', 'GoTo', 'Call', 'Global'
),
2 => array(
'Null', 'Nothing', 'And',
'False', '&lt;%', '%&gt;',
'&lt;script language=', '&lt;/script&gt;',
'True', 'var', 'Or', 'BOF', 'EOF',
'Function', 'Class', 'New', 'Sub'
),
3 => array(
'CreateObject', 'Write', 'Redirect', 'Cookies', 'BinaryRead', 'ClientCertificate', 'Form', 'QueryString',
'ServerVariables', 'TotalBytes', 'AddHeader', 'AppendToLog', 'BinaryWrite', 'Buffer', 'CacheControl',
'Charset', 'Clear', 'ContentType', 'End()', 'Expires', 'ExpiresAbsolute', 'Flush()', 'IsClientConnected',
'PICS', 'Status', 'Connection', 'Recordset', 'Execute', 'Abandon', 'Lock', 'UnLock', 'Command', 'Fields',
'Properties', 'Property', 'Send', 'Replace', 'InStr', 'TRIM', 'NOW', 'Day', 'Month', 'Hour', 'Minute', 'Second',
'Year', 'MonthName', 'LCase', 'UCase', 'Abs', 'Array', 'As', 'LEN', 'MoveFirst', 'MoveLast', 'MovePrevious',
'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll'
)
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #990099; font-weight: bold;',
2 => 'color: #0000ff; font-weight: bold;',
3 => 'color: #330066;'
),
'COMMENTS' => array(
1 => 'color: #008000;',
2 => 'color: #ff6600;',
'MULTI' => 'color: #008000;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #006600; font-weight:bold'
),
'STRINGS' => array(
0 => 'color: #cc0000;'
),
'NUMBERS' => array(
0 => 'color: #800000;'
),
'METHODS' => array(
1 => 'color: #9900cc;'
),
'SYMBOLS' => array(
0 => 'color: #006600; font-weight: bold'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
0 => '',
1 => '',
2 => '',
)
),
'URLS' => array(
1 => '',
2 => '',
3 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_MAYBE,
'SCRIPT_DELIMITERS' => array(
0 => array(
'<%' => '%>'
),
1 => array(
'<script language="vbscript" runat="server">' => '</script>'
),
2 => array(
'<script language="javascript" runat="server">' => '</script>'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
1 => true,
2 => true,
)
);
?>

130
inc/geshi/bash.php Normal file
View File

@ -0,0 +1,130 @@
<?php
/*************************************************************************************
* bash.php
* --------
* Author: Andreas Gohr (andi@splitbrain.org)
* Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/20
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* BASH language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Added support for URLs
* 2004/08/20 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Get symbols working
* * Highlight builtin vars
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Bash',
'COMMENT_SINGLE' => array(1 => '#'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function',
'if', 'in', 'select', 'then', 'until', 'while', 'time'
),
3 => array(
'source', 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command',
'compgen', 'complete', 'continue', 'declare', 'typeset', 'dirs',
'disown', 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc',
'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'kill', 'let',
'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'read', 'readonly',
'return', 'set', 'shift', 'shopt', 'suspend', 'test', 'times', 'trap',
'type', 'ulimit', 'umask', 'unalias', 'unset', 'wait'
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => true,
3 => true,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #0000ff;',
1 => 'color: #0000ff;',
2 => 'color: #0000ff;'
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
3 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}",
1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*",
2 => "([a-zA-Z_][a-zA-Z0-9_]*)="
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

144
inc/geshi/c.php Normal file
View File

@ -0,0 +1,144 @@
<?php
/*************************************************************************************
* c.php
* -----
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Contributors:
* - Jack Lloyd (lloyd@randombit.net)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.4
* CVS Revision Version: $Revision: 1.2 $
* Date Started: 2004/06/04
* Last Modified: $Date: 2004/12/01 08:44:47 $
*
* C language file for GeSHi.
*
* CHANGES
* -------
* 2004/XX/XX (1.0.4)
* - Added a couple of new keywords (Jack Lloyd)
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.2)
* - Added support for URLs
* 2004/08/05 (1.0.1)
* - Added support for symbols
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* - Get a list of inbuilt functions to add (and explore C more
* to complete this rather bare language file
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'C',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'if', 'return', 'while', 'case', 'continue', 'default',
'do', 'else', 'for', 'switch', 'goto'
),
2 => array(
'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
),
3 => array(
'printf', 'cout'
),
4 => array(
'auto', 'char', 'const', 'double', 'float', 'int', 'long',
'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t'
),
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #000066;',
4 => 'color: #993333;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
2 => 'color: #339933;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #202020;',
2 => 'color: #202020;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.',
2 => '::'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

176
inc/geshi/c_mac.php Normal file
View File

@ -0,0 +1,176 @@
<?php
/*************************************************************************************
* c_mac.php
* ---------
* Author: M. Uli Kusterer (witness.of.teachtext@gmx.net)
* Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.0
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/04
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* C for Macs language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'C',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'if', 'return', 'while', 'case', 'continue', 'default',
'do', 'else', 'for', 'switch', 'goto'
),
2 => array(
'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
// Mac-specific constants:
'kCFAllocatorDefault'
),
3 => array(
'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
),
4 => array(
'auto', 'char', 'const', 'double', 'float', 'int', 'long',
'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
// Mac-specific types:
'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef',
'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef',
'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef',
'CFNotificationRef', 'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef',
'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef',
'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef',
'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef',
'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef',
'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef',
'CFXMLTreeRef'
),
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000ff;',
2 => 'color: #0000ff;',
3 => 'color: #0000dd;',
4 => 'color: #0000ff;'
),
'COMMENTS' => array(
1 => 'color: #ff0000;',
2 => 'color: #339900;',
'MULTI' => 'color: #ff0000; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #666666; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #000000;'
),
'STRINGS' => array(
0 => 'color: #666666;'
),
'NUMBERS' => array(
0 => 'color: #0000dd;'
),
'METHODS' => array(
1 => 'color: #00eeff;',
2 => 'color: #00eeff;'
),
'SYMBOLS' => array(
0 => 'color: #000000;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.',
2 => '::'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

127
inc/geshi/caddcl.php Normal file
View File

@ -0,0 +1,127 @@
<?php
/*************************************************************************************
* caddcl.php
* ----------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/30
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* CAD DCL (Dialog Control Language) file for GeSHi.
*
* DCL for AutoCAD 12 or later and IntelliCAD all versions.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/1!/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'CADDCL',
'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'boxed_column','boxed_radio_column','boxed_radio_row','boxed_row',
'column','concatenation','button','dialog','edit_box','image','image_button',
'errtile','list_box','ok_cancel','ok_cancel_help','ok_cancel_help_errtile',
'ok_cancel_help_info','ok_only','paragraph','popup_list','radio_button',
'radio_column','radio_row','row','slider','spacer','spacer_0','spacer_1','text',
'text_part','toggle',
'action','alignment','allow_accept','aspect_ratio','big_increment',
'children_alignment','children_fixed_height',
'children_fixed_width','color',
'edit_limit','edit_width','fixed_height','fixed_width',
'height','initial_focus','is_cancel','is_default',
'is_enabled','is_tab_stop','is-bold','key','label','layout','list',
'max_value','min_value','mnemonic','multiple_select','password_char',
'small_increment','tabs','tab_truncate','value','width',
'false','true','left','right','centered','top','bottom',
'dialog_line','dialog_foreground','dialog_background',
'graphics_background','black','red','yellow','green','cyan',
'blue','magenta','whitegraphics_foreground',
'horizontal','vertical'
)
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

187
inc/geshi/cadlisp.php Normal file
View File

@ -0,0 +1,187 @@
<?php
/*************************************************************************************
* cadlisp.php
* -----------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/30
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* AutoCAD/IntelliCAD Lisp language file for GeSHi.
*
* For AutoCAD V.12..2005 and IntelliCAD all versions.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'CADLISP',
'COMMENT_SINGLE' => array(1 => ";"),
'COMMENT_MULTI' => array(";|" => "|;"),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'abs','acad_colordlg','acad_helpdlg','acad_strlsort','action_tile',
'add_list','alert','alloc','and','angle','angtof','angtos','append','apply',
'arx','arxload','arxunload','ascii','assoc','atan','atof','atoi','atom',
'atoms-family','autoarxload','autoload','Boole','boundp','caddr',
'cadr','car','cdr','chr','client_data_tile','close','command','cond',
'cons','cos','cvunit','defun','defun-q','defun-q-list-ref',
'defun-q-list-set','dictadd','dictnext','dictremove','dictrename',
'dictsearch','dimx_tile','dimy_tile','distance','distof','done_dialog',
'end_image','end_list','entdel','entget','entlast','entmake',
'entmakex','entmod','entnext','entsel','entupd','eq','equal','eval','exit',
'exp','expand','expt','fill_image','findfile','fix','float','foreach','function',
'gc','gcd','get_attr','get_tile','getangle','getcfg','getcname','getcorner',
'getdist','getenv','getfiled','getint','getkword','getorient','getpoint',
'getreal','getstring','getvar','graphscr','grclear','grdraw','grread','grtext',
'grvecs','handent','help','if','initdia','initget','inters','itoa','lambda','last',
'layoutlist','length','list','listp','load','load_dialog','log','logand','logior',
'lsh','mapcar','max','mem','member','menucmd','menugroup','min','minusp','mode_tile',
'namedobjdict','nentsel','nentselp','new_dialog','nil','not','nth','null',
'numberp','open','or','osnap','polar','prin1','princ','print','progn','prompt',
'quit','quote','read','read-char','read-line','redraw','regapp','rem','repeat',
'reverse','rtos','set','set_tile','setcfg','setenv','setfunhelp','setq','setvar',
'setview','sin','slide_image','snvalid','sqrt','ssadd','ssdel','ssget','ssgetfirst',
'sslength','ssmemb','ssname','ssnamex','sssetfirst','start_dialog','start_image',
'start_list','startapp','strcase','strcat','strlen','subst','substr','t','tablet',
'tblnext','tblobjname','tblsearch','term_dialog','terpri','textbox','textpage',
'textscr','trace','trans','type','unload_dialog','untrace','vector_image','ver',
'vports','wcmatch','while','write-char','write-line','xdroom','xdsize','zerop',
'vl-acad-defun','vl-acad-undefun','vl-arx-import','vlax-3D-point',
'vlax-add-cmd','vlax-create-object','vlax-curve-getArea',
'vlax-curve-getClosestPointTo','vlax-curve-getClosestPointToProjection',
'vlax-curve-getDistAtParam','vlax-curve-getDistAtPoint',
'vlax-curve-getEndParam','vlax-curve-getEndPoint',
'vlax-curve-getFirstDeriv','vlax-curve-getParamAtDist',
'vlax-curve-getParamAtPoint','vlax-curve-getPointAtDist',
'vlax-curve-getPointAtParam','vlax-curve-getSecondDeriv',
'vlax-curve-getStartParam','vlax-curve-getStartPoint',
'vlax-curve-isClosed','vlax-curve-isPeriodic','vlax-curve-isPlanar',
'vlax-dump-object','vlax-erased-p','vlax-for','vlax-get-acad-object',
'vlax-get-object','vlax-get-or-create-object','vlax-get-property',
'vlax-import-type-library','vlax-invoke-method','vlax-ldata-delete',
'vlax-ldata-get','vlax-ldata-list','vlax-ldata-put','vlax-ldata-test',
'vlax-make-safearray','vlax-make-variant','vlax-map-collection',
'vlax-method-applicable-p','vlax-object-released-p','vlax-product-key',
'vlax-property-available-p','vlax-put-property','vlax-read-enabled-p',
'vlax-release-object','vlax-remove-cmd','vlax-safearray-fill',
'vlax-safearray-get-dim','vlax-safearray-get-element',
'vlax-safearray-get-l-bound','vlax-safearray-get-u-bound',
'vlax-safearray-put-element','vlax-safearray-type','vlax-tmatrix',
'vlax-typeinfo-available-p','vlax-variant-change-type',
'vlax-variant-type','vlax-variant-value','vlax-write-enabled-p',
'vl-bb-ref','vl-bb-set','vl-catch-all-apply','vl-catch-all-error-message',
'vl-catch-all-error-p','vl-cmdf','vl-consp','vl-directory-files','vl-doc-export',
'vl-doc-import','vl-doc-ref','vl-doc-set','vl-every','vl-exit-with-error',
'vl-exit-with-value','vl-file-copy','vl-file-delete','vl-file-directory-p',
'vl-filename-base','vl-filename-directory','vl-filename-extension',
'vl-filename-mktemp','vl-file-rename','vl-file-size','vl-file-systime',
'vl-get-resource','vlisp-compile','vl-list-exported-functions',
'vl-list-length','vl-list-loaded-vlx','vl-load-all','vl-load-com',
'vl-load-reactors','vl-member-if','vl-member-if-not','vl-position',
'vl-prin1-to-string','vl-princ-to-string','vl-propagate','vlr-acdb-reactor',
'vlr-add','vlr-added-p','vlr-beep-reaction','vlr-command-reactor',
'vlr-current-reaction-name','vlr-data','vlr-data-set',
'vlr-deepclone-reactor','vlr-docmanager-reactor','vlr-dwg-reactor',
'vlr-dxf-reactor','vlr-editor-reactor','vl-registry-delete',
'vl-registry-descendents','vl-registry-read','vl-registry-write',
'vl-remove','vl-remove-if','vl-remove-if-not','vlr-insert-reactor',
'vlr-linker-reactor','vlr-lisp-reactor','vlr-miscellaneous-reactor',
'vlr-mouse-reactor','vlr-notification','vlr-object-reactor',
'vlr-owner-add','vlr-owner-remove','vlr-owners','vlr-pers','vlr-pers-list',
'vlr-pers-p','vlr-pers-release','vlr-reaction-names','vlr-reactions',
'vlr-reaction-set','vlr-reactors','vlr-remove','vlr-remove-all',
'vlr-set-notification','vlr-sysvar-reactor','vlr-toolbar-reactor',
'vlr-trace-reaction','vlr-type','vlr-types','vlr-undo-reactor',
'vlr-wblock-reactor','vlr-window-reactor','vlr-xref-reactor',
'vl-some','vl-sort','vl-sort-i','vl-string-elt','vl-string-left-trim',
'vl-string-mismatch','vl-string-position','vl-string-right-trim',
'vl-string-search','vl-string-subst','vl-string-translate','vl-string-trim',
'vl-symbol-name','vl-symbolp','vl-symbol-value','vl-unload-vlx','vl-vbaload',
'vl-vbarun','vl-vlx-loaded-p'
)
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

174
inc/geshi/cpp.php Normal file
View File

@ -0,0 +1,174 @@
<?php
/*************************************************************************************
* cpp.php
* -------
* Author: Dennis Bayer (Dennis.Bayer@mnifh-giessen.de)
* Contributors:
* - M. Uli Kusterer (witness.of.teachtext@gmx.net)
* - Jack Lloyd (lloyd@randombit.net)
* Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.2 $
* Date Started: 2004/09/27
* Last Modified: $Date: 2004/12/01 08:44:47 $
*
* C++ language file for GeSHi.
*
* CHANGES
* -------
* 2004/XX/XX (1.0.2)
* - Added several new keywords (Jack Lloyd)
* 2004/11/27 (1.0.1)
* - Added StdCLib function and constant names, changed color scheme to
* a cleaner one. (M. Uli Kusterer)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'C++',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
'switch', 'while'
),
2 => array(
'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid'
),
3 => array(
'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
),
4 => array(
'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
'register', 'short', 'shortint', 'signed', 'static', 'struct',
'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
),
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000ff;',
2 => 'color: #0000ff;',
3 => 'color: #0000dd;',
4 => 'color: #0000ff;'
),
'COMMENTS' => array(
1 => 'color: #ff0000;',
2 => 'color: #339900;',
'MULTI' => 'color: #ff0000; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #666666; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #000000;'
),
'STRINGS' => array(
0 => 'color: #666666;'
),
'NUMBERS' => array(
0 => 'color: #0000dd;'
),
'METHODS' => array(
1 => 'color: #00eeff;',
2 => 'color: #00eeff;'
),
'SYMBOLS' => array(
0 => 'color: #000000;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.',
2 => '::'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

229
inc/geshi/csharp.php Normal file
View File

@ -0,0 +1,229 @@
<?php
/*************************************************************************************
* csharp.php
* ----------
* Author: Alan Juden (alan@judenware.org)
* Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.0
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/04
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* C# language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.0)
* - Initial release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'CSharp',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'as', 'auto', 'base', 'break', 'case', 'catch', 'const', 'continue',
'default', 'do', 'else', 'event', 'explicit', 'extern', 'false',
'finally', 'fixed', 'for', 'foreach', 'goto', 'if', 'implicit',
'in', 'internal', 'lock', 'namespace', 'null', 'operator', 'out',
'override', 'params', 'private', 'protected', 'public', 'readonly',
'ref', 'return', 'sealed', 'stackalloc', 'static', 'switch', 'this',
'throw', 'true', 'try', 'unsafe', 'using', 'virtual', 'void', 'while'
),
2 => array(
'#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if',
'#line', '#region', '#undef', '#warning'
),
3 => array(
'checked', 'is', 'new', 'sizeof', 'typeof', 'unchecked'
),
4 => array(
'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double',
'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte',
'short', 'string', 'struct', 'uint', 'ulong', 'ushort'
),
5 => array(
'Microsoft.Win32',
'System',
'System.CodeDOM',
'System.CodeDOM.Compiler',
'System.Collections',
'System.Collections.Bases',
'System.ComponentModel',
'System.ComponentModel.Design',
'System.ComponentModel.Design.CodeModel',
'System.Configuration',
'System.Configuration.Assemblies',
'System.Configuration.Core',
'System.Configuration.Install',
'System.Configuration.Interceptors',
'System.Configuration.Schema',
'System.Configuration.Web',
'System.Core',
'System.Data',
'System.Data.ADO',
'System.Data.Design',
'System.Data.Internal',
'System.Data.SQL',
'System.Data.SQLTypes',
'System.Data.XML',
'System.Data.XML.DOM',
'System.Data.XML.XPath',
'System.Data.XML.XSLT',
'System.Diagnostics',
'System.Diagnostics.SymbolStore',
'System.DirectoryServices',
'System.Drawing',
'System.Drawing.Design',
'System.Drawing.Drawing2D',
'System.Drawing.Imaging',
'System.Drawing.Printing',
'System.Drawing.Text',
'System.Globalization',
'System.IO',
'System.IO.IsolatedStorage',
'System.Messaging',
'System.Net',
'System.Net.Sockets',
'System.NewXml',
'System.NewXml.XPath',
'System.NewXml.Xsl',
'System.Reflection',
'System.Reflection.Emit',
'System.Resources',
'System.Runtime.InteropServices',
'System.Runtime.InteropServices.Expando',
'System.Runtime.Remoting',
'System.Runtime.Serialization',
'System.Runtime.Serialization.Formatters',
'System.Runtime.Serialization.Formatters.Binary',
'System.Security',
'System.Security.Cryptography',
'System.Security.Cryptography.X509Certificates',
'System.Security.Permissions',
'System.Security.Policy',
'System.Security.Principal',
'System.ServiceProcess',
'System.Text',
'System.Text.RegularExpressions',
'System.Threading',
'System.Timers',
'System.Web',
'System.Web.Caching',
'System.Web.Configuration',
'System.Web.Security',
'System.Web.Services',
'System.Web.Services.Description',
'System.Web.Services.Discovery',
'System.Web.Services.Protocols',
'System.Web.UI',
'System.Web.UI.Design',
'System.Web.UI.Design.WebControls',
'System.Web.UI.Design.WebControls.ListControls',
'System.Web.UI.HtmlControls',
'System.Web.UI.WebControls',
'System.WinForms',
'System.WinForms.ComponentModel',
'System.WinForms.Design',
'System.Xml',
'System.Xml.Serialization',
'System.Xml.Serialization.Code',
'System.Xml.Serialization.Schema'
),
),
'SYMBOLS' => array(
'+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':',
'(', ')', '{', '}', '[', ']'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0600FF;',
2 => 'color: #FF8000; font-weight: bold;',
3 => 'color: #008000;',
4 => 'color: #FF0000;',
5 => 'color: #000000;'
),
'COMMENTS' => array(
1 => 'color: #008080; font-style: italic;',
2 => 'color: #008080;',
'MULTI' => 'color: #008080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #008080; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #000000;'
),
'STRINGS' => array(
0 => 'color: #808080;'
),
'NUMBERS' => array(
0 => 'color: #FF0000;'
),
'METHODS' => array(
1 => 'color: #0000FF;',
2 => 'color: #0000FF;'
),
'SYMBOLS' => array(
0 => 'color: #008000;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.google.com/search?q={FNAME}+msdn.microsoft.com',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.',
2 => '::'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

0
inc/geshi/css-gen.cfg Normal file
View File

177
inc/geshi/css.php Normal file
View File

@ -0,0 +1,177 @@
<?php
/*************************************************************************************
* css.php
* -------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.3
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/18
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* CSS language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.2)
* - Changed regexps to catch "-" symbols
* - Added support for URLs
* 2004/08/05 (1.0.1)
* - Added support for symbols
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Improve or drop regexps for class/id/psuedoclass highlighting
* * Re-look at keywords - possibly to make several CSS language
* files, all with different versions of CSS in them
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'CSS',
'COMMENT_SINGLE' => array(1 => '@'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"', "'"),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'aqua', 'azimuth', 'background-attachment', 'background-color',
'background-image', 'background-position', 'background-repeat',
'background', 'black', 'blue', 'border-bottom-color', 'border-bottom-style',
'border-bottom-width', 'border-left-color', 'border-left-style',
'border-left-width', 'border-right', 'border-right-color',
'border-right-style', 'border-right-width', 'border-top-color',
'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
'border-left', 'border-width', 'border-color', 'border-spacing',
'border-style', 'border-top', 'border', 'bottom', 'caption-side',
'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
'font-weight', 'font', 'height', 'left', 'letter-spacing', 'line-height',
'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
'min-width', 'orphans', 'outline', 'outline-color', 'outline-style',
'outline-width', 'overflow', 'padding-bottom', 'padding-left',
'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
'width', 'word-spacing', 'z-index'
),
2 => array(
'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
'baseline', 'behind', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'both',
'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
'pointer', 'portrait', 'purple', 'px',
'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
'static', 'status-bar', 'super', 'sw-resize',
'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
'visible',
'w-resize', 'wait', 'white', 'wider',
'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
'yellow', 'yes'
)
),
'SYMBOLS' => array(
'(', ')', '{', '}', ':', ';'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => true,
2 => true
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #000000; font-weight: bold;',
2 => 'color: #993333;'
),
'COMMENTS' => array(
1 => 'color: #a1a100;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'SCRIPT' => array(
),
'REGEXPS' => array(
0 => 'color: #cc00cc;',
1 => 'color: #6666ff;',
2 => 'color: #3333ff;',
)
),
'URLS' => array(
1 => '',
2 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
0 => '\#[a-zA-Z0-9\-]+\s+\{',
1 => '\.[a-zA-Z0-9\-]+\s',
2 => ':[a-zA-Z0-9\-]+\s'
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

159
inc/geshi/delphi.php Normal file
View File

@ -0,0 +1,159 @@
<?php
/*************************************************************************************
* delphi.php
* ----------
* Author: Járja Norbert (jnorbi@vipmail.hu)
* Copyright: (c) 2004 Járja Norbert, Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/26
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Delphi (Object Pascal) language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Delphi',
'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
'CASE_KEYWORDS' => 0,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'And', 'Array', 'As', 'Begin', 'Case', 'Class', 'Constructor', 'Destructor', 'Div', 'Do', 'DownTo', 'Else',
'End', 'Except', 'File', 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', 'Interface',
'Is', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Packed', 'Procedure', 'Program', 'Property', 'Raise', 'Record',
'Repeat', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', 'To', 'Try', 'Unit', 'Until', 'Uses', 'While', 'With', 'Xor'
),
2 => array(
'nil', 'false', 'true', 'var', 'type', 'const'
),
3 => array(
'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr',
'AnsiLowerCase', 'AnsiMatchStr', 'AnsiMidStr', 'AnsiPos', 'AnsiReplaceStr', 'AnsiReverseString', 'AnsiRightStr',
'AnsiStartsStr', 'AnsiUpperCase', 'ArcCos', 'ArcSin', 'ArcTan', 'Assigned', 'BeginThread', 'Bounds', 'CelsiusToFahrenheit',
'ChangeFileExt', 'Chr', 'CompareStr', 'CompareText', 'Concat', 'Convert', 'Copy', 'Cos', 'CreateDir', 'CurrToStr',
'CurrToStrF', 'Date', 'DateTimeToFileDate', 'DateTimeToStr', 'DateToStr', 'DayOfTheMonth', 'DayOfTheWeek', 'DayOfTheYear',
'DayOfWeek', 'DaysBetween', 'DaysInAMonth', 'DaysInAYear', 'DaySpan', 'DegToRad', 'DeleteFile', 'DiskFree', 'DiskSize',
'DupeString', 'EncodeDate', 'EncodeDateTime', 'EncodeTime', 'EndOfADay', 'EndOfAMonth', 'Eof', 'Eoln', 'Exp', 'ExtractFileDir',
'ExtractFileDrive', 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', 'FahrenheitToCelsius', 'FileAge',
'FileDateToDateTime', 'FileExists', 'FilePos', 'FileSearch', 'FileSetDate', 'FileSize', 'FindClose', 'FindCmdLineSwitch',
'FindFirst', 'FindNext', 'FloatToStr', 'FloatToStrF', 'Format', 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'Frac',
'GetCurrentDir', 'GetLastError', 'GetMem', 'High', 'IncDay', 'IncMinute', 'IncMonth', 'IncYear', 'InputBox',
'InputQuery', 'Int', 'IntToHex', 'IntToStr', 'IOResult', 'IsInfinite', 'IsLeapYear', 'IsMultiThread', 'IsNaN',
'LastDelimiter', 'Length', 'Ln', 'Lo', 'Log10', 'Low', 'LowerCase', 'Max', 'Mean', 'MessageDlg', 'MessageDlgPos',
'MonthOfTheYear', 'Now', 'Odd', 'Ord', 'ParamCount', 'ParamStr', 'Pi', 'Point', 'PointsEqual', 'Pos', 'Pred',
'Printer', 'PromptForFileName', 'PtInRect', 'RadToDeg', 'Random', 'RandomRange', 'RecodeDate', 'RecodeTime', 'Rect',
'RemoveDir', 'RenameFile', 'Round', 'SeekEof', 'SeekEoln', 'SelectDirectory', 'SetCurrentDir', 'Sin', 'SizeOf',
'Slice', 'Sqr', 'Sqrt', 'StringOfChar', 'StringReplace', 'StringToWideChar', 'StrToCurr', 'StrToDate', 'StrToDateTime',
'StrToFloat', 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', 'StuffString', 'Succ', 'Sum', 'Tan',
'Time', 'TimeToStr', 'Tomorrow', 'Trunc', 'UpCase', 'UpperCase', 'VarType', 'WideCharToString', 'WrapText', 'Yesterday',
'Append', 'AppendStr', 'Assign', 'AssignFile', 'AssignPrn', 'Beep', 'BlockRead', 'BlockWrite', 'Break',
'ChDir', 'Close', 'CloseFile', 'Continue', 'DateTimeToString', 'Dec', 'DecodeDate', 'DecodeDateTime',
'DecodeTime', 'Delete', 'Dispose', 'EndThread', 'Erase', 'Exclude', 'Exit', 'FillChar', 'Flush', 'FreeAndNil',
'FreeMem', 'GetDir', 'GetLocaleFormatSettings', 'Halt', 'Inc', 'Include', 'Insert', 'MkDir', 'Move', 'New',
'ProcessPath', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', 'Rename', 'ReplaceDate', 'ReplaceTime',
'Reset', 'ReWrite', 'RmDir', 'RunError', 'Seek', 'SetLength', 'SetString', 'ShowMessage', 'ShowMessageFmt',
'ShowMessagePos', 'Str', 'Truncate', 'Val', 'Write', 'WriteLn'
),
4 => array(
'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended',
'Int64', 'Integer', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PChar', 'PCurrency', 'PDateTime',
'PExtended', 'PInt64', 'Pointer', 'PShortString', 'PString', 'PVariant', 'PWideChar', 'PWideString',
'Real', 'Real48', 'ShortInt', 'ShortString', 'Single', 'SmallInt', 'String', 'TBits', 'TConvType', 'TDateTime',
'Text', 'TextFile', 'TFloatFormat', 'TFormatSettings', 'TList', 'TObject', 'TOpenDialog', 'TPoint',
'TPrintDialog', 'TRect', 'TReplaceFlags', 'TSaveDialog', 'TSearchRec', 'TStringList', 'TSysCharSet',
'TThreadFunc', 'Variant', 'WideChar', 'WideString', 'Word'
),
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #000000; font-weight: bold;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #000066;',
4 => 'color: #993333;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'REGEXPS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => '',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

254
inc/geshi/html4strict.php Normal file
View File

@ -0,0 +1,254 @@
<?php
/*************************************************************************************
* html4strict.php
* ---------------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.3
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/10
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* HTML 4.01 strict language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.2)
* - Added support for URLs
* 2004/08/05 (1.0.1)
* - Added INS and DEL
* - Removed the background colour from tags' styles
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Check that only HTML4 strict attributes are highlighted
* * Eliminate empty tags that aren't allowed in HTML4 strict
* * Split to several files - html4trans, xhtml1 etc
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'HTML',
'COMMENT_SINGLE' => array(),
'COMMENT_MULTI' => array('<!--' => '-->'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
),
2 => array(
'&lt;a&gt;', '&lt;abbr&gt;', '&lt;acronym&gt;', '&lt;address&gt;', '&lt;applet&gt;',
'&lt;a', '&lt;abbr', '&lt;acronym', '&lt;address', '&lt;applet',
'&lt;/a&gt;', '&lt;/abbr&gt;', '&lt;/acronym&gt;', '&lt;/address&gt;', '&lt;/applet&gt;',
'&lt;/a', '&lt;/abbr', '&lt;/acronym', '&lt;/address', '&lt;/applet',
'&lt;base&gt;', '&lt;basefont&gt;', '&lt;bdo&gt;', '&lt;big&gt;', '&lt;blockquote&gt;', '&lt;body&gt;', '&lt;br&gt;', '&lt;button&gt;', '&lt;b&gt;',
'&lt;base', '&lt;basefont', '&lt;bdo', '&lt;big', '&lt;blockquote', '&lt;body', '&lt;br', '&lt;button', '&lt;b',
'&lt;/base&gt;', '&lt;/basefont&gt;', '&lt;/bdo&gt;', '&lt;/big&gt;', '&lt;/blockquote&gt;', '&lt;/body&gt;', '&lt;/br&gt;', '&lt;/button&gt;', '&lt;/b&gt;',
'&lt;/base', '&lt;/basefont', '&lt;/bdo', '&lt;/big', '&lt;/blockquote', '&lt;/body', '&lt;/br', '&lt;/button', '&lt;/b',
'&lt;caption&gt;', '&lt;center&gt;', '&lt;cite&gt;', '&lt;code&gt;', '&lt;colgroup&gt;', '&lt;col&gt;',
'&lt;caption', '&lt;center', '&lt;cite', '&lt;code', '&lt;colgroup', '&lt;col',
'&lt;/caption&gt;', '&lt;/center&gt;', '&lt;/cite&gt;', '&lt;/code&gt;', '&lt;/colgroup&gt;', '&lt;/col&gt;',
'&lt;/caption', '&lt;/center', '&lt;/cite', '&lt;/code', '&lt;/colgroup', '&lt;/col',
'&lt;dd&gt;', '&lt;del&gt;', '&lt;dfn&gt;', '&lt;dir&gt;', '&lt;div&gt;', '&lt;dl&gt;', '&lt;dt&gt;',
'&lt;dd', '&lt;del', '&lt;dfn', '&lt;dir', '&lt;div', '&lt;dl', '&lt;dt',
'&lt;/dd&gt;', '&lt;/del&gt;', '&lt;/dfn&gt;', '&lt;/dir&gt;', '&lt;/div&gt;', '&lt;/dl&gt;', '&lt;/dt&gt;',
'&lt;/dd', '&lt;/del', '&lt;/dfn', '&lt;/dir', '&lt;/div', '&lt;/dl', '&lt;/dt',
'&lt;em&gt;',
'&lt;em',
'&lt;/em&gt;',
'&lt;/em',
'&lt;fieldset&gt;', '&lt;font&gt;', '&lt;form&gt;', '&lt;frame&gt;', '&lt;frameset&gt;',
'&lt;fieldset', '&lt;font', '&lt;form', '&lt;frame', '&lt;frameset',
'&lt;/fieldset&gt;', '&lt;/font&gt;', '&lt;/form&gt;', '&lt;/frame&gt;', '&lt;/frameset&gt;',
'&lt;/fieldset', '&lt;/font', '&lt;/form', '&lt;/frame', '&lt;/frameset',
'&lt;h1&gt;', '&lt;h2&gt;', '&lt;h3&gt;', '&lt;h4&gt;', '&lt;h5&gt;', '&lt;h6&gt;', '&lt;head&gt;', '&lt;hr&gt;', '&lt;html&gt;',
'&lt;h1', '&lt;h2', '&lt;h3', '&lt;h4', '&lt;h5', '&lt;h6', '&lt;head', '&lt;hr', '&lt;html',
'&lt;/h1&gt;', '&lt;/h2&gt;', '&lt;/h3&gt;', '&lt;/h4&gt;', '&lt;/h5&gt;', '&lt;/h6&gt;', '&lt;/head&gt;', '&lt;/hr&gt;', '&lt;/html&gt;',
'&lt;/h1', '&lt;/h2', '&lt;/h3', '&lt;/h4', '&lt;/h5', '&lt;/h6', '&lt;/head', '&lt;/hr', '&lt;/html',
'&lt;iframe&gt;', '&lt;ilayer&gt;', '&lt;img&gt;', '&lt;input&gt;', '&lt;ins&gt;', '&lt;isindex&gt;', '&lt;i&gt;',
'&lt;iframe', '&lt;ilayer', '&lt;img', '&lt;input', '&lt;ins', '&lt;isindex', '&lt;i',
'&lt;/iframe&gt;', '&lt;/ilayer&gt;', '&lt;/img&gt;', '&lt;/input&gt;', '&lt;/ins&gt;', '&lt;/isindex&gt;', '&lt;/i&gt;',
'&lt;/iframe', '&lt;/ilayer', '&lt;/img', '&lt;/input', '&lt;/ins', '&lt;/isindex', '&lt;/i',
'&lt;kbd&gt;',
'&lt;kbd',
'&t;/kbd&gt;',
'&lt;/kbd',
'&lt;label&gt;', '&lt;legend&gt;', '&lt;link&gt;', '&lt;li&gt;',
'&lt;label', '&lt;legend', '&lt;link', '&lt;li',
'&lt;/label&gt;', '&lt;/legend&gt;', '&lt;/link&gt;', '&lt;/li&gt;',
'&lt;/label', '&lt;/legend', '&lt;/link', '&lt;/li',
'&lt;map&gt;', '&lt;meta&gt;',
'&lt;map', '&lt;meta',
'&lt;/map&gt;', '&lt;/meta&gt;',
'&lt;/map', '&lt;/meta',
'&lt;noframes&gt;', '&lt;noscript&gt;',
'&lt;noframes', '&lt;noscript',
'&lt;/noframes&gt;', '&lt;/noscript&gt;',
'&lt;/noframes', '&lt;/noscript',
'&lt;object&gt;', '&lt;ol&gt;', '&lt;optgroup&gt;', '&lt;option&gt;',
'&lt;object', '&lt;ol', '&lt;optgroup', '&lt;option',
'&lt;/object&gt;', '&lt;/ol&gt;', '&lt;/optgroup&gt;', '&lt;/option&gt;',
'&lt;/object', '&lt;/ol', '&lt;/optgroup', '&lt;/option',
'&lt;param&gt;', '&lt;pre&gt;', '&lt;p&gt;',
'&lt;param', '&lt;pre', '&lt;p',
'&lt;/param&gt;', '&lt;/pre&gt;', '&lt;/p&gt;',
'&lt;/param', '&lt;/pre', '&lt;/p',
'&lt;q&gt;',
'&lt;q',
'&lt;/q&gt;',
'&lt;/q',
'&lt;samp&gt;', '&lt;script&gt;', '&lt;select&gt;', '&lt;small&gt;', '&lt;span&gt;', '&lt;strike&gt;', '&lt;strong&gt;', '&lt;style&gt;', '&lt;sub&gt;', '&lt;sup&gt;', '&lt;s&gt;',
'&lt;samp', '&lt;script', '&lt;select', '&lt;small', '&lt;span', '&lt;strike', '&lt;strong', '&lt;style', '&lt;sub', '&lt;sup', '&lt;s',
'&lt;/samp&gt;', '&lt;/script&gt;', '&lt;/select&gt;', '&lt;/small&gt;', '&lt;/span&gt;', '&lt;/strike&gt;', '&lt;/strong&gt;', '&lt;/style&gt;', '&lt;/sub&gt;', '&lt;/sup&gt;', '&lt;/s&gt;',
'&lt;/samp', '&lt;/script', '&lt;/select', '&lt;/small', '&lt;/span', '&lt;/strike', '&lt;/strong', '&lt;/style', '&lt;/sub', '&lt;/sup', '&lt;/s',
'&lt;table&gt;', '&lt;tbody&gt;', '&lt;td&gt;', '&lt;textarea&gt;', '&lt;text&gt;', '&lt;tfoot&gt;', '&lt;thead&gt;', '&lt;th&gt;', '&lt;title&gt;', '&lt;tr&gt;', '&lt;tt&gt;',
'&lt;table', '&lt;tbody', '&lt;td', '&lt;textarea', '&lt;text', '&lt;tfoot', '&lt;tfoot', '&lt;thead', '&lt;th', '&lt;title', '&lt;tr', '&lt;tt',
'&lt;/table&gt;', '&lt;/tbody&gt;', '&lt;/td&gt;', '&lt;/textarea&gt;', '&lt;/text&gt;', '&lt;/tfoot&gt;', '&lt;/thead', '&lt;/tfoot', '&lt;/th&gt;', '&lt;/title&gt;', '&lt;/tr&gt;', '&lt;/tt&gt;',
'&lt;/table', '&lt;/tbody', '&lt;/td', '&lt;/textarea', '&lt;/text', '&lt;/tfoot', '&lt;/tfoot', '&lt;/thead', '&lt;/th', '&lt;/title', '&lt;/tr', '&lt;/tt',
'&lt;ul&gt;', '&lt;u&gt;',
'&lt;ul', '&lt;u',
'&lt;/ul&gt;', '&lt;/ul&gt;',
'&lt;/ul', '&lt;/u',
'&lt;var&gt;',
'&lt;var',
'&lt;/var&gt;',
'&lt;/var',
'&gt;', '&lt;'
),
3 => array(
'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
'background', 'bgcolor', 'border',
'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
'enctype',
'face', 'for', 'frame', 'frameborder',
'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
'id', 'ismap',
'label', 'lang', 'language', 'link', 'longdesc',
'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
'name', 'nohref', 'noresize', 'noshade', 'nowrap',
'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
'profile', 'prompt',
'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
'tabindex', 'target', 'text', 'title', 'type',
'usemap',
'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
'width'
)
),
'SYMBOLS' => array(
'/', '='
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'SCRIPT' => array(
0 => 'color: #00bbdd;',
1 => 'color: #ddbb00;',
2 => 'color: #009900;'
),
'REGEXPS' => array(
)
),
'URLS' => array(
1 => '',
2 => 'http://december.com/html/4/element/{FNAME}.html',
3 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
'SCRIPT_DELIMITERS' => array(
0 => array(
'<!DOCTYPE' => '>'
),
1 => array(
'&' => ';'
),
2 => array(
'<' => '>'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => false,
1 => false,
2 => true
)
);
?>

1402
inc/geshi/java.php Normal file

File diff suppressed because it is too large Load Diff

146
inc/geshi/javascript.php Normal file
View File

@ -0,0 +1,146 @@
<?php
/*************************************************************************************
* javascript.php
* --------------
* Author: Ben Keen (ben.keen@gmail.com)
* Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/20
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* JavaScript language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'JAVASCRIPT',
'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
'while', 'write', 'with'
),
2 => array(
'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
'protected', 'public', 'super', 'true', 'use', 'var'
),
3 => array(
// common functions for Window object
'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
'stop',
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #000066; font-weight: bold;',
2 => 'color: #003366; font-weight: bold;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
1 => 'color: #009900; font-style: italic;',
'MULTI' => 'color: #009900; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #3366CC;'
),
'NUMBERS' => array(
0 => 'color: #CC0000;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #0066FF;'
),
'SCRIPT' => array(
0 => '',
1 => '',
2 => '',
3 => ''
)
),
'URLS' => array(
1 => '',
2 => '',
3 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
0 => "/.*/([igm]*)?" // matches js reg exps
),
'STRICT_MODE_APPLIES' => GESHI_MAYBE,
'SCRIPT_DELIMITERS' => array(
0 => array(
'<script type="text/javascript">' => '</script>'
),
1 => array(
'<script language="javascript">' => '</script>'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
1 => true
)
);
?>

131
inc/geshi/lisp.php Normal file
View File

@ -0,0 +1,131 @@
<?php
/*************************************************************************************
* lisp.php
* --------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/30
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Generic Lisp language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/08/30 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'LISP',
'COMMENT_SINGLE' => array(1 => ';'),
'COMMENT_MULTI' => array(';|' => '|;'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'not','defun','princ',
'eval','apply','funcall','quote','identity','function',
'complement','backquote','lambda','set','setq','setf',
'defun','defmacro','gensym','make','symbol','intern',
'symbol','name','symbol','value','symbol','plist','get',
'getf','putprop','remprop','hash','make','array','aref',
'car','cdr','caar','cadr','cdar','cddr','caaar','caadr','cadar',
'caddr','cdaar','cdadr','cddar','cdddr','caaaar','caaadr',
'caadar','caaddr','cadaar','cadadr','caddar','cadddr',
'cdaaar','cdaadr','cdadar','cdaddr','cddaar','cddadr',
'cdddar','cddddr','cons','list','append','reverse','last','nth',
'nthcdr','member','assoc','subst','sublis','nsubst',
'nsublis','remove','length','list','length',
'mapc','mapcar','mapl','maplist','mapcan','mapcon','rplaca',
'rplacd','nconc','delete','atom','symbolp','numberp',
'boundp','null','listp','consp','minusp','zerop','plusp',
'evenp','oddp','eq','eql','equal','cond','case','and','or',
'let','l','if','prog','prog1','prog2','progn','go','return',
'do','dolist','dotimes','catch','throw','error','cerror','break',
'continue','errset','baktrace','evalhook','truncate','float',
'rem','min','max','abs','sin','cos','tan','expt','exp','sqrt',
'random','logand','logior','logxor','lognot','bignums','logeqv',
'lognand','lognor','logorc2','logtest','logbitp','logcount',
'integer','length','nil'
)
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
0 => 'color: #202020;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

132
inc/geshi/lua.php Normal file
View File

@ -0,0 +1,132 @@
<?php
/*************************************************************************************
* lua.php
* -------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/10
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* LUA language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'LUA',
'COMMENT_SINGLE' => array(1 => "--"),
'COMMENT_MULTI' => array('--[[' => ']]'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'and','break','do','else','elseif','end','false','for','function','if',
'in','local','nil','not','or','repeat','return','then','true','until','while',
'_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring',
'print','tonumber','tostring','type','unpack',
'_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT',
'_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype',
'rawget','rawset','require','sort','tinsert','tremove',
'abs','acos','asin','atan','atan2','ceil','cos','deg','exp',
'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed',
'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan',
'openfile','closefile','readfrom','writeto','appendto',
'remove','rename','flush','seek','tmpfile','tmpname','read','write',
'clock','date','difftime','execute','exit','getenv','setlocale','time',
'_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall',
'rawegal','rawget','rawset','require','setfenv','setmetatable','xpcall',
'string','table','math','coroutine','io','os','debug',
'string.byte','string.char','string.dump','string.find','string.len',
'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub',
'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn',
'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp',
'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod',
'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan',
'coroutine.create','coroutine.resume','coroutine.status',
'coroutine.wrap','coroutine.yield',
'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write',
'io.stdin','io.stdout','io.stderr',
'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename',
'os.setlocale','os.time','os.tmpname'
)
),
'SYMBOLS' => array(
'(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => true
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

164
inc/geshi/nsis.php Normal file
View File

@ -0,0 +1,164 @@
<?php
/*************************************************************************************
* nsis.php
* --------
* Author: Tux (tux@inmail.cz)
* Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/29/07
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* NullSoft Installer System language file for GeSHi.
* Words are from SciTe configuration file
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Added support for URLs
* 2004/08/05 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'nsis',
'COMMENT_SINGLE' => array(1 => ';'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'",'"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'What','Abort','AddSize','AllowRootDirInstall','AutoCloseWindow',
'BGGradient','BrandingText','BringToFront','CRCCheck','Call','CallInstDLL','Caption','ClearErrors',
'CompletedText','ComponentText','CopyFiles','CreateDirectory','CreateShortCut','Delete',
'DeleteINISec','DeleteINIStr','DeleteRegKey','DeleteRegValue','DetailPrint','DetailsButtonText',
'DirShow','DirText','DisabledBitmap','EnabledBitmap','EnumRegKey','EnumRegValue','Exch','Exec',
'ExecShell','ExecWait','ExpandEnvStrings','File','FileClose','FileErrorText','FileOpen','FileRead',
'FileReadByte','FileSeek','FileWrite','FileWriteByte','FindClose','FindFirst','FindNext','FindWindow',
'Function','FunctionEnd','GetCurrentAddress','GetDLLVersionLocal','GetDllVersion','GetFileTime',
'GetFileTimeLocal','GetFullPathName','GetFunctionAddress','GetLabelAddress','GetTempFileName',
'Goto','HideWindow','Icon','IfErrors','IfFileExists','IfRebootFlag','InstProgressFlags','InstType',
'InstallButtonText','InstallColors','InstallDir','InstallDirRegKey','IntCmp','IntCmpU','IntFmt','IntOp',
'IsWindow','LicenseData','LicenseText','MessageBox','MiscButtonText','Name','OutFile','Pop','Push',
'Quit','RMDir','ReadEnvStr','ReadINIStr','ReadRegDword','ReadRegStr','Reboot','RegDLL','Rename',
'Return','SearchPath','Section','SectionDivider','SectionEnd','SectionIn','SendMessage','SetAutoClose',
'SetCompress','SetCompressor','SetDatablockOptimize','SetDateSave','SetDetailsPrint','SetDetailsView','SetErrors',
'SetFileAttributes','SetOutPath','SetOverwrite','SetRebootFlag','ShowInstDetails','ShowUninstDetails',
'SilentInstall','SilentUnInstall','Sleep','SpaceTexts','StrCmp','StrCpy','StrLen','SubCaption','UnRegDLL',
'UninstallButtonText','UninstallCaption','UninstallEXEName','UninstallIcon','UninstallSubCaption',
'UninstallText','WindowIcon','WriteINIStr','WriteRegBin','WriteRegDword','WriteRegDWORD','WriteRegExpandStr',
'WriteRegStr','WriteUninstaller','SectionGetFlags','SectionSetFlags','SectionSetText','SectionGetText',
'LogText','LogSet','CreateFont','SetShellVarContext','SetStaticBkColor','SetBrandingImage','PluginDir',
'SubSectionEnd','SubSection','CheckBitmap','ChangeUI','SetFont','AddBrandingImage','XPStyle','Var',
'LangString','!define','!undef','!ifdef','!ifndef','!endif','!else','!macro','!echo','!warning','!error','!verbose',
'!macroend','!insertmacro','!system','!include','!cd','!packhdr','!addplugindir'
),
2 => array(
'$0','$1','$2','$3','$4','$5','$6','$7','$8','$9',
'$R0','$R1','$R2','$R3','$R4','$R5','$R6','$R7','$R8','$R9','$CMDLINE','$DESKTOP',
'$EXEDIR','$HWNDPARENT','$INSTDIR','$OUTDIR','$PROGRAMFILES','${NSISDIR}',
'$QUICKLAUNCH','$SMPROGRAMS','$SMSTARTUP','$STARTMENU','$SYSDIR','$TEMP','$WINDIR'
),
3 => array(
'ARCHIVE','FILE_ATTRIBUTE_ARCHIVE','FILE_ATTRIBUTE_HIDDEN',
'FILE_ATTRIBUTE_NORMAL','FILE_ATTRIBUTE_OFFLINE','FILE_ATTRIBUTE_READONLY',
'FILE_ATTRIBUTE_SYSTEM','FILE_ATTRIBUTE_TEMPORARY','HIDDEN','HKCC','HKCR','HKCU',
'HKDD','HKEY_CLASSES_ROOT','HKEY_CURRENT_CONFIG','HKEY_CURRENT_USER','HKEY_DYN_DATA',
'HKEY_LOCAL_MACHINE','HKEY_PERFORMANCE_DATA','HKEY_USERS','HKLM','HKPD','HKU','IDABORT',
'IDCANCEL','IDIGNORE','IDNO','IDOK','IDRETRY','IDYES','MB_ABORTRETRYIGNORE','MB_DEFBUTTON1',
'MB_DEFBUTTON2','MB_DEFBUTTON3','MB_DEFBUTTON4','MB_ICONEXCLAMATION',
'MB_ICONINFORMATION','MB_ICONQUESTION','MB_ICONSTOP','MB_OK','MB_OKCANCEL',
'MB_RETRYCANCEL','MB_RIGHT','MB_SETFOREGROUND','MB_TOPMOST','MB_YESNO','MB_YESNOCANCEL',
'NORMAL','OFFLINE','READONLY','SW_SHOWMAXIMIZED','SW_SHOWMINIMIZED','SW_SHOWNORMAL',
'SYSTEM','TEMPORARY','auto','colored','false','force','hide','ifnewer','nevershow','normal',
'off','on','show','silent','silentlog','smooth','true','try'
),
4 => array(
'MyFunction','MySomethingElse'
)
),
'SYMBOLS' => array(
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #00007f;',
2 => 'color: #0000ff;',
3 => 'color: #46aa03; font-weight:bold;',
4 => 'color: #0000ff;',
),
'COMMENTS' => array(
1 => 'color: #adadad; font-style: italic;',
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #7f007f;'
),
'NUMBERS' => array(
0 => 'color: #ff0000;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => '',
4 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

241
inc/geshi/objc.php Normal file
View File

@ -0,0 +1,241 @@
<?php
/*************************************************************************************
* objc.php
* --------
* Author: M. Uli Kusterer (witness.of.teachtext@gmx.net)
* Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.0
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/04
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Objective C language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Objective C',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'if', 'return', 'while', 'case', 'continue', 'default',
'do', 'else', 'for', 'switch', 'goto'
),
2 => array(
'NULL', 'false', 'break', 'true', 'enum', 'nil', 'Nil', 'errno', 'EDOM',
'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC'
),
3 => array(
'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
),
4 => array( // Data types:
'auto', 'char', 'const', 'double', 'float', 'int', 'long',
'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
// OpenStep/GNUstep/Cocoa:
'SEL', 'id', 'NSRect', 'NSRange', 'NSPoint', 'NSZone', 'Class', 'IMP', 'BOOL',
// OpenStep/GNUstep/Cocoa @identifiers
'@selector', '@class', '@protocol', '@interface', '@implementation', '@end',
'@private', '@protected', '@public', '@try', '@throw', '@catch', '@finally',
'@encode', '@defs', '@synchronized'
),
5 => array( // OpenStep/GNUstep/Cocoa Foundation
'NSAppleEventDescriptor', 'NSNetService', 'NSAppleEventManager',
'NSNetServiceBrowser', 'NSAppleScript', 'NSNotification', 'NSArchiver',
'NSNotificationCenter', 'NSArray', 'NSNotificationQueue', 'NSAssertionHandler',
'NSNull', 'NSAttributedString', 'NSNumber', 'NSAutoreleasePool',
'NSNumberFormatter', 'NSBundle', 'NSObject', 'NSCachedURLResponse',
'NSOutputStream', 'NSCalendarDate', 'NSPipe', 'NSCharacterSet', 'NSPort',
'NSClassDescription', 'NSPortCoder', 'NSCloneCommand', 'NSPortMessage',
'NSCloseCommand', 'NSPortNameServer', 'NSCoder', 'NSPositionalSpecifier',
'NSConditionLock', 'NSProcessInfo', 'NSConnection', 'NSPropertyListSerialization',
'NSCountCommand', 'NSPropertySpecifier', 'NSCountedSet', 'NSProtocolChecker',
'NSCreateCommand', 'NSProxy', 'NSData', 'NSQuitCommand', 'NSDate',
'NSRandomSpecifier', 'NSDateFormatter', 'NSRangeSpecifier', 'NSDecimalNumber',
'NSRecursiveLock', 'NSDecimalNumberHandler', 'NSRelativeSpecifier',
'NSDeleteCommand', 'NSRunLoop', 'NSDeserializer', 'NSScanner', 'NSDictionary',
'NSScriptClassDescription', 'NSDirectoryEnumerator', 'NSScriptCoercionHandler',
'NSDistantObject', 'NSScriptCommand', 'NSDistantObjectRequest',
'NSScriptCommandDescription', 'NSDistributedLock', 'NSScriptExecutionContext',
'NSDistributedNotificationCenter', 'NSScriptObjectSpecifier', 'NSEnumerator',
'NSScriptSuiteRegistry', 'NSError', 'NSScriptWhoseTest', 'NSException',
'NSSerializer', 'NSExistsCommand', 'NSSet', 'NSFileHandle', 'NSSetCommand',
'NSFileManager', 'NSSocketPort', 'NSFormatter', 'NSSocketPortNameServer',
'NSGetCommand', 'NSSortDescriptor', 'NSHost', 'NSSpecifierTest', 'NSHTTPCookie',
'NSSpellServer', 'NSHTTPCookieStorage', 'NSStream', 'NSHTTPURLResponse',
'NSString', 'NSIndexSet', 'NSTask', 'NSIndexSpecifier', 'NSThread',
'NSInputStream', 'NSTimer', 'NSInvocation', 'NSTimeZone', 'NSKeyedArchiver',
'NSUnarchiver', 'NSKeyedUnarchiver', 'NSUndoManager', 'NSLock',
'NSUniqueIDSpecifier', 'NSLogicalTest', 'NSURL', 'NSMachBootstrapServer',
'NSURLAuthenticationChallenge', 'NSMachPort', 'NSURLCache', 'NSMessagePort',
'NSURLConnection', 'NSMessagePortNameServer', 'NSURLCredential',
'NSMethodSignature', 'NSURLCredentialStorage', 'NSMiddleSpecifier',
'NSURLDownload', 'NSMoveCommand', 'NSURLHandle', 'NSMutableArray',
'NSURLProtectionSpace', 'NSMutableAttributedString', 'NSURLProtocol',
'NSMutableCharacterSet', 'NSURLRequest', 'NSMutableData', 'NSURLResponse',
'NSMutableDictionary', 'NSUserDefaults', 'NSMutableIndexSet', 'NSValue',
'NSMutableSet', 'NSValueTransformer', 'NSMutableString', 'NSWhoseSpecifier',
'NSMutableURLRequest', 'NSXMLParser', 'NSNameSpecifier'
),
6 => array( // OpenStep/GNUstep/Cocoa AppKit
'NSActionCell', 'NSOpenGLPixelFormat', 'NSAffineTransform', 'NSOpenGLView',
'NSAlert', 'NSOpenPanel', 'NSAppleScript Additions', 'NSOutlineView',
'NSApplication', 'NSPageLayout', 'NSArrayController', 'NSPanel',
'NSATSTypesetter', 'NSParagraphStyle', 'NSPasteboard', 'NSBezierPath',
'NSPDFImageRep', 'NSBitmapImageRep', 'NSPICTImageRep', 'NSBox', 'NSPopUpButton',
'NSBrowser', 'NSPopUpButtonCell', 'NSBrowserCell', 'NSPrinter', 'NSPrintInfo',
'NSButton', 'NSPrintOperation', 'NSButtonCell', 'NSPrintPanel', 'NSCachedImageRep',
'NSProgressIndicator', 'NSCell', 'NSQuickDrawView', 'NSClipView', 'NSResponder',
'NSRulerMarker', 'NSColor', 'NSRulerView', 'NSColorList', 'NSSavePanel',
'NSColorPanel', 'NSScreen', 'NSColorPicker', 'NSScroller', 'NSColorWell',
'NSScrollView', 'NSComboBox', 'NSSearchField', 'NSComboBoxCell',
'NSSearchFieldCell', 'NSControl', 'NSSecureTextField', 'NSController',
'NSSecureTextFieldCell', 'NSCursor', 'NSSegmentedCell', 'NSCustomImageRep',
'NSSegmentedControl', 'NSDocument', 'NSShadow', 'NSDocumentController',
'NSSimpleHorizontalTypesetter', 'NSDrawer', 'NSSlider', 'NSEPSImageRep',
'NSSliderCell', 'NSEvent', 'NSSound', 'NSFileWrapper', 'NSSpeechRecognizer',
'NSFont', 'NSSpeechSynthesizer', 'NSFontDescriptor', 'NSSpellChecker',
'NSFontManager', 'NSSplitView', 'NSFontPanel', 'NSStatusBar', 'NSForm',
'NSStatusItem', 'NSFormCell', 'NSStepper', 'NSGlyphGenerator', 'NSStepperCell',
'NSGlyphInfo', 'NSGraphicsContext', 'NSTableColumn', 'NSHelpManager',
'NSTableHeaderCell', 'NSImage', 'NSTableHeaderView', 'NSImageCell', 'NSTableView',
'NSImageRep', 'NSTabView', 'NSImageView', 'NSTabViewItem', 'NSInputManager',
'NSText', 'NSInputServer', 'NSTextAttachment', 'NSLayoutManager',
'NSTextAttachmentCell', 'NSMatrix', 'NSTextContainer', 'NSMenu', 'NSTextField',
'NSMenuItem', 'NSTextFieldCell', 'NSMenuItemCell', 'NSTextStorage', 'NSMenuView',
'NSTextTab', 'NSMovie', 'NSTextView', 'NSMovieView', 'NSToolbar', 'NSToolbarItem',
'NSMutableParagraphStyle', 'NSTypesetter', 'NSNib', 'NSNibConnector',
'NSUserDefaultsController', 'NSNibControlConnector', 'NSView',
'NSNibOutletConnector', 'NSWindow', 'NSObjectController', 'NSWindowController',
'NSOpenGLContext', 'NSWorkspace', 'NSOpenGLPixelBuffer'
)
),
'SYMBOLS' => array(
'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false,
6 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000ff;',
2 => 'color: #0000ff;',
3 => 'color: #0000dd;',
4 => 'color: #0000ff;',
5 => 'color: #0000ff;',
6 => 'color: #0000ff;'
),
'COMMENTS' => array(
1 => 'color: #ff0000;',
2 => 'color: #339900;',
'MULTI' => 'color: #ff0000; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #666666; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #002200;'
),
'STRINGS' => array(
0 => 'color: #666666;'
),
'NUMBERS' => array(
0 => 'color: #0000dd;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #002200;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
4 => '',
5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/{FNAME}.html',
6 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/{FNAME}.html'
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

132
inc/geshi/oobas.php Normal file
View File

@ -0,0 +1,132 @@
<?php
/*************************************************************************************
* oobas.php
* ---------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/30
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* OpenOffice.org Basic language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'OpenOffice.org Basic',
'COMMENT_SINGLE' => array(1 => "'"),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'dim','private','public','global','as','if','redim','true','set',
'byval',
'false','bool','double','integer','long','object','single','variant',
'msgbox','print','inputbox','green','blue','red','qbcolor',
'rgb','open','close','reset','freefile','get','input','line',
'put','write','loc','seek','eof','lof','chdir','chdrive',
'curdir','dir','fileattr','filecopy','filedatetime','fileexists',
'filelen','getattr','kill','mkdir','name','rmdir','setattr',
'dateserial','datevalue','day','month','weekday','year','cdatetoiso',
'cdatefromiso','hour','minute','second','timeserial','timevalue',
'date','now','time','timer','erl','err','error','on','error','goto','resume',
'and','eqv','imp','not','or','xor','mod','','atn','cos','sin','tan','log',
'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct',
'it','then','else','select','case','iif','do','loop','for','next',
'while','wend','gosub','return','goto','on','goto','call','choose','declare',
'end','exit','freelibrary','function','rem','stop','sub','switch','with',
'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool',
'defdate','defdbl','defint','deflng','asc','chr','str','val','cbyte',
'space','string','format','lcase','left','lset','ltrim','mid','right',
'rset','rtrim','trim','ucase','split','join','converttourl','convertfromurl',
'instr','len','strcomp','beep','shell','wait','getsystemticks','environ',
'getsolarversion','getguitype','twipsperpixelx','twipsperpixely',
'createunostruct','createunoservice','getprocessservicemanager',
'createunodialog','createunolistener','createunovalue','thiscomponent',
'globalscope'
)
),
'SYMBOLS' => array(
'(', ')', '='
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099;'
),
'SCRIPT' => array(
),
'REGEXPS' => array(
)
),
'URLS' => array(
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

145
inc/geshi/pascal.php Normal file
View File

@ -0,0 +1,145 @@
<?php
/*************************************************************************************
* pascal.php
* ----------
* Author: Tux (tux@inamil.cz)
* Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.2
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/26
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Pascal language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.2)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.1)
* - Added support for URLs
* 2004/08/05 (1.0.0)
* - Added support for symbols
* 2004/07/27 (0.9.1)
* - Pascal is OO language. Some new words.
* 2004/07/26 (0.9.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Pascal',
'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('{' => '}','(*' => '*)'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'if', 'while', 'until', 'repeat', 'default',
'do', 'else', 'for', 'switch', 'goto','label','asm','begin','end',
'assembler','case', 'downto', 'to','div','mod','far','forward','in','inherited',
'inline','interrupt','label','library','not','var','of','then','stdcall',
'cdecl','end.','raise','try','except','name','finally','resourcestring','override','overload',
'default','public','protected','private','property','published','stored','catch'
),
2 => array(
'nil', 'false', 'break', 'true', 'function', 'procedure','implementation','interface',
'unit','program','initialization','finalization','uses'
),
3 => array(
'abs', 'absolute','and','arc','arctan','chr','constructor','destructor',
'dispose','cos','eof','eoln','exp','get','index','ln','new','xor','write','writeln',
'shr','sin','sqrt','succ','pred','odd','read','readln','ord','ordinal','blockread','blockwrite'
),
4 => array(
'array', 'char', 'const', 'boolean', 'real', 'integer', 'longint',
'word', 'shortint', 'record','byte','bytebool','string',
'type','object','export','exports','external','file','longbool','pointer','set',
'packed','ansistring','union'
),
),
'SYMBOLS' => array(
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => '',
4 => 'color: #993333;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
2 => 'color: #339933;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #202020;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => '',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

162
inc/geshi/perl.php Normal file
View File

@ -0,0 +1,162 @@
<?php
/*************************************************************************************
* perl.php
* --------
* Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com)
* Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/20
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* Perl language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/08/20 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * LABEL:
* * string comparison operators
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Perl',
'COMMENT_SINGLE' => array(1 => '#'),
'COMMENT_MULTI' => array( '=pod' => '=cut'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my',
'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our',
'reset', 'continue','and', 'cmp', 'ne'
),
2 => array(
'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN',
'STDIN', 'STDOUT', 'STDERR'
),
3 => array(
'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless',
'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr',
'chroot', 'close', 'closedir', 'connect', 'continue', 'cos',
'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die',
'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent',
'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit',
'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline',
'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr',
'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname',
'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority',
'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent',
'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent',
'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep',
'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill',
'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local',
'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget',
'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir',
'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print',
'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw',
'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe',
'recv', 'redo', 'ref', 'rename', 'require', 'return',
'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek',
'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent',
'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent',
'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget',
'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair',
'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat',
'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread',
'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied',
'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef',
'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values',
'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y'
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => true,
2 => true,
3 => true,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;',
2 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #0000ff;',
4 => 'color: #009999;',
),
'SCRIPT' => array(
)
),
'URLS' => array(
3 => 'http://www.perldoc.com/perl5.6/pod/func/{FNAME}.html'
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '-&gt;',
2 => '::'
),
'REGEXPS' => array(
0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
4 => '&lt;[a-zA-Z_][a-zA-Z0-9_]*&gt;',
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

162
inc/geshi/php-brief.php Normal file
View File

@ -0,0 +1,162 @@
<?php
/*************************************************************************************
* php-brief.php
* -------------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.3
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/02
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* PHP language file for GeSHi (brief version).
*
* CHANGES
* -------
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* - Fixed &new problem
* 2004/10/27 (1.0.2)
* - Added support for URLs
* 2004/08/05 (1.0.1)
* - Added support for symbols
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/07/14)
* -------------------------
* * Remove more functions that are hardly used
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'PHP',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'include', 'require', 'include_once', 'require_once',
'for', 'as', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch',
'return', 'break'
),
2 => array(
'null', '__LINE__', '__FILE__',
'false', '&lt;?php', '?&gt;',
'true', 'var', 'default',
'function', 'class', 'new', '&amp;new'
),
3 => array(
'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
)
),
'SYMBOLS' => array(
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
2 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;',
2 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #0000ff;'
),
'SCRIPT' => array(
0 => '',
1 => '',
2 => '',
3 => ''
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.php.net/{FNAME}',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '-&gt;',
2 => '::'
),
'REGEXPS' => array(
0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"
),
'STRICT_MODE_APPLIES' => GESHI_MAYBE,
'SCRIPT_DELIMITERS' => array(
'<?php' => '?>',
'<?' => '?>',
'<%' => '%>',
'<script language="php">' => '</script>'
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
1 => true,
2 => true,
3 => true
)
);
?>

346
inc/geshi/php.php Normal file
View File

@ -0,0 +1,346 @@
<?php
/*************************************************************************************
* php.php
* --------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.3
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/20
* Last Modified: $Date: 2004/11/29 08:46:24 $
*
* PHP language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/25 (1.0.3)
* - Added support for multiple object splitters
* - Fixed &new problem
* 2004/10/27 (1.0.2)
* - Added URL support
* - Added extra constants
* 2004/08/05 (1.0.1)
* - Added support for symbols
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/07/14)
* -------------------------
* * Make sure the last few function I may have missed
* (like eval()) are included for highlighting
* * Split to several files - php4, php5 etc
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'PHP',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'include', 'require', 'include_once', 'require_once',
'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch',
'return', 'break'
),
2 => array(
'null', '__LINE__', '__FILE__',
'false', '&lt;?php', '?&gt;', '&lt;?',
'&lt;script language', '&lt;/script&gt;',
'true', 'var', 'default',
'function', 'class', 'new', '&amp;new',
'__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
),
3 => array(
'zlib_get_coding_type','zend_version','zend_logo_guid','yp_order','yp_next',
'yp_match','yp_master','yp_get_default_domain','yp_first','yp_errno','yp_err_string',
'yp_cat','yp_all','xml_set_unparsed_entity_decl_handler','xml_set_start_namespace_decl_handler','xml_set_processing_instruction_handler','xml_set_object',
'xml_set_notation_decl_handler','xml_set_external_entity_ref_handler','xml_set_end_namespace_decl_handler','xml_set_element_handler','xml_set_default_handler','xml_set_character_data_handler',
'xml_parser_set_option','xml_parser_get_option','xml_parser_free','xml_parser_create_ns','xml_parser_create','xml_parse_into_struct',
'xml_parse','xml_get_error_code','xml_get_current_line_number','xml_get_current_column_number','xml_get_current_byte_index','xml_error_string',
'wordwrap','wddx_serialize_vars','wddx_serialize_value','wddx_packet_start','wddx_packet_end','wddx_deserialize',
'wddx_add_vars','vsprintf','vprintf','virtual','version_compare','var_export',
'var_dump','utf8_encode','utf8_decode','usort','usleep','user_error',
'urlencode','urldecode','unserialize','unregister_tick_function','unpack','unlink',
'unixtojd','uniqid','umask','uksort','ucwords','ucfirst',
'uasort','trim','trigger_error','touch','token_name','token_get_all',
'tmpfile','time','textdomain','tempnam','tanh','tan',
'system','syslog','symlink','substr_replace','substr_count','substr',
'strval','strtr','strtoupper','strtotime','strtolower','strtok',
'strstr','strspn','strrpos','strrev','strrchr','strpos',
'strncmp','strncasecmp','strnatcmp','strnatcasecmp','strlen','stristr',
'stripslashes','stripcslashes','strip_tags','strftime','stream_wrapper_register','stream_set_write_buffer',
'stream_set_timeout','stream_set_blocking','stream_select','stream_register_wrapper','stream_get_meta_data','stream_filter_prepend',
'stream_filter_append','stream_context_set_params','stream_context_set_option','stream_context_get_options','stream_context_create','strcspn',
'strcoll','strcmp','strchr','strcasecmp','str_word_count','str_shuffle',
'str_rot13','str_replace','str_repeat','str_pad','stat','sscanf',
'srand','sqrt','sql_regcase','sprintf','spliti','split',
'soundex','sort','socket_writev','socket_write','socket_strerror','socket_shutdown',
'socket_setopt','socket_set_timeout','socket_set_option','socket_set_nonblock','socket_set_blocking','socket_set_block',
'socket_sendto','socket_sendmsg','socket_send','socket_select','socket_recvmsg','socket_recvfrom',
'socket_recv','socket_readv','socket_read','socket_listen','socket_last_error','socket_iovec_set',
'socket_iovec_free','socket_iovec_fetch','socket_iovec_delete','socket_iovec_alloc','socket_iovec_add','socket_getsockname',
'socket_getpeername','socket_getopt','socket_get_status','socket_get_option','socket_create_pair','socket_create_listen',
'socket_create','socket_connect','socket_close','socket_clear_error','socket_bind','socket_accept',
'sleep','sizeof','sinh','sin','similar_text','shuffle',
'show_source','shmop_write','shmop_size','shmop_read','shmop_open','shmop_delete',
'shmop_close','shm_remove_var','shm_remove','shm_put_var','shm_get_var','shm_detach',
'shm_attach','shell_exec','sha1_file','sha1','settype','setlocale',
'setcookie','set_time_limit','set_socket_blocking','set_magic_quotes_runtime','set_include_path','set_file_buffer',
'set_error_handler','session_write_close','session_unset','session_unregister','session_start','session_set_save_handler',
'session_set_cookie_params','session_save_path','session_register','session_regenerate_id','session_name','session_module_name',
'session_is_registered','session_id','session_get_cookie_params','session_encode','session_destroy','session_decode',
'session_cache_limiter','session_cache_expire','serialize','sem_remove','sem_release','sem_get',
'sem_acquire','rtrim','rsort','round','rmdir','rewinddir',
'rewind','restore_include_path','restore_error_handler','reset','rename','register_tick_function',
'register_shutdown_function','realpath','readlink','readgzfile','readfile','readdir',
'read_exif_data','rawurlencode','rawurldecode','range','rand','rad2deg',
'quotemeta','quoted_printable_decode','putenv','proc_open','proc_close','printf',
'print_r','prev','preg_split','preg_replace_callback','preg_replace','preg_quote',
'preg_match_all','preg_match','preg_grep','pow','posix_uname','posix_ttyname',
'posix_times','posix_strerror','posix_setuid','posix_setsid','posix_setpgid','posix_setgid',
'posix_seteuid','posix_setegid','posix_mkfifo','posix_kill','posix_isatty','posix_getuid',
'posix_getsid','posix_getrlimit','posix_getpwuid','posix_getpwnam','posix_getppid','posix_getpid',
'posix_getpgrp','posix_getpgid','posix_getlogin','posix_getgroups','posix_getgrnam','posix_getgrgid',
'posix_getgid','posix_geteuid','posix_getegid','posix_getcwd','posix_get_last_error','posix_errno',
'posix_ctermid','pos','popen','pi','phpversion','phpinfo',
'phpcredits','php_uname','php_sapi_name','php_logo_guid','php_ini_scanned_files','pg_update',
'pg_untrace','pg_unescape_bytea','pg_tty','pg_trace','pg_setclientencoding','pg_set_client_encoding',
'pg_send_query','pg_select','pg_result_status','pg_result_seek','pg_result_error','pg_result',
'pg_query','pg_put_line','pg_port','pg_ping','pg_pconnect','pg_options',
'pg_numrows','pg_numfields','pg_num_rows','pg_num_fields','pg_meta_data','pg_lowrite',
'pg_lounlink','pg_loreadall','pg_loread','pg_loopen','pg_loimport','pg_loexport',
'pg_locreate','pg_loclose','pg_lo_write','pg_lo_unlink','pg_lo_tell','pg_lo_seek',
'pg_lo_read_all','pg_lo_read','pg_lo_open','pg_lo_import','pg_lo_export','pg_lo_create',
'pg_lo_close','pg_last_oid','pg_last_notice','pg_last_error','pg_insert','pg_host',
'pg_getlastoid','pg_get_result','pg_get_pid','pg_get_notify','pg_freeresult','pg_free_result',
'pg_fieldtype','pg_fieldsize','pg_fieldprtlen','pg_fieldnum','pg_fieldname','pg_fieldisnull',
'pg_field_type','pg_field_size','pg_field_prtlen','pg_field_num','pg_field_name','pg_field_is_null',
'pg_fetch_row','pg_fetch_result','pg_fetch_object','pg_fetch_assoc','pg_fetch_array','pg_fetch_all',
'pg_exec','pg_escape_string','pg_escape_bytea','pg_errormessage','pg_end_copy','pg_delete',
'pg_dbname','pg_copy_to','pg_copy_from','pg_convert','pg_connection_status','pg_connection_reset',
'pg_connection_busy','pg_connect','pg_cmdtuples','pg_close','pg_clientencoding','pg_client_encoding',
'pg_cancel_query','pg_affected_rows','pfsockopen','pclose','pathinfo','passthru',
'parse_url','parse_str','parse_ini_file','pack','overload','output_reset_rewrite_vars',
'output_add_rewrite_var','ord','openssl_x509_read','openssl_x509_parse','openssl_x509_free','openssl_x509_export_to_file',
'openssl_x509_export','openssl_x509_checkpurpose','openssl_x509_check_private_key','openssl_verify','openssl_sign','openssl_seal',
'openssl_public_encrypt','openssl_public_decrypt','openssl_private_encrypt','openssl_private_decrypt','openssl_pkey_new','openssl_pkey_get_public',
'openssl_pkey_get_private','openssl_pkey_free','openssl_pkey_export_to_file','openssl_pkey_export','openssl_pkcs7_verify','openssl_pkcs7_sign',
'openssl_pkcs7_encrypt','openssl_pkcs7_decrypt','openssl_open','openssl_get_publickey','openssl_get_privatekey','openssl_free_key',
'openssl_error_string','openssl_csr_sign','openssl_csr_new','openssl_csr_export_to_file','openssl_csr_export','openlog',
'opendir','octdec','ob_start','ob_list_handlers','ob_implicit_flush','ob_iconv_handler',
'ob_gzhandler','ob_get_status','ob_get_level','ob_get_length','ob_get_flush','ob_get_contents',
'ob_get_clean','ob_flush','ob_end_flush','ob_end_clean','ob_clean','number_format',
'nl_langinfo','nl2br','ngettext','next','natsort','natcasesort',
'mysql_unbuffered_query','mysql_thread_id','mysql_tablename','mysql_table_name','mysql_stat','mysql_selectdb',
'mysql_select_db','mysql_result','mysql_real_escape_string','mysql_query','mysql_ping','mysql_pconnect',
'mysql_numrows','mysql_numfields','mysql_num_rows','mysql_num_fields','mysql_listtables','mysql_listfields',
'mysql_listdbs','mysql_list_tables','mysql_list_processes','mysql_list_fields','mysql_list_dbs','mysql_insert_id',
'mysql_info','mysql_get_server_info','mysql_get_proto_info','mysql_get_host_info','mysql_get_client_info','mysql_freeresult',
'mysql_free_result','mysql_fieldtype','mysql_fieldtable','mysql_fieldname','mysql_fieldlen','mysql_fieldflags',
'mysql_field_type','mysql_field_table','mysql_field_seek','mysql_field_name','mysql_field_len','mysql_field_flags',
'mysql_fetch_row','mysql_fetch_object','mysql_fetch_lengths','mysql_fetch_field','mysql_fetch_assoc','mysql_fetch_array',
'mysql_escape_string','mysql_error','mysql_errno','mysql_dropdb','mysql_drop_db','mysql_dbname',
'mysql_db_query','mysql_db_name','mysql_data_seek','mysql_createdb','mysql_create_db','mysql_connect',
'mysql_close','mysql_client_encoding','mysql_affected_rows','mysql','mt_srand','mt_rand',
'mt_getrandmax','move_uploaded_file','money_format','mktime','mkdir','min',
'microtime','method_exists','metaphone','memory_get_usage','md5_file','md5',
'mbsubstr','mbstrrpos','mbstrpos','mbstrlen','mbstrcut','mbsplit',
'mbregex_encoding','mberegi_replace','mberegi','mbereg_search_setpos','mbereg_search_regs','mbereg_search_pos',
'mbereg_search_init','mbereg_search_getregs','mbereg_search_getpos','mbereg_search','mbereg_replace','mbereg_match',
'mbereg','mb_substr_count','mb_substr','mb_substitute_character','mb_strwidth','mb_strtoupper',
'mb_strtolower','mb_strrpos','mb_strpos','mb_strlen','mb_strimwidth','mb_strcut',
'mb_split','mb_send_mail','mb_regex_set_options','mb_regex_encoding','mb_preferred_mime_name','mb_parse_str',
'mb_output_handler','mb_language','mb_internal_encoding','mb_http_output','mb_http_input','mb_get_info',
'mb_eregi_replace','mb_eregi','mb_ereg_search_setpos','mb_ereg_search_regs','mb_ereg_search_pos','mb_ereg_search_init',
'mb_ereg_search_getregs','mb_ereg_search_getpos','mb_ereg_search','mb_ereg_replace','mb_ereg_match','mb_ereg',
'mb_encode_numericentity','mb_encode_mimeheader','mb_detect_order','mb_detect_encoding','mb_decode_numericentity','mb_decode_mimeheader',
'mb_convert_variables','mb_convert_kana','mb_convert_encoding','mb_convert_case','max','mail',
'magic_quotes_runtime','ltrim','lstat','long2ip','log1p','log10',
'log','localtime','localeconv','linkinfo','link','levenshtein',
'lcg_value','ksort','krsort','key_exists','key','juliantojd',
'join','jewishtojd','jdtounix','jdtojulian','jdtojewish','jdtogregorian',
'jdtofrench','jdmonthname','jddayofweek','is_writeable','is_writable','is_uploaded_file',
'is_subclass_of','is_string','is_scalar','is_resource','is_real','is_readable',
'is_object','is_numeric','is_null','is_nan','is_long','is_link',
'is_integer','is_int','is_infinite','is_float','is_finite','is_file',
'is_executable','is_double','is_dir','is_callable','is_bool','is_array',
'is_a','iptcparse','iptcembed','ip2long','intval','ini_set',
'ini_restore','ini_get_all','ini_get','ini_alter','in_array','import_request_variables',
'implode','image_type_to_mime_type','ignore_user_abort','iconv_set_encoding','iconv_get_encoding','iconv',
'i18n_mime_header_encode','i18n_mime_header_decode','i18n_ja_jp_hantozen','i18n_internal_encoding','i18n_http_output','i18n_http_input',
'i18n_discover_encoding','i18n_convert','hypot','htmlspecialchars','htmlentities','html_entity_decode',
'highlight_string','highlight_file','hexdec','hebrevc','hebrev','headers_sent',
'header','gzwrite','gzuncompress','gztell','gzseek','gzrewind',
'gzread','gzputs','gzpassthru','gzopen','gzinflate','gzgetss',
'gzgets','gzgetc','gzfile','gzeof','gzencode','gzdeflate',
'gzcompress','gzclose','gregoriantojd','gmstrftime','gmmktime','gmdate',
'glob','gettype','gettimeofday','gettext','getservbyport','getservbyname',
'getrusage','getrandmax','getprotobynumber','getprotobyname','getopt','getmyuid',
'getmypid','getmyinode','getmygid','getmxrr','getlastmod','getimagesize',
'gethostbynamel','gethostbyname','gethostbyaddr','getenv','getdate','getcwd',
'getallheaders','get_resource_type','get_required_files','get_parent_class','get_object_vars','get_meta_tags',
'get_magic_quotes_runtime','get_magic_quotes_gpc','get_loaded_extensions','get_included_files','get_include_path','get_html_translation_table',
'get_extension_funcs','get_defined_vars','get_defined_functions','get_defined_constants','get_declared_classes','get_current_user',
'get_class_vars','get_class_methods','get_class','get_cfg_var','get_browser','fwrite',
'function_exists','func_num_args','func_get_args','func_get_arg','ftruncate','ftp_systype',
'ftp_ssl_connect','ftp_size','ftp_site','ftp_set_option','ftp_rmdir','ftp_rename',
'ftp_rawlist','ftp_quit','ftp_pwd','ftp_put','ftp_pasv','ftp_nlist',
'ftp_nb_put','ftp_nb_get','ftp_nb_fput','ftp_nb_fget','ftp_nb_continue','ftp_mkdir',
'ftp_mdtm','ftp_login','ftp_get_option','ftp_get','ftp_fput','ftp_fget',
'ftp_exec','ftp_delete','ftp_connect','ftp_close','ftp_chdir','ftp_cdup',
'ftok','ftell','fstat','fsockopen','fseek','fscanf',
'frenchtojd','fread','fputs','fpassthru','fopen','fnmatch',
'fmod','flush','floor','flock','floatval','filetype',
'filesize','filepro_rowcount','filepro_retrieve','filepro_fieldwidth','filepro_fieldtype','filepro_fieldname',
'filepro_fieldcount','filepro','fileperms','fileowner','filemtime','fileinode',
'filegroup','filectime','fileatime','file_get_contents','file_exists','file',
'fgetss','fgets','fgetcsv','fgetc','fflush','feof',
'fclose','ezmlm_hash','extract','extension_loaded','expm1','explode',
'exp','exif_thumbnail','exif_tagname','exif_read_data','exif_imagetype','exec',
'escapeshellcmd','escapeshellarg','error_reporting','error_log','eregi_replace','eregi',
'ereg_replace','ereg','end','easter_days','easter_date','each',
'doubleval','dngettext','dl','diskfreespace','disk_total_space','disk_free_space',
'dirname','dir','dgettext','deg2rad','defined','define_syslog_variables',
'define','decoct','dechex','decbin','debug_zval_dump','debug_backtrace',
'deaggregate','dcngettext','dcgettext','dba_sync','dba_replace','dba_popen',
'dba_optimize','dba_open','dba_nextkey','dba_list','dba_insert','dba_handlers',
'dba_firstkey','dba_fetch','dba_exists','dba_delete','dba_close','date',
'current','ctype_xdigit','ctype_upper','ctype_space','ctype_punct','ctype_print',
'ctype_lower','ctype_graph','ctype_digit','ctype_cntrl','ctype_alpha','ctype_alnum',
'crypt','create_function','crc32','count_chars','count','cosh',
'cos','copy','convert_cyr_string','constant','connection_status','connection_aborted',
'compact','closelog','closedir','clearstatcache','class_exists','chunk_split',
'chr','chown','chop','chmod','chgrp','checkdnsrr',
'checkdate','chdir','ceil','call_user_method_array','call_user_method','call_user_func_array',
'call_user_func','cal_to_jd','cal_info','cal_from_jd','cal_days_in_month','bzwrite',
'bzread','bzopen','bzflush','bzerrstr','bzerror','bzerrno',
'bzdecompress','bzcompress','bzclose','bindtextdomain','bindec','bind_textdomain_codeset',
'bin2hex','bcsub','bcsqrt','bcscale','bcpow','bcmul',
'bcmod','bcdiv','bccomp','bcadd','basename','base_convert',
'base64_encode','base64_decode','atanh','atan2','atan','assert_options',
'assert','asort','asinh','asin','arsort','array_walk',
'array_values','array_unshift','array_unique','array_sum','array_splice','array_slice',
'array_shift','array_search','array_reverse','array_reduce','array_rand','array_push',
'array_pop','array_pad','array_multisort','array_merge_recursive','array_merge','array_map',
'array_keys','array_key_exists','array_intersect_assoc','array_intersect','array_flip','array_filter',
'array_fill','array_diff_assoc','array_diff','array_count_values','array_chunk','array_change_key_case',
'apache_setenv','apache_response_headers','apache_request_headers','apache_note','apache_lookup_uri','apache_get_version',
'apache_child_terminate','aggregation_info','aggregate_properties_by_regexp','aggregate_properties_by_list','aggregate_properties','aggregate_methods_by_regexp',
'aggregate_methods_by_list','aggregate_methods','aggregate','addslashes','addcslashes','acosh',
'acos','abs','_','echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
2 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;',
2 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #0000ff;'
),
'SCRIPT' => array(
0 => '',
1 => '',
2 => '',
3 => ''
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.php.net/{FNAME}',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '-&gt;',
2 => '::'
),
'REGEXPS' => array(
0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*",
),
'STRICT_MODE_APPLIES' => GESHI_MAYBE,
'SCRIPT_DELIMITERS' => array(
0 => array(
'<?php' => '?>'
),
1 => array(
'<?' => '?>'
),
2 => array(
'<%' => '%>'
),
3 => array(
'<script language="php">' => '</script>'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
1 => true,
2 => true,
3 => true
)
);
?>

143
inc/geshi/python.php Normal file
View File

@ -0,0 +1,143 @@
<?php
/*************************************************************************************
* python.php
* ----------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/30
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* Python language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/08/30 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Python',
'COMMENT_SINGLE' => array(1 => '#'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'and','assert','break','class','continue','def','del','elif','else','except','exec','finally','for','from',
'global','if','import','in','is','lambda','map','not','None','or','pass','print','raise','range','return',
'try','while','abs','apply','callable','chr','cmp','coerce','compile','complex','delattr','dir','divmod',
'eval','execfile','filter','float','getattr','globals','group','hasattr','hash','hex','',
'id','input','int','intern','isinstance','issubclass','joinfields','len','list','local','long',
'max','min','match','oct','open','ord','pow','raw_input','reduce','reload','repr','round',
'search','setattr','setdefault','slice','str','splitfields','unichr','unicode','tuple','type',
'vars','xrange','zip','__abs__','__add__','__and__','__call__','__cmp__','__coerce__',
'__del__','__delattr__','__delitem__','__delslice__','__div__','__divmod__',
'__float__','__getattr__','__getitem__','__getslice__','__hash__','__hex__',
'__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__','__ior__','__ixor__',
'__ilshift__','__irshift__','__invert__','__int__','__init__','__len__','__long__','__lshift__',
'__mod__','__mul__','__neg__','__nonzero__','__oct__','__or__','__pos__','__pow__',
'__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
'__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',
'__setattr__','__setitem__','__setslice__','__str__','__sub__','__xor__',
'__bases__','__class__','__dict__','__methods__','__members__','__name__',
'__version__','ArithmeticError','AssertionError','AttributeError','EOFError','Exception',
'FloatingPointError','IOError','ImportError','IndentationError','IndexError',
'KeyError','KeyboardInterrupt','LookupError','MemoryError','NameError','OverflowError',
'RuntimeError','StandardError','SyntaxError','SystemError','SystemExit','TabError','TypeError',
'ValueError','ZeroDivisionError','AST','','atexit','BaseHTTPServer','Bastion',
'cmd','codecs','commands','compileall','copy','CGIHTTPServer','Complex','dbhash',
'dircmp','dis','dospath','dumbdbm','emacs','find','fmt','fnmatch','ftplib',
'getopt','glob','gopherlib','grep','htmllib','httplib','ihooks','imghdr','imputil',
'linecache','lockfile','macpath','macurl2path','mailbox','mailcap',
'mimetools','mimify','mutex','math','Mimewriter','newdir','ni','nntplib','ntpath','nturl2path',
'os','ospath','pdb','pickle','pipes','poly','popen2','posixfile','posixpath','profile','pstats','pyclbr',
'pyexpat','Para','quopri','Queue','rand','random','regex','regsub','rfc822',
'sched','sgmllib','shelve','site','sndhdr','string','sys','snmp',
'SimpleHTTPServer','StringIO','SocketServer',
'tb','tempfile','toaiff','token','tokenize','traceback','tty','types','tzparse',
'Tkinter','unicodedata','urllib','urlparse','util','uu','UserDict','UserList',
'wave','webbrowser','whatsound','whichdb','whrandom','xdrlib','xml','xmlpackage',
'zmod','array','struct','self',
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => true
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #202020;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

146
inc/geshi/qbasic.php Normal file
View File

@ -0,0 +1,146 @@
<?php
/*************************************************************************************
* qbasic.php
* ----------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.3
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/20
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* QBasic/QuickBASIC language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.2)
* - Added support for URLs
* 2004/08/05 (1.0.1)
* - Added support for symbols
* - Removed unnessecary slashes from some keywords
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Make sure all possible combinations of keywords with
* a space in them (EXIT FOR, END SELECT) are added
* to the first keyword group
* * Update colours, especially for the first keyword group
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'QBasic/QuickBASIC',
'COMMENT_SINGLE' => array(1 => "'", 2 => 'REM'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF',
'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'RETURN', 'RESUME', 'SELECT',
'CASE', 'UNTIL'
),
3 => array(
'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN',
'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL', 'CALL', 'CALLS', 'CASE',
'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR',
'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG',
'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$',
'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR',
'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE',
'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR',
'FILES', 'FIX', 'FRE', 'FREEFILE', 'FUNCTION', 'GET', 'HEX$', 'IMP', 'INKEY$',
'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS',
'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC',
'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'UNLOCK', 'LONG', 'LPOS', 'LPRINT',
'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$',
'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY',
'STRIG', 'TIMER', 'UEVENT', 'OPEN', 'OPTION', 'BASE', 'OR', 'OUT', 'OUTPUT',
'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET',
'PRINT', 'USING', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET',
'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN',
'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP',
'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG',
'STRING', 'STRING$', 'SUB', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER',
'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL',
'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR'
)
),
'SYMBOLS' => array(
'(', ')'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
3 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #a1a100;',
3 => 'color: #000066;'
),
'COMMENTS' => array(
1 => 'color: #808080;',
2 => 'color: #808080;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099;'
),
'SCRIPT' => array(
),
'REGEXPS' => array(
)
),
'URLS' => array(
1 => '',
3 => 'http://www.qbasicnews.com/qboho/qck{FNAME}.shtml'
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

167
inc/geshi/smarty.php Normal file
View File

@ -0,0 +1,167 @@
<?php
/*************************************************************************************
* smarty.php
* ----------
* Author: Alan Juden (alan@judenware.org)
* Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.0
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/07/10
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* Smarty template language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.0)
* - Initial Release
*
* TODO
* ----
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Smarty',
'COMMENT_SINGLE' => array(),
'COMMENT_MULTI' => array('{*' => '*}'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim',
'config_load', 'foreach', 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php',
'sectionelse', 'clear_all_cache', 'clear_cache', 'is_cached', 'from', 'item'
),
2 => array(
'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format',
'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format',
'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap'
),
3 => array(
'assign', 'counter', 'cycle', 'debug', 'eval', 'fetch', 'html_checkboxes', 'html_image', 'html_options',
'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init',
'popup', 'textformat'
),
4 => array(
'$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl',
'$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir',
'$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite',
'$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func',
'$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter',
'$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals',
'$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type'
),
5 => array(
'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache',
'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display',
'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars', 'is_cached',
'load_filter', 'register_block', 'register_compiler_function', 'register_function',
'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter',
'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block',
'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object',
'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource'
),
6 => array(
'name', 'assign', 'file', 'scope', 'global', 'key', 'once', 'script',
'loop', 'start', 'step', 'max', 'show', 'values', 'value'
),
7 => array(
'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod'
),
),
'SYMBOLS' => array(
'/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false,
6 => false,
7 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0600FF;', //Functions
2 => 'color: #008000;', //Modifiers
3 => 'color: #0600FF;', //Custom Functions
4 => 'color: #804040;', //Variables
5 => 'color: #008000;', //Methods
6 => 'color: #6A0A0A;', //Attributes
7 => 'color: #D36900;' //Text-based symbols
),
'COMMENTS' => array(
'MULTI' => 'color: #008080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #D36900;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: #D36900;'
),
'SCRIPT' => array(
),
'REGEXPS' => array(
)
),
'URLS' => array(
1 => 'http://smarty.php.net/{FNAME}',
2 => 'http://smarty.php.net/{FNAME}',
3 => 'http://smarty.php.net/{FNAME}',
4 => 'http://smarty.php.net/{FNAME}',
5 => 'http://smarty.php.net/{FNAME}',
6 => '',
7 => 'http://smarty.php.net/{FNAME}'
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
'SCRIPT_DELIMITERS' => array(
0 => array(
'{' => '}'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true
)
);
?>

136
inc/geshi/sql.php Normal file
View File

@ -0,0 +1,136 @@
<?php
/*************************************************************************************
* sql.php
* -------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.3
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/04
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* SQL language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.2)
* - Added "`" string delimiter
* - Added "#" single comment starter
* 2004/08/05 (1.0.1)
* - Added support for symbols
* - Added many more keywords (mostly MYSQL keywords)
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Add all keywords
* * Split this to several sql files - mysql-sql, ansi-sql etc
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'SQL',
'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => 1,
'QUOTEMARKS' => array("'", '"', '`'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'ALL', 'ASC', 'AS', 'ALTER', 'AND', 'ADD', 'AUTO_INCREMENT',
'BETWEEN', 'BINARY', 'BOTH', 'BY', 'BOOLEAN',
'CHANGE', 'CHECK', 'COLUMNS', 'COLUMN', 'CROSS','CREATE',
'DATABASES', 'DATABASE', 'DATA', 'DELAYED', 'DESCRIBE', 'DESC', 'DISTINCT', 'DELETE', 'DROP', 'DEFAULT',
'ENCLOSED', 'ESCAPED', 'EXISTS', 'EXPLAIN',
'FIELDS', 'FIELD', 'FLUSH', 'FOR', 'FOREIGN', 'FUNCTION', 'FROM',
'GROUP', 'GRANT',
'HAVING',
'IGNORE', 'INDEX', 'INFILE', 'INSERT', 'INNER', 'INTO', 'IDENTIFIED', 'IN', 'IS', 'IF',
'JOIN',
'KEYS', 'KILL','KEY',
'LEADING', 'LIKE', 'LIMIT', 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LEFT', 'LANGUAGE',
'MODIFY',
'NATURAL', 'NOT', 'NULL', 'NEXTVAL',
'OPTIMIZE', 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTFILE', 'OR', 'OUTER', 'ON',
'PROCEEDURE','PROCEDURAL', 'PRIMARY',
'READ', 'REFERENCES', 'REGEXP', 'RENAME', 'REPLACE', 'RETURN', 'REVOKE', 'RLIKE', 'RIGHT',
'SHOW', 'SONAME', 'STATUS', 'STRAIGHT_JOIN', 'SELECT', 'SETVAL', 'SET',
'TABLES', 'TEMINATED', 'TO', 'TRAILING','TRUNCATE', 'TABLE', 'TEMPORARY', 'TRIGGER', 'TRUSTED',
'UNIQUE', 'UNLOCK', 'USE', 'USING', 'UPDATE', 'UNSIGNED',
'VALUES', 'VARIABLES', 'VIEW',
'WITH', 'WRITE', 'WHERE',
'ZEROFILL',
'XOR',
)
),
'SYMBOLS' => array(
'(', ')', '=', '<', '>', '|'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #993333; font-weight: bold;'
),
'COMMENTS' => array(
1 => 'color: #808080; font-style: italic;',
2 => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'SCRIPT' => array(
),
'REGEXPS' => array(
)
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

150
inc/geshi/vb.php Normal file
View File

@ -0,0 +1,150 @@
<?php
/*************************************************************************************
* vb.php
* ------
* Author: Roberto Rossi (rsoftware@altervista.org)
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/08/30
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* Visual Basic language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/08/30 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Visual Basic',
'COMMENT_SINGLE' => array(1 => "'"),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'as', 'err', 'boolean', 'and', 'or', 'recordset', 'unload', 'to',
'integer','long','single','new','database','nothing','set','close',
'open','print','split','line','field','querydef','instrrev',
'abs','array','asc','ascb','ascw','atn','avg','me',
'cbool','cbyte','ccur','cdate','cdbl','cdec','choose','chr','chrb','chrw','cint','clng',
'command','cos','count','createobject','csng','cstr','curdir','cvar','cvdate','cverr',
'date','dateadd','datediff','datepart','dateserial','datevalue','day','ddb','dir','doevents',
'environ','eof','error','exp',
'fileattr','filedatetime','filelen','fix','format','freefile','fv',
'getallstrings','getattr','getautoserversettings','getobject','getsetting',
'hex','hour','iif','imestatus','input','inputb','inputbox','instr','instb','int','ipmt',
'isarray','isdate','isempty','iserror','ismissing','isnull','isnumeric','isobject',
'lbound','lcase','left','leftb','len','lenb','loadpicture','loc','lof','log','ltrim',
'max','mid','midb','min','minute','mirr','month','msgbox',
'now','nper','npv','oct','partition','pmt','ppmt','pv','qbcolor',
'rate','rgb','right','rightb','rnd','rtrim',
'second','seek','sgn','shell','sin','sln','space','spc','sqr','stdev','stdevp','str',
'strcomp','strconv','string','switch','sum','syd',
'tab','tan','time','timer','timeserial','timevalue','trim','typename',
'ubound','ucase','val','var','varp','vartype','weekday','year',
'appactivate','base','beep','call','case','chdir','chdrive','const',
'declare','defbool','defbyte','defcur','defdate','defdbl','defdec','defint',
'deflng','defobj','defsng','defstr','deftype','defvar','deletesetting','dim','do',
'else','elseif','end','enum','erase','event','exit','explicit',
'false','filecopy','for','foreach','friend','function','get','gosub','goto',
'if','implements','kill','let','lineinput','lock','loop','lset','mkdir','name','next','not',
'onerror','on','option','private','property','public','put','raiseevent','randomize',
'redim','rem','reset','resume','return','rmdir','rset',
'savepicture','savesetting','sendkeys','setattr','static','sub',
'then','true','type','unlock','wend','while','width','with','write',
'vbabort','vbabortretryignore','vbapplicationmodal','vbarray',
'vbbinarycompare','vbblack','vbblue','vbboolean','vbbyte','vbcancel',
'vbcr','vbcritical','vbcrlf','vbcurrency','vbcyan','vbdataobject',
'vbdate','vbdecimal','vbdefaultbutton1','vbdefaultbutton2',
'vbdefaultbutton3','vbdefaultbutton4','vbdouble','vbempty',
'vberror','vbexclamation','vbfirstfourdays','vbfirstfullweek',
'vbfirstjan1','vbformfeed','vbfriday','vbgeneraldate','vbgreen',
'vbignore','vbinformation','vbinteger','vblf','vblong','vblongdate',
'vblongtime','vbmagenta','vbmonday','vbnewline','vbno','vbnull',
'vbnullchar','vbnullstring','vbobject','vbobjecterror','vbok','vbokcancel',
'vbokonly','vbquestion','vbred','vbretry','vbretrycancel','vbsaturday',
'vbshortdate','vbshorttime','vbsingle','vbstring','vbsunday',
'vbsystemmodal','vbtab','vbtextcompare','vbthursday','vbtuesday',
'vbusesystem','vbusesystemdayofweek','vbvariant','vbverticaltab',
'vbwednesday','vbwhite','vbyellow','vbyes','vbyesno','vbyesnocancel',
'vbnormal','vbdirectory'
)
),
'SYMBOLS' => array(
'(', ')'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #b1b100;'
),
'COMMENTS' => array(
1 => 'color: #808080;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
0 => 'color: #66cc66;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099;'
),
'SCRIPT' => array(
),
'REGEXPS' => array(
)
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

200
inc/geshi/vbnet.php Normal file
View File

@ -0,0 +1,200 @@
<?php
/*************************************************************************************
* vbnet.php
* ---------
* Author: Alan Juden (alan@judenware.org)
* Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.0
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/06/04
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* VB.NET language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.0)
* - Initial release
*
* TODO (updated 2004/11/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'vb.net',
'COMMENT_SINGLE' => array(1 => "'"),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
1 => array(
'3DDKSHADOW', '3DHIGHLIGHT', '3DLIGHT', 'ABORT', 'ABORTRETRYIGNORE', 'ACTIVEBORDER',
'ACTIVETITLEBAR', 'ALIAS', 'APPLICATIONMODAL', 'APPLICATIONWORKSPACE', 'ARCHIVE',
'BACK', 'BINARYCOMPARE', 'BLACK', 'BLUE', 'BUTTONFACE', 'BUTTONSHADOW', 'BUTTONTEXT',
'CANCEL', 'CDROM', 'CR', 'CRITICAL', 'CRLF', 'CYAN', 'DEFAULT', 'DEFAULTBUTTON1',
'DEFAULTBUTTON2', 'DEFAULTBUTTON3', 'DESKTOP', 'DIRECTORY', 'EXCLAMATION', 'FALSE',
'FIXED', 'FORAPPENDING', 'FORMFEED', 'FORREADING', 'FORWRITING', 'FROMUNICODE',
'GRAYTEXT', 'GREEN', 'HIDDEN', 'HIDE', 'HIGHLIGHT', 'HIGHLIGHTTEXT', 'HIRAGANA',
'IGNORE', 'INACTIVEBORDER', 'INACTIVECAPTIONTEXT', 'INACTIVETITLEBAR', 'INFOBACKGROUND',
'INFORMATION', 'INFOTEXT', 'KATAKANALF', 'LOWERCASE', 'MAGENTA', 'MAXIMIZEDFOCUS',
'MENUBAR', 'MENUTEXT', 'METHOD', 'MINIMIZEDFOCUS', 'MINIMIZEDNOFOCUS', 'MSGBOXRIGHT',
'MSGBOXRTLREADING', 'MSGBOXSETFOREGROUND', 'NARROW', 'NEWLINE', 'NO', 'NORMAL',
'NORMALFOCUS', 'NORMALNOFOCUS', 'NULLSTRING', 'OBJECTERROR', 'OK', 'OKCANCEL', 'OKONLY',
'PROPERCASE', 'QUESTION', 'RAMDISK', 'READONLY', 'RED', 'REMOTE', 'REMOVABLE', 'RETRY',
'RETRYCANCEL', 'SCROLLBARS', 'SYSTEMFOLDER', 'SYSTEMMODAL', 'TAB', 'TEMPORARYFOLDER',
'TEXTCOMPARE', 'TITLEBARTEXT', 'TRUE', 'UNICODE', 'UNKNOWN', 'UPPERCASE', 'VERTICALTAB',
'VOLUME', 'WHITE', 'WIDE', 'WIN16', 'WIN32', 'WINDOWBACKGROUND', 'WINDOWFRAME',
'WINDOWSFOLDER', 'WINDOWTEXT', 'YELLOW', 'YES', 'YESNO', 'YESNOCANCEL'
),
2 => array(
'As', 'ADDHANDLER', 'ASSEMBLY', 'AUTO', 'Binary', 'ByRef', 'ByVal', 'BEGINEPILOGUE',
'Else', 'Empty', 'Error', 'ENDPROLOGUE', 'EXTERNALSOURCE', 'ENVIRON', 'For',
'Friend', 'GET', 'HANDLES', 'Input', 'Is', 'Len', 'Lock', 'Me', 'Mid', 'MUSTINHERIT',
'MYBASE', 'MYCLASS', 'New', 'Next', 'Nothing', 'Null', 'NOTINHERITABLE',
'NOTOVERRIDABLE', 'OFF', 'On', 'Option', 'Optional', 'OVERRIDABLE', 'ParamArray',
'Print', 'Private', 'Property', 'Public', 'Resume', 'Seek', 'Static', 'Step',
'String', 'SHELL', 'SENDKEYS', 'SET', 'Then', 'Time', 'To', 'THROW', 'WithEvents'
),
3 => array(
'COLLECTION', 'DEBUG', 'DICTIONARY', 'DRIVE', 'DRIVES', 'ERR', 'FILE', 'FILES',
'FILESYSTEMOBJECT', 'FOLDER', 'FOLDERS', 'TEXTSTREAM'
),
4 => array(
'BOOLEAN', 'BYTE', 'DATE', 'DECIMIAL', 'DOUBLE', 'INTEGER', 'LONG', 'OBJECT',
'SINGLE STRING'
),
5 => array(
'ADDRESSOF', 'AND', 'BITAND', 'BITNOT', 'BITOR', 'BITXOR',
'GETTYPE', 'LIKE', 'MOD', 'NOT', 'ORXOR'
),
6 => array(
'APPACTIVATE', 'BEEP', 'CALL', 'CHDIR', 'CHDRIVE', 'CLASS', 'CASE', 'CATCH',
'DECLARE', 'DELEGATE', 'DELETESETTING', 'DIM', 'DO', 'DOEVENTS', 'END', 'ENUM',
'EVENT', 'EXIT', 'EACH', 'FUNCTION', 'FINALLY', 'IF', 'IMPORTS', 'INHERITS',
'INTERFACE', 'IMPLEMENTS', 'KILL', 'LOOP', 'MIDB', 'NAMESPACE', 'OPEN', 'PUT',
'RAISEEVENT', 'RANDOMIZE', 'REDIM', 'REM', 'RESET', 'SAVESETTING', 'SELECT',
'SETATTR', 'STOP', 'SUB', 'SYNCLOCK', 'STRUCTURE', 'SHADOWS', 'SWITCH',
'TIMEOFDAY', 'TODAY', 'TRY', 'WIDTH', 'WITH', 'WRITE', 'WHILE'
),
7 => array(
'ABS', 'ARRAY', 'ASC', 'ASCB', 'ASCW', 'CALLBYNAME', 'CBOOL', 'CBYTE', 'CCHAR',
'CCHR', 'CDATE', 'CDBL', 'CDEC', 'CHOOSE', 'CHR', 'CHR$', 'CHRB', 'CHRB$', 'CHRW',
'CINT', 'CLNG', 'CLNG8', 'CLOSE', 'COBJ', 'COMMAND', 'COMMAND$', 'CONVERSION',
'COS', 'CREATEOBJECT', 'CSHORT', 'CSTR', 'CURDIR', 'CTYPE', 'CVDATE', 'DATEADD',
'DATEDIFF', 'DATEPART', 'DATESERIAL', 'DATEVALUE', 'DAY', 'DDB', 'DIR', 'DIR$',
'EOF', 'ERROR$', 'EXP', 'FILEATTR', 'FILECOPY', 'FILEDATATIME', 'FILELEN', 'FILTER',
'FIX', 'FORMAT', 'FORMAT$', 'FORMATCURRENCY', 'FORMATDATETIME', 'FORMATNUMBER',
'FORMATPERCENT', 'FREEFILE', 'FV', 'GETALLSETTINGS', 'GETATTRGETOBJECT', 'GETSETTING',
'HEX', 'HEX$', 'HOUR', 'IIF', 'IMESTATUS', 'INPUT$', 'INPUTB', 'INPUTB$', 'INPUTBOX',
'INSTR', 'INSTRB', 'INSTRREV', 'INT', 'IPMT', 'IRR', 'ISARRAY', 'ISDATE', 'ISEMPTY',
'ISERROR', 'ISNULL', 'ISNUMERIC', 'ISOBJECT', 'JOIN', 'LBOUND', 'LCASE', 'LCASE$',
'LEFT', 'LEFT$', 'LEFTB', 'LEFTB$', 'LENB', 'LINEINPUT', 'LOC', 'LOF', 'LOG', 'LTRIM',
'LTRIM$', 'MID$', 'MIDB', 'MIDB$', 'MINUTE', 'MIRR', 'MKDIR', 'MONTH', 'MONTHNAME',
'MSGBOX', 'NOW', 'NPER', 'NPV', 'OCT', 'OCT$', 'PARTITION', 'PMT', 'PPMT', 'PV',
'RATE', 'REPLACE', 'RIGHT', 'RIGHT$', 'RIGHTB', 'RIGHTB$', 'RMDIR', 'RND', 'RTRIM',
'RTRIM$', 'SECOND', 'SIN', 'SLN', 'SPACE', 'SPACE$', 'SPC', 'SPLIT', 'STR', 'STR$',
'STRCOMP', 'STRCONV', 'STRING$', 'STRREVERSE', 'SYD', 'TAB', 'TAN', 'TIMEOFDAY',
'TIMER', 'TIMESERIAL', 'TIMEVALUE', 'TODAY', 'TRIM', 'TRIM$', 'TYPENAME', 'UBOUND',
'UCASE', 'UCASE$', 'VAL', 'WEEKDAY', 'WEEKDAYNAME', 'YEAR'
),
8 => array(
'ANY', 'ATN', 'CALENDAR', 'CIRCLE', 'CURRENCY', 'DEFBOOL', 'DEFBYTE', 'DEFCUR',
'DEFDATE', 'DEFDBL', 'DEFDEC', 'DEFINT', 'DEFLNG', 'DEFOBJ', 'DEFSNG', 'DEFSTR',
'DEFVAR', 'EQV', 'GOSUB', 'IMP', 'INITIALIZE', 'ISMISSING', 'LET', 'LINE', 'LSET',
'RSET', 'SGN', 'SQR', 'TERMINATE', 'VARIANT', 'VARTYPE', 'WEND'
),
),
'SYMBOLS' => array(
'&', '&=', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '\\', '\\=',
'^', '^='
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false,
6 => false,
7 => false,
8 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0600FF;', //Constants
2 => 'color: #FF8000;', //Keywords
3 => 'color: #008000;', //Data Types
4 => 'color: #FF0000;', //Objects
5 => 'color: #804040;', //Operators
6 => 'color: #0600FF;', //Statements
7 => 'color: #0600FF;', //Functions
8 => 'color: #0600FF;' //Deprecated
),
'COMMENTS' => array(
1 => 'color: #008080; font-style: italic;',
2 => 'color: #008080;',
'MULTI' => 'color: #008080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #008080; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #000000;'
),
'STRINGS' => array(
0 => 'color: #808080;'
),
'NUMBERS' => array(
0 => 'color: #FF0000;'
),
'METHODS' => array(
1 => 'color: #0000FF;'
),
'SYMBOLS' => array(
0 => 'color: #008000;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => 'http://www.google.com/search?q={FNAME}+msdn.microsoft.com',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 =>'.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

444
inc/geshi/visualfoxpro.php Normal file
View File

@ -0,0 +1,444 @@
<?php
/*************************************************************************************
* visualfoxpro.php
* ----------------
* Author: Roberto Armellin (r.armellin@tin.it)
* Copyright: (c) 2004 Roberto Armellin, Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/09/17
* Last Modified: 2004/09/18
*
* Visual FoxPro language file for GeSHi.
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/10/27)
* -------------------------
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'VFP',
'COMMENT_SINGLE' => array(1 => "//", 2 => "\n*"),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array('Case', 'Else', '#Else', 'Then',
'Endcase', 'Enddefine', 'Enddo', 'Endfor', 'Endfunc', 'Endif', 'Endprintjob',
'Endproc', 'Endscan', 'Endtext', 'Endwith', '#Endif',
'#Elif','#Else','#Endif','#Define','#If','#Include',
'#Itsexpression','#Readclauses','#Region','#Section','#Undef','#Wname',
'Case','Define','Do','Else','Endcase','Enddefine',
'Enddo','Endfor','Endfunc','Endif','Endprintjob','Endproc',
'Endscan','Endtext','Endwith','For','Function','Hidden',
'If','Local','Lparameter','Lparameters','Next','Otherwise',
'Parameters','Printjob','Procedure','Protected','Public','Scan',
'Text','Then','While','With','?','??',
'???','Abs','Accept','Access','Aclass','Acopy',
'Acos','Adatabases','Adbobjects','Addbs','Addrelationtoenv','Addtabletoenv',
'Adel','Adir','Aelement','Aerror','Afields','Afont',
'Agetclass','Agetfileversion','Ains','Ainstance','Alen','Align',
'Alines','Alltrim','Alter','Amembers','Amouseobj','Anetresources',
'Ansitooem','Append','Aprinters','Ascan','Aselobj','Asin',
'Asort','Assert','Asserts','Assist','Asubscript','Asynchronous',
'At_c','Atan','Atc','Atcc','Atcline','Atline',
'Atn2','Aused','Autoform','Autoreport','Avcxclasses','Average',
'BarCount','BarPrompt','BatchMode','BatchUpdateCount','Begin','BellSound',
'BinToC','Bintoc','Bitand','Bitclear','Bitlshift','Bitnot',
'Bitor','Bitrshift','Bitset','Bittest','Bitxor','Bof',
'Browse','BrowseRefresh','Buffering','BuilderLock','COMArray','COMReturnError',
'CToBin','Calculate','Call','Capslock','Cd','Cdow',
'Ceiling','Central','Change','Char','Chdir','Chr',
'Chrsaw','Chrtran','Chrtranc','Close','Cmonth','Cntbar',
'Cntpad','Col','Comclassinfo','CommandTargetQuery','Compile','Completed',
'Compobj','Compute','Concat','ConnectBusy','ConnectHandle','ConnectName',
'ConnectString','ConnectTimeOut','ContainerReleaseType','Continue','Copy','Cos',
'Cot','Count','Coverage','Cpconvert','Cpcurrent','Cpdbf',
'Cpnotrans','Create','CreateBinary','Createobject','Createobjectex','Createoffline',
'CrsBuffering','CrsFetchMemo','CrsFetchSize','CrsMaxRows','CrsMethodUsed','CrsNumBatch',
'CrsShareConnection','CrsUseMemoSize','CrsWhereClause','Ctobin','Ctod','Ctot',
'Curdate','Curdir','CurrLeft','CurrSymbol','CursorGetProp','CursorSetProp',
'Curtime','Curval','DBGetProp','DBSetProp','DB_BufLockRow','DB_BufLockTable',
'DB_BufOff','DB_BufOptRow','DB_BufOptTable','DB_Complette','DB_DeleteInsert','DB_KeyAndModified',
'DB_KeyAndTimestamp','DB_KeyAndUpdatable','DB_LocalSQL','DB_NoPrompt','DB_Prompt','DB_RemoteSQL',
'DB_TransAuto','DB_TransManual','DB_TransNone','DB_Update','Datetime','Day',
'Dayname','Dayofmonth','Dayofweek','Dayofyear','Dbalias','Dbused',
'Ddeaborttrans','Ddeadvise','Ddeenabled','Ddeexecute','Ddeinitiate','Ddelasterror',
'Ddepoke','Dderequest','Ddesetoption','Ddesetservice','Ddesettopic','Ddeterminate',
'Debugout','Declare','DefOLELCid','DefaultValue','Defaultext','Degrees',
'DeleteTrigger','Desc','Description','Difference','Dimension','Dir',
'Directory','Diskspace','DispLogin','DispWarnings','Display','Dll',
'Dmy','DoDefault','DoEvents','Doc','Doevents','Dow',
'Drivetype','Drop','Dropoffline','Dtoc','Dtor','Dtos',
'Dtot','DynamicInputMask','Each','Edit','Eject','Elif',
'End','Eof','Erase','Evaluate','Event','Eventtracking',
'Exclude','Exclusive','Exit','Exp','Export','External',
'FDate','FTime','Fchsize','Fclose','Fcount','Fcreate',
'Feof','Ferror','FetchMemo','FetchSize','Fflush','Fgets',
'Filer','Filetostr','Find','Fklabel','Fkmax','Fldlist',
'Flock','Floor','Flush','Fontmetric','Fopen','Forceext',
'Forcepath','FormSetClass','FormSetLib','FormsClass','FormsLib','Found',
'FoxPro','Foxcode','Foxdoc','Foxgen','Foxgraph','Foxview',
'Fputs','Fread','French','Fseek','Fsize','Fv',
'Fwrite','Gather','German','GetPem','Getbar','Getcolor',
'Getcp','Getdir','Getenv','Getexpr','Getfile','Getfldstate',
'Getfont','Gethost','Getnextmodified','Getobject','Getpad','Getpict',
'Getprinter','Go','Gomonth','Goto','Graph','GridHorz',
'GridShow','GridShowPos','GridSnap','GridVert','Help','HelpOn',
'HelpTo','HighLightRow','Home','Hour','IMEStatus','IdleTimeOut',
'Idxcollate','Ifdef','Ifndef','Iif','Import','Include',
'Indbc','Index','Indexseek','Inkey','Inlist','Input',
'Insert','InsertTrigger','Insmode','IsBlank','IsFLocked','IsLeadByte',
'IsMouse','IsNull','IsRLocked','Isalpha','Iscolor','Isdigit',
'Isexclusive','Isflocked','Ishosted','Islower','Isreadonly','Isrlocked',
'Isupper','Italian','Japan','Join','Justdrive','Justext',
'Justfname','Justpath','Juststem','KeyField','KeyFieldList','Keyboard'
),
2 => array('Keymatch','LastProject','Lastkey','Lcase','Leftc','Len',
'Lenc','Length','Likec','Lineno','LoadPicture','Loadpicture',
'Locate','Locfile','Log','Log10','Logout','Lookup',
'Loop','Lower','Ltrim','Lupdate','Mail','MaxRecords',
'Mcol','Md','Mdown','Mdx','Mdy','Memlines',
'Menu','Messagebox','Minute','Mkdir','Mline','Modify',
'Month','Monthname','Mouse','Mrkbar','Mrkpad','Mrow',
'Mtdll','Mton','Mwindow','Native','Ndx','Network',
'NoFilter','Nodefault','Normalize','Note','Now','Ntom',
'NullString','Numlock','Nvl','ODBChdbc','ODBChstmt','OLEDropTextInsertion',
'OLELCid','Objnum','Objref','Objtoclient','Objvar','Occurs',
'Oemtoansi','Oldval','OlePublic','Olereturnerror','On','Open',
'Oracle','Order','Os','Outer','PCount','Pack',
'PacketSize','Padc','Padl','Padr','Payment','Pcol',
'PemStatus','Pi','Pivot','Play','Pop','Popup',
'Power','PrimaryKey','Printstatus','Private','Prmbar','Prmpad',
'ProjectClick','Proper','Prow','Prtinfo','Push','Putfile',
'Pv','Qpr','Quater','QueryTimeOut','Quit','Radians',
'Rand','Rat','Ratc','Ratline','Rd','Rdlevel',
'Read','Readkey','Recall','Reccount','RecentlyUsedFiles','Recno',
'Recsize','Regional','Reindex','RelatedChild','RelatedTable','RelatedTag',
'Remove','Rename','Repeat','Replace','Replicate','Report',
'ResHeight','ResWidth','ResourceOn','ResourceTo','Resources','Restore',
'Resume','Retry','Return','Revertoffline','Rgbscheme','Rightc',
'Rlock','Rmdir','Rollback','Round','Rtod','Rtrim',
'RuleExpression','RuleText','Run','Runscript','Rview','SQLAsynchronous',
'SQLBatchMode','SQLCancel','SQLColumns','SQLConnect','SQLConnectTimeOut','SQLDisconnect',
'SQLDispLogin','SQLDispWarnings','SQLExec','SQLGetProp','SQLIdleTimeOut','SQLMoreResults',
'SQLPrepare','SQLQueryTimeOut','SQLSetProp','SQLTables','SQLTransactions','SQLWaitTime',
'Save','SavePicture','Savepicture','ScaleUnits','Scatter','Scols',
'Scroll','Sec','Second','Seek','Select','SendUpdates',
'Set','SetDefault','Setfldstate','Setup','ShareConnection','ShowOLEControls',
'ShowOLEInsertable','ShowVCXs','Sign','Sin','Size','SizeBox',
'Skpbar','Skppad','Sort','Soundex','SourceName','Sqlcommit',
'Sqll','Sqlrollback','Sqlstringconnect','Sqrt','Srows','StatusBar',
'Store','Str','Strconv','Strtofile','Strtran','Stuff',
'Stuffc','Substr','Substrc','Substring','Sum','Suspend',
'Sys','Sysmetric','TabOrdering','Table','TableRefresh','Tablerevert',
'Tableupdate','TagCount','TagNo','Tan','Target','This',
'Thisform','Thisformset','Timestamp','Timestampdiff','Total','Transactions',
'Transform','Trim','Truncate','Ttoc','Ttod','Txnlevel',
'Txtwidth','Type','Ucase','Undefine','Unlock','Unpack',
'Updatable','UpdatableFieldList','Update','UpdateName','UpdateNameList','UpdateTrigger',
'UpdateType','Updated','Upper','Upsizing','Usa','Use',
'UseMemoSize','Used','Val','Validate','Varread','Vartype',
'Version','VersionLanguage','Wait','WaitTime','Wborder','Wchild',
'Wcols','Week','Wexist','Wfont','WhereType','Windcmd',
'Windhelp','Windmemo','Windmenu','Windmodify','Windquery','Windscreen',
'Windsnip','Windstproc','WizardPrompt','Wlast','Wlcol','Wlrow',
'Wmaximum','Wminimum','Wontop','Woutput','Wparent','Wread',
'Wrows','Wtitle','Wvisible','Year','Zap','_Alignment',
'_Asciicols','_Asciirows','_Assist','_Beautify','_Box','_Browser',
'_Builder','_Calcmem','_Calcvalue','_Cliptext','_Converter','_Coverage',
'_Curobj','_Dblclick','_Diarydate','_Dos','_Foxdoc','_Foxgraph',
'_Gallery','_Gengraph','_Genhtml','_Genmenu','_Genpd','_Genscrn',
'_Genxtab','_Getexpr','_Include','_Indent','_Lmargin','_Mac',
'_Mbr_appnd','_Mbr_cpart','_Mbr_delet','_Mbr_font','_Mbr_goto','_Mbr_grid',
'_Mbr_link','_Mbr_mode','_Mbr_mvfld','_Mbr_mvprt','_Mbr_seek','_Mbr_sp100',
'_Mbr_sp200','_Mbr_szfld','_Mbrowse','_Mda_appnd','_Mda_avg','_Mda_brow',
'_Mda_calc','_Mda_copy','_Mda_count','_Mda_label','_Mda_pack','_Mda_reprt',
'_Mda_rindx','_Mda_setup','_Mda_sort','_Mda_sp100','_Mda_sp200','_Mda_sp300',
'_Mda_sum','_Mda_total','_Mdata','_Mdiary','_Med_clear','_Med_copy',
'_Med_cut','_Med_cvtst','_Med_find','_Med_finda','_Med_goto','_Med_insob',
'_Med_link','_Med_obj','_Med_paste','_Med_pref','_Med_pstlk','_Med_redo',
'_Med_repl','_Med_repla','_Med_slcta','_Med_sp100','_Med_sp200','_Med_sp300',
'_Med_sp400','_Med_sp500','_Med_undo','_Medit','_Mfi_clall','_Mfi_close',
'_Mfi_export','_Mfi_import','_Mfi_new','_Mfi_open','_Mfi_pgset','_Mfi_prevu',
'_Mfi_print','_Mfi_quit','_Mfi_revrt','_Mfi_savas','_Mfi_save','_Mfi_send',
'_Mfi_setup','_Mfi_sp100','_Mfi_sp200','_Mfi_sp300','_Mfi_sp400','_Mfile',
'_Mfiler','_Mfirst','_Mlabel','_Mlast','_Mline','_Mmacro',
'_Mmbldr','_Mpr_beaut','_Mpr_cancl','_Mpr_compl','_Mpr_do','_Mpr_docum',
'_Mpr_formwz','_Mpr_gener','_Mpr_graph','_Mpr_resum','_Mpr_sp100','_Mpr_sp200',
'_Mpr_sp300','_Mpr_suspend','_Mprog','_Mproj','_Mrc_appnd','_Mrc_chnge',
'_Mrc_cont','_Mrc_delet','_Mrc_goto','_Mrc_locat','_Mrc_recal','_Mrc_repl',
'_Mrc_seek','_Mrc_sp100','_Mrc_sp200','_Mrecord','_Mreport','_Mrqbe',
'_Mscreen','_Msm_data','_Msm_edit','_Msm_file','_Msm_format','_Msm_prog',
'_Msm_recrd','_Msm_systm','_Msm_text','_Msm_tools','_Msm_view','_Msm_windo',
'_Mst_about','_Mst_ascii','_Mst_calcu','_Mst_captr','_Mst_dbase','_Mst_diary',
'_Mst_filer','_Mst_help','_Mst_hphow','_Mst_hpsch','_Mst_macro','_Mst_office',
'_Mst_puzzl','_Mst_sp100','_Mst_sp200','_Mst_sp300','_Mst_specl','_Msysmenu',
'_Msystem','_Mtable','_Mtb_appnd','_Mtb_cpart','_Mtb_delet','_Mtb_delrc',
'_Mtb_goto','_Mtb_link','_Mtb_mvfld','_Mtb_mvprt','_Mtb_props','_Mtb_recal',
'_Mtb_sp100','_Mtb_sp200','_Mtb_sp300','_Mtb_sp400','_Mtb_szfld','_Mwi_arran',
'_Mwi_clear','_Mwi_cmd','_Mwi_color','_Mwi_debug','_Mwi_hide','_Mwi_hidea',
'_Mwi_min','_Mwi_move','_Mwi_rotat','_Mwi_showa','_Mwi_size','_Mwi_sp100',
'_Mwi_sp200','_Mwi_toolb','_Mwi_trace','_Mwi_view','_Mwi_zoom','_Mwindow',
'_Mwizards','_Mwz_all','_Mwz_form','_Mwz_foxdoc','_Mwz_import','_Mwz_label',
'_Mwz_mail','_Mwz_pivot','_Mwz_query','_Mwz_reprt','_Mwz_setup','_Mwz_table',
'_Mwz_upsizing','_Netware','_Oracle','_Padvance','_Pageno','_Pbpage',
'_Pcolno','_Pcopies','_Pdparms','_Pdriver','_Pdsetup','_Pecode',
'_Peject','_Pepage','_Pform','_Plength','_Plineno','_Ploffset',
'_Ppitch','_Pquality','_Pretext','_Pscode','_Pspacing','_Pwait',
'_Rmargin','_Runactivedoc','_Samples','_Screen','_Shell','_Spellchk',
'_Sqlserver','_Startup','_Tabs','_Tally','_Text','_Throttle',
'_Transport','_Triggerlevel','_Unix','_WebDevOnly','_WebMenu','_WebMsftHomePage',
'_WebVFPHomePage','_WebVfpOnlineSupport','_Windows','_Wizard','_Wrap','_scctext',
'_vfp','Additive','After','Again','Aindent','Alignright',
'All','Alt','Alternate','And','Ansi','Any',
'Aplabout','App','Array','As','Asc','Ascending',
'Ascii','At','Attributes','Automatic','Autosave','Avg',
'Bar','Before','Bell','Between','Bitmap','Blank',
'Blink','Blocksize','Border','Bottom','Brstatus','Bucket',
'Buffers','By','Candidate','Carry','Cascade','Catalog',
'Cdx','Center','Century','Cga','Character','Check',
'Classlib','Clock','Cnt','Codepage','Collate','Color',
'Com1','Com2','Command','Compact','Compatible','Compress',
'Confirm','Connection','Connections','Connstring','Console','Copies',
'Cpcompile','Cpdialog','Csv','Currency','Cycle','Databases',
'Datasource','Date','Db4','Dbc','Dbf','Dbmemo3',
'Debug','Decimals','Defaultsource','Deletetables','Delimited','Delimiters',
'Descending','Design','Development','Device','Dif','Disabled',
'Distinct','Dlls','Dohistory','Dos','Dosmem','Double',
'Driver','Duplex','Echo','Editwork','Ega25','Ega43',
'Ems','Ems64','Encrypt','Encryption','Environment','Escape',
'Events','Exact','Except','Exe','Exists','Expression',
'Extended','F','Fdow','Fetch','Field','Fields',
'File','Files','Fill','Fixed','Float','Foldconst',
'Font','Footer','Force','Foreign','Fox2x','Foxplus',
'Free','Freeze','From','Fullpath','Fw2','Fweek',
'Get','Gets','Global','Group','Grow','Halfheight',
'Having','Heading','Headings','Helpfilter','History','Hmemory',
'Hours','Id','In','Indexes','Information','Instruct',
'Int','Integer','Intensity','Intersect','Into','Is',
'Isometric','Key','Keycolumns','Keycomp','Keyset','Last',
'Ledit','Level','Library','Like','Linked','Lock',
'Logerrors','Long','Lpartition','Mac','Macdesktop','Machelp',
'Mackey','Macros','Mark','Master','Max','Maxmem',
'Mdi','Memlimit','Memory','Memos','Memowidth','Memvar',
'Menus','Messages','Middle','Min','Minimize','Minus',
'Mod','Modal','Module','Mono43','Movers','Multilocks',
'Mvarsiz','Mvcount','N','Near','Negotiate','Noalias',
'Noappend','Noclear','Noclose','Noconsole','Nocptrans','Nodata',
'Nodebug','Nodelete','Nodup','Noedit','Noeject','Noenvironment',
'Nofloat','Nofollow','Nogrow','Noinit','Nolgrid','Nolink',
'Nolock','Nomargin','Nomdi','Nomenu','Nominimize','Nomodify'
),
3 => array('Nomouse','None','Nooptimize','Nooverwrite','Noprojecthook','Noprompt',
'Noread','Norefresh','Norequery','Norgrid','Norm','Normal',
'Nosave','Noshadow','Noshow','Nospace','Not','Notab',
'Notify','Noupdate','Novalidate','Noverify','Nowait','Nowindow',
'Nowrap','Nozoom','Npv','Null','Number','Objects',
'Odometer','Of','Off','Oleobjects','Only','Optimize',
'Or','Orientation','Output','Outshow','Overlay','Overwrite',
'Pad','Palette','Paperlength','Papersize','Paperwidth','Password',
'Path','Pattern','Pause','Pdox','Pdsetup','Pen',
'Pfs','Pixels','Plain','Popups','Precision','Preference',
'Preview','Primary','Printer','Printquality','Procedures','Production',
'Program','Progwork','Project','Prompt','Query','Random',
'Range','Readborder','Readerror','Record','Recover','Redit',
'Reference','References','Relative','Remote','Reprocess','Resource',
'Rest','Restrict','Rgb','Right','Row','Rowset',
'Rpd','Runtime','Safety','Same','Sample','Say',
'Scale','Scheme','Scoreboard','Screen','Sdf','Seconds',
'Selection','Shadows','Shared','Sheet','Shell','Shift',
'Shutdown','Single','Some','Sortwork','Space','Sql',
'Standalone','Status','Std','Step','Sticky','String',
'Structure','Subclass','Summary','Sylk','Sysformats','Sysmenus',
'System','T','Tab','Tables','Talk','Tedit',
'Textmerge','Time','Timeout','Titles','Tmpfiles','To',
'Topic','Transaction','Trap','Trbetween','Trigger','Ttoption',
'Typeahead','Udfparms','Union','Unique','Userid','Users',
'Values','Var','Verb','Vga25','Vga50','Views',
'Volume','Where','Windows','Wk1','Wk3','Wks',
'Workarea','Wp','Wr1','Wrap','Wrk','Xcmdfile',
'Xl5','Xl8','Xls','Y','Yresolution','Zoom',
'Activate','ActivateCell','Add','AddColumn','AddItem','AddListItem',
'AddObject','AddProperty','AddToSCC','AfterBuild','AfterCloseTables','AfterDock',
'AfterRowColChange','BeforeBuild','BeforeDock','BeforeOpenTables','BeforeRowColChange','Box',
'Build','CheckIn','CheckOut','Circle','Clear','ClearData',
'Cleanup','Click','CloneObject','CloseEditor','CloseTables','Cls',
'CommandTargetExec','CommandTargetQueryStas','ContainerRelease','DataToClip','DblClick','Deactivate',
'Delete','DeleteColumn','Deleted','Destroy','DoCmd','Dock',
'DoScroll','DoVerb','DownClick','Drag','DragDrop','DragOver',
'DropDown','Draw','EnterFocus','Error','ErrorMessage','Eval',
'ExitFocus','FormatChange','GetData','GetFormat','GetLatestVersion','GoBack',
'GotFocus','GoForward','GridHitTest','Hide','HideDoc','IndexToItemId',
'Init','InteractiveChange','Item','ItemIdToIndex','KeyPress','Line',
'Load','LostFocus','Message','MiddleClick','MouseDown','MouseMove',
'MouseUp','MouseWheel','Move','Moved','NavigateTo','Newobject',
'OLECompleteDrag','OLEDrag','OLEDragDrop','OLEDragOver','OLEGiveFeedback','OLESetData',
'OLEStartDrag','OpenEditor','OpenTables','Paint','Point','Print',
'ProgrammaticChange','PSet','QueryAddFile','QueryModifyFile','QueryRemoveFile','QueryRunFile',
'QueryUnload','RangeHigh','RangeLow','ReadActivate','ReadExpression','ReadDeactivate',
'ReadMethod','ReadShow','ReadValid','ReadWhen','Refresh','Release',
'RemoveFromSCC','RemoveItem','RemoveListItem','RemoveObject','Requery','RequestData',
'Reset','ResetToDefault','Resize','RightClick','SaveAs','SaveAsClass',
'Scrolled','SetAll','SetData','SetFocus','SetFormat','SetMain',
'SetVar','SetViewPort','ShowDoc','ShowWhatsThis','TextHeight','TextWidth',
'Timer','UIEnable','UnDock','UndoCheckOut','Unload','UpClick',
'Valid','WhatsThisMode','When','WriteExpression','WriteMethod','ZOrder',
'ATGetColors','ATListColors','Accelerate','ActiveColumn','ActiveControl','ActiveForm',
'ActiveObjectId','ActivePage','ActiveProject','ActiveRow','AddLineFeeds','Alias',
'Alignment','AllowAddNew','AllowHeaderSizing','AllowResize','AllowRowSizing','AllowTabs',
'AlwaysOnTop','Application','AutoActivate','AutoCenter','AutoCloseTables','AutoIncrement',
'AutoOpenTables','AutoRelease','AutoSize','AutoVerbMenu','AutoYield','AvailNum',
'BackColor','BackStyle','BaseClass','BorderColor','BorderStyle','BorderWidth',
'Bound','BoundColumn','BoundTo','BrowseAlignment','BrowseCellMarg','BrowseDestWidth',
'BufferMode','BufferModeOverride','BuildDateTime','ButtonCount','ButtonIndex','Buttons',
'CLSID','CanAccelerate','CanGetFocus','CanLoseFocus','Cancel','Caption',
'ChildAlias','ChildOrder','Class','ClassLibrary','ClipControls','ClipRect',
'Closable','ColorScheme','ColorSource','ColumnCount','ColumnHeaders','ColumnLines',
'ColumnOrder','ColumnWidths','Columns','Comment','ContinuousScroll','ControlBox',
'ControlCount','ControlIndex','ControlSource','Controls','CurrentControl','CurrentX',
'CurrentY','CursorSource','Curvature','DataSession','DataSessionId','DataSourceObj',
'DataType','Database','DateFormat','DateMark','DefButton','DefButtonOrig',
'DefHeight','DefLeft','DefTop','DefWidth','Default','DefaultFilePath',
'DefineWindows','DeleteMark','Desktop','Dirty','DisabledBackColor','DisabledByEOF',
'DisabledForeColor','DisabledItemBackColor','DisabledItemForeColor','DisabledPicture','DispPageHeight','DispPageWidth',
'DisplayCount','DisplayValue','DoCreate','DockPosition','Docked','DocumentFile',
'DownPicture','DragIcon','DragMode','DragState','DrawMode','DrawStyle',
'DrawWidth','DynamicAlignment','DynamicBackColor','DynamicCurrentControl','DynamicFontBold','DynamicFontItalic',
'DynamicFontName','DynamicFontOutline','DynamicFontShadow','DynamicFontSize','DynamicFontStrikethru','DynamicFontUnderline',
'DynamicForeColor','EditFlags','Enabled','EnabledByReadLock','Encrypted','EnvLevel',
'ErasePage','FileClass','FileClassLibrary','FillColor','FillStyle','Filter',
'FirstElement','FontBold','FontItalic','FontName','FontOutline','FontShadow',
'FontSize','FontStrikethru','FontUnderline','ForceFocus','ForeColor','FormCount',
'FormIndex','FormPageCount','FormPageIndex','Format','Forms','FoxFont',
'FullName','GoFirst','GoLast','GridLineColor','GridLineWidth','GridLines'
),
4 => array('HPROJ','HWnd','HalfHeightCaption','HasClip','HeaderGap','HeaderHeight',
'Height','HelpContextID','HideSelection','Highlight','HomeDir','HostName',
'HotKey','HscrollSmallChange','IMEMode','Icon','IgnoreInsert','InResize',
'Increment','IncrementalSearch','InitialSelectedAlias','InputMask','Instancing','IntegralHeight',
'Interval','ItemBackColor','ItemData','ItemForeColor','ItemIDData','ItemTips',
'JustReadLocked','KeyPreview','KeyboardHighValue','KeyboardLowValue','LastModified','Left',
'LeftColumn','LineSlant','LinkMaster','List','ListCount','ListIndex',
'ListItem','ListItemId','LockDataSource','LockScreen','MDIForm','MainClass',
'MainFile','Margin','MaxButton','MaxHeight','MaxLeft','MaxLength',
'MaxTop','MaxWidth','MemoWindow','MinButton','MinHeight','MinWidth',
'MouseIcon','MousePointer','Movable','MoverBars','MultiSelect','Name',
'NapTime','NewIndex','NewItemId','NoDataOnLoad','NoDefine','NotifyContainer',
'NullDisplay','NumberOfElements','OLEDragMode','OLEDragPicture','OLEDropEffects','OLEDropHasData',
'OLEDropMode','OLERequestPendingTimeOut','OLEServerBusyRaiseError','OLEServerBusyTimeOut','OLETypeAllowed','OleClass',
'OleClassId','OleControlContainer','OleIDispInValue','OleIDispOutValue','OleIDispatchIncoming','OleIDispatchOutgoing',
'OnResize','OneToMany','OpenViews','OpenWindow','PageCount','PageHeight',
'PageOrder','PageWidth','Pages','Panel','PanelLink','Parent',
'ParentAlias','ParentClass','Partition','PasswordChar','Picture','ProcessID',
'ProgID','ProjectHookClass','ProjectHookLibrary','Projects','ReadColors','ReadCycle',
'ReadFiller','ReadLock','ReadMouse','ReadOnly','ReadSave','ReadSize',
'ReadTimeout','RecordMark','RecordSource','RecordSourceType','Rect','RelationalExpr',
'RelativeColumn','RelativeRow','ReleaseErase','ReleaseType','ReleaseWindows','Resizable',
'RightToLeft','RowHeight','RowSource','RowSourceType','SCCProvider','SCCStatus',
'SDIForm','ScaleMode','ScrollBars','SelLength','SelStart','SelText',
'SelectOnEntry','Selected','SelectedBackColor','SelectedForeColor','SelectedID','SelectedItemBackColor',
'SelectedItemForeColor','SelfEdit','ServerClass','ServerClassLibrary','ServerHelpFile','ServerName',
'ServerProject','ShowTips','ShowWindow','Sizable','Size<height>','Size<maxlength>',
'Size<width>','Skip','SkipForm','Sorted','SourceType','Sparse',
'SpecialEffect','SpinnerHighValue','SpinnerLowValue','SplitBar','StartMode','StatusBarText',
'Stretch','StrictDateEntry','Style','SystemRefCount','TabIndex','TabStop',
'TabStretch','TabStyle','Tabhit','Tabs','Tag','TerminateRead',
'ThreadID','TitleBar','ToolTipText','Top','TopIndex','TopItemId',
'TypeLibCLSID','TypeLibDesc','TypeLibName','UnlockDataSource','Value','ValueDirty',
'VersionComments','VersionCompany','VersionCopyright','VersionDescription','VersionNumber','VersionProduct',
'VersionTrademarks','View','ViewPortHeight','ViewPortLeft','ViewPortTop','ViewPortWidth',
'Visible','VscrollSmallChange','WasActive','WasOpen','WhatsThisButton','WhatsThisHelp',
'WhatsThisHelpID','Width','WindowList','WindowNTIList','WindowState','WindowType',
'WordWrap','ZOrderSet','ActiveDoc','Checkbox','Column','ComboBox',
'CommandButton','CommandGroup','Container','Control','Cursor','Custom',
'DataEnvironment','EditBox','Empty','FontClass','Form','Formset',
'General','Grid','Header','HyperLink','Image','Label',
'ListBox','Memo','OleBaseControl','OleBoundControl','OleClassIDispOut','OleControl',
'OptionButton','OptionGroup','Page','PageFrame','ProjectHook','RectClass',
'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar'
),
),
'SYMBOLS' => array("!", "@", "$", "%", "(", ")", "-", "+", "=", "/", "{", "}", "[", "]", ":", ";", ",", " ", ".", "*", "&"),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => false,
2 => false,
3 => false,
4 => false,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: blue;',
2 => 'color: blue;',
3 => 'color: blue;',
4 => 'color: blue;'
),
'COMMENTS' => array(
1 => 'color: green; font-style: italic;',
2 => 'color: green font-style: italic;',
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: blue;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'SYMBOLS' => array(
0 => 'color: blue;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
?>

145
inc/geshi/xml.php Normal file
View File

@ -0,0 +1,145 @@
<?php
/*************************************************************************************
* xml.php
* -------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.1
* CVS Revision Version: $Revision: 1.1 $
* Date Started: 2004/09/01
* Last Modified: $Date: 2004/11/29 08:46:25 $
*
* XML language file for GeSHi. Based on the idea/file by Christian Weiske
*
* CHANGES
* -------
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (1.0.0)
* - First Release
*
* TODO (updated 2004/11/27)
* -------------------------
* * Check regexps work and correctly highlight XML stuff and nothing else
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi 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.
*
* GeSHi 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 GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'HTML',
'COMMENT_SINGLE' => array(),
'COMMENT_MULTI' => array('<!--' => '-->'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
),
'SYMBOLS' => array(
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
),
'STYLES' => array(
'KEYWORDS' => array(
),
'COMMENTS' => array(
'MULTI' => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'SCRIPT' => array(
0 => 'color: #00bbdd;',
1 => 'color: #ddbb00;',
2 => 'color: #339933;',
3 => 'color: #009900;'
),
'REGEXPS' => array(
0 => 'color: #000066;',
1 => 'font-weight: bold; color: black;',
2 => 'font-weight: bold; color: black;',
)
),
'URLS' => array(
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
0 => array(
GESHI_SEARCH => '(((xml:)?[a-z\-]+))(=)',
GESHI_REPLACE => '\\1',
GESHI_MODIFIERS => 'i',
GESHI_BEFORE => '',
GESHI_AFTER => '\\4'
),
1 => array(
GESHI_SEARCH => '(&lt;/?[a-z0-9]*(&gt;)?)',
GESHI_REPLACE => '\\1',
GESHI_MODIFIERS => 'i',
GESHI_BEFORE => '',
GESHI_AFTER => ''
),
2 => array(
GESHI_SEARCH => '((/)?&gt;)',
GESHI_REPLACE => '\\1',
GESHI_MODIFIERS => 'i',
GESHI_BEFORE => '',
GESHI_AFTER => ''
)
),
'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
'SCRIPT_DELIMITERS' => array(
0 => array(
'<!DOCTYPE' => '>'
),
1 => array(
'&' => ';'
),
2 => array(
'<![CDATA[' => ']]>'
),
3 => array(
'<' => '>'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => false,
1 => false,
2 => false,
3 => true
)
);
?>

970
inc/html.php Normal file
View File

@ -0,0 +1,970 @@
<?
include_once("inc/format.php");
/**
* Convenience function to quickly build a wikilink
*/
function html_wikilink($url,$name='',$search=''){
global $conf;
$link = array();
$link['url'] = $url;
$link['name'] = $name;
$link = format_link_wiki($link);
if($search){
($conf['userewrite']) ? $link['url'].='?s=' : $link['url'].='&amp;s=';
$link['url'] .= urlencode($search);
}
return format_link_build($link);
}
/**
* The loginform
*/
function html_login(){
global $lang;
global $conf;
global $ID;
print parsedLocale('login');
?>
<div align="center">
<form action="<?=script()?>" accept-charset="<?=$lang['encoding']?>" method="post">
<fieldset>
<legend><?=$lang['btn_login']?></legend>
<input type="hidden" name="id" value="<?=$ID?>" />
<input type="hidden" name="do" value="login" />
<label>
<span><?=$lang['user']?></span>
<input type="text" name="u" value="<?=formText($_REQUEST['u'])?>" class="edit" />
</label><br />
<label>
<span><?=$lang['pass']?></span>
<input type="password" name="p" class="edit" />
</label><br />
<input type="submit" value="<?=$lang['btn_login']?>" class="button" />
</fieldset>
</form>
<?
if($conf['openregister']){
print '<p>';
print $lang['reghere'];
print ': <a href="'.wl($ID,'do=register').'" class="wikilink1">'.$lang['register'].'</a>';
print '</p>';
}
?>
</div>
<?
if(@file_exists('includes/login.txt')){
print io_cacheParse('includes/login.txt');
}
}
/**
* shows the edit/source/show button dependent on current mode
*/
function html_editbutton(){
global $ID;
global $REV;
global $ACT;
global $INFO;
if($ACT == 'show' || $ACT == 'search'){
if($INFO['writable']){
if($INFO['exists']){
$r = html_btn('edit',$ID,'e',array('do' => 'edit','rev' => $REV),'post');
}else{
$r = html_btn('create',$ID,'e',array('do' => 'edit','rev' => $REV),'post');
}
}else{
$r = html_btn('source',$ID,'v',array('do' => 'edit','rev' => $REV),'post');
}
}else{
$r = html_btn('show',$ID,'v',array('do' => 'show'));
}
return $r;
}
function html_secedit_button($section,$p){
global $ID;
global $lang;
$secedit = '';
if($p) $secedit .= "</p>\n";
$secedit .= '<div class="secedit">';
$secedit .= html_btn('secedit',$ID,'',
array('do' => 'edit',
'lines' => "$section"),
'post');
$secedit .= '</div>';
if($p) $secedit .= "\n<p>";
return $secedit;
}
function html_secedit($text,$show=true){
global $INFO;
if($INFO['writable'] && $show){
$text = preg_replace('#<!-- SECTION \[(\d+-\d+)\] -->#e',
"html_secedit_button('\\1',true)",
$text);
$text = preg_replace('#<!-- SECTION \[(\d+-)\] -->#e',
"html_secedit_button('\\1',false)",
$text);
}else{
$text = preg_replace('#<!-- SECTION \[(\d*-\d*)\] -->#e','',$text);
}
return $text;
}
/**
* displays the breadcrumbs trace
*/
function html_breadcrumbs(){
global $lang;
global $conf;
//check if enabled
if(!$conf['breadcrumbs']) return;
$crumbs = breadcrumbs(); //setup crumb trace
print '<div class="breadcrumbs">';
print $lang['breadcrumb'].':';
foreach ($crumbs as $crumb){
print ' &raquo; ';
print '<a href="'.wl($crumb).'" class="breadcrumbs" onclick="return svchk()" onkeypress="return svchk()" title="'.$crumb.'">'.noNS($crumb).'</a>';
}
print '</div>';
}
/**
* display the HTML head and metadata
*/
function html_head(){
global $ID;
global $ACT;
global $INFO;
global $conf;
global $lang;
print '<'.'?xml version="1.0"?'.">\n";
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"';
print ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
print "\n";
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$conf['lang']?>" lang="<?=$conf['lang']?>" dir="ltr">
<head>
<title><?=$ID?> [<?=$conf['title']?>]</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$lang['encoding']?>" />
<meta name="generator" content="DokuWiki <?=DOKUWIKIVERSION?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?=getBaseURL()?>style.css" />
<link rel="stylesheet" media="print" type="text/css" href="<?=getBaseURL()?>print.css" />
<link rel="shortcut icon" href="<?=getBaseURL()?>images/favicon.ico" />
<link rel="start" href="<?=wl()?>" />
<link rel="contents" href="<?=wl($ID,'do=index')?>" title="<?=$lang['index']?>" />
<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="<?=getBaseURL()?>feed.php" />
<link rel="alternate" type="application/rss+xml" title="Current Namespace" href="<?=getBaseURL()?>feed.php?mode=list&amp;ns=<?=$INFO['namespace']?>" />
<link rel="alternate" type="text/html" title="Plain HTML" href="<?=wl($ID,'do=export_html')?>" />
<link rel="alternate" type="text/plain" title="Wiki Markup" href="<?=wl($ID, 'do=export_raw')?>" />
<?
if($ACT=='show' || $ACT=='export_html'){
if($INFO['exists']){
print ' <meta name="robots" content="index,follow" />'."\n";
print ' <meta name="date" content="'.date('Y-m-d\TH:i:sO',$INFO['lastmod']).'" />'."\n";
}else{
print ' <meta name="robots" content="noindex,follow" />'."\n";
}
}else{
print ' <meta name="robots" content="noindex,nofollow" />'."\n";
}
?>
<script language="JavaScript" type="text/javascript">
var alertText = '<?=$lang['qb_alert']?>';
var notSavedYet = '<?=$lang['notsavedyet']?>';
var baseURL = '<?=getBaseURL()?>';
</script>
<script language="JavaScript" type="text/javascript" src="<?=getBaseURL()?>script.js"></script>
<!--[if gte IE 5]>
<style type="text/css">
/* that IE 5+ conditional comment makes this only visible in IE 5+ */
img { behavior: url("<?=getBaseURL()?>pngbehavior.htc"); } /* IE bugfix for transparent PNGs */
</style>
<![endif]-->
<?@include("includes/meta.html")?>
</head>
<?
}
/**
* Displays a button (using it's own form)
*/
function html_btn($name,$id,$akey,$params,$method='get'){
global $conf;
global $lang;
$label = $lang['btn_'.$name];
$ret = '';
$id = idfilter($id);
//make nice URLs even for buttons
$link = getBaseURL().'/';
$link = preg_replace('#//$#','/',$link);
if(!$conf['userewrite']){
$script = $link.'doku.php';
$params['id'] = $id;
}else{
$script = $link.$id;
}
$ret .= '<form class="button" method="'.$method.'" action="'.$script.'" onsubmit="return svchk()">';
reset($params);
while (list($key, $val) = each($params)) {
$ret .= '<input type="hidden" name="'.$key.'" ';
$ret .= 'value="'.htmlspecialchars($val).'" />';
}
$ret .= '<input type="submit" value="'.htmlspecialchars($label).'" class="button" ';
if($akey){
$ret .= 'title="ALT+'.strtoupper($akey).'" ';
$ret .= 'accesskey="'.$akey.'" ';
}
$ret .= '/>';
$ret .= '</form>';
return $ret;
}
/**
* Check for the given permission or prints an error
*/
function html_acl($perm){
global $INFO;
if($INFO['perm'] >= $perm) return true;
print parsedLocale('denied');
return false;
}
/**
* Displays the page header and calls html_head()
*/
function html_header(){
global $ID;
global $REV;
global $lang;
global $conf;
html_head();
?>
<body>
<div class="all">
<?
html_msgarea();
@include("includes/topheader.html")
?>
<div class="header">
<div class="pagename">
[[<a href="<?=wl($ID,'do=backlink')?>" onclick="return svchk()" onkeypress="return svchk()"><?=$ID?></a>]]
</div>
<div class="logo">
<a href="<?=wl()?>" name="top" accesskey="h" title="[ALT+H]" onclick="return svchk()" onkeypress="return svchk()"><?=$conf['title']?></a>
</div>
</div>
<?@include("includes/header.html")?>
<div class="bar" id="bar_top">
<div class="bar-left" id="bar_topleft">
<?=html_editbutton()?>
<?=html_btn(revs,$ID,'r',array('do' => 'revisions'))?>
</div>
<div class="bar-right" id="bar_topright">
<?=html_btn(recent,'','r',array('do' => 'recent'))?>
<form action="<?=wl()?>" accept-charset="<?=$lang['encoding']?>">
<input type="hidden" name="do" value="search" />
<input type="text" name="id" class="edit" />
<input type="submit" value="<?=$lang['btn_search']?>" class="button" />
</form>&nbsp;
</div>
</div>
<?
flush();
html_breadcrumbs();
@include("includes/pageheader.html");
?>
<div class="page">
<!-- wikipage start -->
<?
}
/**
* Displays some Metadata like who's logged in and the last modified
* date - do not confuse this with the HTML meta header.
*/
function html_metainfo(){
global $conf;
global $lang;
global $INFO;
global $REV;
$fn = $INFO['filepath'];
if(!$conf['fullpath']){
if($REV){
$fn = str_replace(realpath($conf['olddir']).DIRECTORY_SEPARATOR,'',$fn);
}else{
$fn = str_replace(realpath($conf['datadir']).DIRECTORY_SEPARATOR,'',$fn);
}
}
$date = date($conf['dformat'],$INFO['lastmod']);
print '<div class="meta">';
if($_SERVER['REMOTE_USER']){
print '<div class="user">';
print $lang['loggedinas'].': '.$_SERVER['REMOTE_USER'];
print '</div>';
}
print ' &nbsp; ';
if($INFO['exists']){
print $fn;
print ' &middot; ';
print $lang['lastmod'];
print ': ';
print $date;
if($INFO['locked']){
print ' &middot; ';
print $lang['lockedby'];
print ': ';
print $INFO['locked'];
}
}
print '</div>';
}
function html_footer(){
global $ID;
global $REV;
global $INFO;
global $lang;
global $conf;
?>
<!-- wikipage stop -->
</div>
<div class="clearer">&nbsp;</div>
<?
flush();
@include("includes/pagefooter.html");
html_metainfo();
?>
<div class="bar" id="bar_bottom">
<div class="bar-left" id="bar_bottomleft">
<?=html_editbutton()?>
<?=html_btn(revs,$ID,'r',array('do' => 'revisions'))?>
</div>
<div class="bar-right" id="bar_bottomright">
<?
if($conf['useacl']){
if($_SERVER['REMOTE_USER']){
print html_btn('logout',$ID,'',array('do' => 'logout',));
}else{
print html_btn('login',$ID,'',array('do' => 'login'));
}
}
?>
<?=html_btn(index,$ID,'x',array('do' => 'index'))?>
<a href="#top"><input type="button" class="button" value="<?=$lang['btn_top']?>" /></a>&nbsp;
</div>
</div>
<?@include("includes/footer.html")?>
</div>
</body>
</html>
<?
}
function html_toc($toc){
global $lang;
$ret = '';
$ret .= '<div class="toc">';
$ret .= '<div class="tocheader">';
$ret .= $lang['toc'];
$ret .= ' <script type="text/javascript">';
$ret .= 'showTocToggle("+","-")';
$ret .= '</script>';
$ret .= '</div>';
$ret .= '<div id="tocinside">';
$ret .= html_buildlist($toc,'toc','html_list_toc');
$ret .= '</div>';
$ret .= '</div>';
return $ret;
}
/**
* User function for html_buildlist()
*/
function html_list_toc($item){
$ret = '';
$ret .= '<a href="#'.$item['id'].'" class="toc">';
$ret .= $item['name'];
$ret .= '</a>';
return $ret;
}
function html_show($text=''){
global $ID;
global $REV;
global $HIGH;
//disable section editing for old revisions or in preview
if($text || $REV){
global $parser;
$parser['secedit'] = false;
}
if ($text){
//PreviewHeader
print parsedLocale('preview');
print '<div class="preview">';
print html_secedit(parse($text),false);
print '</div>';
}else{
if ($REV) print parsedLocale('showrev');
$html = parsedWiki($ID,$REV,true);
$html = html_secedit($html);
print html_hilight($html,$HIGH);
}
}
/**
* Highlights searchqueries in HTML code
*/
function html_hilight($html,$query){
$queries = preg_split ("/\s/",$query,-1,PREG_SPLIT_NO_EMPTY);
foreach ($queries as $q){
$q = preg_quote($q,'/');
$html = preg_replace("/((<[^>]*)|$q)/ie", '"\2"=="\1"? "\1":"<span class=\"search_hit\">\1</span>"', $html);
}
return $html;
}
/**
* This function runs a search and displays the result
*/
function html_search(){
require_once("inc/search.php");
global $conf;
global $QUERY;
global $ID;
global $lang;
print parsedLocale('searchpage');
flush();
//do quick pagesearch
$data = array();
search($data,$conf['datadir'],'search_pagename',array(query => $QUERY));
if(count($data)){
sort($data);
print '<div class="search_quickresult">';
print '<b>'.$lang[quickhits].':</b><br />';
foreach($data as $row){
print '<div class="search_quickhits">';
print html_wikilink(':'.$row['id'],$row['id']);
print '</div> ';
}
//clear float (see http://www.complexspiral.com/publications/containing-floats/)
print '<div class="clearer">&nbsp;</div>';
print '</div>';
}
flush();
//do fulltext search
$data = array();
search($data,$conf['datadir'],'search_fulltext',array(query => $QUERY));
if(count($data)){
usort($data,'sort_search_fulltext');
foreach($data as $row){
print '<div class="search_result">';
print html_wikilink(':'.$row['id'],$row['id'],$QUERY);
print ': <span class="search_cnt">'.$row['count'].' '.$lang['hits'].'</span><br />';
print '<div class="search_snippet">'.$row['snippet'].'</div>';
print '</div>';
}
}else{
print '<div align="center">'.$lang['nothingfound'].'</div>';
}
}
function html_locked($ip){
global $ID;
global $conf;
global $lang;
$locktime = filemtime(wikiFN($ID).'.lock');
$expire = @date($conf['dformat'], $locktime + $conf['locktime'] );
$min = round(($conf['locktime'] - (time() - $locktime) )/60);
print parsedLocale('locked');
print '<ul>';
print '<li><b>'.$lang['lockedby'].':</b> '.$ip.'</li>';
print '<li><b>'.$lang['lockexpire'].':</b> '.$expire.' ('.$min.' min)</li>';
print '</ul>';
}
function html_revisions(){
global $ID;
global $INFO;
global $conf;
global $lang;
$revisions = getRevisions($ID);
$date = @date($conf['dformat'],$INFO['lastmod']);
print parsedLocale('revisions');
print '<ul>';
if($INFO['exists']){
print '<li>'.$date.' <a class="wikilink1" href="'.wl($ID).'">'.$ID.'</a> ('.$lang['current'].')</li>';
}
foreach($revisions as $rev){
$date = date($conf['dformat'],$rev);
print '<li>';
print $date.' <a class="wikilink1" href="'.wl($ID,"rev=$rev").'">'.$ID.'</a> ';
print '<a href="'.wl($ID,"rev=$rev,do=diff").'">['.$lang['diff'].']</a>';
print '</li>';
}
print '</ul>';
}
function html_recent(){
global $conf;
$recents = getRecents(0,true);
print parsedLocale('recent');
print '<ul>';
foreach(array_keys($recents) as $id){
$date = date($conf['dformat'],$recents[$id]['date']);
print '<li>';
print $date.' '.html_wikilink($id,$id);
print ' '.htmlspecialchars($recents[$id]['sum']);
print ' <span class="user">(';
print $recents[$id]['ip'];
if($recents[$id]['user']) print ' '.$recents[$id]['user'];
print ')</span>';
print '</li>';
}
print '</ul>';
}
function html_index($ns){
require_once("inc/search.php");
global $conf;
global $ID;
$dir = $conf['datadir'];
$ns = cleanID($ns);
if(empty($ns)){
$ns = dirname(str_replace(':','/',$ID));
if($ns == '.') $ns ='';
}
$ns = str_replace(':','/',$ns);
print parsedLocale('index');
$data = array();
search($data,$conf['datadir'],'search_index',array('ns' => $ns));
print html_buildlist($data,'idx','html_list_index');
}
/**
* User function for html_buildlist()
*/
function html_list_index($item){
$ret = '';
$base = ':'.$item['id'];
$base = substr($base,strrpos($base,':')+1);
if($item['type']=='d'){
$ret .= '<a href="'.wl($ID,'idx='.$item['id']).'" class="idx_dir">';
$ret .= $base;
$ret .= '</a>';
}else{
$ret .= html_wikilink(':'.$item['id']);
}
return $ret;
}
/**
* Build an unordered list from the given $data array
* Each item in the array has to have a 'level' property
* the item itself gets printed by the given $func user
* function
*/
function html_buildlist($data,$class,$func){
$level = 0;
$opens = 0;
$ret = '';
foreach ($data as $item){
if( $item['level'] > $level ){
//open new list
$ret .= "\n<ul class=\"$class\">\n";
}elseif( $item['level'] < $level ){
//close last item
$ret .= "</li>\n";
for ($i=0; $i<($level - $item['level']); $i++){
//close higher lists
$ret .= "</ul>\n</li>\n";
}
}else{
//close last item
$ret .= "</li>\n";
}
//remember current level
$level = $item['level'];
//print item
$ret .= '<li class="level'.$item['level'].'">';
$ret .= '<span class="li">';
$ret .= $func($item); //user function
$ret .= '</span>';
}
//close remaining items and lists
for ($i=0; $i < $level; $i++){
$ret .= "</li></ul>\n";
}
return $ret;
}
function html_backlinks(){
require_once("inc/search.php");
global $ID;
global $conf;
if(preg_match('#^(.*):(.*)$#',$ID,$matches)){
$opts['ns'] = $matches[1];
$opts['name'] = $matches[2];
}else{
$opts['ns'] = '';
$opts['name'] = $ID;
}
print parsedLocale('backlinks');
$data = array();
search($data,$conf['datadir'],'search_backlinks',$opts);
sort($data);
print '<ul class="idx">';
foreach($data as $row){
print '<li>';
print html_wikilink(':'.$row['id'],$row['id']);
print '</li>';
}
print '</ul>';
}
function html_diff($text='',$intro=true){
require_once("inc/DifferenceEngine.php");
global $ID;
global $REV;
global $lang;
global $conf;
if($text){
$df = new Diff(split("\n",htmlspecialchars(rawWiki($ID,''))),
split("\n",htmlspecialchars(cleanText($text))));
$left = '<a class="wikilink1" href="'.wl($ID).'">'.
$ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).'</a>'.
$lang['current'];
$right = $lang['yours'];
}else{
$df = new Diff(split("\n",htmlspecialchars(rawWiki($ID,$REV))),
split("\n",htmlspecialchars(rawWiki($ID,''))));
$left = '<a class="wikilink1" href="'.wl($ID,"rev=$REV").'">'.
$ID.' '.date($conf['dformat'],$REV).'</a>';
$right = '<a class="wikilink1" href="'.wl($ID).'">'.
$ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).'</a> '.
$lang['current'];
}
$tdf = new TableDiffFormatter();
if($intro) print parsedLocale('diff');
?>
<table class="diff" width="100%">
<tr>
<td colspan="2" width="50%" class="diff-header">
<?=$left?>
</td>
<td colspan="2" width="50%" class="diff-header">
<?=$right?>
</td>
</tr>
<?=$tdf->format($df)?>
</table>
<?
}
function html_conflict($text,$summary){
global $ID;
global $lang;
print parsedLocale('conflict');
?>
<form name="editform" method="post" action="<?=script()?>" accept-charset="<?=$lang['encoding']?>">
<input type="hidden" name="id" value="<?=$ID?>" />
<input type="hidden" name="wikitext" value="<?=formText($text)?>" />
<input type="hidden" name="summary" value="<?=formText($summary)?>" />
<div align="center">
<input class="button" type="submit" name="do" value="<?=$lang['btn_save']?>" accesskey="s" title="[ALT+S]" />
<input class="button" type="submit" name="do" value="<?=$lang['btn_cancel']?>" />
</div>
</form>
<br /><br /><br /><br />
<?
}
/**
* Prints the glovbal message array
*/
function html_msgarea(){
global $MSG;
if(!isset($MSG)) return;
foreach($MSG as $msg){
print '<div class="'.$msg['lvl'].'">';
print $msg['msg'];
print '</div>';
}
}
/**
* Prints the registration form
*/
function html_register(){
global $lang;
global $ID;
print parsedLocale('register');
?>
<div align="center">
<form name="register" method="post" action="<?=wl($ID)?>" accept-charset="<?=$lang['encoding']?>">
<input type="hidden" name="do" value="register" />
<input type="hidden" name="save" value="1" />
<fieldset>
<legend><?=$lang['register']?></legend>
<label>
<?=$lang['user']?>
<input type="text" name="login" class="edit" size="50" value="<?=formText($_POST['login'])?>" />
</label><br />
<label>
<?=$lang['fullname']?>
<input type="text" name="fullname" class="edit" size="50" value="<?=formText($_POST['fullname'])?>" />
</label><br />
<label>
<?=$lang['email']?>
<input type="text" name="email" class="edit" size="50" value="<?=formText($_POST['email'])?>" />
</label><br />
<input type="submit" class="button" value="<?=$lang['register']?>" />
</fieldset>
</form>
</div>
<?
}
/**
* This displays the edit form (lots of logic included)
*/
function html_edit($text=null,$include='edit'){ //FIXME: include needed?
global $ID;
global $REV;
global $DATE;
global $RANGE;
global $PRE;
global $SUF;
global $INFO;
global $SUM;
global $lang;
global $conf;
//check for create permissions first
if(!$INFO['exists'] && !html_acl(AUTH_CREATE)) return;
//set summary default
if(!$SUM){
if($REV){
$SUM = $lang['restored'];
}elseif(!$INFO['exists']){
$SUM = $lang['created'];
}
}
//no text? Load it!
if(!isset($text)){
$pr = false; //no preview mode
if($RANGE){
list($PRE,$text,$SUF) = rawWikiSlices($RANGE,$ID,$REV);
}else{
$text = rawWiki($ID,$REV);
}
}else{
$pr = true; //preview mode
}
$wr = $INFO['writable'];
if($wr){
if ($REV) print parsedLocale('editrev');
print parsedLocale($include);
}else{
print parsedLocale('read');
$ro='readonly="readonly"';
}
if(!$DATE) $DATE = $INFO['lastmod'];
?>
<form name="editform" method="post" action="<?=script()?>" accept-charset="<?=$lang['encoding']?>" onsubmit="return svchk()">
<input type="hidden" name="id" value="<?=$ID?>" />
<input type="hidden" name="rev" value="<?=$REV?>" />
<input type="hidden" name="date" value="<?=$DATE?>" />
<input type="hidden" name="prefix" value="<?=formText($PRE)?>" />
<input type="hidden" name="suffix" value="<?=formText($SUF)?>" />
<table style="width:99%">
<tr>
<td class="toolbar" colspan="3">
<?if($wr){?>
<script language="JavaScript" type="text/javascript">
<?/* sets changed to true when previewed */?>
textChanged = <? ($pr) ? print 'true' : print 'false' ?>;
formatButton('images/bold.png','<?=$lang['qb_bold']?>','**','**','<?=$lang['qb_bold']?>','b');
formatButton('images/italic.png','<?=$lang['qb_italic']?>',"\/\/","\/\/",'<?=$lang['qb_italic']?>','i');
formatButton('images/underline.png','<?=$lang['qb_underl']?>','__','__','<?=$lang['qb_underl']?>','u');
formatButton('images/code.png','<?=$lang['qb_code']?>','\'\'','\'\'','<?=$lang['qb_code']?>','c');
formatButton('images/fonth1.png','<?=$lang['qb_h1']?>','====== ',' ======\n','<?=$lang['qb_h1']?>','1');
formatButton('images/fonth2.png','<?=$lang['qb_h2']?>','===== ',' =====\n','<?=$lang['qb_h2']?>','2');
formatButton('images/fonth3.png','<?=$lang['qb_h3']?>','==== ',' ====\n','<?=$lang['qb_h3']?>','3');
formatButton('images/fonth4.png','<?=$lang['qb_h4']?>','=== ',' ===\n','<?=$lang['qb_h4']?>','4');
formatButton('images/fonth5.png','<?=$lang['qb_h5']?>','== ',' ==\n','<?=$lang['qb_h5']?>','5');
formatButton('images/link.png','<?=$lang['qb_link']?>','[[',']]','<?=$lang['qb_link']?>','l');
formatButton('images/extlink.png','<?=$lang['qb_extlink']?>','[[',']]','http://www.example.com|<?=$lang['qb_extlink']?>');
formatButton('images/list.png','<?=$lang['qb_ol']?>',' - ','\n','<?=$lang['qb_ol']?>');
formatButton('images/list_ul.png','<?=$lang['qb_ul']?>',' * ','\n','<?=$lang['qb_ul']?>');
insertButton('images/rule.png','<?=$lang['qb_hr']?>','----\n');
mediaButton('images/image.png','<?=$lang['qb_media']?>','m','<?=$INFO['namespace']?>');
<?
if($conf['useacl'] && $_SERVER['REMOTE_USER']){
echo "insertButton('images/sig.png','".$lang['qb_sig']."','".html_signature()."','y');";
}
?>
</script>
<?}?>
</td>
</tr>
<tr>
<td colspan="3">
<textarea name="wikitext" id="wikitext" <?=$ro?> cols="80" rows="10" class="edit" onchange="textChanged = true;" tabindex="1"><?="\n".formText($text)?></textarea>
</td>
</tr>
<tr>
<td>
<?if($wr){?>
<input class="button" type="submit" name="do" value="<?=$lang['btn_save']?>" accesskey="s" title="[ALT+S]" onclick="textChanged=false" onkeypress="textChanged=false" tabindex="3" />
<input class="button" type="submit" name="do" value="<?=$lang['btn_preview']?>" accesskey="p" title="[ALT+P]" onclick="textChanged=false" onkeypress="textChanged=false" tabindex="4" />
<input class="button" type="submit" name="do" value="<?=$lang['btn_cancel']?>" tabindex="5" />
<?}?>
</td>
<td>
<?if($wr){?>
<?=$lang['summary']?>:
<input type="text" class="edit" name="summary" size="50" value="<?=formText($SUM)?>" tabindex="2" />
<?}?>
</td>
<td align="right">
<script type="text/javascript">
showSizeCtl();
<?if($wr){?>
init_locktimer(<?=$conf['locktime']-60?>,'<?=$lang['willexpire']?>');
document.editform.wikitext.focus();
<?}?>
</script>
</td>
</tr>
</table>
</form>
<?
}
/**
* prepares the signature string as configured in the config
*/
function html_signature(){
global $conf;
global $INFO;
$sig = $conf['signature'];
$sig = strftime($sig);
$sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
$sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
$sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig);
$sig = str_replace('@DATE@',date($conf['dformat']),$sig);
return $sig;
}
/**
* prints some debug info
*/
function html_debug(){
global $conf;
print '<html><body>';
print '<p>When reporting bugs please send all the following ';
print 'output as a mail to andi@splitbrain.org ';
print 'The best way to do this is to save this page in your browser</p>';
print '<b>$_SERVER:</b><pre>';
print_r($_SERVER);
print '</pre>';
print '<b>$conf:</b><pre>';
print_r($conf);
print '</pre>';
print '<b>abs baseURL:</b><pre>';
print getBaseURL(true);
print '</pre>';
print '<b>rel baseURL:</b><pre>';
print dirname($_SERVER['PHP_SELF']).'/';
print '</pre>';
print '<b>PHP Version:</b><pre>';
print phpversion();
print '</pre>';
print '<b>locale:</b><pre>';
print setlocale(LC_ALL,0);
print '</pre>';
print '<b>Environment:</b><pre>';
print_r($_ENV);
print '</pre>';
print '<b>PHP settings:</b><pre>';
$inis = ini_get_all();
print_r($inis);
print '</pre>';
print '</body></html>';
}
?>

139
inc/io.php Normal file
View File

@ -0,0 +1,139 @@
<?
require_once("inc/common.php");
require_once("inc/parser.php");
/**
* Returns the parsed text from the given sourcefile. Uses cache
* if exists. Creates it if not.
*/
function io_cacheParse($file){
global $conf;
global $CACHEGROUP;
global $parser; //we read parser options
$parsed = '';
$cache = $conf['datadir'].'/.cache/';
$cache .= md5($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$CACHEGROUP);
$purge = $conf['datadir'].'/.cache/purgefile';
// check if cache can be used
$cachetime = @filemtime($cache);
if( @file_exists($cache) // does the cachefile exist
&& @file_exists($file) // and does the source exist
&& !isset($_REQUEST['purge']) // no purge param was set
&& filesize($cache) // and contains the cachefile any data
&& ((time() - $cachetime) < $conf['cachetime']) // and is cachefile young enough
&& ($cachetime > filemtime($file)) // and newer than the source
&& ($cachetime > @filemtime($purge)) // and newer than the purgefile
&& ($cachetime > filemtime('conf/dokuwiki.php')) // and newer than the config file
&& ($cachetime > @filemtime('conf/local.php')) // and newer than the local config file
&& ($cachetime > filemtime('inc/parser.php')) // and newer than the parser
&& ($cachetime > filemtime('inc/format.php'))) // and newer than the formating functions
{
$parsed = io_readFile($cache); //give back cache
$parsed .= "\n<!-- cachefile $cache used -->\n";
}elseif(@file_exists($file)){
$parsed = parse(io_readFile($file)); //sets global parseroptions
if($parser['cache']){
io_saveFile($cache,$parsed); //save cachefile
$parsed .= "\n<!-- no cachefile used, but created -->\n";
}else{
@unlink($cache); //try to delete cachefile
$parsed .= "\n<!-- no cachefile used, caching forbidden -->\n";
}
}
return $parsed;
}
/**
* Returns content of $file as cleaned string. Uses gzip if extension
* is .gz
*/
function io_readFile($file){
$ret = '';
if(@file_exists($file)){
if(substr($file,-3) == '.gz'){
$ret = join('',gzfile($file));
}else{
$ret = join('',file($file));
}
}
return cleanText($ret);
}
/**
* Saves $content to $file. Uses gzip if extension
* is .gz
*
* returns true on success
*/
function io_saveFile($file,$content){
io_makeFileDir($file);
if(substr($file,-3) == '.gz'){
$fh = @gzopen($file,'wb9');
if(!$fh){
msg("Writing $file failed",-1);
return false;
}
gzwrite($fh, $content);
gzclose($fh);
}else{
$fh = @fopen($file,'wb');
if(!$fh){
msg("Writing $file failed",-1);
return false;
}
fwrite($fh, $content);
fclose($fh);
}
return true;
}
/**
* Create the directory needed for the given file
*/
function io_makeFileDir($file){
global $conf;
$dir = dirname($file);
umask($conf['dmask']);
if(!is_dir($dir)){
io_mkdir_p($dir) || msg("Creating directory $dir failed",-1);
}
umask($conf['umask']);
}
/**
* Creates a directory hierachy.
*
* @see http://www.php.net/manual/en/function.mkdir.php
* @author <saint@corenova.com>
*/
function io_mkdir_p($target){
if (is_dir($target)||empty($target)) return 1; // best case check first
if (@file_exists($target) && !is_dir($target)) return 0;
if (io_mkdir_p(substr($target,0,strrpos($target,'/'))))
return @mkdir($target,0777); // crawl back up & create dir tree
return 0;
}
/**
* Runs an external command and returns it's output as string
* inspired by a patch by Harry Brueckner <harry_b@eml.cc>
*/
function io_runcmd($cmd){
$fh = popen($cmd, "r");
if(!$fh) return false;
$ret = '';
while (!feof($fh)) {
$ret .= fread($fh, 8192);
}
pclose($fh);
return $ret;
}
?>

View File

@ -0,0 +1,899 @@
<?php
/*************************************************
Snoopy - the PHP net client
Author: Monte Ohrt <monte@ispi.net>
Copyright (c): 1999-2000 ispi, all rights reserved
Version: 1.0
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You may contact the author of Snoopy by e-mail at:
monte@ispi.net
Or, write to:
Monte Ohrt
CTO, ispi
237 S. 70th suite 220
Lincoln, NE 68510
The latest version of Snoopy can be obtained from:
http://snoopy.sourceforge.com
*************************************************/
class Snoopy
{
/**** Public variables ****/
/* user definable vars */
var $host = "www.php.net"; // host name we are connecting to
var $port = 80; // port we are connecting to
var $proxy_host = ""; // proxy host to use
var $proxy_port = ""; // proxy port to use
var $agent = "Snoopy v1.0"; // agent we masquerade as
var $referer = ""; // referer info to pass
var $cookies = array(); // array of cookies to pass
// $cookies["username"]="joe";
var $rawheaders = array(); // array of raw headers to send
// $rawheaders["Content-type"]="text/html";
var $maxredirs = 5; // http redirection depth maximum. 0 = disallow
var $lastredirectaddr = ""; // contains address of last redirected address
var $offsiteok = true; // allows redirection off-site
var $maxframes = 0; // frame content depth maximum. 0 = disallow
var $expandlinks = true; // expand links to fully qualified URLs.
// this only applies to fetchlinks()
// or submitlinks()
var $passcookies = true; // pass set cookies back through redirects
// NOTE: this currently does not respect
// dates, domains or paths.
var $user = ""; // user for http authentication
var $pass = ""; // password for http authentication
// http accept types
var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
var $results = ""; // where the content is put
var $error = ""; // error messages sent here
var $response_code = ""; // response code returned from server
var $headers = array(); // headers returned from server sent here
var $maxlength = 500000; // max return data length (body)
var $read_timeout = 0; // timeout on read operations, in seconds
// supported only since PHP 4 Beta 4
// set to 0 to disallow timeouts
var $timed_out = false; // if a read operation timed out
var $status = 0; // http request status
var $curl_path = "/usr/bin/curl";
// Snoopy will use cURL for fetching
// SSL content if a full system path to
// the cURL binary is supplied here.
// set to false if you do not have
// cURL installed. See http://curl.haxx.se
// for details on installing cURL.
// Snoopy does *not* use the cURL
// library functions built into php,
// as these functions are not stable
// as of this Snoopy release.
// send Accept-encoding: gzip?
var $use_gzip = true;
/**** Private variables ****/
var $_maxlinelen = 4096; // max line length (headers)
var $_httpmethod = "GET"; // default http request method
var $_httpversion = "HTTP/1.0"; // default http request version
var $_submit_method = "POST"; // default submit method
var $_submit_type = "application/x-www-form-urlencoded"; // default submit type
var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type
var $_redirectaddr = false; // will be set if page fetched is a redirect
var $_redirectdepth = 0; // increments on an http redirect
var $_frameurls = array(); // frame src urls
var $_framedepth = 0; // increments on frame depth
var $_isproxy = false; // set if using a proxy server
var $_fp_timeout = 30; // timeout for socket connection
/*======================================================================*\
Function: fetch
Purpose: fetch the contents of a web page
(and possibly other protocols in the
future like ftp, nntp, gopher, etc.)
Input: $URI the location of the page to fetch
Output: $this->results the output text from the fetch
\*======================================================================*/
function fetch($URI)
{
//preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
$URI_PARTS = parse_url($URI);
if (!empty($URI_PARTS["user"]))
$this->user = $URI_PARTS["user"];
if (!empty($URI_PARTS["pass"]))
$this->pass = $URI_PARTS["pass"];
switch($URI_PARTS["scheme"])
{
case "http":
$this->host = $URI_PARTS["host"];
if(!empty($URI_PARTS["port"]))
$this->port = $URI_PARTS["port"];
if($this->_connect($fp))
{
if($this->_isproxy)
{
// using proxy, send entire URI
$this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
}
else
{
$path = $URI_PARTS["path"].(isset($URI_PARTS["query"]) ? "?".$URI_PARTS["query"] : "");
// no proxy, send only the path
$this->_httprequest($path, $fp, $URI, $this->_httpmethod);
}
$this->_disconnect($fp);
if($this->_redirectaddr)
{
/* url was redirected, check if we've hit the max depth */
if($this->maxredirs > $this->_redirectdepth)
{
// only follow redirect if it's on this site, or offsiteok is true
if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
{
/* follow the redirect */
$this->_redirectdepth++;
$this->lastredirectaddr=$this->_redirectaddr;
$this->fetch($this->_redirectaddr);
}
}
}
if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
{
$frameurls = $this->_frameurls;
$this->_frameurls = array();
while(list(,$frameurl) = each($frameurls))
{
if($this->_framedepth < $this->maxframes)
{
$this->fetch($frameurl);
$this->_framedepth++;
}
else
break;
}
}
}
else
{
return false;
}
return true;
break;
case "https":
if(!$this->curl_path || (!is_executable($this->curl_path))) {
$this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n";
return false;
}
$this->host = $URI_PARTS["host"];
if(!empty($URI_PARTS["port"]))
$this->port = $URI_PARTS["port"];
if($this->_isproxy)
{
// using proxy, send entire URI
$this->_httpsrequest($URI,$URI,$this->_httpmethod);
}
else
{
$path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
// no proxy, send only the path
$this->_httpsrequest($path, $URI, $this->_httpmethod);
}
if($this->_redirectaddr)
{
/* url was redirected, check if we've hit the max depth */
if($this->maxredirs > $this->_redirectdepth)
{
// only follow redirect if it's on this site, or offsiteok is true
if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
{
/* follow the redirect */
$this->_redirectdepth++;
$this->lastredirectaddr=$this->_redirectaddr;
$this->fetch($this->_redirectaddr);
}
}
}
if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
{
$frameurls = $this->_frameurls;
$this->_frameurls = array();
while(list(,$frameurl) = each($frameurls))
{
if($this->_framedepth < $this->maxframes)
{
$this->fetch($frameurl);
$this->_framedepth++;
}
else
break;
}
}
return true;
break;
default:
// not a valid protocol
$this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
return false;
break;
}
return true;
}
/*======================================================================*\
Private functions
\*======================================================================*/
/*======================================================================*\
Function: _striplinks
Purpose: strip the hyperlinks from an html document
Input: $document document to strip.
Output: $match an array of the links
\*======================================================================*/
function _striplinks($document)
{
preg_match_all("'<\s*a\s+.*href\s*=\s* # find <a href=
([\"\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\s\>]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space
'isx",$document,$links);
// catenate the non-empty matches from the conditional subpattern
while(list($key,$val) = each($links[2]))
{
if(!empty($val))
$match[] = $val;
}
while(list($key,$val) = each($links[3]))
{
if(!empty($val))
$match[] = $val;
}
// return the links
return $match;
}
/*======================================================================*\
Function: _stripform
Purpose: strip the form elements from an html document
Input: $document document to strip.
Output: $match an array of the links
\*======================================================================*/
function _stripform($document)
{
preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
// catenate the matches
$match = implode("\r\n",$elements[0]);
// return the links
return $match;
}
/*======================================================================*\
Function: _striptext
Purpose: strip the text from an html document
Input: $document document to strip.
Output: $text the resulting text
\*======================================================================*/
function _striptext($document)
{
// I didn't use preg eval (//e) since that is only available in PHP 4.0.
// so, list your entities one by one here. I included some of the
// more common ones.
$search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript
"'<[\/\!]*?[^<>]*?>'si", // strip out html tags
"'([\r\n])[\s]+'", // strip out white space
"'&(quote|#34);'i", // replace html entities
"'&(amp|#38);'i",
"'&(lt|#60);'i",
"'&(gt|#62);'i",
"'&(nbsp|#160);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i"
);
$replace = array( "",
"",
"\\1",
"\"",
"&",
"<",
">",
" ",
chr(161),
chr(162),
chr(163),
chr(169));
$text = preg_replace($search,$replace,$document);
return $text;
}
/*======================================================================*\
Function: _expandlinks
Purpose: expand each link into a fully qualified URL
Input: $links the links to qualify
$URI the full URI to get the base from
Output: $expandedLinks the expanded links
\*======================================================================*/
function _expandlinks($links,$URI)
{
preg_match("/^[^\?]+/",$URI,$match);
$match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
$search = array( "|^http://".preg_quote($this->host)."|i",
"|^(?!http://)(\/)?(?!mailto:)|i",
"|/\./|",
"|/[^\/]+/\.\./|"
);
$replace = array( "",
$match."/",
"/",
"/"
);
$expandedLinks = preg_replace($search,$replace,$links);
return $expandedLinks;
}
/*======================================================================*\
Function: _httprequest
Purpose: go get the http data from the server
Input: $url the url to fetch
$fp the current open file pointer
$URI the full URI
$body body contents to send if any (POST)
Output:
\*======================================================================*/
function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
{
if($this->passcookies && $this->_redirectaddr)
$this->setcookies();
$URI_PARTS = parse_url($URI);
if(empty($url))
$url = "/";
$headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
if(!empty($this->agent))
$headers .= "User-Agent: ".$this->agent."\r\n";
if(!empty($this->host) && !isset($this->rawheaders['Host']))
$headers .= "Host: ".$this->host."\r\n";
if(!empty($this->accept))
$headers .= "Accept: ".$this->accept."\r\n";
if($this->use_gzip) {
// make sure PHP was built with --with-zlib
// and we can handle gzipp'ed data
if ( function_exists(gzinflate) ) {
$headers .= "Accept-encoding: gzip\r\n";
}
else {
trigger_error(
"use_gzip is on, but PHP was built without zlib support.".
" Requesting file(s) without gzip encoding.",
E_USER_NOTICE);
}
}
if(!empty($this->referer))
$headers .= "Referer: ".$this->referer."\r\n";
if(!empty($this->cookies))
{
if(!is_array($this->cookies))
$this->cookies = (array)$this->cookies;
reset($this->cookies);
if ( count($this->cookies) > 0 ) {
$cookie_headers .= 'Cookie: ';
foreach ( $this->cookies as $cookieKey => $cookieVal ) {
$cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
}
$headers .= substr($cookie_headers,0,-2) . "\r\n";
}
}
if(!empty($this->rawheaders))
{
if(!is_array($this->rawheaders))
$this->rawheaders = (array)$this->rawheaders;
while(list($headerKey,$headerVal) = each($this->rawheaders))
$headers .= $headerKey.": ".$headerVal."\r\n";
}
if(!empty($content_type)) {
$headers .= "Content-type: $content_type";
if ($content_type == "multipart/form-data")
$headers .= "; boundary=".$this->_mime_boundary;
$headers .= "\r\n";
}
if(!empty($body))
$headers .= "Content-length: ".strlen($body)."\r\n";
if(!empty($this->user) || !empty($this->pass))
$headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n";
$headers .= "\r\n";
// set the read timeout if needed
if ($this->read_timeout > 0)
socket_set_timeout($fp, $this->read_timeout);
$this->timed_out = false;
fwrite($fp,$headers.$body,strlen($headers.$body));
$this->_redirectaddr = false;
unset($this->headers);
// content was returned gzip encoded?
$is_gzipped = false;
while($currentHeader = fgets($fp,$this->_maxlinelen))
{
if ($this->read_timeout > 0 && $this->_check_timeout($fp))
{
$this->status=-100;
return false;
}
// if($currentHeader == "\r\n")
if(preg_match("/^\r?\n$/", $currentHeader) )
break;
// if a header begins with Location: or URI:, set the redirect
if(preg_match("/^(Location:|URI:)/i",$currentHeader))
{
// get URL portion of the redirect
preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches);
// look for :// in the Location header to see if hostname is included
if(!preg_match("|\:\/\/|",$matches[2]))
{
// no host in the path, so prepend
$this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
// eliminate double slash
if(!preg_match("|^/|",$matches[2]))
$this->_redirectaddr .= "/".$matches[2];
else
$this->_redirectaddr .= $matches[2];
}
else
$this->_redirectaddr = $matches[2];
}
if(preg_match("|^HTTP/|",$currentHeader))
{
if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
{
$this->status= $status[1];
}
$this->response_code = $currentHeader;
}
if (preg_match("/Content-Encoding: gzip/", $currentHeader) ) {
$is_gzipped = true;
}
$this->headers[] = $currentHeader;
}
# $results = fread($fp, $this->maxlength);
$results = "";
while ( $data = fread($fp, $this->maxlength) ) {
$results .= $data;
if (
strlen($results) > $this->maxlength ) {
break;
}
}
// gunzip
if ( $is_gzipped ) {
// per http://www.php.net/manual/en/function.gzencode.php
$results = substr($results, 10);
$results = gzinflate($results);
}
if ($this->read_timeout > 0 && $this->_check_timeout($fp))
{
$this->status=-100;
return false;
}
// check if there is a a redirect meta tag
if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
{
$this->_redirectaddr = $this->_expandlinks($match[1],$URI);
}
// have we hit our frame depth and is there frame src to fetch?
if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
{
$this->results[] = $results;
for($x=0; $x<count($match[1]); $x++)
$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
}
// have we already fetched framed content?
elseif(is_array($this->results))
$this->results[] = $results;
// no framed content
else
$this->results = $results;
return true;
}
/*======================================================================*\
Function: _httpsrequest
Purpose: go get the https data from the server using curl
Input: $url the url to fetch
$URI the full URI
$body body contents to send if any (POST)
Output:
\*======================================================================*/
function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
{
if($this->passcookies && $this->_redirectaddr)
$this->setcookies();
$headers = array();
$URI_PARTS = parse_url($URI);
if(empty($url))
$url = "/";
// GET ... header not needed for curl
//$headers[] = $http_method." ".$url." ".$this->_httpversion;
if(!empty($this->agent))
$headers[] = "User-Agent: ".$this->agent;
if(!empty($this->host))
$headers[] = "Host: ".$this->host;
if(!empty($this->accept))
$headers[] = "Accept: ".$this->accept;
if(!empty($this->referer))
$headers[] = "Referer: ".$this->referer;
if(!empty($this->cookies))
{
if(!is_array($this->cookies))
$this->cookies = (array)$this->cookies;
reset($this->cookies);
if ( count($this->cookies) > 0 ) {
$cookie_str = 'Cookie: ';
foreach ( $this->cookies as $cookieKey => $cookieVal ) {
$cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
}
$headers[] = substr($cookie_str,0,-2);
}
}
if(!empty($this->rawheaders))
{
if(!is_array($this->rawheaders))
$this->rawheaders = (array)$this->rawheaders;
while(list($headerKey,$headerVal) = each($this->rawheaders))
$headers[] = $headerKey.": ".$headerVal;
}
if(!empty($content_type)) {
if ($content_type == "multipart/form-data")
$headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
else
$headers[] = "Content-type: $content_type";
}
if(!empty($body))
$headers[] = "Content-length: ".strlen($body);
if(!empty($this->user) || !empty($this->pass))
$headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
for($curr_header = 0; $curr_header < count($headers); $curr_header++)
$cmdline_params .= " -H \"".$headers[$curr_header]."\"";
if(!empty($body))
$cmdline_params .= " -d \"$body\"";
if($this->read_timeout > 0)
$cmdline_params .= " -m ".$this->read_timeout;
$headerfile = uniqid(time());
# accept self-signed certs
$cmdline_params .= " -k";
exec($this->curl_path." -D \"/tmp/$headerfile\"".$cmdline_params." ".$URI,$results,$return);
if($return)
{
$this->error = "Error: cURL could not retrieve the document, error $return.";
return false;
}
$results = implode("\r\n",$results);
$result_headers = file("/tmp/$headerfile");
$this->_redirectaddr = false;
unset($this->headers);
for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
{
// if a header begins with Location: or URI:, set the redirect
if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
{
// get URL portion of the redirect
preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches);
// look for :// in the Location header to see if hostname is included
if(!preg_match("|\:\/\/|",$matches[2]))
{
// no host in the path, so prepend
$this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
// eliminate double slash
if(!preg_match("|^/|",$matches[2]))
$this->_redirectaddr .= "/".$matches[2];
else
$this->_redirectaddr .= $matches[2];
}
else
$this->_redirectaddr = $matches[2];
}
if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
{
$this->response_code = $result_headers[$currentHeader];
if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code, $match))
{
$this->status= $match[1];
}
}
$this->headers[] = $result_headers[$currentHeader];
}
// check if there is a a redirect meta tag
if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
{
$this->_redirectaddr = $this->_expandlinks($match[1],$URI);
}
// have we hit our frame depth and is there frame src to fetch?
if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
{
$this->results[] = $results;
for($x=0; $x<count($match[1]); $x++)
$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
}
// have we already fetched framed content?
elseif(is_array($this->results))
$this->results[] = $results;
// no framed content
else
$this->results = $results;
unlink("/tmp/$headerfile");
return true;
}
/*======================================================================*\
Function: setcookies()
Purpose: set cookies for a redirection
\*======================================================================*/
function setcookies()
{
for($x=0; $x<count($this->headers); $x++)
{
if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i", $this->headers[$x],$match))
$this->cookies[$match[1]] = $match[2];
}
}
/*======================================================================*\
Function: _check_timeout
Purpose: checks whether timeout has occurred
Input: $fp file pointer
\*======================================================================*/
function _check_timeout($fp)
{
if ($this->read_timeout > 0) {
$fp_status = socket_get_status($fp);
if ($fp_status["timed_out"]) {
$this->timed_out = true;
return true;
}
}
return false;
}
/*======================================================================*\
Function: _connect
Purpose: make a socket connection
Input: $fp file pointer
\*======================================================================*/
function _connect(&$fp)
{
if(!empty($this->proxy_host) && !empty($this->proxy_port))
{
$this->_isproxy = true;
$host = $this->proxy_host;
$port = $this->proxy_port;
}
else
{
$host = $this->host;
$port = $this->port;
}
$this->status = 0;
if($fp = fsockopen(
$host,
$port,
$errno,
$errstr,
$this->_fp_timeout
))
{
// socket connection succeeded
return true;
}
else
{
// socket connection failed
$this->status = $errno;
switch($errno)
{
case -3:
$this->error="socket creation failed (-3)";
case -4:
$this->error="dns lookup failure (-4)";
case -5:
$this->error="connection refused or timed out (-5)";
default:
$this->error="connection failed (".$errno.")";
}
return false;
}
}
/*======================================================================*\
Function: _disconnect
Purpose: disconnect a socket connection
Input: $fp file pointer
\*======================================================================*/
function _disconnect($fp)
{
return(fclose($fp));
}
/*======================================================================*\
Function: _prepare_post_body
Purpose: Prepare post body according to encoding type
Input: $formvars - form variables
$formfiles - form upload files
Output: post body
\*======================================================================*/
function _prepare_post_body($formvars, $formfiles)
{
settype($formvars, "array");
settype($formfiles, "array");
if (count($formvars) == 0 && count($formfiles) == 0)
return;
switch ($this->_submit_type) {
case "application/x-www-form-urlencoded":
reset($formvars);
while(list($key,$val) = each($formvars)) {
if (is_array($val) || is_object($val)) {
while (list($cur_key, $cur_val) = each($val)) {
$postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
}
} else
$postdata .= urlencode($key)."=".urlencode($val)."&";
}
break;
case "multipart/form-data":
$this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
reset($formvars);
while(list($key,$val) = each($formvars)) {
if (is_array($val) || is_object($val)) {
while (list($cur_key, $cur_val) = each($val)) {
$postdata .= "--".$this->_mime_boundary."\r\n";
$postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
$postdata .= "$cur_val\r\n";
}
} else {
$postdata .= "--".$this->_mime_boundary."\r\n";
$postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
$postdata .= "$val\r\n";
}
}
reset($formfiles);
while (list($field_name, $file_names) = each($formfiles)) {
settype($file_names, "array");
while (list(, $file_name) = each($file_names)) {
if (!is_readable($file_name)) continue;
$fp = fopen($file_name, "r");
$file_content = fread($fp, filesize($file_name));
fclose($fp);
$base_name = basename($file_name);
$postdata .= "--".$this->_mime_boundary."\r\n";
$postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
$postdata .= "$file_content\r\n";
}
}
$postdata .= "--".$this->_mime_boundary."--\r\n";
break;
}
return $postdata;
}
}
?>

184
inc/magpie/rss_cache.inc Normal file
View File

@ -0,0 +1,184 @@
<?php
/*
* Project: MagpieRSS: a simple RSS integration tool
* File: rss_cache.inc, a simple, rolling(no GC), cache
* for RSS objects, keyed on URL.
* Author: Kellan Elliott-McCrea <kellan@protest.net>
* Version: 0.51
* License: GPL
*
* The lastest version of MagpieRSS can be obtained from:
* http://magpierss.sourceforge.net
*
* For questions, help, comments, discussion, etc., please join the
* Magpie mailing list:
* http://lists.sourceforge.net/lists/listinfo/magpierss-general
*
*/
class RSSCache {
var $BASE_CACHE = './cache'; // where the cache files are stored
var $MAX_AGE = 3600; // when are files stale, default one hour
var $ERROR = ""; // accumulate error messages
function RSSCache ($base='', $age='') {
if ( $base ) {
$this->BASE_CACHE = $base;
}
if ( $age ) {
$this->MAX_AGE = $age;
}
// attempt to make the cache directory
if ( ! @file_exists( $this->BASE_CACHE ) ) {
$status = @mkdir( $this->BASE_CACHE, 0755 );
// if make failed
if ( ! $status ) {
$this->error(
"Cache couldn't make dir '" . $this->BASE_CACHE . "'."
);
}
}
}
/*=======================================================================*\
Function: set
Purpose: add an item to the cache, keyed on url
Input: url from wich the rss file was fetched
Output: true on sucess
\*=======================================================================*/
function set ($url, $rss) {
$this->ERROR = "";
$cache_file = $this->file_name( $url );
$fp = @fopen( $cache_file, 'w' );
if ( ! $fp ) {
$this->error(
"Cache unable to open file for writing: $cache_file"
);
return 0;
}
$data = $this->serialize( $rss );
fwrite( $fp, $data );
fclose( $fp );
return $cache_file;
}
/*=======================================================================*\
Function: get
Purpose: fetch an item from the cache
Input: url from wich the rss file was fetched
Output: cached object on HIT, false on MISS
\*=======================================================================*/
function get ($url) {
$this->ERROR = "";
$cache_file = $this->file_name( $url );
if ( ! @file_exists( $cache_file ) ) {
$this->debug(
"Cache doesn't contain: $url (cache file: $cache_file)"
);
return 0;
}
$fp = @fopen($cache_file, 'r');
if ( ! $fp ) {
$this->error(
"Failed to open cache file for reading: $cache_file"
);
return 0;
}
$data = fread( $fp, filesize($cache_file) );
$rss = $this->unserialize( $data );
return $rss;
}
/*=======================================================================*\
Function: check_cache
Purpose: check a url for membership in the cache
and whether the object is older then MAX_AGE (ie. STALE)
Input: url from wich the rss file was fetched
Output: cached object on HIT, false on MISS
\*=======================================================================*/
function check_cache ( $url ) {
$this->ERROR = "";
$filename = $this->file_name( $url );
if ( @file_exists( $filename ) ) {
// find how long ago the file was added to the cache
// and whether that is longer then MAX_AGE
$mtime = filemtime( $filename );
$age = time() - $mtime;
if ( $this->MAX_AGE > $age ) {
// object exists and is current
return 'HIT';
}
else {
// object exists but is old
return 'STALE';
}
}
else {
// object does not exist
return 'MISS';
}
}
/*=======================================================================*\
Function: serialize
\*=======================================================================*/
function serialize ( $rss ) {
return serialize( $rss );
}
/*=======================================================================*\
Function: unserialize
\*=======================================================================*/
function unserialize ( $data ) {
return unserialize( $data );
}
/*=======================================================================*\
Function: file_name
Purpose: map url to location in cache
Input: url from wich the rss file was fetched
Output: a file name
\*=======================================================================*/
function file_name ($url) {
$filename = md5( $url );
return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) );
}
/*=======================================================================*\
Function: error
Purpose: register error
\*=======================================================================*/
function error ($errormsg, $lvl=E_USER_WARNING) {
// append PHP's error message if track_errors enabled
if ( isset($php_errormsg) ) {
$errormsg .= " ($php_errormsg)";
}
$this->ERROR = $errormsg;
if ( MAGPIE_DEBUG ) {
trigger_error( $errormsg, $lvl);
}
else {
error_log( $errormsg, 0);
}
}
function debug ($debugmsg, $lvl=E_USER_NOTICE) {
if ( MAGPIE_DEBUG ) {
$this->error("MagpieRSS [debug] $debugmsg", $lvl);
}
}
}
?>

Some files were not shown because too many files have changed in this diff Show More