当前位置: 首页>>代码示例>>PHP>>正文


PHP printtime函数代码示例

本文整理汇总了PHP中printtime函数的典型用法代码示例。如果您正苦于以下问题:PHP printtime函数的具体用法?PHP printtime怎么用?PHP printtime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了printtime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: specialchars

echo "<tr><td>Reason:</td><td>";
if (empty($rejdata['reason'])) {
    echo '<span class="nodata">none</span>';
} else {
    echo specialchars($rejdata['reason']);
}
echo "</td></tr>\n";
foreach (array('userid_start' => 'Issued by', 'userid_finish' => ($rejdata['valid'] ? 'Accepted' : 'Canceled') . ' by') as $user => $msg) {
    if (isset($rejdata[$user])) {
        echo "<tr><td>{$msg}:</td><td>" . '<a href="user.php?id=' . urlencode($rejdata[$user]) . '">' . specialchars($userdata[$rejdata[$user]]) . "</a></td></tr>\n";
    }
}
foreach (array('starttime' => 'Start time', 'endtime' => 'Apply time') as $time => $msg) {
    echo "<tr><td>{$msg}:</td><td>";
    if (isset($rejdata[$time])) {
        echo printtime($rejdata[$time]);
    } else {
        echo '<span class="nodata">-</span>';
    }
    echo "</td></tr>\n";
}
if ($todo > 0) {
    echo "<tr><td>Queued:</td><td>{$todo} unfinished judgings</td>\n";
}
echo "</table>\n\n";
if (!isset($rejdata['endtime'])) {
    echo addForm($pagename . '?id=' . urlencode($id)) . addSubmit('cancel rejudging', 'cancel') . addEndForm();
    if ($todo == 0) {
        echo addForm($pagename . '?id=' . urlencode($id)) . addSubmit('apply rejudging', 'apply') . addEndForm();
    }
}
开发者ID:rohit-takhar,项目名称:domjudge,代码行数:31,代码来源:rejudging.php

示例2: IN

	               result, verified, valid FROM judging
	               WHERE cid IN (%Ai) AND judgehost = %s
	               ORDER BY starttime DESC, judgingid DESC', $cids, $row['hostname']);
}
if (empty($cids) || $res->count() == 0) {
    echo "<p class=\"nodata\">No judgings.</p>\n\n";
} else {
    echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\" class=\"sorttable_numeric\">ID</th><th " . "scope=\"col\">started</th><th scope=\"col\">runtime</th><th " . "scope=\"col\">result</th><th scope=\"col\">valid</th><th " . "scope=\"col\">verified</th></tr>\n</thead>\n<tbody>\n";
    while ($jud = $res->next()) {
        if (empty($jud['endtime'])) {
            if ($jud['valid']) {
                $runtime = printtimediff($jud['starttime'], NULL);
            } else {
                $runtime = '[aborted]';
            }
        } else {
            $runtime = printtimediff($jud['starttime'], $jud['endtime']);
        }
        $link = ' href="submission.php?id=' . (int) $jud['submitid'] . '&amp;jid=' . (int) $jud['judgingid'] . '"';
        echo '<tr' . ($jud['valid'] ? '' : ' class="disabled"') . '>';
        echo "<td><a{$link}>j" . (int) $jud['judgingid'] . '</a></td>';
        echo "<td><a{$link}>" . printtime($jud['starttime']) . '</a></td>';
        echo "<td><a{$link}>" . $runtime . '</a></td>';
        echo "<td><a{$link}>" . printresult(@$jud['result'], $jud['valid']) . '</a></td>';
        echo "<td class=\"tdcenter\"><a{$link}>" . printyn($jud['valid']) . '</a></td>';
        echo "<td class=\"tdcenter\"><a{$link}>" . printyn($jud['verified']) . '</a></td>';
        echo "</tr>\n";
    }
    echo "</tbody>\n</table>\n\n";
}
require LIBWWWDIR . '/footer.php';
开发者ID:kien8995,项目名称:domjudge,代码行数:31,代码来源:judgehost.php

示例3: htmlspecialchars

}
?>

<table>
<tr><td>Problem:</td>
	<td><span class="probid"><?php 
echo htmlspecialchars($row['shortname']);
?>
</span> -
    <?php 
