Changeset 47 for trunk/Base/HTML
- Timestamp:
- Jul 27, 2014, 9:14:56 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 2 1 config.php 2 .project
-
- Property svn:ignore
-
trunk/Base/HTML/Form.php
r42 r47 8 8 var $Values = array(); 9 9 var $OnSubmit = ''; 10 10 11 11 function __construct($System, $FormClass) 12 12 { … … 16 16 { 17 17 $this->Values[$Index] = ''; 18 } 18 } 19 19 } 20 20 … … 36 36 if($Item['Type'] != 'Hidden') 37 37 { 38 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; 38 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; 39 39 $Edit = $this->System->Type->ExecuteTypeEvent($Item['Type'], 'OnView', 40 40 array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type'])); … … 43 43 } 44 44 $Output = '<div style="text-align: center">'.$this->Definition['Title'].'</div>'.$this->Table($Table, 'WideTable'); 45 return($Output); 45 return($Output); 46 46 } 47 47 … … 62 62 foreach($this->Definition['Items'] as $Index => $Item) 63 63 { 64 if($Item['Type'] != 'Hidden') 64 if($Item['Type'] != 'Hidden') 65 65 { 66 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; 66 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; 67 67 $Edit = $this->System->Type->ExecuteTypeEvent($Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type'])); 68 68 array_push($Table['Rows'], array($Item['Caption'].':', $Edit)); … … 73 73 foreach($this->Definition['Items'] as $Index => $Item) 74 74 if($Item['Type'] == 'Hidden') $Output .= $this->System->Type->ExecuteTypeEvent($Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type'])); 75 return($Output); 75 return($Output); 76 76 } 77 77 … … 119 119 } 120 120 } 121 122 ?> -
trunk/Base/HTML/HTML.php
r42 r47 16 16 { 17 17 $Indentation = 2; 18 18 19 19 $Output = ''; 20 20 $Indent = 0; … … 30 30 } 31 31 $Line = trim(substr($Text, $Start, $End + 1)); 32 if(strlen($Line) > 0) 32 if(strlen($Line) > 0) 33 33 if($Line[0] == '<') 34 34 { 35 if($Text[$Start + 1] == '/') 35 if($Text[$Start + 1] == '/') 36 36 { 37 37 $IndentNew = $IndentNew - $Indentation; 38 38 $Indent = $IndentNew; 39 } else 39 } else 40 40 { 41 41 if(strpos($Line, ' ')) $Command = substr($Line, 1, strpos($Line, ' ') - 1); 42 42 else $Command = substr($Line, 1, strlen($Line) - $Indentation); 43 43 if(strpos($Text, '</'.$Command.'>')) $IndentNew = $IndentNew + $Indentation; 44 } 44 } 45 45 } 46 46 if($Line != '') $Output .= (str_repeat(' ', $Indent).$Line."\n"); … … 59 59 function MakeLink($Title, $Target) 60 60 { 61 return('<a href="'.$Target.'">'.$Title.'</a>'); 61 return('<a href="'.$Target.'">'.$Title.'</a>'); 62 62 } 63 63 … … 89 89 // Zobrazení číselný seznamu stránek 90 90 function PageList($QueryStringVar, $Page, $TotalCount, $CountPerPage, $Around = 10) 91 { 91 { 92 92 $QueryStringArray = $this->System->HTTP->GetQueryStringArray(); 93 93 $Count = ceil($TotalCount / $CountPerPage); … … 95 95 if($Count > 1) 96 96 { 97 if($Page > 0) 97 if($Page > 0) 98 98 { 99 99 $QueryStringArray[$QueryStringVar] = 0; … … 118 118 } 119 119 if($PagesMax < ($Count - 1)) $Result .= ' .. '; 120 if($Page < ($Count - 1)) 120 if($Page < ($Count - 1)) 121 121 { 122 122 $QueryStringArray[$QueryStringVar] = $Page + 1; … … 138 138 } 139 139 } 140 141 ?> -
trunk/Base/HTML/Table.php
r42 r47 14 14 var $TotalRowCount; 15 15 var $RowPerPage = 20; 16 16 17 17 function __construct($System, $FormClass) 18 18 { 19 19 $this->System = $System; 20 $this->Definition = $FormClass; 20 $this->Definition = $FormClass; 21 21 $this->QueryParameters = array(); 22 22 } 23 23 24 24 function CheckOrder() 25 25 { … … 33 33 { 34 34 if(array_key_exists('DefaultOrderColumn', $this->Definition)) $_GET['Column'] = $this->Definition['DefaultOrderColumn']; 35 else 35 else 36 36 { 37 37 $Keys = array_keys($this->Definition['Items']); … … 64 64 $Output .= '<div class="Pager">'.$this->PageList('Page', $this->Page, $this->TotalRowCount, $this->RowPerPage).'</div>'; 65 65 return($Output); 66 } 67 66 } 67 68 68 function LoadValuesFromDatabase($Database) 69 { 69 { 70 70 $this->CheckOrder(); 71 71 $OrderType = array('ASC', 'DESC'); … … 103 103 $this->Values[] = $Row; 104 104 } 105 } 105 } 106 106 } 107 108 ?> -
trunk/Base/HTML/XHTML.php
r42 r47 34 34 } 35 35 } 36 37 ?>
Note:
See TracChangeset
for help on using the changeset viewer.