<?php
/* +----------------------------------------------------------------------+
| Netautor Professional Application Server |
+----------------------------------------------------------------------+
| Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net> |
+----------------------------------------------------------------------+
| This file is subject to license, that is bundled with this package |
| in the file LICENSE.TXT, and is available at through the |
| world-wide-web at http://www.netautor.com/license/ |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| hide@address.com so we can mail you a copy. |
+----------------------------------------------------------------------+
| Authors: Stefan Rottensteiner <hide@address.com> |
| Marek Kadziela <hide@address.com> |
| Gregor Wollner |
| Christian Unger |
| Helli Kleinhans |
+----------------------------------------------------------------------+*/
/**
* @version $Revision: 1.8 $
* @author Stefan Rottensteiner
*/
require_once('../../include/init.inc');
if(!$USER->check_feature('Admin'))
{
$USER->login_call();
}
// --- include necessary functions
includeNaPro( 'array,form,string' );
$LOCALE->textdomain('index');
$GFX_Path = $GLOBALS['DC_ENV']->indexpath."grafik/";
function get_lang($topic){
return $GLOBALS['LOCALE']->gettext( $topic);
}
//++++++++++++++++++++++++++++++
function getPoolListFromUser($feature)
{
if (empty($GLOBALS['USER']->FEATURE['value'][$feature]))
{
$Result=array();
}
else
{
$fv = $GLOBALS['USER']->get_feature_value($feature);
foreach ($fv as $index => $namePath)
{
list($name,$Path)=explode('=',$namePath,2);
$Result[$index]['name']=$name;
$Result[$index]['path']=$Path;
}
}
return $Result;
}
//+++++++++++++++++++++++++++++++
if (empty($feature)) $feature = 'index_path';
$BaseDirs = getPoolListFromUser($feature);
if (!isset($selectedBaseDir)) $selectedBaseDir='';
$Indizes = array();
if (!empty($selectedBaseDir) && searchArrayValue($selectedBaseDir,$BaseDirs,true))
{
// File.fnc nachladen
includeNaPro('file');
// RealPath zum PoolNamen holen
foreach($BaseDirs as $Index => $Value)
{
if ($Value['name']==$selectedBaseDir)
{
$selectedBaseDirPath = $Value['path'];
break;
}
}
// Verzeichnis auslesen
$params= array (
'match_file' =>'.swish-e$',
'timeformat' =>'d.m.Y H:i:s',
'reallist' =>true
);
$DirContent= File_readDirectory($selectedBaseDirPath,99,$params);
foreach ($DirContent as $Key => $Value)
{
if ( !is_numeric($Key)) continue;
$NewKey = $Value['url'];
if (!isset($Value['size'])) $NewKey.=$Value['name'];
unset( $DirContent[ $Key ] );
$DirContent[ $NewKey ]['level'] = $Value['level'];
$DirContent[ $NewKey ]['hasIndex'] = ( strpos($Value['name'],'index.') === 0 );
$DirContent[ $NewKey ]['hasConfig'] = ( strpos($Value['name'],'config.') === 0 );
}
ksort($DirContent);
}
if (!empty($selectedIndizes))
{
}
include('idx_mgr.msk');
includeNaPro("swish");
$SD= create_SwishDefaultConfig();
?>