Legend:
- Unmodified
- Added
- Removed
-
base.php
r15 r16 65 65 } 66 66 } 67 $Output .= '<td><a href="?Action=ViewItem&Table='.$List['TableName'].'&Item='.$DbRow['ItemId'].'"> Zobrazit</a> <a href="?Action=EditItem&Table='.$List['TableName'].'&Item='.$DbRow['ItemId'].'">Editovat</a> <a href="?Action=DeleteItem&Table='.$List['TableName'].'&Item='.$DbRow['ItemId'].'">Smazat</a></td></tr>';67 $Output .= '<td><a href="?Action=ViewItem&Table='.$List['TableName'].'&Item='.$DbRow['ItemId'].'"><img border="0" src="images/view.png" alt="Zobrazit" title="Zobrazit"></a> <a href="?Action=EditItem&Table='.$List['TableName'].'&Item='.$DbRow['ItemId'].'"><img border="0" src="images/edit.png" alt="Editovat" title="Editovat"></a> <a href="?Action=DeleteItem&Table='.$List['TableName'].'&Item='.$DbRow['ItemId'].'"><img border="0" src="images/delete.png" alt="Smazat" title="Smazat"></a></td></tr>'; 68 68 } 69 69 $Output .= '</table>'; … … 137 137 138 138 $Output .= '<td>'.$DbRow['CreationTime'].'</td>'; 139 $Output .= '<td><a href="?Action=ViewItem&Table='.$List['TableName'].'&Item='.$DbRow['Id'].'"> Zobrazit</a></td></tr>';139 $Output .= '<td><a href="?Action=ViewItem&Table='.$List['TableName'].'&Item='.$DbRow['Id'].'"><img border="0" src="images/view.png" alt="Zobrazit" title="Zobrazit"></a></td></tr>'; 140 140 } 141 141 $Output .= '</table>'; … … 210 210 $Output .= ShowViewItem($List, $Id); 211 211 $Form->Values['Column'] = $_POST['Column']; 212 $Form->Values['ItemId'] = $Id; 213 $Form->Values['ListTableName'] = $List['TableName']; 212 214 ExecuteListEvent($List['TableName'], 'OnEdit', $Form->Values); 213 215 return($Output); … … 284 286 $NewItemId = $System->Modules['DatabaseList']->AddItem($List['TableName'], $Form->Values); 285 287 $NewId = $Database->insert_id; 286 288 $System->Modules['Log']->Add($List['Id'], $NewId, $LogActionType['Add']); 287 289 $Output = 'Položka přidána'; 288 290 $Output .= ShowViewItem($List, $NewItemId); … … 350 352 } 351 353 352 function TableList($System) 353 { 354 global $Lists; 355 356 $Type = array('Uživatelské', 'Systémové'); 357 $Output = '<strong>'.$Type[$System].' seznamy:</strong><br />'; 358 foreach($Lists as $Index => $List) 359 { 360 if(($List['System'] == $System) and ($List['VisibleInMenu'] == 1)) 361 $Output .= '<a href="?Action=ShowList&Table='.$Index.'">'.$List['Title'].'</a><br />'; 354 function ShowMenu() 355 { 356 global $Lists, $Database; 357 358 $DbResult = $Database->query('SELECT t1.* FROM `SystemMenu` AS t1 LEFT JOIN `SystemMenu` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND (t1.DeletionTime IS NULL)'); 359 while($DbRow = $DbResult->fetch_assoc()) 360 { 361 $Output .= '<strong>'.$DbRow['Name'].'</strong><br />'; 362 $DbResult2 = $Database->query('SELECT t1.* FROM `SystemList` AS t1 LEFT JOIN `SystemList` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND (t1.DeletionTime IS NULL) AND (t1.`Menu` = '.$DbRow['ItemId'].')'); 363 while($DbRow2 = $DbResult2->fetch_assoc()) 364 { 365 //if(($List['System'] == $System) and ($List['VisibleInMenu'] == 1)) 366 //if(CheckPermission('Read', $List['Id'])) 367 $Output .= '<a href="?Action=ShowList&Table='.$DbRow2['TableName'].'">'.$DbRow2['Title'].'</a><br />'; 368 } 369 $Output .= '<br />'; 362 370 } 363 371 $Output .= '<br />'; … … 421 429 global $Database, $Lists; 422 430 423 $DbResult = $Database->query('SELECT t1.* FROM `SystemList` AS t1 LEFT JOIN `SystemList` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) ');431 $DbResult = $Database->query('SELECT t1.* FROM `SystemList` AS t1 LEFT JOIN `SystemList` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND (t1.DeletionTime IS NULL)'); 424 432 while($DbRow = $DbResult->fetch_assoc()) 425 433 { 426 434 $Items = array(); 427 $DbResult2 = $Database->query('SELECT t1.* FROM `SystemListItem` AS t1 LEFT JOIN `SystemListItem` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND t1.List='.$DbRow['ItemId']);435 $DbResult2 = $Database->query('SELECT t1.* FROM `SystemListItem` AS t1 LEFT JOIN `SystemListItem` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND (t1.DeletionTime IS NULL) AND (t1.List='.$DbRow['ItemId'].')'); 428 436 while($DbRow2 = $DbResult2->fetch_assoc()) 429 437 { … … 449 457 $Types = array(); 450 458 $TypeNames = array(); 451 $DbResult = $Database->query('SELECT t1.* FROM `SystemType` AS t1 LEFT JOIN `SystemType` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) ');459 $DbResult = $Database->query('SELECT t1.* FROM `SystemType` AS t1 LEFT JOIN `SystemType` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND (t1.DeletionTime IS NULL)'); 452 460 while($DbRow = $DbResult->fetch_assoc()) 453 461 { … … 503 511 function CheckPermission($Right, $ListId, $ItemId = 0) 504 512 { 505 global $Database ;513 global $Database, $System; 506 514 507 515 $DbResult = $Database->query('SELECT t1.* FROM `Permission` AS t1 LEFT JOIN `Permission` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL) AND t1.PermissionGroup = (SELECT PermissionGroup.Id FROM PermissionGroup WHERE PermissionGroup.Id=(SELECT User.PermissionGroup FROM User WHERE User.ItemId='.$System->Modules['User']->User['Id'].' ORDER BY User.Id DESC LIMIT 1) ORDER BY PermissionGroup.Id DESC LIMIT 1) AND t1.DeletionTime IS NULL AND t1.List='.$ListId);
Note:
See TracChangeset
for help on using the changeset viewer.