Example #1
0
<html lang="en">
<head><title>Proteins processed | Myrimatch</title></head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/tracervis.css" rel="stylesheet" media="screen">

<?php 
include_once "dao.php";
include_once "summary.php";
dao_open();
?>

<body>
<div style="margin: 1em 0.5em">
<h2><?php 
home_btn();
?>
 Proteins</h2>

<?php 
summary_all_proteins();
?>

</div>
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
<?php 
dao_close();
?>
</html>
Example #2
0
function render_object($object_id, $operation_id)
{
    $object = get_object($object_id);
    $ios = get_io_for_object($object_id);
    $name = get_name_for_object($ios);
    echo '<h2>';
    home_btn();
    echo ' <span style="color: #ddd">' . htmlspecialchars($object['type']) . '</span> ' . htmlspecialchars($name) . '</h2>';
    echo '<table class="table table-condensed">';
    $prev_io = null;
    $was_write = false;
    $last_write = false;
    $allSame = false;
    $first = true;
    foreach ($ios as $io) {
        if ($io['readwrite'] == ReadWrite::Read) {
            if (!$was_write && $first) {
                echo "<tr class=\"error-no-write\"><td colspan=\"6\">Not clear who wrote this value</td></tr>";
            }
        }
        $result = '';
        if ($io['operation_id'] == $operation_id) {
            $result .= "<tr class=\"highlight\">";
        } else {
            $result .= "<tr>";
        }
        $result .= '<td>' . $io['id'] . '</td>';
        $result .= render_io($io, $allSame, 'operation', $name, $prev_io);
        $result .= "</tr>";
        if ($was_write && $io['readwrite'] == ReadWrite::Read && !$allSame) {
            echo "<tr class=\"error-no-write\"><td colspan=\"6\">Not sure where exactly this value changed</td></tr>";
        }
        echo $result;
        $prev_io = $io;
        $last_write = $io['readwrite'] == ReadWrite::Write;
        $was_write |= $last_write;
        $first = false;
    }
    if ($last_write) {
        echo "<tr class=\"error-no-write\"><td colspan=\"6\">Not clear who reads the value after this last write</td></tr>";
    }
    echo '</table>';
}