Changeset 431 for trunk/is/index.php
- Timestamp:
- Oct 11, 2012, 9:15:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/is/index.php
r430 r431 34 34 { 35 35 if(array_key_exists('Table', $_SESSION)) 36 $Output .= $this->Show Table($FormClasses[$_SESSION['Table']]);36 $Output .= $this->ShowList($FormClasses[$_SESSION['Table']]); 37 37 } else 38 if($_SESSION['Action'] == 'edit') 39 { 40 $Form = new Form($_SESSION['Table']); 41 $Form->LoadValuesFromDatabase($_SESSION['Id']); 42 $Form->OnSubmit = '?a=view'; 43 $Output .= $Form->ShowEditForm(); 44 } else 45 if($_SESSION['Action'] == 'view') 46 { 47 48 } else 49 if($_SESSION['Action'] == 'delete') 50 { 51 52 } 38 if($_SESSION['Action'] == 'edit') $Output .= $this->ShowEdit(); 39 else if($_SESSION['Action'] == 'add') $Output .= $this->ShowAdd(); 40 else if($_SESSION['Action'] == 'view') $Output .= $this->ShowView(); 41 else if($_SESSION['Action'] == 'delete') $Output .= $this->ShowDelete(); 53 42 $Output .= '</td></tr></table>'; 54 43 … … 56 45 } 57 46 58 function ShowTable($FormClass) 47 function ShowEdit() 48 { 49 $Form = new Form($_SESSION['Table']); 50 $Form->LoadValuesFromDatabase($_SESSION['Id']); 51 $Form->OnSubmit = '?a=view'; 52 $Output = $Form->ShowEditForm(); 53 return($Output); 54 } 55 56 function ShowDelete() 57 { 58 $Output = ''; 59 return($Output); 60 } 61 62 function ShowAdd() 63 { 64 $Form = new Form($_SESSION['Table']); 65 $Form->OnSubmit = '?a=view'; 66 $Output = $Form->ShowEditForm(); 67 return($Output); 68 } 69 70 function ShowView() 71 { 72 $Form = new Form($_SESSION['Table']); 73 $Form->LoadValuesFromDatabase($_SESSION['Id']); 74 $Form->OnSubmit = '?a=view'; 75 $Output = $Form->ShowViewForm(); 76 $Output .= '<br/><div style="text-align: center;"><a href="?a=edit"><img alt="Upravit" title="Upravit" src="'. 77 $this->System->Link('/images/edit.png').'"/></a></div>'; 78 return($Output); 79 } 80 81 function ShowList($FormClass) 59 82 { 60 83 global $Type, $FormTypes; … … 70 93 $TableColumns[] = array('Name' => $ItemIndex, 'Title' => $FormItem['Caption']); 71 94 $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 72 $Order = GetOrderTableHeader($TableColumns, 'Name', 0); 95 if(!array_key_exists('DefaultSortColumn', $FormClass)) 96 $FormClass['DefaultSortColumn'] = 'Id'; 97 $Order = GetOrderTableHeader($TableColumns, $FormClass['DefaultSortColumn'], 0); 73 98 $Output .= $Order['Output']; 74 99
Note:
See TracChangeset
for help on using the changeset viewer.