Ignore:
Timestamp:
Jul 27, 2014, 9:05:14 PM (10 years ago)
Author:
chronos
Message:
  • Opraveno: SQL aktualizace 40 plus chybějící tabulka MeasureMethod.
  • Opraveno: Neplatné ukázkové konfigurační soubory.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/View/Main.php

    r45 r46  
    2424      'caption' => 'Měsíc',
    2525      'period' => 2592000, // 3600 * 24 * 30,
    26     ), 
     26    ),
    2727    'year' => array(
    2828      'caption' => 'Rok',
     
    4646    for($I = 1; $I < 32; $I++)
    4747    {
    48       if($I == $TimeParts['mday']) $Selected = ' selected="1"'; else $Selected = ''; 
     48      if($I == $TimeParts['mday']) $Selected = ' selected="1"'; else $Selected = '';
    4949      $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>';
    5050    }
     
    5454    $Output .= '<select name="Month">';
    5555    foreach($this->Months as $Index => $Month)
    56     { 
     56    {
    5757      if($Index == $TimeParts['mon']) $Selected = ' selected="1"'; else $Selected = '';
    5858      if($Index > 0) $Output .= '<option value="'.$Index.'"'.$Selected.'>'.$Month.'</option>';
     
    6363    $Output .= '<select name="Year">';
    6464    for($I = 2000; $I < 2010; $I++)
    65     { 
     65    {
    6666      if($I == $TimeParts['year']) $Selected = ' selected="1"'; else $Selected = '';
    6767      $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>';
     
    7272    $Output .= '<select name="Hour">';
    7373    for($I = 0; $I < 24; $I++)
    74     { 
     74    {
    7575      if($I == $TimeParts['hours']) $Selected = ' selected="1"'; else $Selected = '';
    7676      $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>';
     
    8080    // Minute selection
    8181    $Output .= '<select name="Minute">';
    82     for($I = 0; $I < 60; $I++) 
     82    for($I = 0; $I < 60; $I++)
    8383    {
    8484      if($I == $TimeParts['minutes']) $Selected = ' selected="1"'; else $Selected = '';
     
    9999  {
    100100    $Debug = 0;
    101 
    102101    foreach($this->Config['Application']['DefaultVariables'] as $Index => $Variable)
    103102    {
     
    112111      $_SESSION['TimeEnd'] = time() - 60;
    113112      $_SESSION['TimeStart'] = $_SESSION['TimeEnd'] - $this->GraphTimeRanges[$_SESSION['Period']]['period'];
    114     } 
     113    }
    115114
    116115    $Output = '<div class="Title">Statistiky</div>';
     
    130129          }
    131130        }
    132         break; 
     131        break;
    133132      case 'SetTimeNow':
    134         if(array_key_exists('Time', $_GET)) 
     133        if(array_key_exists('Time', $_GET))
    135134        {
    136135          if(($_GET['Time'] == 'TimeStart') or ($_GET['Time'] == 'TimeEnd'))
     
    142141        break;
    143142    }
    144     $Output .= '<strong>Časový úsek:</strong><br>';
     143    $Output .= '<strong>Časový úsek:</strong><br/>';
    145144    // Show graf time range menu
    146145    if($_SESSION['TimeSpecify'] == 0)
     
    150149        $Output .= '<a href="?Period='.$Index.'">'.$Item['caption'].'</a>&nbsp;';
    151150      $Output .= '<br/>';
    152       $Output .= '<a href="?TimeSpecify=1">Přesnější nastavení...</a><br>';
     151      $Output .= '<a href="?TimeSpecify=1">Přesnější nastavení...</a><br/>';
    153152    } else {
    154153      $Output .= '<table cellspacing="0" cellpadding="2" border="0">';
     
    156155      $Output .= '<tr><td>Konec:</td><td>'.$this->EditTime('TimeEnd').'</td></tr>';
    157156      $Output .= '</table>';
    158       $Output .= '<a href="?TimeSpecify=0">Jednoduché nastavení...</a><br>';
     157      $Output .= '<a href="?TimeSpecify=0">Jednoduché nastavení...</a><br/>';
    159158    }
    160159    $Output .= '<br/>'.$this->Graph();
     
    162161    $Output .= '<br/>'.$this->MeasureTable();
    163162    return($Output);
    164   } 
    165  
     163  }
     164
    166165  function Graph()
    167166  {
    168167    $Output = '<strong>Graf:</strong><br/>';
    169     $Output .= '<img alt="Graf" src="?M=Graph&amp;Measure='.$_SESSION['Measure'].'&amp;From='.$_SESSION['TimeStart'].'&amp;To='.$_SESSION['TimeEnd'].'&amp;Width='.$this->Config['Application']['GraphSize']['Width'].'&amp;Height='.$this->Config['Application']['GraphSize']['Height'].'&amp;Differential='.$_SESSION['Differential'].'" width="'.$this->Config['Application']['GraphSize']['Width'].'" height="'.$this->Config['Application']['GraphSize']['Height'].'"><br>';
    170     $Output .= '<a href="?Measure='.$_SESSION['Measure'].'&amp;TimeStart='.$_SESSION['TimeStart'].'&amp;TimeEnd='.$_SESSION['TimeEnd'].'&amp;TimeSpecify=1&amp;Differential='.$_SESSION['Differential'].'">Odkaz na vybraný graf</a><br>';
     168    $Output .= '<img alt="Graf" src="?M=Graph&amp;Measure='.$_SESSION['Measure'].
     169      '&amp;From='.$_SESSION['TimeStart'].'&amp;To='.$_SESSION['TimeEnd'].'&amp;Width='.
     170      $this->Config['Application']['ImageWidth'].'&amp;Height='.$this->Config['Application']['ImageHeight'].
     171      '&amp;Differential='.$_SESSION['Differential'].'" width="'.$this->Config['Application']['ImageWidth'].
     172      '" height="'.$this->Config['Application']['ImageHeight'].'"/><br/>';
     173    $Output .= '<a href="?Measure='.$_SESSION['Measure'].'&amp;TimeStart='.$_SESSION['TimeStart'].'&amp;TimeEnd='.$_SESSION['TimeEnd'].'&amp;TimeSpecify=1&amp;Differential='.$_SESSION['Differential'].'">Odkaz na vybraný graf</a><br/>';
    171174//print_r(GetValues($Measure, $TimeStart, $TimeEnd));
    172175    return($Output);
    173176  }
    174  
     177
    175178  function MeasureTable()
    176179  {
     
    202205        $LastMeasureValue = '&nbsp;';
    203206      }
    204       if($Measure['Continuity'] == 1) $Interpolate = 'Ano'; 
     207      if($Measure['Continuity'] == 1) $Interpolate = 'Ano';
    205208        else $Interpolate = 'Ne';
    206209      if($Measure['Info'] == '') $Measure['Info'] = '&nbsp;';
     
    214217    //print_r(gd_info());
    215218    //print_r($_SESSION);
    216  
     219
    217220    //ShowPage($Output);
    218221    //echo(AddPrefixMultipliers('-0.000000071112345', 'B'));
Note: See TracChangeset for help on using the changeset viewer.