<div class="page-header">
	<h1>Topics</h1>
</div>
<div class="col-md-7">
	<h2>Topics by Alpha (&alpha;)</h2>
	<div>
		<p>The &alpha; value of a topic is a measure of the frequency with which it appears in the corpus. Topics with a
		high &alpha; appear in many documents with a high weight; as such, they often refer to very general themes, such as the genre of 
		the document collection itself. Topics with a low &alpha; value are outliers, and may appear in one or two
		documents.</p></div>
<?php 
$vmin = $alpha_stats['min'];
$vmax = $alpha_stats['max'];
foreach ($topics as $topic) {
    $trend = $trends['t' . $topic['topic_id']];
    $bg = sparkline($trend, 2005, 2015);
    $vnow = $topic['topic_alpha'];
    $topic_url = base_url('topic/item/' . $topic['topic_id']);
    $img_url = base_url("assets/images/topic_plots/t{$topic['topic_id']}.png");
    print "<div class='data-item'>";
    print "<p style='font-size:110%;'>";
    print $bg;
    print "<a href='{$topic_url}'>" . $topic['topic_words'] . "</a> <span class='text-muted'><small>T-" . $topic['topic_id'] . "</small></span></p>";
    print progress_bar('success', $vnow, $vmin, $vmax, $vnow);
    print "</div>";
}
?>
	
</div>

<div class="col-md-5">
예제 #2
0
파일: index.php 프로젝트: rdmpage/bioguid
function show_table($title, $result)
{
    echo "<tr><td colspan=\"5\" ><br/><br/><b>{$title}</b></td></tr>" . "\n";
    while (!$result->EOF) {
        echo '<tr style="background-color:';
        switch ($result->fields['status']) {
            case '200':
                echo 'white';
                break;
            default:
                echo 'rgb(255,187,187)';
                break;
        }
        echo '">' . "\n";
        echo '<td style="border-bottom:1px dotted rgb(128,128,128);">';
        switch ($result->fields['status']) {
            case '200':
                echo '<img src="../images/accept.png" alt="accept"/>';
                break;
            case '404':
                echo '<img src="../images/delete.png" alt="delete"/>';
                break;
            default:
                echo '<img src="../images/error.png" alt="error"/>';
                break;
        }
        echo '</td>' . "\n";
        echo '<td style="border-bottom:1px dotted rgb(128,128,128);" align="right">' . $result->fields['status'] . '</td>';
        $name = $result->fields['name'];
        $name = str_replace("&", "&amp;", $name);
        $name = str_replace("<", "&lt;", $name);
        $name = str_replace(">", "&gt;", $name);
        echo '<td style="border-bottom:1px dotted rgb(128,128,128);">' . $name . '</td>' . "\n";
        echo '<td style="border-bottom:1px dotted rgb(128,128,128);"><a href="' . str_replace("&", "&amp;", $result->fields['url']) . '" target="_blank">' . $result->fields['url'] . '</a></td>' . "\n";
        // Sparkline
        //sparkline($result->fields['service_id']);
        echo '<td style="border-bottom:1px dotted rgb(128,128,128);background-color:white" align="right">' . '<img  src="' . sparkline($result->fields['service_id']) . '" alt="sparkline"/></td>' . "\n";
        echo '<td style="border-bottom:1px dotted rgb(128,128,128);background-color:white" align="right">';
        if ($result->fields['total_time'] == 0) {
            echo '-';
        } else {
            echo $result->fields['total_time'];
        }
        echo '</td>' . "\n";
        echo '</tr>' . "\n";
        $result->MoveNext();
    }
}