echo htmlspecialchars($row['probname']);
?>
</td></tr>
<tr><td>Submitted:</td>
	<td><?php 
echo printtime($row['submittime']);
?>
</td></tr>
<tr><td>Language:</td>
	<td><?php 
echo htmlspecialchars($row['langname']);
?>
</td></tr>
</table>

<p>Result: <?php 
echo printresult($row['result'], TRUE);
?>
</p>
<?php 
$show_compile = dbconfig_get('show_compile', 2);
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:submission_details.php

示例4: while

} else {
    echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">ID</th>" . "<th scope=\"col\">reason</th>" . "<th scope=\"col\">startuser</th>" . "<th scope=\"col\">finishuser</th>" . "<th scope=\"col\">starttime</th>" . "<th scope=\"col\">endtime</th>" . "<th scope=\"col\">status</th></tr>\n" . "</thead>\n<tbody>\n";
    while ($row = $res->next()) {
        $todo = $DB->q('VALUE SELECT COUNT(*) FROM submission
		                WHERE rejudgingid=%i', $row['rejudgingid']);
        $done = $DB->q('VALUE SELECT COUNT(*) FROM judging
		                WHERE rejudgingid=%i AND endtime IS NOT NULL', $row['rejudgingid']);
        $todo -= $done;
        $link = '<a href="rejudging.php?id=' . urlencode($row['rejudgingid']) . '">';
        $class = '';
        if (isset($row['endtime'])) {
            $class = 'class="disabled"';
        } else {
            $class = $todo > 0 ? '' : 'class="unseen"';
        }
        echo "<tr {$class}>" . "<td>" . $link . $row['rejudgingid'] . '</a></td>' . "<td>" . $link . htmlspecialchars($row['reason']) . '</a></td>' . "<td>" . $link . htmlspecialchars($row['startuser']) . "</a></td>" . "<td>" . $link . htmlspecialchars($row['finishuser']) . "</a></td>" . "<td>" . $link . printtime($row['starttime']) . "</a></td>" . "<td>" . $link . printtime($row['endtime']) . "</a></td>" . "<td>" . $link;
        if (isset($row['endtime'])) {
            echo $row['valid'] ? 'applied' : 'canceled';
        } else {
            if ($todo > 0) {
                $perc = (int) (100 * ((double) $done / (double) ($done + $todo)));
                echo "{$perc}% done";
            } else {
                echo 'ready';
            }
        }
        echo "</a></td></tr>\n";
    }
    echo "</tbody>\n</table>\n\n";
}
require LIBWWWDIR . '/footer.php';
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:rejudgings.php

示例5: while

}
echo " | ";
if ($res->count() == 1 + PAGEMAX) {
    echo "<a href=\"?start=" . ($start + PAGEMAX) . "\">next page</a>";
} else {
    echo "<span class=\"nodata\">next page</span>";
}
echo "</p>";
if ($res->count() == 0) {
    echo '<p class="nodata">No entries</p>';
    require LIBWWWDIR . '/footer.php';
    exit;
}
echo "<table class=\"list sortable\">\n" . "<thead><tr><th>id</th><th>when</th><th class=\"sorttable_numeric\">cid</th>" . "<th>who</th><th colspan=\"3\">what</th><th>extra info</th></tr></thead>\n<tbody>\n";
while ($logline = $res->next()) {
    echo "<tr><td>" . specialchars($logline['logid']) . "</td>" . "<td title=\"" . specialchars(printtime($logline['logtime'], "%Y-%m-%d %H:%M:%S (%Z)")) . "\">" . printtime($logline['logtime']) . "</td><td>" . (empty($logline['cid']) ? '' : 'c' . $logline['cid']) . "</td><td>" . specialchars($logline['user']) . "</td><td>" . specialchars($logline['datatype']) . "</td><td>";
    // First define defaults, allow to override afterwards:
    $link = urlencode($logline['datatype']) . '.php?id=' . urlencode($logline['dataid']);
    $name = specialchars($logline['dataid']);
    switch ($logline['datatype']) {
        case 'balloon':
            $link = NULL;
            $name = 'b' . $name;
            break;
        case 'contest':
            $name = 'c' . $name;
            break;
        case 'judging':
            $link = 'submission.php?jid=' . urlencode($logline['dataid']);
            $name = 'j' . $name;
            break;
开发者ID:sponi78,项目名称:domjudge,代码行数:31,代码来源:auditlog.php

示例6: while

require LIBWWWDIR . '/header.php';
echo "<h1>Users</h1>\n\n";
if ($users->count() == 0) {
    echo "<p class=\"nodata\">No users defined</p>\n\n";
} else {
    echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">username</th><th scope=\"col\">name</th>" . "<th scope=\"col\">email</th><th scope=\"col\">roles</th>" . "<th scope=\"col\">team</th>" . "<th class=\"thleft\" scope=\"col\">status</th><th></th>" . "</tr>\n</thead>\n<tbody>\n";
    while ($row = $users->next()) {
        $status = 0;
        if (isset($row['last_login'])) {
            $status = 1;
        }
        $link = '<a href="user.php?id=' . urlencode($row['userid']) . '">';
        echo "<tr class=\"" . ($row['enabled'] == 1 ? '' : 'sub_ignore') . "\">" . "<td class=\"username\">" . $link . specialchars($row['username']) . "</a></td>" . "<td>" . $link . specialchars($row['name']) . "</a></td>" . "<td>" . $link . (isset($row['email']) ? specialchars($row['email']) : '&nbsp;') . "</a></td>" . "<td>" . $link . specialchars($row['roles']) . "</a></td>" . "<td>" . $link . (isset($row['teamid']) ? "t" . specialchars($row['teamid']) : '&nbsp;') . "</a></td>";
        echo "<td sorttable_customkey=\"" . $status . "\" class=\"";
        if ($status == 1) {
            echo 'team-ok" title="logged in: ' . printtime($row['last_login']) . '"';
        } else {
            echo 'team-nocon" title="no connections made"';
        }
        echo ">{$link}" . CIRCLE_SYM . "</a></td>";
        if (IS_ADMIN) {
            echo "<td class=\"editdel\">" . editLink('user', $row['userid']) . "&nbsp;" . delLink('user', 'userid', $row['userid'], $row['name']) . "</td>";
        }
        echo "</tr>\n";
    }
    echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
    echo "<p>" . addLink('user') . "</p>\n";
}
require LIBWWWDIR . '/footer.php';
开发者ID:bertptrs,项目名称:domjudge,代码行数:31,代码来源:users.php

示例7: while

    echo "No roles assigned";
} else {
    while ($role = $roles->next()) {
        echo "{$role['role']} - {$role['description']}<br>";
    }
}
?>
</td></tr>
<tr><td>Team:</td><?php 
if ($row['teamid']) {
    echo "<td class=\"teamid\"><a href=\"team.php?id=" . urlencode($row['teamid']) . "\">" . htmlspecialchars($row['teamname'] . " (t" . $row['teamid'] . ")") . "</a></td>";
} else {
    echo "<td>-</td>";
}
?>
</tr>
<tr><td>Last login:</td><td><?php 
echo printtime($row['last_login'], '%a %d %b %Y %T %Z');
?>
</td></tr>
<tr><td>Last IP:   </td><td><?php 
echo @$row['ip_address'] ? printhost($row['ip_address'], TRUE) : '';
?>
</td></tr>
</table></div>

<?php 
if (IS_ADMIN) {
    echo "<p class=\"nomorecol\">" . editLink('user', $id) . "\n" . delLink('user', 'userid', $id) . "</p>\n\n";
}
require LIBWWWDIR . '/footer.php';
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:user.php

示例8: getmovies

$movies = getmovies("biercam", $from, $to);
$nav = "<a href='?from=" . ($from - $step) . "&to=" . ($to - $step) . "'>Eerder</a> ";
if ($from + $step < time()) {
    $nav .= "<a href='?from=" . ($from + $step) . "&to=" . ($to + $step) . "'>Later</a>";
}
$nav .= " <a href='?'>Nu</a>";
$nav .= " <a href='view.php?url=mms://lounge.datux.nl:9192&desc=Biercam Live stream 1'>Livestream 1</a>";
$nav .= " <a href='view.php?url=mmsh://lounge.datux.nl:9192&desc=Biercam Live stream 2'>Livestream 2</a>";
$nav .= " <a href='view.php?url=http://lounge.datux.nl:9192&desc=Biercam Live stream 3'>Livestream 3</a>";
//print navigation
echo "{$nav}";
//print the grand movie table
foreach ($movies as $movie => $thumbs) {
    echo "<h1>";
    $time = movie2timestamp($movie);
    printtime($time);
    echo "</h1>";
    echo "<table>";
    $nr = 0;
    echo "<tr>";
    foreach ($thumbs as $thumb) {
        echo "<td id=thumb>";
        echo "<image src='{$thumb}'><br>";
        $thumbtime = filectime($thumb);
        echo date("G:i", $thumbtime);
        $nr++;
        if ($nr == 5) {
            $nr = 0;
            echo "</tr><tr>";
        }
    }
开发者ID:switchUA,项目名称:stuff,代码行数:31,代码来源:index2.php

示例9: addForm

    $TOTAL_BALLOONS[$row['teamid']][] = $row['probid'];
    // keep overwriting these variables - in the end they'll
    // contain the id's of the first balloon in each type
    $first_contest[$row['cid']] = $first_problem[$row['probid']] = $first_team[$row['teamid']] = $row['balloonid'];
}
if (!empty($BALLOONS)) {
    echo addForm($pagename);
    echo "<table class=\"list sortable balloons\">\n<thead>\n" . "<tr><th class=\"sorttable_numeric\">ID</th>" . "<th>time</th>" . (count($contestids) > 1 ? "<th>contest</th>" : "") . "<th>solved</th><th>team</th>" . "<th></th><th>loc.</th><th>category</th><th>total</th>" . "<th></th><th></th></tr>\n</thead>\n";
    foreach ($BALLOONS as $row) {
        if (!$viewall && $row['done'] == 1) {
            continue;
        }
        // start a new row, 'disable' if balloon has been handed out already
        echo '<tr' . ($row['done'] == 1 ? ' class="disabled"' : '') . '>';
        echo '<td>b' . (int) $row['balloonid'] . '</td>';
        echo '<td>' . printtime($row['submittime']) . '</td>';
        if (count($contestids) > 1) {
            // contest of this problem, only when more than one active
            echo '<td>' . specialchars($row['shortname']) . '</td>';
        }
        // the balloon earned
        echo '<td class="probid">' . '<div class="circle" style="background-color: ' . specialchars($probs_data[$row['probid']]['color']) . ';"></div> ' . specialchars($row['probshortname']) . '</td>';
        // team name, location (room) and category
        echo '<td>t' . specialchars($row['teamid']) . '</td><td>' . specialchars($row['teamname']) . '</td><td>' . specialchars($row['room']) . '</td><td>' . specialchars($row['catname']) . '</td><td>';
        // list of balloons for this team
        sort($TOTAL_BALLOONS[$row['teamid']]);
        $TOTAL_BALLOONS[$row['teamid']] = array_unique($TOTAL_BALLOONS[$row['teamid']]);
        foreach ($TOTAL_BALLOONS[$row['teamid']] as $prob_solved) {
            echo '<div title="' . specialchars($prob_solved) . '" class="circle" style="background-color: ' . specialchars($probs_data[$prob_solved]['color']) . ';"></div> ';
        }
        echo '</td><td>';
开发者ID:bertptrs,项目名称:domjudge,代码行数:31,代码来源:balloons.php

示例10: array

if (!isset($NOTIFCOMMENT[0]) || empty($NOTIFCOMMENT[0])) {
    $NOTIFCOMMENT[0] = "N/A";
}
if (!isset($NOTIFCOMMENT[1])) {
    $NOTIFCOMMENT[1] = "N/A";
}
if (!isset($COMMENT[0]) || empty($COMMENT[0])) {
    $COMMENT[0] = "N/A";
    $NOCOMMENT = 1;
} else {
    $NOCOMMENT = 0;
}
if (!isset($COMMENT[1])) {
    $COMMENT[1] = "N/A";
}
$STATUSDATA = array('curstat' => "<div class='" . $COLOR . "'>" . $STATUS . " (" . printtime($LASTCHANGEDIFF) . ")" . "</div>", 'outputstatus' => $OUTPUT, 'checkstatus' => $CURATTEMP . "/" . $MAXATTEMP . " | " . $NORMALINTERVAL . "m/" . $RETRYINTERVAL . "m | " . printtime($LASTCHECKTIMEDIFF), 'lastok' => substr($LASTTIMEOK, 0, 4) == "1970" || $STATUS == "OK" ? "N/A" : $LASTTIMEOK . " (" . printtime($LASTTIMEOKDIFF) . ")", 'nextcheck' => printtime($NEXTCHECKTIMEDIFF) < 0 ? "N/A" : $NEXTCHECKTIME . " (" . printtime($NEXTCHECKTIMEDIFF) . ")", 'checkinfo' => $CHKTYPE . ", A={$st_data['ACTIVE']}, P={$st_data['PASSIVE']} | " . $CHECKNAME, 'checktime' => $LATENCY . " | " . $EXEC_TIME, 'laststatus' => printtime($LASTCHANGEDIFF) . " | " . printtime($UPDATETIMEDIFF), 'flapping' => $FLAPPING . " " . ($st_data['FLAPPING'] != 2 ? "(" . $PERCENT . "% " . _('state_change') . ")" : ""), 'groupstatus' => $GROUPS . " | " . $CONTACTGROUP, 'notifystatus' => ($COUNTNOTIFY == 0 ? "N/A (0)" : $LASTNOTIFY . " (" . $COUNTNOTIFY . ") ") . " | " . ($NEXTTIMENOTIFYDIFF <= 0 ? "N/A" : printtime($NEXTTIMENOTIFYDIFF)), $ACK && count($ACKCOMMENT) > 1 ? 'ackcur' : 'noackcur' => $ACKCOMMENT[1], $DOWNTIME && count($DOWNCOMMENT) > 2 ? 'downcur' : 'nodowncur' => $DOWNCOMMENT[2] . " (" . _('end') . " " . $DOWNCOMMENT[1] . ")", !$NOTIF && count($NOTIFCOMMENT) > 1 ? 'notifycur' : 'nonotifycur' => $NOTIFCOMMENT[1], $NOCOMMENT == 0 ? 'commentcur' : 'nocommentcur' => $COMMENT[1]);
/* Open gitory popup */
if (count($_SESSION['HISTORY'])) {
    $STATUSDATA['linkhistory'] = "<a href=\"#\" onClick=\"return pop('history.php?id={$id}&type={$type}&host={$HOSTNAME}&svc={$SERVICE}', '{$id}', '{$HISTORY_POPUP_WIDTH}', '{$HISTORY_POPUP_HEIGHT}');\">" . ucfirst(_('show_history')) . "</a>";
}
/* Custom variables */
/* The $cvar array is only used to build the $variables array which
 * contains the final list of key/value custom variables. Precedence
 * is given to variables defined on the service if also present on
 * the host.
 *
 * Values of custom variables can make reference to other custom
 * variables using the syntax ${_OTHER_VARIABLE}. Values can also
 * reference special properties of the $other_variables array with
 * the same syntax.
 *
开发者ID:laiello,项目名称:openpom,代码行数:31,代码来源:status-nagios.php

示例11: putClarificationList

/**
 * Print a list of clarifications in a table with links to the clarifications.
 */
function putClarificationList($clars, $team = NULL)
{
    global $username, $cids;
    if ($team == NULL && !IS_JURY) {
        error("access denied to clarifications: you seem to be team nor jury");
    }
    echo "<table class=\"list sortable\">\n<thead>\n<tr>" . (IS_JURY ? "<th scope=\"col\">ID</th>" : "") . (IS_JURY && count($cids) > 1 ? "<th scope=\"col\">contest</th>" : "") . "<th scope=\"col\">time</th>" . "<th scope=\"col\">from</th>" . "<th scope=\"col\">to</th><th scope=\"col\">subject</th>" . "<th scope=\"col\">text</th>" . (IS_JURY ? "<th scope=\"col\">answered</th><th scope=\"col\">by</th>" : "") . "</tr>\n</thead>\n<tbody>\n";
    while ($clar = $clars->next()) {
        // check viewing permission for teams
        if (!IS_JURY && !canViewClarification($team, $clar)) {
            continue;
        }
        $clar['clarid'] = (int) $clar['clarid'];
        $link = '<a href="clarification.php?id=' . urlencode($clar['clarid']) . '">';
        if (isset($clar['unread'])) {
            echo '<tr class="unread">';
        } else {
            echo '<tr>';
        }
        if (IS_JURY) {
            echo '<td>' . $link . $clar['clarid'] . '</a></td>';
        }
        echo IS_JURY && count($cids) > 1 ? '<td>' . $link . $clar['contestshortname'] . '</a></td>' : '';
        echo '<td>' . $link . printtime($clar['submittime']) . '</a></td>';
        if ($clar['sender'] == NULL) {
            $sender = 'Jury';
            if ($clar['recipient'] == NULL) {
                $recipient = 'All';
            } else {
                $recipient = htmlspecialchars($clar['toname']);
            }
        } else {
            $sender = htmlspecialchars($clar['fromname']);
            $recipient = 'Jury';
        }
        echo '<td>' . $link . $sender . '</a></td>' . '<td>' . $link . $recipient . '</a></td>';
        echo '<td>' . $link;
        if (is_null($clar['probid'])) {
            echo "general";
        } else {
            echo "problem " . $clar['shortname'];
        }
        echo "</a></td>";
        echo '<td class="clartext">' . $link . summarizeClarification($clar['body']) . "</a></td>";
        if (IS_JURY) {
            unset($answered, $jury_member);
            $claim = FALSE;
            $answered = printyn($clar['answered']);
            if (empty($clar['jury_member'])) {
                $jury_member = '&nbsp;';
            } else {
                $jury_member = htmlspecialchars($clar['jury_member']);
            }
            if (!$clar['answered']) {
                if (empty($clar['jury_member'])) {
                    $claim = TRUE;
                } else {
                    $answered = 'claimed';
                }
            }
            echo "<td>{$link} {$answered}</a></td><td>";
            if ($claim && isset($clar['sender'])) {
                echo "<a class=\"button\" href=\"clarification.php?claim=1&amp;id=" . htmlspecialchars($clar['clarid']) . "\">claim</a>";
            } else {
                if (!$clar['answered'] && $jury_member == $username) {
                    echo "<a class=\"button\" href=\"clarification.php?unclaim=1&amp;id=" . htmlspecialchars($clar['clarid']) . "\">unclaim</a>";
                } else {
                    echo "{$link} {$jury_member}</a>";
                }
            }
            echo "</td>";
        }
        echo "</tr>\n";
    }
    echo "</tbody>\n</table>\n\n";
}
开发者ID:nya3jp,项目名称:domjudge,代码行数:79,代码来源:clarification.php

示例12: putSubmissions


//.........这里部分代码省略.........
        // always provide link if this is Jury. For team, provide link
        // to a different page, provided that the result is actually
        // present and valid.
        if (IS_JURY) {
            // If rejudging list, link to the new rejudging:
            $linkurl = 'submission.php?id=' . $sid . (isset($restrictions['rejudgingid']) ? '&amp;rejudgingid=' . $restrictions['rejudgingid'] : '');
            $link = ' href="' . $linkurl . '"';
        } elseif ($row['submittime'] < $cdatas[$row['cid']]['endtime'] && $row['result'] && $row['valid'] && (!dbconfig_get('verification_required', 0) || $row['verified'])) {
            $link = ' href="submission_details.php?id=' . $sid . '"';
        } else {
            $link = '';
        }
        echo "<tr class=\"" . ($iseven ? 'roweven' : 'rowodd');
        $iseven = !$iseven;
        if ($row['valid']) {
            $subcnt++;
        } else {
            $igncnt++;
            echo ' sub_ignore';
        }
        if ($sid == $highlight) {
            echo ' highlight';
        }
        if (!IS_JURY && !$row['seen']) {
            echo ' unseen';
        }
        echo '">';
        if (IS_JURY) {
            echo "<td><a{$link}>s{$sid}</a></td>";
        }
        if (IS_JURY && count($cids) > 1) {
            echo "<td><a{$link}>c{$row['cid']}</a></td>";
        }
        echo "<td><a{$link}>" . printtime($row['submittime']) . "</a></td>";
        if (IS_JURY) {
            echo '<td title="t' . htmlspecialchars($row['teamid']) . '">' . "<a{$link}>" . htmlspecialchars(str_cut($row['teamname'], 30)) . '</a></td>';
        }
        echo '<td class="probid" title="' . htmlspecialchars($row['probname']) . '">' . "<a{$link}>" . htmlspecialchars($row['shortname']) . '</a></td>';
        echo '<td class="langid" title="' . htmlspecialchars($row['langname']) . '">' . "<a{$link}>" . htmlspecialchars($row['langid']) . '</a></td>';
        echo "<td class=\"result\"><a{$link}>";
        if (difftime($row['submittime'], $cdatas[$row['cid']]['endtime']) >= 0) {
            echo printresult('too-late');
            if (IS_JURY && $row['result']) {
                echo " (" . printresult($row['result']) . ")";
            }
        } else {
            if (!$row['result'] || !IS_JURY && !$row['verified'] && dbconfig_get('verification_required', 0)) {
                echo printresult($row['judgehost'] || !IS_JURY ? '' : 'queued');
            } else {
                echo printresult($row['result']);
            }
        }
        echo "</a></td>";
        if (IS_JURY) {
            // only display verification if we're done with judging
            unset($verified, $jury_member);
            $claim = FALSE;
            if (empty($row['result'])) {
                $verified = '&nbsp;';
                $jury_member = '&nbsp;';
            } else {
                $verified = printyn($row['verified']);
                if (empty($row['jury_member'])) {
                    $jury_member = '&nbsp;';
                } else {
                    $jury_member = htmlspecialchars($row['jury_member']);
开发者ID:nya3jp,项目名称:domjudge,代码行数:67,代码来源:common.php

示例13: array

/**
 * View the internal errors
 *
 * Part of the DOMjudge Programming Contest Jury System and licenced
 * under the GNU GPL. See README and COPYING for details.
 */
require 'init.php';
$title = 'Internal Errors';
$refresh = array('after' => 15, 'url' => 'internal_errors.php');
require LIBWWWDIR . '/header.php';
echo "<h1>Internal Errors</h1>\n\n";
$res = $DB->q('SELECT errorid, judgingid, description, time, status
               FROM internal_error
               ORDER BY status, errorid');
if ($res->count() == 0) {
    echo "<p class=\"nodata\">No internal errors found</p>\n\n";
} else {
    echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">ID</th>" . "<th scope=\"col\">jid</th>" . "<th scope=\"col\">description</th>" . "<th scope=\"col\">time</th>" . "<th scope=\"col\">status</th></tr>\n" . "</thead>\n<tbody>\n";
    while ($row = $res->next()) {
        $link = '<a href="internal_error.php?id=' . urlencode($row['errorid']) . '">';
        $class = '';
        if ($row['status'] != 'open') {
            $class = 'class="disabled"';
        } else {
            $class = 'class="unseen"';
        }
        echo "<tr {$class}>" . "<td>" . $link . $row['errorid'] . '</a></td>' . "<td>" . $link . "j" . $row['judgingid'] . '</a></td>' . "<td>" . $link . specialchars($row['description']) . "</a></td>" . "<td>" . $link . printtime($row['time']) . "</a></td>" . "<td>" . $link . $row['status'] . '</a></td>' . "</tr>\n";
    }
    echo "</tbody>\n</table>\n\n";
}
require LIBWWWDIR . '/footer.php';
开发者ID:bertptrs,项目名称:domjudge,代码行数:31,代码来源:internal_errors.php

示例14: printtime

<?php

function printtime($encode)
{
    //setlocale に失敗すると前回の値が使用されるため
    //C でクリアする
    setlocale(LC_TIME, 'C');
    $result = setlocale(LC_TIME, $encode);
    echo strftime("%B - %A - %a") . " ({$encode}) - {$result} \r\n";
}
printtime('ja_JP');
printtime('ja_JP.UTF-8');
printtime('ja');
printtime('Japanese_Japan.932');
printtime('CP932');
printtime('UTF-8');
printtime('Japanese_Japan.65001');
开发者ID:coderhelps,项目名称:try_samples,代码行数:17,代码来源:testtime.php

示例15: printContestStart

/**
 * Print contest start time
 */
function printContestStart($cdata)
{
    $res = "scheduled to start ";
    if (printtime(now(), '%Y%m%d') == printtime($cdata['starttime'], '%Y%m%d')) {
        // Today
        $res .= "at " . printtime($cdata['starttime']);
    } else {
        // Print full date
        $res .= "on " . printtime($cdata['starttime'], '%a %d %b %Y %T %Z');
    }
    return $res;
}
开发者ID:22a,项目名称:Cleaner-Ducss-Judge,代码行数:15,代码来源:scoreboard.php


注:本文中的printtime函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。