'; /* Copyright (C) 2008 Technikum-Wien * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * Authors: Christian Paminger < christian.paminger@technikum-wien.at > * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > */ require_once('../../../config/cis.config.inc.php'); ?> " />

Applikationsliste

'.$cAPPName.' - '.$cAPPLink.'
'; if (empty($cAPPName) || empty($cAPPLink)) { continue; } $cAPPHref=''.$cAPPName.''; $cAPPIcon=trim((isset($xml['APP'][$i]['ICON'])?$xml['APP'][$i]['ICON']:'')); // Applikation-Array Main $arrAPPRow=array('MainLevel'=>$cAPPName,'SecondLevel'=>'','ThirdLevel'=>'','FourthLevel'=>'','APPLink'=>$cAPPLink,'APPHref'=>$cAPPHref,'Icon'=>$cAPPIcon,'Error'=>1); // SHORTCUTLIST / SHORTCUT lesen $cAPPLocation=''; $arrAPPShortcutlist=(array)$xml['APP'][$i]; if (isset($arrAPPShortcutlist['SHORTCUTLIST']) && is_array($arrAPPShortcutlist) ) { // SHORTCUT lesen $arrAPPShortcut=(array)$arrAPPShortcutlist['SHORTCUTLIST']; if(isset($arrAPPShortcut['SHORTCUT']) && !isset($arrAPPShortcut['SHORTCUT']['LOCATION'])) $arrAPPShortcut['SHORTCUT']=$arrAPPShortcut['SHORTCUT'][0]; //var_dump($arrAPPShortcut); if (isset($arrAPPShortcut['SHORTCUT']) && isset($arrAPPShortcut['SHORTCUT']['LOCATION']) ) { // Location - Path zur Anwendung aufsplitten fuer Menue $cAPPLocation=(string)$arrAPPShortcut['SHORTCUT']['LOCATION']; // den APP-Path entfernen aus der Location - wird benoetigt fuer die Softwareunterteilung $cAPPLocation=trim(str_ireplace($cSoftGridApplicationsRoot,'',$cAPPLocation)); $arrAPPRow['Error']=0; // Softwarunterteilung if (!empty($cAPPLocation)) { $cAPPDisplay=(string)$arrAPPShortcut['SHORTCUT']['DISPLAY']; if (!empty($cAPPDisplay)) { $arrAPPRow['APPHref']=''.$cAPPDisplay.''; } $arrLevel=explode('\\',$cAPPLocation); if (is_array($arrLevel) && count($arrLevel)<1) { $arrLevel=explode('/',$cAPPLocation); } $arrAPPRow['SecondLevel']=trim((isset($arrLevel[0])?$arrLevel[0]:'')); $arrAPPRow['ThirdLevel']=trim((isset($arrLevel[1])?$arrLevel[1]:'')); $arrAPPRow['FourthLevel']=trim((isset($arrLevel[2])?$arrLevel[2]:'')); } } } // Sortkey umwandeln auf Kleinbuchstaben $cSort=strtolower($arrAPPRow['SecondLevel'].$arrAPPRow['ThirdLevel'].$arrAPPRow['FourthLevel'].' '.$i); // Hinzufuegen der Applikation zur Softwareliste - Array if ($debug || empty($tmp_value['Error']) ) { $arrAPPMENUE[$cSort]=$arrAPPRow; } } // Ende XML Verarbeiten // Plausib ob Daten ermittelt werden konnten fuer die HTML Liste if (!is_array($arrAPPMENUE) || count($arrAPPMENUE)<1) { die('Keine Daten gefunden.'); } // Array Sort nach Key ksort($arrAPPMENUE); #krsort($arrAPPMENUE); // DebugMode if ($debug) { $cDebug=''; $cDebug.="

XML Datei - $cXMLFile - wird verarbeitet.

"; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; reset($arrAPPMENUE); $cLastSecondLevel=null; while (list( $tmp_key, $tmp_value ) = each($arrAPPMENUE)) { if (isset($tmp_value['Error']) && !empty($tmp_value['Error']) ) { $cDebug.=''; } else { $cDebug.=''; } $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; $cDebug.=''; } $cDebug.='
MainSecondThirdFourthHrefIconError
'.$tmp_value['MainLevel'].''.$tmp_value['SecondLevel'].''.$tmp_value['ThirdLevel'].''.$tmp_value['FourthLevel'].''.$tmp_value['APPHref'].''.(!empty($tmp_value['Icon'])?'Icon':'').''.$tmp_value['Error'].'
'; echo $cDebug; } /* ----------------------------------------- Ausgabe der Softwareliste in HTML Form ------------------------------------------- */ $cLastSecondLevel=null; $cHTML=''; $cHTML.=''; $bNaechsteReihe=true; $cHTML.=''; $cHTML.=''; $cHTML.=''; $cHTML.='
EinzelanwendungSoftwarepaket
'; reset($arrAPPMENUE); while (list( $tmp_key, $tmp_value ) = each($arrAPPMENUE)) { $cAPPMainLevel=(isset($tmp_value['MainLevel'])?$tmp_value['MainLevel']:''); $cAPPLink=(isset($tmp_value['APPLink'])?$tmp_value['APPLink']:''); if (empty($cAPPMainLevel) || empty($cAPPLink)) { continue; } if (isset($tmp_value['Error']) && !empty($tmp_value['Error']) ) { continue; } if (isset($cClass) && $cClass=='row2') { $cClass='row1'; } else { $cClass='row2'; } if ($bNaechsteReihe && !empty($tmp_value['SecondLevel'])) { $bNaechsteReihe=false; $cHTML.='
'; } // MainLevel - Es gibt keine Unterteilung if (empty($tmp_value['SecondLevel'])) { $cHTML.=''; $cHTML.=''; $cHTML.=''; } else if ($cLastSecondLevel!=strtolower($tmp_value['SecondLevel'])) { $cLastSecondLevel=strtolower($tmp_value['SecondLevel']); $cKeyMD5=md5($cLastSecondLevel.$cClass); $cHTML.=''; $cHTML.=''; $cHTML.=''; } $cLastSecondLevel=strtolower($tmp_value['SecondLevel']); } $cHTML.='
'.(!empty($tmp_value['Icon'])?'Icon':'').' '.$tmp_value['APPHref'].' 
'.$tmp_value['SecondLevel'].' 
anzeigen ausblenden
'; $cHTML.='
'.SecondLevel($arrAPPMENUE,$cLastSecondLevel).'
'; echo $cHTML; function SecondLevel($arrAPPMENUE,$cSearchSecondLevel) { $cLastThirdLevel=null; $cHTML=''; reset($arrAPPMENUE); while (list( $tmp_key, $tmp_value ) = each($arrAPPMENUE)) { $cAPPMainLevel=(isset($tmp_value['MainLevel'])?$tmp_value['MainLevel']:''); $cAPPLink=(isset($tmp_value['APPLink'])?$tmp_value['APPLink']:''); if (empty($cAPPMainLevel) || empty($cAPPLink)) { break; } $cLastSecondLevel=strtolower($tmp_value['SecondLevel']); if ($cSearchSecondLevel!=$cLastSecondLevel) { continue; } if (isset($cClass) && $cClass=='row2') { $cClass='row1'; } else { $cClass='row2'; } // SecondLevel - Es gibt keine ThirdLeve Unterteilung if (empty($tmp_value['ThirdLevel'])) { $cHTML.=''; $cHTML.=''; $cHTML.=''; } else if ($cLastThirdLevel!=strtolower($tmp_value['ThirdLevel'])) { $cLastThirdLevel=strtolower($tmp_value['ThirdLevel']); $cKey=md5($cLastSecondLevel.$cLastThirdLevel.$cClass); $cHTML.=''; $cHTML.=''; $cHTML.=''; } $cLastThirdLevel=strtolower($tmp_value['ThirdLevel']); } $cHTML.='
'.(!empty($tmp_value['Icon'])?'Icon':'').' '.$tmp_value['APPHref'].'
'.$tmp_value['ThirdLevel'].'
anzeigen ausblenden
'; $cHTML.='
'.ThirdLevel($arrAPPMENUE,$cSearchSecondLevel,$cLastThirdLevel).'
'; return $cHTML; } function ThirdLevel($arrAPPMENUE,$cSearchSecondLevel,$cSearchThirdLevel) { $cLastFourthLevel=null; $cHTML=''; reset($arrAPPMENUE); while (list( $tmp_key, $tmp_value ) = each($arrAPPMENUE)) { $cAPPMainLevel=(isset($tmp_value['MainLevel'])?$tmp_value['MainLevel']:''); $cAPPLink=(isset($tmp_value['APPLink'])?$tmp_value['APPLink']:''); if (empty($cAPPMainLevel) || empty($cAPPLink)) { break; } $cLastSecondLevel=strtolower($tmp_value['SecondLevel']); $cLastThirdLevel=strtolower($tmp_value['ThirdLevel']); if ($cSearchSecondLevel!=$cLastSecondLevel || $cSearchThirdLevel!=$cLastThirdLevel ) { continue; } if (isset($cClass) && $cClass=='row2') { $cClass='row1'; } else { $cClass='row2'; } // MainLevel - Es gibt keine Unterteilung if (empty($tmp_value['FourthLevel'])) { $cHTML.=''; $cHTML.=''; $cHTML.=''; } else if ($cLastFourthLevel!=strtolower($tmp_value['FourthLevel'])) { $cLastFourthLevel=strtolower($tmp_value['FourthLevel']); $cKey=md5($cSearchSecondLevel.$cSearchThirdLevel.$cLastFourthLevel.$cClass); $cHTML.=''; $cHTML.=''; $cHTML.=''; } $cLastFourthLevel=strtolower($tmp_value['FourthLevel']); } $cHTML.='
'.(!empty($tmp_value['Icon'])?'Icon':'').' '.$tmp_value['APPHref'].'
'.$tmp_value['FourthLevel'].'
anzeigen ausblenden
'; $cHTML.='
'.FourthLevel($arrAPPMENUE,$cSearchSecondLevel,$cSearchThirdLevel,$cLastFourthLevel).'
'; return $cHTML; } function FourthLevel($arrAPPMENUE,$cSearchSecondLevel,$cSearchThirdLevel,$cSearchFourthLevel) { $cHTML=''; reset($arrAPPMENUE); while (list( $tmp_key, $tmp_value ) = each($arrAPPMENUE)) { $cAPPMainLevel=(isset($tmp_value['MainLevel'])?$tmp_value['MainLevel']:''); $cAPPLink=(isset($tmp_value['APPLink'])?$tmp_value['APPLink']:''); if (empty($cAPPMainLevel) || empty($cAPPLink)) { break; } $cLastSecondLevel=strtolower($tmp_value['SecondLevel']); $cLastThirdLevel=strtolower($tmp_value['ThirdLevel']); $cLastFourthLevel=strtolower($tmp_value['FourthLevel']); if ($cSearchSecondLevel!=$cLastSecondLevel || $cSearchThirdLevel!=$cLastThirdLevel || $cSearchFourthLevel!=$cLastFourthLevel ) { continue; } if (isset($cClass) && $cClass=='row2') { $cClass='row1'; } else { $cClass='row2'; } $cHTML.=''; $cHTML.=''; $cHTML.=''; } $cHTML.='
'.(!empty($tmp_value['Icon'])?'Icon':'').' '.$tmp_value['APPHref'].'
'; return $cHTML; } ?>