<div id="stock" style="display: none" class="annmethod"> Annotation File <select name="annfile"> <?php $session_stock = $_SESSION['stock_annfile']; foreach ($files as $f) { if ($f == $session_stock) { echo "<option selected=\"selected\">{$f}</option>\n"; } else { echo "<option>{$f}</option>\n"; } } ?> </select> <input type="submit" value="Use Ready-Made Annotations" /> <?php insert_tooltip('Use a ready made set of annotations for the current file.', $default_tooltip_size); ?> </div></form><?php } ?> <script type="text/javascript"> d = document.getElementById('annselect'); setAnnMethod(d.options[d.selectedIndex].value); </script> <br/> <?php echo '<div style="border: 1px solid black; margin-left: 10px; margin-right: 10px; padding: 4px; background-color: #f0f0fa; overflow: auto; height: 400px">'; echo process_xml($xml, 'simpleprologtohtml.xsl'); echo '</div>'; echo "\n<p><a href='get_pl.php'>Download Source Program</a></p>";
checkbox('watch_connectives'); ?> </p> <p style="margin-top: 4px; margin-bottom: 2px;">Infinite unfold <?php checkbox('watch_infunfold'); ?> memo <?php checkbox('watch_infmemo'); ?> </p> <p style="margin-top: 4px; margin-bottom: 2px;">Back propagation <?php checkbox('watch_backprop'); if ($_SESSION['watch'] == 'off') { echo '<script type="text/javascript">changeDisableOptions(true)</script>'; } insert_tooltip("<b>Watchdog Mode</b> detects problems with the specialisation process.<br/>Enable <b>builtins</b> to detect improperly instantiated builtin calls.<br/>Enable <b>connectives</b> to detect back-propagation of bindings in connectives (if,or)<br/>Enable <b>infinite unfold</b>/<b>memo</b> to detect infinite unfolding or memoisation<br/>Enable <b>back propagation</b> to watch for back-propagation of bindings onto non-declarative builtins", '450px'); ?> </p> </div> <p>Logging <?php output_select('logging', array(0, 1, 2), array('Normal', 'Verbose', 'Very Verbose'), $logging); ?> </p> </td> </tr> </table> </form> <form action="new_annotations.php" method="post" onsubmit="return submitAnnotations(this.form)"> <div id="menu" style="visibility:hidden;"></div> <?php
</p> </form> <form action="upload_initial.php" method="post"> <p style="margin-top: 4px; margin-bottom: 4px"> <?php $filename = $_SESSION['filename']; $stock = $_SESSION['stock']; echo "<input type='hidden' name='filename' value='{$filename}' />"; echo "<input type='hidden' name='stockfile' value='{$stock}' />"; ?> <input type="submit" value="Next>>"/> <input type="button" value="Clear" onclick="document.getElementById('ta').value = ''" /> <input type="submit" name="save" value="Save"/> <?php insert_tooltip('<b>Next</b> uploads whatever you type into the text box below so that you can annotate it. You can start again by clicking <b>Clear</b>, while clicking <b>Save</b> uploads your source code and then allows you to carry on editing.', $default_tooltip_size); ?> </p> <!-- The main source window - all uploaded programs should go through here --> <textarea id="ta" name="usertyped" style="width: 99%" rows="30"><?php if (isset($_POST['filename'])) { $filename = $_POST['filename']; $stock_file = stock_file($filename, '.pl'); if ($stock_file !== false) { echo htmlspecialchars(file_get_contents($stock_file)); } } elseif ($_SESSION['plfile']) { echo htmlspecialchars($_SESSION['plfile']); } else { echo "/* Enter Prolog Code here */";
function info_tooltip($content) { return insert_tooltip("<i style=\"cursor:pointer\" class=\"fa fa-fw fa-info-circle\"></i>", $content); }