Changeset 36


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.
Location:
trunk
Files:
6 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]);
  • trunk/config.sample.php

    r35 r36  
    2222    'AdminEmail' => 'admin@localhost',
    2323    'ItemsPerPage' => 20,
    24         'ShowSQLQuery' => true,
    25         'ShowSQLError' => true,
    26         'ShowPHPError' => true,
    27         'ShowRuntimeInfo' => true,
     24    'ShowSQLQuery' => false,
     25    'ShowSQLError' => false,
     26    'ShowPHPError' => false,
     27    'ShowRuntimeInfo' => false,
    2828  ),
    2929  'User' => array
  • trunk/error.php

    r35 r36  
    2626    $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber."\n";
    2727    $Backtrace = debug_backtrace();
    28     array_shift($Backtrace);
     28    $Backtrace[0]['function'] = '';
     29    $Backtrace[0]['args'] = '';
     30    //$First = array_shift($Backtrace);
     31    print_r($First);
     32   
     33    //array_unshift($Backtrace, $First);
    2934    //array_shift($Backtrace);
    3035    //print_r($Backtrace);
     
    4954    //mail($Config['Web']['AdminEmail'], $Config['Web']['Title'].' - Chybové hlášení', $Error);
    5055        // Show error message
    51         if($Config['Web']['ShowError'] == true)
     56        if($Config['Web']['ShowPHPError'] == true)
    5257        {
    5358          echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n".
     
    5560    '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head><body>'."\n".
    5661    'Došlo k vnitřní chybě!<br> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br><br>');
    57           echo('<pre>'.$err.'</pre><br>');                      // V případě ladění chybu i zobraz
     62          echo('<pre>'.$Error.'</pre><br>');                    // V případě ladění chybu i zobraz
    5863      echo('</body></html>');
    5964        }
  • trunk/types/PointerOneToOne.php

    r31 r36  
    7272    $TargetTable = $Type['Parameters'][0];
    7373    $TargetName = $this->GetTablePointerName($Type, $Item);
    74     $Output = '<a href="?Action=ViewItem&amp;Table='.$TargetTable.'&amp;Item='.$TargetName[$List['IdName']].'">'.$TargetName['Name'].'</a>';
     74    if($TargetName != '') $Output = '<a href="?Action=ViewItem&amp;Table='.$TargetTable.'&amp;Item='.$TargetName[$List['IdName']].'">'.$TargetName['Name'].'</a>';
     75    else $Output = '';
    7576    return($Output);
    7677  }
  • trunk/types/include.php

    r29 r36  
    1919include('types/IPv4Address.php');
    2020
    21 define("TypeIntegerId", 1);
     21define('TypeIntegerId', 1);
    2222define('TypeBooleanId', 4);
    2323define('TypeStringId', 3);
  • trunk/user.php

    r35 r36  
    139139      {
    140140        $this->Database->update(array('Table' => $this->TableUser, 'Condition' => 'Id='.$Row['Id']), array('LastLoginTime' => 'NOW()'));
    141         $this->Database->update(array('Table' => $this->TableUserOnline, 'Condition' => 'SessionId="'.$SID.'"'), array('User' => $Row['Id'], 'Id' => $Row['mId']));
     141        $this->Database->update(array('Table' => $this->TableUserOnline, 'Condition' => 'SessionId="'.$SID.'"'), array('User' => $Row['Id'], 'Id' => $Row['Id']));
    142142        // načtení stavu stromu
    143143        $Result = USER_LOGGED_IN;
Note: See TracChangeset for help on using the changeset viewer.