Changeset 1737 for www


Ignore:
Timestamp:
Feb 2, 2007, 6:15:43 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Add filter to the live test.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/toilet.html

    r1413 r1737  
    5353                     'smbraille' => 'Small Braille',
    5454                     'circle' => 'Circle');
    55    if(!isset($fontlist[$font])) $font = 'smblock'; ?>
     55   if(!isset($fontlist[$font])) $font = 'smblock';
     56   $filter = $_POST['filter'];
     57   $filterlist = array('' => 'No filter',
     58                       'flip' => 'Flip',
     59                       'flop' => 'Flop',
     60                       'rotate' => 'Rotate');
     61   if(!isset($filterlist[$filter])) $filter = ''; ?>
    5662
    5763<form method="post" action="toilet.html">
     
    6066      <? foreach($fontlist as $name => $desc) { ?>
    6167        <option value="<?php echo $name; ?>"<? if($name == $font) echo ' selected="selected"';?>><?php echo $desc; ?></option>
     68      <? } ?>
     69    </select>
     70    <select name="filter">
     71      <? foreach($filterlist as $name => $desc) { ?>
     72        <option value="<?php echo $name; ?>"<? if($name == $filter) echo ' selected="selected"';?>><?php echo $desc; ?></option>
    6273      <? } ?>
    6374    </select>
     
    7182  <div class="toilet">
    7283    <p class="toilet"><pre><?
    73          exec('toilet -f '.$font.' '.escapeshellarg($text), &$result);
     84         exec('toilet -f '.$font.' '.$filter.' '.escapeshellarg($text),
     85              &$result);
    7486         foreach($result as $line)
    7587             echo htmlspecialchars($line)."\n";
Note: See TracChangeset for help on using the changeset viewer.