<?php
/* @var $this DebugController */

$this->breadcrumbs=array(
    'Debug'=>array('/debug'),
    'Eval',
);
?>
<h1>
  <?php echo t('Evaluate PHP code'); ?>
</h1>

<?php 

if($do_eval)
{
  echo("<pre>".htmlentities($result)."</pre>");
}


?>

<form method="post">
  <textarea id="phpCode" name="code" cols="10" rows="30" style="width: 100%; height: 100%; font-family: monospace;"><?php echo($code); ?></textarea>
  <div style="margin: 5px 5px 5px 5px; text-align: center;">
    <label style="display: inline;" for="as_value"><b>As Value</b></label>
    <input id="as_value" type="checkbox" name="as_value" value="1" />
  </div>
  <input type="hidden" name="do_eval" value="1" />
  <input type="submit" value="eval()" />
</form>

<script>
$('#phpCode').focus();
</script>
