Changeset 36
- Timestamp:
- May 6, 2009, 6:59:26 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 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]); -
trunk/config.sample.php
r35 r36 22 22 'AdminEmail' => 'admin@localhost', 23 23 '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, 28 28 ), 29 29 'User' => array -
trunk/error.php
r35 r36 26 26 $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber."\n"; 27 27 $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); 29 34 //array_shift($Backtrace); 30 35 //print_r($Backtrace); … … 49 54 //mail($Config['Web']['AdminEmail'], $Config['Web']['Title'].' - Chybové hlášení', $Error); 50 55 // Show error message 51 if($Config['Web']['Show Error'] == true)56 if($Config['Web']['ShowPHPError'] == true) 52 57 { 53 58 echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n". … … 55 60 '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head><body>'."\n". 56 61 '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 zobraz62 echo('<pre>'.$Error.'</pre><br>'); // V případě ladění chybu i zobraz 58 63 echo('</body></html>'); 59 64 } -
trunk/types/PointerOneToOne.php
r31 r36 72 72 $TargetTable = $Type['Parameters'][0]; 73 73 $TargetName = $this->GetTablePointerName($Type, $Item); 74 $Output = '<a href="?Action=ViewItem&Table='.$TargetTable.'&Item='.$TargetName[$List['IdName']].'">'.$TargetName['Name'].'</a>'; 74 if($TargetName != '') $Output = '<a href="?Action=ViewItem&Table='.$TargetTable.'&Item='.$TargetName[$List['IdName']].'">'.$TargetName['Name'].'</a>'; 75 else $Output = ''; 75 76 return($Output); 76 77 } -
trunk/types/include.php
r29 r36 19 19 include('types/IPv4Address.php'); 20 20 21 define( "TypeIntegerId", 1);21 define('TypeIntegerId', 1); 22 22 define('TypeBooleanId', 4); 23 23 define('TypeStringId', 3); -
trunk/user.php
r35 r36 139 139 { 140 140 $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'])); 142 142 // načtení stavu stromu 143 143 $Result = USER_LOGGED_IN;
Note:
See TracChangeset
for help on using the changeset viewer.