Make some changes on chrono
This commit is contained in:
parent
83c61f6fe4
commit
363ba3325a
@ -131,7 +131,7 @@ else if ($n && $p[0] == SALT_USER)
|
||||
$page = "teams/list";
|
||||
}
|
||||
|
||||
else if (empty($VAR["start_challenge"]) || $VAR["start_challenge"] < time())
|
||||
else if (empty($VAR["start_challenge"]))
|
||||
{
|
||||
$TEAM = new Team($p[1]);
|
||||
$template->assign("my_team", $TEAM);
|
||||
|
@ -9,7 +9,7 @@ if (count($p) > 2)
|
||||
switch($p[2])
|
||||
{
|
||||
case "start":
|
||||
file_put_contents($VAR["misc_dir"]."/challenge_started", time() + 42);
|
||||
file_put_contents($VAR["misc_dir"]."/challenge_started", time() + (intval($_POST["time"]) - 240) * 60);
|
||||
break;
|
||||
|
||||
case "init":
|
||||
|
@ -70,7 +70,7 @@
|
||||
<input type="text" class="form-control" name="f{$k}_path" id="f{$k}_path" value="{$file.path_orig|escape}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="f{$k}_sha1">SHA-1</label>{if is_file($file.path)} Calculated from {$file.path}: {sha1_file($file.path)}{/if}
|
||||
<label for="f{$k}_sha1">SHA-1</label>{if is_file($file.path)} Calculated from {$file.path}: {sha1_file($file.path)} <span class="label {if sha1_file($file.path) != $file.sha1}label-danger">pas bon{else}label-success">ok{/if}</span>{/if}
|
||||
<input type="text" class="form-control" name="f{$k}_sha1" id="f{$k}_sha1" value="{$file.sha1|escape}">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,24 +15,36 @@
|
||||
<li><strong>[CN] :</strong> {$cert['subject']['CN']}</li>
|
||||
<li><strong>[emailAddress] :</strong> {$cert['subject']['emailAddress']}</li>
|
||||
</ul>
|
||||
<a href="/{$SALT_ADMIN}/certificate/deleteca" class="btn btn-danger"
|
||||
onclick="return confirm('Êtes-vous sûr de vouloir supprimer ce certificat ?')">Supprimer</a>
|
||||
<!--<a href="/{$SALT_ADMIN}/certificate/deleteca" class="btn btn-danger"
|
||||
onclick="return confirm('Êtes-vous sûr de vouloir supprimer ce certificat ?')">Supprimer</a>-->
|
||||
{elseif isset($cert_writable) && ! $cert_writable}
|
||||
<div class="alert alert-danger"><span class="glyphicon glyphicon-warning-sign"></span> Répertoire non accessible en écriture.</div>
|
||||
<a href="/{$SALT_ADMIN}/certificate/newca" class="btn btn-primary" disabled="disabled">Nouveau</a>
|
||||
<!--<a href="/{$SALT_ADMIN}/certificate/newca" class="btn btn-primary" disabled="disabled">Nouveau</a>-->
|
||||
{else}
|
||||
<a href="/{$SALT_ADMIN}/certificate/newca" class="btn btn-primary">Nouveau</a>
|
||||
Pas de certificat
|
||||
<!--<a href="/{$SALT_ADMIN}/certificate/newca" class="btn btn-primary">Nouveau</a>-->
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Chrono</h3>
|
||||
<h3 class="panel-title">Chrono <span class="label label-{if isset($END)}success">Lancé{else}danger">Arrêté{/if}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<a href="/{$SALT_ADMIN}/chrono/start" class="btn btn-success">Start</a>
|
||||
<a href="/{$SALT_ADMIN}/chrono/init" class="btn btn-danger">Réinitialiser</a>
|
||||
<form method="post" action="/{$SALT_ADMIN}/chrono/start" role="form" class="form-inline">
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="time">Temps :</label>
|
||||
<div class="input-group">
|
||||
<input type="input" class="form-control" id="time" name="time" value="240">
|
||||
<span class="input-group-addon">minutes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">Start</button>
|
||||
<a href="/{$SALT_ADMIN}/chrono/init" class="btn btn-danger">Réinitialiser</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{extends file="public/layout.tpl"}
|
||||
|
||||
{block name=head2}
|
||||
<meta http-equiv="refresh" content="100">
|
||||
<meta http-equiv="refresh" content="{10*(count($teams)+1)}">
|
||||
{/block}
|
||||
|
||||
{block name=main}
|
||||
|
Loading…
Reference in New Issue
Block a user