<?xml version="1.0"?>

<document>
  <properties>
    <title>
Running PMD on 
<![CDATA[
<?php 
  print($unixname) 
?> ]]> 
    </title>
  </properties>

  <body>
<section name="Running PMD Demo on &lt;?php print($unixname) ?&gt;">
<p>Your PMD Report should be ready in a couple of seconds.  It will
be available from here: 
<?php print("/demo/".$unixname."/pmd.xml") ?>
</p>

<p>
<?php print("/home/groups/p/pm/pmd/tools/demo/run-demo.sh " . $unixname . " " . $module . " " . $source ) ?>
</p>
<p>
<pre>
<?php 
  $cmd = "/home/groups/p/pm/pmd/tools/demo/run-demo.sh " . $unixname . " " . $module . " " . $source . " 2>&1"; 
  print("Executing: " . $cmd);
  print("<br />");

  $fp = popen($cmd, "r" );
  $read = fread( $fp, 4096 );

  print("<br />");
  print( $read );
?>
</pre>
</p>
</section>
  </body>
</document>
