';
/* 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.='
Main
';
$cDebug.='
Second
';
$cDebug.='
Third
';
$cDebug.='
Fourth
';
$cDebug.='
Href
';
$cDebug.='
Icon
';
$cDebug.='
Error
';
$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.='
'.$tmp_value['MainLevel'].'
';
$cDebug.='
'.$tmp_value['SecondLevel'].'
';
$cDebug.='
'.$tmp_value['ThirdLevel'].'
';
$cDebug.='
'.$tmp_value['FourthLevel'].'
';
$cDebug.='
'.$tmp_value['APPHref'].'
';
$cDebug.='
'.(!empty($tmp_value['Icon'])?'':'').'
';
$cDebug.='
'.$tmp_value['Error'].'
';
$cDebug.='
';
}
$cDebug.='
';
echo $cDebug;
}
/* -----------------------------------------
Ausgabe der Softwareliste in HTML Form
------------------------------------------- */
$cLastSecondLevel=null;
$cHTML='';
$cHTML.='
';
$bNaechsteReihe=true;
$cHTML.='
Einzelanwendung
Softwarepaket
';
$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))
{
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.='
';
$cHTML.='
';
}
// MainLevel - Es gibt keine Unterteilung
if (empty($tmp_value['SecondLevel']))
{
$cHTML.='