cvs: pear /Text_Wiki/doc test_Text_Wiki.php

From: Date: Wed, 20 Jul 2005 14:06:03 +0000
Subject: cvs: pear /Text_Wiki/doc test_Text_Wiki.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33164@lists.php.net to get a copy of this message
toggg Wed Jul 20 10:06:03 2005 EDT Modified files: /pear/Text_Wiki/doc test_Text_Wiki.php Log: Some more cleaning, introduced CSS http://cvs.php.net/diff.php/pear/Text_Wiki/doc/test_Text_Wiki.php?r1=1.4&r2=1.5&ty=u Index: pear/Text_Wiki/doc/test_Text_Wiki.php diff -u pear/Text_Wiki/doc/test_Text_Wiki.php:1.4 pear/Text_Wiki/doc/test_Text_Wiki.php:1.5 --- pear/Text_Wiki/doc/test_Text_Wiki.php:1.4 Tue Jul 19 16:27:18 2005 +++ pear/Text_Wiki/doc/test_Text_Wiki.php Wed Jul 20 10:06:01 2005 @@ -1,11 +1,11 @@ <?php /** * Eventually set an include path if all parsers/renderers not installed - * $Id: test_Text_Wiki.php,v 1.4 2005/07/19 20:27:18 toggg Exp $ + * $Id: test_Text_Wiki.php,v 1.5 2005/07/20 14:06:01 toggg Exp $ */ $parser = $render = $source = ''; $plist = array('Default', 'BBCode'); -$rlist = array('Xhtml', 'Plain', 'Latex');php_sapi_name(); +$rlist = array('Xhtml', 'Plain', 'Latex'); /** * Here we need to know if we are running from command line or from web @@ -23,7 +23,8 @@ } else { $html = true; $elist = findExamples(dirname(__FILE__)); - if (isset($_REQUEST['example'])) { + if (isset($_REQUEST['example']) + && in_array($_REQUEST['exchoice'], $elist)) { $_REQUEST['source'] = file_get_contents ($_REQUEST['exchoice']); if (preg_match('#(\b'.implode('\b|\b', $plist).'\b)#i', $_REQUEST['source'], $match)) { @@ -102,14 +103,16 @@ <meta name="AUTHOR" content="bertrand Gugger / Toggg"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="KEYWORDS" content="PEAR, Wiki, Parse, Render, Convert, PHP, BBCode, Xhtml, Plain, Latex"> - <!-- - <link rel="stylesheet" type="text/css" href="test_Text_Wiki.css"> - --> - <script language="javascript" type="text/javascript"> - // <!-- - - // --> - </script> + <style type="text/css"> + blockquote, pre { + border: solid; + } + .codefilename { + color: blue; + background-color:orange; + text-decoration: underline; + } + </style> </head> <body> <h3>PEAR::Text_Wiki Demo</h3> @@ -117,18 +120,20 @@ <FORM method="post"> Translate from <SELECT name="parser">{$optparser}</SELECT> -to + to <SELECT name="render">{$optrender}</SELECT> + <INPUT type="submit" name="translate" value="translate"> <br /> -<textarea name="source" cols="80" rows="25">{$_REQUEST['source']}</textarea> +<textarea name="source" cols="60" rows="25">{$_REQUEST['source']}</textarea> <br /> -<INPUT type="submit" name="translate" value="translate"> or choose +<h4> Or choose <SELECT name="exchoice">{$optexample}</SELECT> -and -<INPUT type="submit" name="example" value="example"> + and +<INPUT type="submit" name="example" value="Load example"> +</h4> </FORM> </div> -<div style="float: down;"> +<div style="float: down; font-family: monospace;"> {$hresult} </div> <div> @@ -142,7 +147,8 @@ $ret = array(); $dh=opendir($dir? $dir : '.'); while ($subfil = readdir($dh)) { - if (!is_dir($subfil) && (substr($subfil, -4) == '.txt')) { + if (!is_dir($subfil) && is_readable($subfil) + && (substr($subfil, -4) == '.txt')) { $ret[] = $subfil; } }

« previous php.pear.cvs (#33164) next »