Ejemplo n.º 1
0
function show_participant()
{
    $i = rand(0, 99);
    $j = $i + 1;
    echo "<table cellpadding=8 cellspacing=0 width=100%>\n        <tr><td class=heading_right>\n        <center>\n        <span class=section_title>" . tra("Computing power") . "</span>\n        <br>\n        <a class=heading href=chart_list.php><b>" . tra("Top 100 volunteers") . "</b></a>\n        &middot; <a class=heading href=\"links.php#stats\"><b>" . tra("Statistics") . "</b></a>\n        </center>\n        </td></tr>\n        <tr><td>\n    ";
    show_totals();
    include "piecharts/{$i}.html";
    echo "</td></tr></table>";
}
Ejemplo n.º 2
0
    $free = round(100*$disk['fsFree']/$disk['size']);
    $used = 100-$free;
    echo "<td><div class='usage-disk'><span style='margin:0;width:{$used}%' class='".usage_color($used,false)."'><span>".my_scale($disk['fsUsed']*1024, $unit)." $unit</span></span></div></td>";
    echo "<td><div class='usage-disk'><span style='margin:0;width:{$free}%' class='".usage_color($free,true)."'><span>".my_scale($disk['fsFree']*1024, $unit)." $unit</span></span></div></td>";
  }
  echo "<td>".device_browse($disk)."</td>";
  echo "</tr>";
  break;
case 'cache':
  if ($var['fsState']=='Stopped') {
    foreach ($disks as $disk) {if ($disk['type']=='Cache') array_offline($disk);}
    echo "<tr class='tr_last'><td><img src='/webGui/images/sum.png' class='icon'>Slots:</td><td colspan='9'>".cache_slots()."</td><td></td></tr>";
    echo "<tr><td colspan='10'></td><td></td></tr>";
  } else {
    foreach ($disks as $disk) {if ($disk['type']=='Cache') array_online($disk);}
    if ($display['total'] && $var['cacheSbNumDisks']>1) show_totals("Pool of ".my_word($var['cacheNumDevices'])." devices");
  }
  break;
case 'open':
  $status = isset($confirm['preclear']) ? '' : '_NP';
  foreach ($devs as $dev) {
    $dev['name'] = 'preclear';
    $dev['color'] = read_disk($dev['device'], 'color');
    $dev['temp'] = read_disk($dev['device'], 'temp');
    $dev['status'] = $status;
    echo "<tr>";
    echo "<td>".device_info($dev)."</td>";
    echo "<td>".device_desc($dev)."</td>";
    echo "<td>".my_temp($dev['temp'])."</td>";
    if (file_exists("/tmp/preclear_stat_{$dev['device']}")) {
      $text = exec("cut -d'|' -f3 /tmp/preclear_stat_{$dev['device']} | sed 's:\^n:\<br\>:g'");
Ejemplo n.º 3
0
  echo "<td>".device_info($disk)."</td>";
  echo "<td>".device_desc($disk)."</td>";
  echo "<td>*</td>";
  echo "<td>".my_number($disk['numReads'])."</td>";
  echo "<td>".my_number($disk['numWrites'])."</td>";
  echo "<td>".my_number($disk['numErrors'])."</td>";
  fs_info($disk);
  echo "</tr>";
  break;
case 'cache':
  if ($var['fsState']=='Stopped') {
    foreach ($disks as $disk) {if ($disk['type']=='Cache') array_offline($disk);}
    echo "<tr class='tr_last'><td><img src='/webGui/images/sum.png' class='icon'>Slots:</td><td colspan='9'>".cache_slots()."</td><td></td></tr>";
  } else {
    foreach ($disks as $disk) {if ($disk['type']=='Cache') array_online($disk);}
    if ($display['total'] && $var['cacheSbNumDisks']>1) show_totals('Pool of '.my_word($var['cacheNumDevices']).' devices');
  }
  break;
case 'open':
  foreach ($devs as $dev) {
    $dev['name'] = $dev['device'];
    $dev['type'] = 'New';
    $dev['color'] = read_disk($dev['device'],'color');
    $dev['temp'] = read_disk($dev['device'],'temp');
    echo "<tr>";
    echo "<td>".device_info($dev)."</td>";
    echo "<td>".device_desc($dev)."</td>";
    echo "<td>".my_temp($dev['temp'])."</td>";
    if (file_exists("/tmp/preclear_stat_{$dev['device']}")) {
      $text = exec("cut -d'|' -f3 /tmp/preclear_stat_{$dev['device']}|sed 's:\^n:\<br\>:g'");
      if (strpos($text,'Total time')===false) $text = 'Preclear in progress... '.$text;