Changeset 526 for trunk/Modules/Portal/Portal.php
- Timestamp:
- Apr 21, 2013, 10:23:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Portal/Portal.php
r524 r526 8 8 var $ShortTitle = 'Rozcestník'; 9 9 10 function Show Links($HyperlinkGroup)10 function ShowActions($ActionGroup) 11 11 { 12 12 $Output = ''; 13 $DbResult = $this->Database->query('SELECT * FROM `Hyperlink` WHERE (`Group`='.$HyperlinkGroup['Id'].') AND (`Enable` = 1)'); 14 while($HyperLink = $DbResult->fetch_assoc()) 15 { 16 if($HyperLink['IconFile'] == '') $HyperLink['IconFile'] = 'clear.png'; 17 if(substr($HyperLink['URL'], 0, 4) != 'http') $HyperLink['URL'] = $this->System->Config['Web']['RootFolder'].$HyperLink['URL']; 18 if(($HyperLink['PermissionModule'] == '') or (($HyperLink['PermissionModule'] != '') and $this->System->User->User->CheckPermission($HyperLink['PermissionModule'], $HyperLink['PermissionOperation']))) 19 $Output .= '<img alt="'.$HyperLink['Name'].'" src="images/favicons/'.$HyperLink['IconFile'].'" width="16" height="16" /> <a href="'.$HyperLink['URL'].'">'.$HyperLink['Name'].'</a><br />'; 20 } 21 return($this->Panel($HyperlinkGroup['Name'], $Output)); 13 $DbResult = $this->Database->query('SELECT *, `ActionIcon`.`Name` AS `Icon` FROM `Action` LEFT JOIN `ActionIcon` ON `ActionIcon`.`Id` = `Action`.`Icon` '. 14 'WHERE (`Group`='.$ActionGroup['Id'].') AND (`Enable` = 1)'); 15 while($Action = $DbResult->fetch_assoc()) 16 { 17 if($Action['Icon'] == '') $Action['Icon'] = 'clear.png'; 18 if(substr($Action['URL'], 0, 4) != 'http') $Action['URL'] = $this->System->Link($Action['URL']); 19 if(($Action['PermissionModule'] == '') or (($Action['PermissionModule'] != '') and $this->System->User->User->CheckPermission($Action['PermissionModule'], $Action['PermissionOperation']))) 20 $Output .= '<img alt="'.$Action['Title'].'" src="images/favicons/'.$Action['Icon'].'" width="16" height="16" /> <a href="'.$Action['URL'].'">'.$Action['Title'].'</a><br />'; 21 } 22 return($this->Panel($ActionGroup['Name'], $Output)); 22 23 } 23 24 … … 305 306 } 306 307 307 $DbResult = $this->Database->query('SELECT * FROM ` HyperlinkGroup`');308 $DbResult = $this->Database->query('SELECT * FROM `ActionGroup`'); 308 309 while($DbRow = $DbResult->fetch_assoc()) 309 $ HyperlinkGroups[$DbRow['Id']] = $DbRow;310 $ActionGroups[$DbRow['Id']] = $DbRow; 310 311 311 312 // Show pannels … … 322 323 while($Panel = $DbResult2->fetch_assoc()) 323 324 { 324 if($Panel['Module'] == ' HyperlinkGroup') $Output .= $this->ShowLinks($HyperlinkGroups[$Panel['Parameters']]);325 if($Panel['Module'] == 'ActionGroup') $Output .= $this->ShowActions($ActionGroups[$Panel['Parameters']]); 325 326 else if($Panel['Module'] == 'OnlineHostList') $Output .= $this->Panel('Online počítače', $this->OnlineHostList()); 326 327 else if($Panel['Module'] == 'UserOptions')
Note:
See TracChangeset
for help on using the changeset viewer.