コード例 #1
0
ファイル: index.php プロジェクト: erixemaan/webjohn
function session_status($sessid)
{
    $john = new johnSession($sessid);
    return $john->status();
}
コード例 #2
0
		<table class="table">
			<thead>
				<th>Session</th>
				<th>Status</th>
				<th>Actions</th>
			</thead>
			<tbody>
<?php 
foreach (list_sessions() as $sessid) {
    //~ var_dump($sessid);
    $john = new johnSession($sessid);
    //~ var_dump($john);
    print '<tr>';
    print '<td>' . $john->session_name . '</td>';
    print '<td id="status_' . $sessid . '">';
    print securedString($john->status());
    print '</td>';
    print '<td id=buttons_' . $sessid . '>';
    if ($john->isRunning()) {
        print '&nbsp;<button id="stop_' . $sessid . '" type="button" class="btn btn-danger btn-small" data-loading-text="..."><i class="icon-stop icon-white"></i> Stop</button>';
    } elseif (!$john->isFinished()) {
        print '&nbsp;<button id="start_' . $sessid . '" type="button" class="btn btn-success btn-small" data-loading-text="..."><i class="icon-play icon-white"></i> Resume</button>';
    }
    print '&nbsp;<button id="update_' . $sessid . '" type="button" class="btn btn-small" data-loading-text="..."';
    if (!$john->isRunning()) {
        print ' style="display: none"';
    }
    print '><i class="icon-refresh"></i> Update</button>';
    //~ print '&nbsp;<a data-remote="'.$_SERVER['SCRIPT_NAME'].'?json=0&action=show&sessionid='.$sessid.'" data-target="#showRes" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-list"></i> Results</a>';
    print '&nbsp;<a href="report.php?sessID=' . $sessid . '" role="button" class="btn btn-small"><i class="icon-list"></i> Results</a>';
    if (!$john->isRunning()) {