Changeset 36 for trunk/base.php
- Timestamp:
- May 6, 2009, 6:59:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base.php
r35 r36 1 1 <?php 2 3 $Types = array(); 4 $TypeDefinitionList = array(); 5 $Lists = array(); 2 6 3 7 function GetListTableName($List) … … 19 23 } 20 24 21 if($Title == '') $Output .= '<div>'.$List['Title'].'</div>'; 22 else $Output .= '<div>'.$Title.'</div>'; 25 if(!array_key_exists('OrderDirection', $_SESSION)) $_SESSION['OrderDirection'] = 0; 26 if($Title == '') $Output = '<div>'.$List['Title'].'</div>'; 27 else $Output = '<div>'.$Title.'</div>'; 23 28 $Output .= '<table class="WideTable"><tr>'; 24 29 foreach($List['Items'] as $Item) … … 174 179 if($Type['BaseType'] != 'PointerOneToMany') 175 180 { 181 if($Item['Required'] == 1) $Required = '*'; else $Required = ''; 176 182 if($Item['Editable'] == 1) 177 183 { … … 189 195 ); 190 196 $Form->OnSubmit = '?Action=EditItemFinish&Item='.$Id; 191 $Output .= $Form->ShowEditForm(); 197 $Output = $Form->ShowEditForm(); 198 if(array_key_exists('Column', $_GET)) $Column = $_GET['Column']; else $Column = ''; 199 if(array_key_exists('ColumnValue', $_GET)) $ColumnValue = $_GET['ColumnValue']; else $ColumnValue = ''; 192 200 if(($Column != '') and ($ColumnValue != 0)) 193 201 { … … 480 488 while($DbRow2 = $DbResult2->fetch_assoc()) 481 489 { 490 $List = GetListDefinition($DbRow2['Id']); 482 491 if(CheckPermission('Read', $DbRow2[$List['IdName']])) 483 492 $Group .= '<a href="?Action=ShowList&Table='.$DbRow2['Id'].'">'.$DbRow2['Title'].'</a><br />'; … … 495 504 //print_r($_SESSION); 496 505 $PermanentVar = array('Table', 'Item', 'Column', 'ColumnValue', 'Action'); 506 if(array_key_exists('Table', $_GET)) 497 507 if($_GET['Table'] != $_SESSION['Table']) 498 508 { … … 508 518 { 509 519 $List = GetListDefinition($_SESSION['Table']); 510 if($List == NULL) SystemMessage('Zobrazení stránky', 'Seznam id '.$_SESSION['Table'].' nenalezen!'); 511 //echo($_SESSION['Table']); 512 //print_r($List); 513 if(array_key_exists('Action', $_SESSION)) 520 if(is_null($List)) $Output .= SystemMessage('Zobrazení stránky', 'Seznam id '.$_SESSION['Table'].' nenalezen!'); 521 else if(array_key_exists('Action', $_SESSION)) 514 522 { 515 523 switch($_SESSION['Action']) … … 581 589 } 582 590 $Lists[$List['Id']] = $List; 583 } else $Lists[$List['Id']] = NULL; 591 } else 592 { 593 $Lists[$Id] = NULL; 594 } 584 595 } 585 596 return($Lists[$Id]);
Note:
See TracChangeset
for help on using the changeset viewer.