Changeset 597 for trunk/Modules
- Timestamp:
- Nov 22, 2013, 10:37:47 PM (11 years ago)
- Location:
- trunk/Modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/IS/IS.php
r586 r597 484 484 $LinkTitle = MakeLink($MenuItem['URL'], $LinkTitle); 485 485 } 486 if($MenuItem['IconName'] != '') $Image = '<img src="../images/favicons/'.$MenuItem['IconName'].'"/> '; 487 else $Image = '<img src="../images/favicons/blank.png"/> '; 488 $Output .= '<li>'.$Image.$LinkTitle.'</li>'; 486 if($MenuItem['IconName'] != '') $Image = '<img src="'.$this->System->Link('/images/favicons/'.$MenuItem['IconName']).'"/> '; 487 else $Image = '<img src="'.$this->System->Link('/images/favicons/blank.png').'"/> '; 488 if(!$this->System->User->CheckPermission($this->TableToModule($Table), 'Write')) 489 $Output .= '<li>'.$Image.$LinkTitle.'</li>'; 489 490 $Output .= $this->ShowMenuItem($MenuItem['Id']); 490 491 } … … 495 496 function TableToModule($Table) 496 497 { 497 $DbResult = $this->Database->query('SELECT (SELECT Name FROM Module WHERE Module.Id=Model.Module) AS Name FROM Model WHERE Name="'.$Table.'"'); 498 $DbResult = $this->Database->query('SELECT (SELECT `Name` FROM `Module` '. 499 'WHERE `Module`.`Id`=`Model`.`Module`) AS `Name` FROM `Model` WHERE `Name`="'.$Table.'"'); 498 500 if($DbResult->num_rows == 1) 499 501 { -
trunk/Modules/Portal/Portal.php
r586 r597 103 103 function ShowActions($ActionGroup) 104 104 { 105 $Output = ''; 106 $DbResult = $this->Database->query('SELECT *, `ActionIcon`.`Name` AS `Icon` FROM `Action` '. 107 'LEFT JOIN `ActionIcon` ON `ActionIcon`.`Id` = `Action`.`Icon` '. 108 'WHERE (`Group`='.$ActionGroup['Id'].') AND (`Enable` = 1)'); 105 $Output = ''; 106 $DbResult = $this->Database->query('SELECT `Id` FROM `Action` '. 107 'WHERE (`Action`.`Group`='.$ActionGroup['Id'].') AND (`Action`.`Enable` = 1)'); 109 108 while($Action = $DbResult->fetch_assoc()) 110 109 { 111 if($Action['Icon'] == '') $Action['Icon'] = 'clear.png'; 112 if(substr($Action['URL'], 0, 4) != 'http') $Action['URL'] = $this->System->Link($Action['URL']); 113 if($Action['PermissionOperation'] != '') 114 { 115 $DbResult2 = $this->Database->query('SELECT * FROM PermissionOperation'. 116 ' LEFT JOIN Module ON Module.Id=PermissionOperation.Module'. 117 ' WHERE Id='.$Action['PermissionOperation']); 118 $DbRow2 = $DbResult2->fetch_assoc(); 119 if($this->System->User->User->CheckPermission($DbRow2['Module'], $DbRow2['Operation'])) 120 $Allowed = true; else $Allowed = false; 121 } else $Allowed = true; 122 if($Allowed) 123 $Output .= '<img alt="'.$Action['Title'].'" src="images/favicons/'.$Action['Icon'].'" width="16" height="16" /> <a href="'.$Action['URL'].'">'.$Action['Title'].'</a><br />'; 110 $Output .= $this->System->ShowAction($Action['Id']); 124 111 } 125 112 return($this->Panel($ActionGroup['Name'], $Output));
Note:
See TracChangeset
for help on using the changeset viewer.