Changeset 27
- Timestamp:
- Dec 8, 2008, 8:41:25 AM (16 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
base.php
r26 r27 11 11 } 12 12 13 if($Title == '') $Output = '<div>'.$List['Title'].'</div>';14 else $Output = '<div>'.$Title.'</div>';13 if($Title == '') $Output .= '<div>'.$List['Title'].'</div>'; 14 else $Output .= '<div>'.$Title.'</div>'; 15 15 $Output .= '<table class="WideTable"><tr>'; 16 16 foreach($List['Items'] as $Item) … … 80 80 if(strlen($PageList) != 0) $Output .= $PageList.'<br />'; 81 81 if(CheckPermission('Write', $List['ItemId'])) $Output .= ' <a href="?Action=AddItem&Table='.$List['ItemId'].$ColumnSelection.'">Přidat</a> '.$FullListLink; 82 if(CheckPermission('Read', $List['ItemId'])) $Output .= ' <a href="?Action=ShowSearch&Table='.$List['ItemId'].$ColumnSelection.'">Hledat</a> '.$FullListLink; 82 83 return($Output); 83 84 } … … 374 375 } 375 376 377 function ShowSearch($List) 378 { 379 global $Database; 380 381 if(!CheckPermission('Read', $List['ItemId'])) return(SystemMessage('Řízení přístupu', 'Nemáte dostatečná oprávnění')); 382 $DefinitionItems = array(); 383 $AfterTableOutput = ''; 384 foreach($List['Items'] as $Item) 385 { 386 //echo($Item['Name'].','); 387 $Type = GetTypeDefinition($Item['Type']); 388 if(($Type['BaseType'] != 'PointerOneToMany') and ($Item['Name'] != $Column)) 389 { 390 if($Item['Editable'] == 1) 391 $DefinitionItems[] = array('Name' => $Item['Name'], 'Type' => $Item['Type'], 'Caption' => $Item['TextBefore'], 'Value' => '', 'SourceTable' => $List['ItemId'], 'SourceItemId' => 0); 392 } else 393 if($Item['Name'] == $Column) 394 { 395 $DefinitionItems[] = array('Name' => $Column, 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $ColumnValue); 396 } 397 } 398 $DefinitionItems[] = array('Name' => 'Column', 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $Column); 399 400 $Form = new Form(); 401 $Form->Definition = array 402 ( 403 'Title' => 'Hledání', 404 'SubmitBuffonText' => 'Vyhledat', 405 'Items' => $DefinitionItems, 406 ); 407 $Form->OnSubmit = '?Action=Search'; 408 $Output .= $Form->ShowEditForm(); 409 return($Output); 410 } 411 412 function Search($List) 413 { 414 global $Database, $System, $LogActionType; 415 416 if(!CheckPermission('Write', $List['ItemId'])) return(SystemMessage('Řízení přístupu', 'Nemáte dostatečná oprávnění')); 417 $System->Modules['Log']->Add($List['ItemId'], $Id, $LogActionType['Delete']); 418 $System->Modules['DatabaseList']->DeleteItem($List['ItemId'], $Id); 419 $Output = 'Položka smazána.'; 420 $Output .= ShowList($List, $_SESSION['Column'], $_SESSION['ColumnValue']).'<br /><br />'; 421 ExecuteListEvent($List['ItemId'], 'OnDelete', $Id); 422 return($Output); 423 424 $Output = ShowList($List); 425 return($Output); 426 } 427 376 428 function ShowMenu() 377 429 { … … 395 447 return($Output); 396 448 } 449 397 450 398 451 function Output() … … 419 472 switch($_SESSION['Action']) 420 473 { 474 case 'ShowSearch': 475 $Output = ShowSearch($List); 476 break; 421 477 case 'EditItem': 422 478 $Output = ShowEditItem($List, $_SESSION['Item']); -
config.sample.php
r25 r27 1 1 <?php 2 2 3 $Config = array( 4 'Database' => array( 3 $Config = array 4 ( 5 'Database' => array 6 ( 5 7 'Host' => 'localhost', 6 8 'User' => 'webis', … … 10 12 'Charset' => 'utf8', 11 13 ), 12 'Web' => array( 14 'Web' => array 15 ( 16 'Charset' => 'UTF-8', 17 'Host' => 'localhost', 18 'RootFolder' => 'http://localhost/webis', 19 'Description' => 'Web information system', 20 'Title' => 'Webis', 21 'Admin' => 'Admin', 22 'AdminEmail' => 'admin@localhost', 13 23 'ItemsPerPage' => 20, 14 24 ), -
lists/SystemListItem.php
r26 r27 30 30 { 31 31 $this->RebuildOrder(); 32 32 } 33 33 34 34 function OnDelete($Parameters)
Note:
See TracChangeset
for help on using the changeset viewer.