Changeset 14


Ignore:
Timestamp:
Oct 14, 2008, 9:24:18 AM (16 years ago)
Author:
george
Message:
  • Přidáno: Typ File(soubor). Možnost uploadovat nový soubor nebo otevřít stávající uložený.
  • Přidáno: Typ DateTime(datum a čas).
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • base.php

    r13 r14  
    493493  while($DbRow = $DbResult->fetch_assoc())
    494494  {
    495     $Database->query($Query); 
     495    $Database->query($Query);
    496496  }
    497497}
  • forms.php

    r13 r14  
    2020  {
    2121    $this->DefinitionTextTypeToNumericType();
    22     $Output = '<center><form action="'.$this->OnSubmit.'" method="post"><div align="center">';
     22    $Output = '<center><form enctype="multipart/form-data" action="'.$this->OnSubmit.'" method="post"><div align="center">';
    2323    $Table = $this->ShowEditBlock();
    2424    $Output .= $this->Definition['Title'].Table($Table).$this->ShowHiddenBlock().'<input type="submit" value="'.$this->Definition['SubmitBuffonText'].'"></div></form>';
     
    4141        if(!array_key_exists($Index, $this->Values) and isset($Item['Value'])) $this->Values[$Index] = $Item['Value'];
    4242        $Edit = ExecuteTypeEvent($Item['Type'], 'OnEdit', $Item);
    43         array_push($Table['Rows'], array($Item['Caption'].':', $Edit));
     43        array_push($Table['Rows'], array($Item['Caption'], $Edit));
    4444      }
    4545    }
     
    8888      if(!array_key_exists($Item['Name'], $this->Values) and isset($Item['Value'])) $this->Values[$Item['Name']] = $Item['Value'];
    8989      $Edit = ExecuteTypeEvent($Item['Type'], 'OnView', $Item);
    90       array_push($Table['Rows'], array($Item['Caption'].':', $Edit));
     90      array_push($Table['Rows'], array($Item['Caption'], $Edit));
    9191    }
    9292    return($Table);
  • global.php

    r13 r14  
    157157}
    158158
     159$UnitNames = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB');
     160
     161function HumanSize($Value)
     162{
     163  global $UnitNames;
     164
     165  $UnitIndex = 0;
     166  while($Value > 1024)
     167  {
     168    $Value = round($Value / 1024);
     169    $UnitIndex++;
     170  }
     171  return($Value.' '.$UnitNames[$UnitIndex]);
     172}
     173
    159174?>
  • style.css

    r9 r14  
    6161  border-style: solid;
    6262  border-width: 1px;
    63   padding: 3px;
     63  padding: 1px 3px 1px 3px;
    6464}
    6565
  • types/Date.php

    r11 r14  
    11<?php
    2 
    3 $MonthList = array('0', 'Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec');
    42
    53function TypeDateOnView($Item)
    64{
    7   global $MonthList;
     5  global $MonthNames;
    86
    97  $Parts = explode('-', $Item['Value']);
    108
    11   $Output = ($Parts[2] * 1).'.'.$MonthList[$Parts[1] * 1].'.'.$Parts[0];
     9  $Output = ($Parts[2] * 1).'.'.$MonthNames[$Parts[1] * 1].' '.$Parts[0];
    1210  return($Output);
    1311}
     
    1513function TypeDateOnEdit($Item)
    1614{
    17   global $MonthList;
     15  global $MonthNames;
    1816
    1917  $Parts = explode('-', $Item['Value']);
     
    3230  {
    3331    if($Parts[1] == $I) $Selected = ' selected="1"'; else $Selected = '';
    34     $Output .= '<option value="'.$I.'"'.$Selected.'>'.$MonthList[$I].'</option>';
     32    $Output .= '<option value="'.$I.'"'.$Selected.'>'.$MonthNames[$I].'</option>';
    3533  }
    3634  $Output .= '</select>';
  • types/Float.php

    r11 r14  
    77}
    88
    9 function TypeFloatEditHtml($Item)
     9function TypeFloatOnEdit($Item)
    1010{
    1111  $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'">';
  • types/include.php

    r13 r14  
    99include('types/PointerOneToOne.php');
    1010include('types/Date.php');
     11include('types/DateTime.php');
    1112include('types/Password.php');
    1213include('types/Float.php');
    1314include('types/Hyperlink.php');
    1415include('types/Hidden.php');
     16include('types/File.php');
    1517
    1618?>
Note: See TracChangeset for help on using the changeset viewer.