2007-01-19 23:26:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter
|
|
|
|
{
|
|
|
|
|
2008-01-07 00:17:49 +00:00
|
|
|
protected $ac;
|
|
|
|
|
|
|
|
public function __construct($encoding, $ac) {
|
|
|
|
$this->ac = $ac;
|
|
|
|
parent::HTMLReporter($encoding);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function paintHeader($test_name) {
|
2007-01-19 23:26:15 +00:00
|
|
|
parent::paintHeader($test_name);
|
|
|
|
?>
|
|
|
|
<form action="" method="get" id="select">
|
|
|
|
<select name="f">
|
2008-01-07 00:17:49 +00:00
|
|
|
<option value="" style="font-weight:bold;"<?php if(!$this->ac['file']) {echo ' selected';} ?>>All Tests</option>
|
2007-01-19 23:26:15 +00:00
|
|
|
<?php foreach($GLOBALS['HTMLPurifierTest']['Files'] as $file) { ?>
|
|
|
|
<option value="<?php echo $file ?>"<?php
|
2008-01-07 00:17:49 +00:00
|
|
|
if ($this->ac['file'] == $file) echo ' selected';
|
2007-01-19 23:26:15 +00:00
|
|
|
?>><?php echo $file ?></option>
|
|
|
|
<?php } ?>
|
|
|
|
</select>
|
2008-02-17 01:07:17 +00:00
|
|
|
<input type="checkbox" name="standalone" value="1" title="Standalone version?" <?php if($this->ac['standalone']) {echo 'checked="checked" ';} ?>/>
|
2007-01-19 23:26:15 +00:00
|
|
|
<input type="submit" value="Go">
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
flush();
|
|
|
|
}
|
|
|
|
|
2008-04-14 19:19:48 +00:00
|
|
|
protected function getCss() {
|
|
|
|
$css = parent::getCss();
|
2007-01-19 23:26:15 +00:00
|
|
|
$css .= '
|
|
|
|
#select {position:absolute;top:0.2em;right:0.2em;}
|
|
|
|
';
|
|
|
|
return $css;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|