Changeset 1179 for www/toilet.html
- Timestamp:
- Oct 1, 2006, 5:34:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/toilet.html
r1168 r1179 48 48 $text = substr(stripslashes($_POST['text']), 0, 40); 49 49 $font = $_POST['font']; 50 $fontlist = array('emboss', 'emboss2', 'smbraille'); 51 $path = "/tmp/trunk-toilet"; ?> 50 $fontlist = array('emboss' => 'Emboss', 51 'emboss2' => 'Emboss 2', 52 'future' => 'Future', 53 'smbraille' => 'Small Braille', 54 'circle' => 'Circle'); 55 if(!isset($fontlist[$font])) $font = 'future'; ?> 52 56 53 57 <form method="post" action="toilet.html"> 54 58 <p> 55 59 <select name="font"> 56 <? foreach($fontlist as $ i => $name) { ?>57 <option value="<?php echo $ i; ?>"<? if($i == $font) echo ' selected="selected"';?>><?php echo $name; ?></option>60 <? foreach($fontlist as $name => $desc) { ?> 61 <option value="<?php echo $name; ?>"<? if($name == $font) echo ' selected="selected"';?>><?php echo $desc; ?></option> 58 62 <? } ?> 59 63 </select> … … 65 69 66 70 <? if($submit) { ?> 67 <blockquote> 68 <p><pre> 69 <? exec($path.'/src/toilet -d '.$path.'/fonts -f "'.$fontlist[$font].'" '.escapeshellarg($text).' | sed "s/\x1b[^m]*m//g"', &$result); 71 <div class="toilet"> 72 <p class="toilet"><pre><? 73 $p = "/tmp/trunk-toilet"; 74 exec($p.'/src/toilet -d '.$p.'/fonts -f '.$font.' '.escapeshellarg($text).' | sed "s/\x1b[^m]*m//g"', &$result); 70 75 foreach($result as $line) 71 echo "\n".htmlspecialchars($line); 72 ?> 73 </pre></p> 74 </blockquote> 76 echo htmlspecialchars($line)."\n"; 77 ?></pre></p> 78 </div> 75 79 <? } ?> 76 80
Note: See TracChangeset
for help on using the changeset viewer.