Changeset 38 for trunk/base.php


Ignore:
Timestamp:
May 12, 2009, 11:30:51 AM (16 years ago)
Author:
george
Message:
  • Přidáno: Typy Color pro výběr barvy a Text pro psaní obsáhlejších textů.
  • Opraveno: Ukládání položek do jiných databází než v které je systém.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base.php

    r36 r38  
    5151  if(array_key_exists('OrderColumn', $_GET))
    5252  {
    53     if($_SESSION['OrderTable'] != $List['Id']) // Different table => set ascending order
     53    if(array_key_exists('OrderTable', $_SESSION) and ($_SESSION['OrderTable'] != $List['Id'])) // Different table => set ascending order
    5454      $_SESSION['OrderDirection'] = 0;
    5555    $_SESSION['OrderColumn'] = $_GET['OrderColumn'];
     
    222222      if($Type['BaseType'] != 'PointerOneToMany')
    223223      {
    224         $DefinitionItems[] = array('Name' => $Index, 'Caption' => $Item['TextBefore'].$Required, 'Value' => $DbRow[$Index], 'SourceTable' => $List['Id'], 'SourceItemId' => $DbRow[$List['IdName']], 'Type' => $Item['Type']);
    225       }
     224        if($Item['Editable'] == 1)
     225        {
     226          $DefinitionItems[] = array('Name' => $Index, 'Caption' => $Item['TextBefore'], 'Value' => $DbRow[$Index], 'SourceTable' => $List['Id'], 'SourceItemId' => $DbRow[$List['IdName']], 'Type' => $Item['Type']);
     227        } else $DefinitionItems[] = array('Name' => $Index, 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $DbRow[$Index]);
     228      }
    226229    }
    227230  }
     
    239242  $Output = 'Změny uloženy.';
    240243  $Output .= ShowViewItem($List, $Id);
    241   $Form->Values['Column'] = $_POST['Column'];
     244  if(array_key_exists('Column', $_POST)) $Form->Values['Column'] = $_POST['Column'];
     245    else $Form->Values['Column'] = '';
    242246  $Form->Values['Id'] = $Id;
    243247  $Form->Values['ListTableName'] = $List['TableName'];
     
    279283  );
    280284  $Form->OnSubmit = '?Action=AddItemFinish';
    281   $Output .= $Form->ShowEditForm().$AfterTableOutput;
     285  $Output = $Form->ShowEditForm().$AfterTableOutput;
    282286  if(($Column != '') and ($ColumnValue != 0))
    283287  {
     
    297301  $DefinitionItems = array();
    298302  $AfterTableOutput = '';
     303  if(array_key_exists('Column', $_GET)) $Column = $_GET['Column']; else $Column = '';
    299304  foreach($List['Items'] as $Item)
    300305  {
     
    401406  $DefinitionItems = array();
    402407  $AfterTableOutput = '';
     408  if(array_key_exists('Column', $_GET)) $Column = $_GET['Column']; else $Column = '';
    403409  foreach($List['Items'] as $Item)
    404410  {
     
    425431  );
    426432  $Form->OnSubmit = '?Action=Search';
    427   $Output .= $Form->ShowEditForm();
     433  $Output = $Form->ShowEditForm();
    428434  return($Output);
    429435}
     
    436442  $DefinitionItems = array();
    437443  $AfterTableOutput = '';
     444  if(array_key_exists('Column', $_GET)) $Column = $_GET['Column']; else $Column = '';
    438445  foreach($List['Items'] as $Item)
    439446  {
     
    649656    $ListObject = $ListDefinition['Class'];
    650657    if(is_callable(array($ListObject, $Event))) return($ListObject->$Event($Parameters));
    651       else return($ListDefinition['TableName'].'->'.$Event.'('.$List.')');
    652   } else return($ListDefinition['TableName'].'->'.$Event.'('.$List.')');
     658      else return($ListDefinition['TableName'].'->'.$Event.'('.$Table.')');
     659  } else return($ListDefinition['TableName'].'->'.$Event.'('.$Table.')');
    653660}
    654661
Note: See TracChangeset for help on using the changeset viewer.