Changeset 36 for trunk/base.php


Ignore:
Timestamp:
May 6, 2009, 6:59:26 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Různá chybová hlášení.
  • Upraveno: Zobrazení přímo skriptu a čísla řádku, ve kterém nastala chyba. Funkce již není přímo zobrazována.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base.php

    r35 r36  
    11<?php
     2
     3$Types = array();
     4$TypeDefinitionList = array();
     5$Lists = array();
    26
    37function GetListTableName($List)
     
    1923  }
    2024
    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>';
    2328  $Output .= '<table class="WideTable"><tr>';
    2429  foreach($List['Items'] as $Item)
     
    174179      if($Type['BaseType'] != 'PointerOneToMany')
    175180      {
     181        if($Item['Required'] == 1) $Required = '*'; else $Required = '';
    176182        if($Item['Editable'] == 1)
    177183        {
     
    189195  );
    190196  $Form->OnSubmit = '?Action=EditItemFinish&amp;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 = '';
    192200  if(($Column != '') and ($ColumnValue != 0))
    193201  {
     
    480488    while($DbRow2 = $DbResult2->fetch_assoc())
    481489    {
     490      $List = GetListDefinition($DbRow2['Id']);
    482491      if(CheckPermission('Read', $DbRow2[$List['IdName']]))
    483492        $Group .= '<a href="?Action=ShowList&amp;Table='.$DbRow2['Id'].'">'.$DbRow2['Title'].'</a><br />';
     
    495504  //print_r($_SESSION);
    496505  $PermanentVar = array('Table', 'Item', 'Column', 'ColumnValue', 'Action');
     506  if(array_key_exists('Table', $_GET))
    497507  if($_GET['Table'] != $_SESSION['Table'])
    498508  {
     
    508518  {
    509519    $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))
    514522    {
    515523      switch($_SESSION['Action'])
     
    581589      }
    582590      $Lists[$List['Id']] = $List;
    583     } else $Lists[$List['Id']] = NULL;
     591    } else
     592    {
     593      $Lists[$Id] = NULL;
     594    }
    584595  }
    585596  return($Lists[$Id]);
Note: See TracChangeset for help on using the changeset viewer.