source: subversion/sites/other/tilesAtHome/Upload/go_nogo.php @ 3839

Last change on this file since 3839 was 3471, checked in by ojw, 13 years ago

Hand-out upload tokens

File size: 700 bytes
Line 
1<?php
2
3  header("Content-type: text/plain");
4  include("../lib/queue.inc");
5  include("../lib/tokens.inc");
6 
7  $Value = QueueLength();
8  $Min = 10;
9  $Max = MaxQueueLength();
10 
11  $Portion = ($Max - $Value) / ($Max - $Min);
12  if($Portion < 0) $Portion = 0;
13  if($Portion > 1) $Portion = 1;
14
15  list($Token1, $Token2) = GetTokens(-1, "testing");
16
17  $Message = "First line is always a number from 0 (stop) to 1 (full speed). \nSecond line is an upload token, as text. \nSubsequent lines may contain human-readable text.";
18 
19  printf("%1.2f\n%s\n%s\n%s %1.2f. trying to keep between %1.2f and %1.2f\n", 
20    $Portion,
21    $Token1,
22    $Message,
23    "Queue length",
24    $Value,
25    $Min,
26    $Max);
27
28?>
Note: See TracBrowser for help on using the repository browser.