OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-meta Date: 09-Mar-2006 20:00:25
Branch: HEAD Handle: 2006030919002500
Added files:
openpkg-meta canvas-php.php
Log:
reuseable PHP code for consumer side
Summary:
Revision Changes Path
1.1 +51 -0 openpkg-meta/canvas-php.php
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-meta/canvas-php.php
============================================================================
$ cvs diff -u -r0 -r1.1 canvas-php.php
--- /dev/null 2006-03-09 20:00:20 +0100
+++ canvas-php.php 2006-03-09 20:00:25 +0100
@@ -0,0 +1,51 @@
+<script language="php">
+##
+## Copyright (c) 2005-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
+## Copyright (c) 2005-2006 Ralf S. Engelschall <http://engelschall.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+## canvas-php.php: PHP reuseable components
+##
+</script>
+
+<script language="php">
+ divert("html-head");
+ echo "<script language=\"php\">";
+</script>
+
+# scramble an email address/link somewhat to prevent
+# trivial address crawlers from picking it up
+function email ($url, $link) {
+ $html = $url;
+ $html = preg_replace('/@/', '<!-- XXX -->@<!-- XXX -->', $html);
+ $html = preg_replace('/\./', '<!-- XXX -->.<!-- XXX -->', $html);
+ if ($link) {
+ $href = $url;
+ $href = preg_replace('/@/', '@', $href);
+ $href = preg_replace('/\./', '.', $href);
+ $html = "<a href=\"mailto:$href\">$html</a>";
+ }
+ echo $html;
+}
+
+<script language="php">
+ echo "</script>";
+</script>
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]