Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/npf/npf_edit.php
<?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.21 $										  |
   +----------------------------------------------------------------------+*/

/**
 * Main editor mask for Netautor functions
 * @author	Stefan Rottensteiner 
 */

	require_once('../../include/init.inc');
if(!$GLOBALS['USER']->check_feature('Admin') && !$GLOBALS['USER']->check_feature('ac_functions'))
{
	$GLOBALS['USER']->login_call();
}

includeNaPro('array,xml');

// Textdomain auf 'functions' setzen
$GLOBALS['LOCALE']->textdomain('functions');

// Beim Einlesen die Original-Beschreibung der Funktionen. Wird durch Reloads im Laufe der Zeit geändert und später dann geschrieben
session_register('OriginalFunctionDescript');
// Liste aller Funktionen
session_register('FunctionList');
// Liste aller Kontexte
session_register('ContextList');

// Mögliche Sprachen für die Beschreibungstext
// value/text der Option-Boxen
$AvailableLanguages	=	array	('en'=>'en','de'=>'de');

	$StardardXMLHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
<!DOCTYPE NA_FUNCTION_DESCRIPT SYSTEM \"na_function_def.dtd\">
<!--
   *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
   | 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  									      |
   *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
  -->
  ";
/**
 * Hilfsfunktion um aus einem geparsten Array bzw. der vom Benutzer eingegebene Definition
 * ein lesbares XML File zu machen. Es wir so weit als möglich auf Vollständigkeit und Richtigkeit 
 * geprüft. Ist also rein auf Netautor Funktionsdefinitionsfiles zugeschnitten !
 *
 * @author	Stefan Rottensteiner
 */
function NAF_makeNetautorXML($XML_Array,$options=null)
{
	$XML_String = '';
	if (empty($options)) $options=array();
	$options['level'] = max(0,intval($options['level']));

	foreach ($XML_Array as $TagName => $TagContent)
	{
		/**
		 * Tags die mit _ beginnen als temporär betrachten - sind so und so nicht im XML valid - und ignorieren
		 */
		if ($TagName[0]=='_') continue;

		foreach ($TagContent as $TagNumber => $TagDef)
		{
			$XML_String.="\r\n".str_repeat("\t",$options['level'])."<{$TagName}";
			if (!empty($TagDef['attributes']))
			{
				foreach ($TagDef['attributes'] as $AttributeName => $AttributeValue)
				{
					/**
					 * Attribute die mit _ beginnen als temporär betrachten - sind so und so nicht im XML valid - und ignorieren
		 			 */
					if ($AttributeName[0]=='_') continue;
					$XML_String.=" {$AttributeName}=\"{$AttributeValue}\"";
				}
			}
			$XML_String.=">";
			if (isset($TagDef['value']))
			{
				if (is_array($TagDef['value']))
				{
					/**
					 * Der "Wert" eines Tags sind weitere geschachtelte Tags
					 */
					$sub_options 			= $options;
					$sub_options['level'] 	= $options['level']+1;
					$XML_String.=NAF_makeNetautorXML($TagDef['value'],$sub_options);
					$XML_String.="\r\n".str_repeat("\t",$options['level'])."</{$TagName}>";
				}
				else
				{
					/**
					 * Ein Tag dessen Wert einfach ein Text ist
					 */
					$XML_String.=htmlspecialchars($TagDef['value']);
					$XML_String.="</{$TagName}>";
				}
			}
			else
			{
					$XML_String.="</{$TagName}>";
			}
		}
	}
	return $XML_String;
}

/**
 * Hilfsfunktion zum Einlesen diverse Infors über dir Funktion
 */
function NAF_readFromXML($function_def)
{
	includeNaPro('file');
	$FullFileName 	= $function_def['location'];
	$FileContent	= implode('',file($FullFileName));

	$XML_Array		= array();
	$XML_Params		= array('keep_info'	=> 'on');
	XML_ToArray($FileContent,$XML_Array,$XML_Params);

	$GLOBALS['FunctionDescript']	= array ();

	/**
	 * NA_FUNCTION_DESCRIPT ist das Root-Element eines Netautor Funktionsbeschreibungsfiles
	 */
	foreach( $XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'] as $index => $data )
	{
		if ($data['attributes']['name'] == $function_def['name'])
		{
			$GLOBALS['FunctionDescript'] = $data;
			$GLOBALS['FunctionDescript']['attributes']['_old_name'] = $GLOBALS['FunctionDescript']['attributes']['name'];
		}
	}

	$GLOBALS['FunctionDescript']['attributes']['_php_file'] = basename($FullFileName);

	$GLOBALS['OriginalFunctionDescript'] = $GLOBALS['FunctionDescript'];
	if(isset($GLOBALS['ParameterDescript'] )) unset($GLOBALS['ParameterDescript']);

	$GLOBALS['FunctionList']  	= array();
	$InternalFunctionList		= scanFunctions($GLOBALS['DC_ENV']->includepath.'npf_lib/');
	$ExternalFunctionList		= scanFunctions($GLOBALS['DC_ENV']->external_func_path);

	$GLOBALS['FunctionList'] 	 = array_merge($InternalFunctionList,$ExternalFunctionList);
	ksort($GLOBALS['FunctionList'] );

	$GLOBALS['ContextList'] 	= array();
	foreach ($GLOBALS['FunctionList'] as $index => $ShortFuncDef)
	{
		$GLOBALS['ContextList'][ $ShortFuncDef['context'] ] = $ShortFuncDef['context'];
	}
}

/**
 * Scannt ein gegebenes Verzeichnis nach Netautor Functions-Files und liest ein paar Werte aus
 * @author	Stefan Rottensteiner
 */
function scanFunctions($dir)
{
	$FunctionList = array();
	$FileList = File_getFiles($dir,'xml');
	foreach ($FileList as $index => $FileName)
	{
		$FullFileName = $dir.$FileName;

		set_time_limit(0);
		echo "<!-- scanning file [{$FullFileName}] for functions -->\r\n";
		echo str_repeat('<!-- X -->',500);
		ob_flush();

		$FileContent		= implode('',file($FullFileName));

		$FunctionMatches	= array();
		$erg				= preg_match_all("/\<FUNCTION.*\>/im",$FileContent,$FunctionMatches);

		$FunctionDef		= array	('name'=>'','status'=>0,'internal'=>0,'location'=> $FullFileName);
		foreach($FunctionMatches[0] as $index2 => $FunctionHeader)
		{
			/* Funktionsnamen auslesen */
			$Match	= array();
			$erg	= preg_match("/name\w*=\w*\"([^\"]+)\"/im",$FunctionHeader,$Match);
			$FunctionDef['name']	= $Match[1];

			/* Kontext der Funktion */
			$Match	= array();
			$erg	= preg_match("/context\w*=\w*\"([^\"]+)\"/im",$FunctionHeader,$Match);
			$FunctionDef['context']	= $Match[1];

			/* Funktionsinformationen merken */
			$FunctionList[ $FunctionDef['name'] ] = $FunctionDef;
		}
	}
	return $FunctionList;
}

/**
 * Bei Bedarf, Funktionsbeschreibung neu einlesen
 */
if (!empty($read_from_xml))
{
	NAF_readFromXML($function_def);
}

/**
 * Wenn ein aktueller oder alter Parameter Name daherkommt ..
 */
if (!empty($ParameterDescript['attributes']['name']) || !empty($ParameterDescript['attributes']['_old_name']))
{
	// Wenn _old_name leer, dann ist das ein neuer Parameter
	if (empty($ParameterDescript['attributes']['_old_name'])) $ParameterDescript['attributes']['_old_name'] = $ParameterDescript['attributes']['name'];

	foreach ($GLOBALS['OriginalFunctionDescript']['value']['PARAM'] as $index => $Parameter)
	{
		if ($ParameterDescript['attributes']['_old_name'] != $Parameter['attributes']['name']) continue;
		$GLOBALS['OriginalFunctionDescript']['value']['PARAM'][ $index ] = $ParameterDescript;
	}
}

/**
 * Umschalten auf einen anderen Parameter
 */
if (!empty($_POST['naf_switch_parameter']))
{
	if ($_POST['naf_switch_parameter'] == '[NEW]')
	{
			$_POST['naf_switch_parameter']	= '';
			$_POST['naf_active_parameter']	= '';
			$ParameterDescript	=	array	('attributes'	=>	array ('name' => ''));
	}
	else
	{
		foreach ($GLOBALS['OriginalFunctionDescript']['value']['PARAM'] as $index => $Parameter)
		{
			if ($_POST['naf_switch_parameter'] != $Parameter['attributes']['name']) continue;
			$ParameterDescript	= $Parameter;
			$_POST['naf_active_parameter'] 	= $_POST['naf_switch_parameter'];
			$_POST['naf_switch_parameter']	= '';
		}
	}
}

/**
 * Irgendetwas soll gelöscht werden .. eine Beschreibung oder ähnliches
 */
if (!empty($_POST['naf_clear_something']))
{
	$clear_somethings = explode(',',$_POST['naf_clear_something']);
	foreach ($clear_somethings as $index => $clear_something) eval("unset(\$".$clear_something.");");
}

/**
 * Irgendetwas soll hinzugefügt werden ... eine Beschreibung oder ähnliches
 */
if (!empty($_POST['naf_add_something']))
{
	$add_somethings = explode(',',$_POST['naf_add_something']);
	foreach ($add_somethings as $index => $add_something) eval("\$".$add_something." = array();");
}

// Kleine Dateinamenbereinigung
if (strpos($FunctionDescript['attributes']['_php_file'],'.')) $FunctionDescript['attributes']['_php_file'] = substr($FunctionDescript['attributes']['_php_file'],0,strrpos($FunctionDescript['attributes']['_php_file'],'.'));
// Name der aufzurufenden PHP Funktion geg. setzen
if (empty($FunctionDescript['attributes']['call'])) $FunctionDescript['attributes']['call'] = $FunctionDescript['attributes']['name'];
// Name der aufzurufenden PHP Datei geg. setzen
if (empty($FunctionDescript['attributes']['_php_file'])) $FunctionDescript['attributes']['_php_file'] = $FunctionDescript['attributes']['name'];

// Datum setzten
if (empty($FunctionDescript['attributes']['date'])) $FunctionDescript['attributes']['date'] = date('Y-m-d',time());
// Deprecated-DAtum setzten wenn notwendig
if (empty($FunctionDescript['attributes']['depricated']) && !empty($FunctionDescript['attributes']['new_name'])) $FunctionDescript['attributes']['depricated'] 		= date('Y-m-d',time());

// Mind. eine leere Beschreibung erzeugen
if (empty($FunctionDescript['value']['DESCRIPT']))
{
	$FunctionDescript['value']['DESCRIPT']	= array(array('attributes'	=> array	('lang'=>'en' ) ,
															'value'		=> ''
													));
}

// Mind. ein leeres Bespiel erzeugen
if (empty($FunctionDescript['value']['EXAMPLE']))
{
	$FunctionDescript['value']['EXAMPLE']	= array(array('attributes'	=> array	('lang'=>'en' ) ,
															'value'		=> ''
													));
}

// Mind. ein leeres Bespiel erzeugen
if (empty($FunctionDescript['value']['PARAM']))
{
	$FunctionDescript['value']['PARAM']	= array(array('attributes'	=> array	('name'=>'' ) ,
														'value'		=> array	(array('DESCRIPT'	=> array ('attributes' => array('lang'=>'en') )))
													));
}

/**
 * Funktionsbeschreibung speichern
 */
if (!empty($naf_action_save))
{
	$check = true;
	// Funktionsnamen checken
	$FunctionDescript['attributes']['name'] = preg_replace('/[^a-z_\.0-9]/','',$FunctionDescript['attributes']['name']);
	// PHP Fubktionsnamen checken
	$FunctionDescript['attributes']['call'] = preg_replace('/[^a-z_\.0-9]/','',$FunctionDescript['attributes']['call']);
	if (empty($FunctionDescript['attributes']['call'])) $FunctionDescript['attributes']['call'] = $FunctionDescript['attributes']['name'];

	// Default Kontext setzten
	if (empty($FunctionDescript['attributes']['context'])) $FunctionDescript['attributes']['context'] = 'common';

	if (empty( $FunctionDescript['attributes']['name']))
	{
		$Message	= $GLOBALS['LOCALE']->gettext('err_no_name');
		$check 		= false;
	}
	if ( $check)
	{
		$FullFileName	= $FunctionDescript['attributes']['_php_file_path'].$FunctionDescript['attributes']['_php_file'].'.xml';

		@$FileContent	= implode('',file($FullFileName));
		if (empty($FileContent)) $FileContent='';

		/**
		 * Bisheriges XML-File als Array parsen
		 */
		$XML_Array		= array();
		$XML_Params		= array('keep_info'	=> 'on');
		XML_ToArray($FileContent,$XML_Array,$XML_Params);

		$FunctionDescript['value']['PARAM'] = $GLOBALS['OriginalFunctionDescript']['value']['PARAM'];

		$_success = false;
		if (empty($FunctionDescript['attributes']['_old_name']))
		{
			/**
			 * Funktion ist neu - einfaches Anhängen an des eben geparste Array
			 */
			$XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'][] = $FunctionDescript;
			$_success = true;
		}
		else
		{
			/**
			 * Funktion ist ein Update - Alte Definition per _old_name suchen und durch neue im eben geparsten Array ersetzten
			 */
			foreach( $XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'] as $index => $data )
			{
				if ($data['attributes']['name'] == $FunctionDescript['attributes']['_old_name'])
				{
					$XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'][$index] = $FunctionDescript;
					$_success = true;
				}
			}
		}

		if (!$_success)
		{
			/**
			 * Funktion nicht gefunden usw. - einfaches Anhängen an des eben geparste Array
			 */
			$XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'][] = $FunctionDescript;
		}
		unset($_success);

		/**
		 * Nun aus dem Array wieder ein XML File machen - wegspeichern - fast fertig 
		 */
		$NewFileContent	= NAF_makeNetautorXML($XML_Array);
		$NewFileContent = $StardardXMLHeader.trim($NewFileContent);
		$FileHandle	= fopen($FullFileName,'wb');
		if ($FileHandle)
		{
			$wroteBytes	= fwrite($FileHandle,$NewFileContent,strlen($NewFileContent));
			fclose($FileHandle);
			$Message	=	$GLOBALS['LOCALE']->gettext('msg_saved');
			$manipulation_success = true;

			if (!empty($FunctionDescript['attributes']['_auto_create_function']))
			{
				$NewFileContent	=	"<?php 
/**
 *
";
				foreach ($FunctionDescript['value']['DESCRIPT'] as $index => $Description)
				{
					$NewFileContent.= "	 * ".$Description['value']."\r\n";
				}

			 	$NewFileContent.="*
 * @autor ".$FunctionDescript['value']['AUTHOR'][0]['value']['NAME'][0]['value']." <".$FunctionDescript['value']['AUTHOR'][0]['value']['EMAIL'][0]['value'].">
 * @version  \$Revision\$
 */
function ".$FunctionDescript['attributes']['name']."(&\$params,&\$values,&\$elements,&\$npf_runtime,&\$DC_ENV,&\$SQL)
{
	\$result = '';
	
	return \$result;
}

?>";
				$FullFileName = str_replace('.xml','.fnc',$FullFileName);
				if (!file_exists($FullFileName))
				{
					@$FileHandle	= fopen($FullFileName,'wb');
					if ($FileHandle)
					{
						fwrite($FileHandle,$NewFileContent,strlen($NewFileContent));
						fclose($FileHandle);
					}
				}
				$FullFileName = str_replace('.fnc','.xml',$FullFileName);
			}

			
			/**
			 * Erneutes, sauberes Einlesen der Funktionsdefinition, Funktionlist etc
			 */
			$function_def	=	array	(	'location'	=>$FullFileName,
											'name'		=>$FunctionDescript['attributes']['name']
											);
			NAF_readFromXML($function_def);
		}
		else
		{
			/**
			 * Fehler beim Öffnen der Zieldatei
			 */
			$Message	=	$GLOBALS['LOCALE']->gettext('err_file_open',array($FullFileName));
		}
	}

	{
	}
}

/**
 * Funktion löschen
 */
if (!empty($naf_action_delete))
{
	if (!empty($FunctionDescript['attributes']['_old_name']))
	{
		$FullFileName	= $FunctionDescript['attributes']['_php_file_path'].$FunctionDescript['attributes']['_php_file'].'.xml';

		if (file_exists($FullFileName))
		{
			@$FileContent	= implode('',file($FullFileName));
			if (empty($FileContent)) $FileContent='';

			/**
			 * Bisheriges XML-File als Array parsen
			 */
			$XML_Array		= array();
			$XML_Params		= array('keep_info'	=> 'on');
			XML_ToArray($FileContent,$XML_Array,$XML_Params);

			$deleted = false;
			foreach( $XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'] as $index => $data )
			{
				if ($data['attributes']['name'] == $FunctionDescript['attributes']['_old_name'])
				{
					$deleted = true;
					unset($XML_Array['NA_FUNCTION_DESCRIPT'][0]['value']['FUNCTION'][$index]);
				}
			}

			if ($deleted)
			{
				/**
				 * Nun aus dem Array wieder ein XML File machen - wegspeichern - fast fertig 
				 */
				$NewFileContent	= NAF_makeNetautorXML($XML_Array);
				$NewFileContent = $StardardXMLHeader.trim($NewFileContent);
				$FileHandle	= fopen($FullFileName,'wb');
				if ($FileHandle)
				{
					$wroteBytes	= fwrite($FileHandle,$NewFileContent,strlen($NewFileContent));
					fclose($FileHandle);
					$Message	=	$GLOBALS['LOCALE']->gettext('msg_deleted');
					$manipulation_success = true;
					/**
					 * Erneutes, sauberes Einlesen der Funktionsdefinition, Funktionlist etc
					 */
					$function_def	=	array	(	'location'	=>$FullFileName,
													'name'		=>''
													);
					NAF_readFromXML($function_def);
					$naf_action_clear = 'yes';
				}
				else
				{
					/**
					 * Fehler beim Öffnen der Zieldatei
					 */
					$Message	=	$GLOBALS['LOCALE']->gettext('err_file_open',array($FullFileName));
				}
			}
			else
			{
				$Message = $GLOBALS['LOCALE']->gettext('err_func_not found',array($FunctionDescript['attributes']['_old_name']));
			}
		}
		else
		{
			$Message	= $GLOBALS['LOCALE']->gettext('err_file_not found',array($FullFileName));
		}
	}
}

/**
 * Wenn eine Funktion erfolgreich gelöscht, angelegt oder erneuert wurde, dann
 * die Doku und die npf_functions.dat löschen
 */
if ($manipulation_success)
{
	$docu_cache_path = (empty($GLOBALS['DC_ENV']->docucache) ? $GLOBALS['DC_ENV']->cachepath : $GLOBALS['DC_ENV']->docucache);
	$docu_file_base  = $docu_cache_path.$FunctionDescript['attributes']['name'].'_';
	if (file_exists($docu_file_base.'.html'))
		unlink($docu_file_base.'.html');
	if (file_exists($docu_file_base.'de.html'))
		unlink($docu_file_base.'de.html');
	if (file_exists($docu_file_base.'en.html'))
		unlink($docu_file_base.'en.html');
	if (file_exists($docu_cache_path.'function_list.html'))
		unlink($docu_cache_path.'function_list.html');
	if (file_exists($GLOBALS['DC_ENV']->cachepath.'npf_functions.dat'))
		unlink($GLOBALS['DC_ENV']->cachepath.'npf_functions.dat');
}

/**
 * Formular leeren
 */
if (!empty($naf_action_clear))
{	// ACTION: Clear all the definitions execept location and context
	$_internal		= $FunctionDescript['attributes']['internal'];
	$_context		= $FunctionDescript['attributes']['context'];
	$_include		= $FunctionDescript['attributes']['_include'];
	$FunctionDescript=array();
	$FunctionDescript['attributes']['internal']				= $_internal;
	$FunctionDescript['attributes']['context']				= $_context;
	$FunctionDescript['attributes']['_include']				= $_include;
	$FunctionDescript['attributes']['call']					= '';
	$FunctionDescript['attributes']['tail']					= 0;
	$FunctionDescript['attributes']['_auto_create_function']= 1;

	unset($_internal);
	unset($_context);
	unset($_include);

	$GLOBALS['OriginalFunctionDescript'] = $FunctionDescript;
	$_POST['naf_switch_parameter']	= '';
	$_POST['naf_active_parameter']	= '';
	$ParameterDescript	=	array	('attributes'	=>	array ('name' => ''));
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>/digiconcept/netautor/functionmanager/edit</title>
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta http-equiv="pragma" 			content="no-cache"> 
		<meta http-equiv="cache-control" 	content="no-cache">
		<meta name		="robots" 			content="noindex">
		<link href="../../include/netautor.css" rel="stylesheet" type="text/css">	
	</head>
<script language="JavaScript" type="text/javascript">
<!--
	function switchParameter(newParameter)
	{
		var f = document.forms[0];
		f.elements['naf_switch_parameter'].value= newParameter;
		f.submit();		
	}

	function clearSomething(whatToClear){
		var f = document.forms[0];
		f.elements['naf_clear_something'].value= whatToClear;
		f.submit();		
	}

	function addSomething(whatToClear){
		var f = document.forms[0];
		f.elements['naf_add_something'].value= whatToClear;
		f.submit();		
	}

//-->
</script>
<body bgcolor="#ffffff" class="standard">
<form action="npf_edit.php" method="post">

<table width="975" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="482" align="left" valign="top">
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="474" colspan="6" align="left" valign="top" class="head">
						<img src="../../grafik/pixel.gif" width="1" height="7"><br>
						<?php echo $GLOBALS['LOCALE']->gettext('descr_basic_info');?><br>
						<img src="../../grafik/spacer_474.gif" width="474" height="24"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_name');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<input type="hidden" 	class="input136" name="FunctionDescript[attributes][_old_name]" 	value="<?php echo ($FunctionDescript['attributes']['_old_name']);?>"><br>					
						<input type="text" 		class="input136" name="FunctionDescript[attributes][name]" 		value="<?php echo ($FunctionDescript['attributes']['name']);?>"><br>
					</td>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_context');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" valign="center" class="text">
									<img src="../../grafik/pixel.gif" width="1" height="1"><br>
									<select class="select101" name="FunctionDescript[attributes][context]" >
											<option></option>									
									<?php 
										@$_POST['naf_add_context'] = trim($_POST['naf_add_context']);
										if (!empty($_POST['naf_add_context'])) 
										{
											$ContextList[ $_POST['naf_add_context'] ]	= $_POST['naf_add_context'] ;
											$FunctionDescript['attributes']['context']	= $_POST['naf_add_context'] ;
										}
										foreach ($ContextList as $index => $Context)
										{
											$selected = (	$Context == $FunctionDescript['attributes']['context'] ? 'selected' : '' );
											echo "<option value='{$Context}' $selected >{$Context}</option>\r";
										}
									?>
									</select><br>
								</td>
								<td align="left" valign="center">
									<input type="button" value="<?php echo $GLOBALS['LOCALE']->gettext('action_new_context');?>" class="buttonsmall" onclick="window.open('npf_new_context.php','neuercontext','menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=no,status=no,top='+event.y+',left='+event.x+',screenX='+event.x+',screenY='+event.y+',width=247,height=170')"><br>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_type');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" valign="center" class="text">
									<select class="select74" name="FunctionDescript[attributes][internal]" onChange="this.form.submit();">
										<option value="1" <?php if (!empty($FunctionDescript['attributes']['internal'])) echo ('selected');?>	>Internal</option>
										<option value="0" <?php if ( empty($FunctionDescript['attributes']['internal'])) echo ('selected');?> 	>External</option>
									</select><br>
								</td>
								<td align="left" valign="center" class="text">
									<?php echo $GLOBALS['LOCALE']->gettext('descr_has_tail');?><br>
								</td>
								<td align="left" valign="center" class="text">
									<select class="select50" name="FunctionDescript[attributes][tail]">
										<option value="1" <?php if (!empty($FunctionDescript['attributes']['tail'])) echo ('selected');?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','yes');?></option>
										<option value="0" <?php if ( empty($FunctionDescript['attributes']['tail'])) echo ('selected');?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','no');?></option>
									</select><br>
								</td>
								<td align="left" valign="center" class="text">
									<?php echo $GLOBALS['LOCALE']->gettext('descr_date');?><br>
								</td>
								<td align="left" valign="center" class="text">
									<input type="text" class="input136" name="FunctionDescript[attributes][date]" value="<?php echo ($FunctionDescript['attributes']['date']);?>" ><br>
								</td>
							</tr>
							<tr>
								<td width="88"><img src="../../grafik/pixel.gif" width="88" height="1"><br></td>
								<td width="55"><img src="../../grafik/pixel.gif" width="55" height="1"><br></td>
								<td width="63"><img src="../../grafik/pixel.gif" width="63" height="1"><br></td>
								<td width="35"><img src="../../grafik/pixel.gif" width="35" height="1"><br></td>
								<td width="136"><img src="../../grafik/pixel.gif" width="136" height="1"><br></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_groups_to');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="center" class="text">
						<select class="select193" name="FunctionDescript[value][GROUP][][value]" size="3" multiple>
							<?php
								foreach ($FunctionList as $index => $ShortFuncDef)
								{
									$selected	= '';
									foreach ($FunctionDescript['value']['GROUP'] as $g_index => $Group)
									{
										if ($Group['value'] == $ShortFuncDef['name'] )
										{
											$selected = 'selected';
											break;
										}
									}
									echo "<option {$selected} value='".$ShortFuncDef['name']."' >".$ShortFuncDef['name']."</option>\r";
								}

							?>
						</select><br>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_php_func');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<input type="text" class="input136" name="FunctionDescript[attributes][call]" value="<?php echo $FunctionDescript['attributes']['call']; ?>"><br>
					</td>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_create_file');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<select class="select50" name="FunctionDescript[attributes][_auto_create_function]">
							<option	value="1" <?php if(!empty($FunctionDescript['attributes']['_auto_create_function'])) echo 'selected'; ?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','yes');?></option>
							<option value="0" <?php if( empty($FunctionDescript['attributes']['_auto_create_function'])) echo 'selected'; ?>><?php echo $GLOBALS['LOCALE']->dgettext('system','no');?></option>
						</select><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_php_file');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" valign="center" class="text">
									<input readonly="readonly" onClick="window.focus();" type="text" class="input289locked" name="FunctionDescript[attributes][_php_file_path]" value="<?php echo ( empty($FunctionDescript['attributes']['internal']) ? $GLOBALS['DC_ENV']->external_func_path : $GLOBALS['DC_ENV']->includepath.'npf_lib/');?>"><br>
								</td>
								<td align="left" valign="center" class="text">
									<input type="text" class="input60" name="FunctionDescript[attributes][_php_file]" value="<?php echo $FunctionDescript['attributes']['_php_file']; ?>">.fnc<br>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixel.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="center" valign="center" class="text" style="background-color:#EDE9DF; border-left-color:#C2C2C2; border-left-width:1px; border-left-style:solid; border-right-color:#A3A3A3; border-right-width:1px; border-right-style:solid; border-top-color:#C2C2C2; border-top-width:1px; border-top-style:solid;">
						<b><?php echo $GLOBALS['LOCALE']->gettext('descr_if_deprecated');?></b><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-left-color:#C2C2C2; border-left-width:1px; border-left-style:solid; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_date');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<input type="text" class="input136" name="FunctionDescript[attributes][depricated]" value="<?php if(!empty($FunctionDescript['attributes']['depricated'])) echo $FunctionDescript['attributes']['depricated']; ?>"><br>
					</td>
					<td width="88" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_new_func');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-right-color:#A3A3A3; border-right-width:1px; border-right-style:solid; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<select class="select136">
							<option></option>
							<option>npf_clear</option>
							<option>npf_create</option>
							<option>npf_delete</option>
							<option>npf_duplicate</option>
							<option>npf_reskey</option>
							<option>npf_search</option>
							<option>npf_submit</option>
							<option>npf_update</option>
							<option>npf_update_multi</option>
						</select><br>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixel.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="top" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_description');?><br>
						<img src="../../grafik/pixel.gif" width="1" height="8"><br>
						<!-- 
						<a href="#" class="link">&raquo; <?php echo $GLOBALS['LOCALE']->gettext('descr_new_language');?></a><br>
						-->
					</td>
					<td colspan="3" width="394" align="left" valign="top" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<?php
								// Falls etwas gelöscht wurde
								$FunctionDescript['value']['DESCRIPT'] = array_values($FunctionDescript['value']['DESCRIPT']);
								$last_index = max(0,count($FunctionDescript['value']['DESCRIPT'])-1);

								foreach ($FunctionDescript['value']['DESCRIPT'] as $index => $Description)
								{
									if (empty($Description['attributes']['lang'])) $Description['attributes']['lang']='en';
								?>
							<tr>
								<td align="left" valign="top" class="text">
									<img src="../../grafik/pixel.gif" width="1" height="1"><br>
									<select class="select50" name="FunctionDescript[value][DESCRIPT][<?php echo $index; ?>][attributes][lang]">
									<?php 
									foreach($AvailableLanguages as $option_value => $option_text)
									{
										$option_selected	= ($Description['attributes']['lang'] == $option_value ? 'selected' : '' );
										echo "<option {$option_selected} value='{$option_value}'>{$option_text}</option>";
									}
									?>
									</select><br>
								</td>
								<td align="left" valign="top" class="text">
									<textarea class="textarea287big" name="FunctionDescript[value][DESCRIPT][<?php echo $index; ?>][value]"><?php echo trim(htmlspecialchars($Description['value'])); ?></textarea><?php 
									if( $index == $last_index )
									{
										echo '<a href="#" onClick="addSomething(\'FunctionDescript[value][DESCRIPT]['.($index+1).']\');"><img src="../../grafik/na_plus.gif" border="0"></a><a href="#" onClick="clearSomething(\'FunctionDescript[value][DESCRIPT]['.$index.']\');"><img src="../../grafik/na_minus.gif" border="0"></a>';
									}
									else
									{
										echo '<a href="#" onClick="clearSomething(\'FunctionDescript[value][DESCRIPT]['.$index.']\');"><img src="../../grafik/na_x.gif" border="0"></a>';
									}
									?><br>
								</td>
							</tr>								
								<?php
								}
							?>						
						</table>	
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="top" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_example');?><br>
						<img src="../../grafik/pixel.gif" width="1" height="8"><br>
						<!--
						<a href="#" class="link">&raquo; <?php echo $GLOBALS['LOCALE']->gettext('descr_new_language');?></a><br>
						-->
					</td>
					<td colspan="3" width="394" align="left" valign="top" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<?php
								$FunctionDescript['value']['EXAMPLE'] = array_values($FunctionDescript['value']['EXAMPLE']);
								$last_index = max(0,count($FunctionDescript['value']['EXAMPLE'])-1);
								foreach ($FunctionDescript['value']['EXAMPLE'] as $index => $Example)
								{
									if (empty($Example['attributes']['lang'])) $Example['attributes']['lang']='en';
								?>
							<tr>
								<td align="left" valign="top" class="text">
									<img src="../../grafik/pixel.gif" width="1" height="1"><br>
									<select class="select50" name="FunctionDescript[value][EXAMPLE][<?php echo $index; ?>][attributes][lang]">
									<?php 
									foreach($AvailableLanguages as $option_value => $option_text)
									{
										$option_selected	= ($Example['attributes']['lang'] == $option_value ? 'selected' : '' );
										echo "<option {$option_selected} value='{$option_value}'>{$option_text}</option>";
									}
									?>
									</select><br>
								</td>
								<td align="left" valign="top" class="text">
									<textarea class="textarea287big" name="FunctionDescript[value][EXAMPLE][<?php echo $index; ?>][value]"><?php echo trim(htmlspecialchars($Example['value'])); ?></textarea><?php 
									if($index == $last_index)
									{
										echo '<a href="#" onClick="addSomething(\'FunctionDescript[value][EXAMPLE]['.(1+$index).']\');"><img src="../../grafik/na_plus.gif" border="0"></a><a href="#" onClick="clearSomething(\'FunctionDescript[value][EXAMPLE]['.$index.']\');"><img src="../../grafik/na_minus.gif" border="0"></a>';
									}
									else
									{
										echo '<a href="#" onClick="clearSomething(\'FunctionDescript[value][EXAMPLE]['.$index.']\');"><img src="../../grafik/na_x.gif" border="0"></a>';
									}
									?><br>
								</td>
							</tr>								
								<?php
								}
							?>						
						</table>	
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_author');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="top" class="text">
						<input type="text" class="input377" name="FunctionDescript[value][AUTHOR][0][value][NAME][0][value]" value="<?php echo htmlspecialchars(trim($FunctionDescript['value']['AUTHOR'][0]['value']['NAME'][0]['value']));?>"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_e_mail');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<input type="text" class="input136" name="FunctionDescript[value][AUTHOR][0][value][EMAIL][0][value]" value="<?php echo htmlspecialchars(trim($FunctionDescript['value']['AUTHOR'][0]['value']['EMAIL'][0]['value']));?>"><br>
					</td>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_company');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<input type="text" class="input136" name="FunctionDescript[value][AUTHOR][0][value][COMPANY][0][value]" value="<?php echo htmlspecialchars(trim($FunctionDescript['value']['AUTHOR'][0]['value']['COMPANY'][0]['value']));?>"><br>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="center" valign="top" class="text">
						<img src="../../grafik/pixel.gif" width="1" height="2"><br>
						<input type="submit" value="<?php echo $GLOBALS['LOCALE']->gettext('action_save');?>" 		class="create"	name="naf_action_save"		>
						<input type="submit" value="<?php echo $GLOBALS['LOCALE']->gettext('action_new');?>" 		class="new"		name="naf_action_clear"		>
						<?php if(!empty($FunctionDescript['attributes']['_old_name'])): ?>
						<input type="submit" value="<?php echo $GLOBALS['LOCALE']->gettext('action_delete');?>" 	class="delete"	name="naf_action_delete"	onClick="if (confirm('<?php echo $GLOBALS['LOCALE']->gettext('msg_confirm_func_delete');?>')) {this.form.submit();}" >
						<?php endif; ?>
						<br>
					</td>
				</tr>
				<tr>
					<td width="88"><img src="../../grafik/pixel.gif" width="80" height="1"><br></td>
					<td width="153"><img src="../../grafik/pixel.gif" width="145" height="1"><br></td>
					<td width="88"><img src="../../grafik/pixel.gif" width="80" height="1"><br></td>
					<td width="153"><img src="../../grafik/pixel.gif" width="145" height="1"><br></td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
		</td>
		<td width="11"></td>
		<td width="480" align="left" valign="top">
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="474" colspan="6" align="left" valign="top" class="text">
						<img src="../../grafik/pixel.gif" width="1" height="7"><br>
						<?php echo $GLOBALS['LOCALE']->gettext('descr_avail_params');?>:<br>
						<img src="../../grafik/pixel.gif" width="1" height="7"><br>
						<?php
							$ParameterList	= array ();
							foreach ($GLOBALS['OriginalFunctionDescript']['value']['PARAM'] as $index => $Parameter)
							{
								$ParameterList[ $Parameter['attributes']['name'] ] = &$GLOBALS['OriginalFunctionDescript']['value']['PARAM'][ $index ];
								?><nobr>[ <a href="#" onClick="switchParameter('<?php echo $Parameter['attributes']['name'];?>');" class="link<?php if ($_POST['naf_active_parameter'] == $Parameter['attributes']['name']) echo 'on';?>"><?php echo $Parameter['attributes']['name'];?></a> ]</nobr><?php 
							}
							if ($_POST['naf_active_parameter']=='[NEW]') $_POST['naf_active_parameter'] = '';
							if (empty($ParameterDescript['attributes']['_old_name'])) $ParameterDescript['attributes']['_old_name'] = $ParameterDescript['attributes']['name'];
						?>
						<br>
						<br>
						<a href="#" onClick="switchParameter('[NEW]');"  class="link">&raquo; <?php echo $GLOBALS['LOCALE']->gettext('action_new_param');?></a><br>
					</td>
				</tr>
				<tr>
					<td width="88"><img src="../../grafik/pixel.gif" width="80" height="1"><br></td>
					<td width="153"><img src="../../grafik/pixel.gif" width="145" height="1"><br></td>
					<td width="88"><img src="../../grafik/pixel.gif" width="80" height="1"><br></td>
					<td width="153"><img src="../../grafik/pixel.gif" width="145" height="1"><br></td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop_arrow.gif" width="482" height="14"><br>
			
			
			
			
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="474" colspan="6" align="left" valign="top" class="head">
						<img src="../../grafik/pixel.gif" width="1" height="4"><br>
						<span class="text">Parameter</span> <?php if (!empty($ParameterDescript['attributes']['name'])) echo '('.$ParameterDescript['attributes']['name'].')'; ?><br>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_name');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<input type="hidden" 				name="ParameterDescript[attributes][_old_name]" 	value="<?php echo $ParameterDescript['attributes']['_old_name']; ?>" 	>
						<input type="text" class="input136" name="ParameterDescript[attributes][name]" 			value="<?php echo $ParameterDescript['attributes']['name']; ?>"			><br>
					</td>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_date');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text">
						<input type="text" class="input136" name="ParameterDescript[attributes][date]" value="<?php echo $ParameterDescript['attributes']['date']; ?>"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_is_explizit');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" valign="center" class="text">
									<?php if ( empty($ParameterDescript['attributes']['flag'])): ?>
									<select class="select50" name="ParameterDescript[attributes][explizit]" >
										<option value="1" <?php if (!empty($ParameterDescript['attributes']['explizit'])) echo ('selected');?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','yes');?></option>
										<option value="0" <?php if ( empty($ParameterDescript['attributes']['explizit'])) echo ('selected');?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','no');?></option>
									</select><br>									
									<?php else: ?>
										<?php echo $GLOBALS['LOCALE']->dgettext('system','no');?>
									<input type="hidden"	value="0" 	name="ParameterDescript[attributes][explizit]" >
									<?php endif; ?>
								</td>
								<td align="left" valign="center" class="text">
									<?php echo $GLOBALS['LOCALE']->gettext('descr_is_flag');?><br>
								</td>
								<td align="left" valign="center" class="text">
									<select class="select50" name="ParameterDescript[attributes][flag]" onChange="this.form.submit();">
										<option value="1" <?php if (!empty($ParameterDescript['attributes']['flag'])) echo ('selected');?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','yes');?></option>
										<option value="0" <?php if ( empty($ParameterDescript['attributes']['flag'])) echo ('selected');?> ><?php echo $GLOBALS['LOCALE']->dgettext('system','no');?></option>
									</select><br>
								</td>
							</tr>
							<tr>
								<td width="117"><img src="../../grafik/pixel.gif" width="117" height="1"><br></td>
								<td width="41"><img src="../../grafik/pixel.gif" width="41" height="1"><br></td>
								<td width="50"><img src="../../grafik/pixel.gif" width="50" height="1"><br></td>
							</tr>
						</table>
					</td>
				</tr>
				<?php
					/**
					 * Wenn das ein FLAG Paramter isst, dann diverse Einstellungen verstecken, sonst anzeigen
					 */
				?>
				<?php if ( empty($ParameterDescript['attributes']['flag'])): ?>
				<tr>
					<td width="88" align="left" valign="center" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_magic_replacer');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" valign="center" class="text">
									<select class="select80" name="ParameterDescript[attributes][magic]" >
										<option value="2" <?php if ($ParameterDescript['attributes']['magic'] =='2' ) echo ('selected');?> >None</option>
										<option value="1" <?php if ($ParameterDescript['attributes']['magic'] =='1' ) echo ('selected');?> >Protected</option>
										<option value="0" <?php if (empty($ParameterDescript['attributes']['magic'])) echo ('selected');?> >Full</option>
									</select><br>
								</td>
								<td align="left" valign="center" class="text">
									<?php echo $GLOBALS['LOCALE']->gettext('descr_quoting');?><br>
								</td>
								<td align="left" valign="center" class="text">
									<select class="select80" name="ParameterDescript[attributes][quote]" >
										<option value="0" <?php if (empty($ParameterDescript['attributes']['quote'])) echo ('selected');?> >None</option>
										<option value="1" <?php if ($ParameterDescript['attributes']['quote'] =='1' ) echo ('selected');?> >Simple</option>
										<option value="2" <?php if ($ParameterDescript['attributes']['quote'] =='2' ) echo ('selected');?> >Extended</option>
										<option value="3" <?php if ($ParameterDescript['attributes']['quote'] =='3' ) echo ('selected');?> >Ext. List</option>
									</select><br>
								</td>
								<td align="left" valign="center" class="text">
									<?php echo $GLOBALS['LOCALE']->gettext('descr_default');?><br>
								</td>
								<td align="left" valign="center" class="text">
									<input type="text" class="input75" name="ParameterDescript[value][DEFAULT][0][value]" value="<?php echo htmlspecialchars($ParameterDescript['value']['DEFAULT'][0]['value']); ?>"><br>
								</td>
							</tr>
							<tr>
								<td width="116"><img src="../../grafik/pixel.gif" width="116" height="1"><br></td>
								<td width="42"><img src="../../grafik/pixel.gif" width="42" height="1"><br></td>
								<td width="96"><img src="../../grafik/pixel.gif" width="96" height="1"><br></td>
								<td width="48"><img src="../../grafik/pixel.gif" width="48" height="1"><br></td>
								<td width="75"><img src="../../grafik/pixel.gif" width="75" height="1"><br></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="top" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_possible_values');?><br>
					</td>
					<td colspan="3" width="394" align="left" valign="center" class="text">
					<?php 
						if (empty($ParameterDescript['value']['VALUE'])) $ParameterDescript['value']['VALUE'] = array('value'=>'');
						$ParameterDescript['value']['VALUE'] = array_values($ParameterDescript['value']['VALUE']);
						$last_v_index	= max(0,count($ParameterDescript['value']['VALUE'])-1);
						foreach ($ParameterDescript['value']['VALUE'] as $v_index => $ValueDesrcipt)
						{
							?><input type="text" class="input346" value="<?php echo htmlspecialchars(trim($ValueDesrcipt['value']));?>" name="ParameterDescript[value][VALUE][<?php echo $v_index; ?>][value]"><?php

							if ($v_index == $last_v_index)
							{
								echo '<a href="#" onClick="addSomething(\'ParameterDescript[value][VALUE]['.(1+$v_index).']\');"><img src="../../grafik/na_plus.gif" border="0"></a><a href="#" onClick="clearSomething(\'ParameterDescript[value][VALUE]['.$v_index.']\');"><img src="../../grafik/na_minus.gif" border="0"></a>';
							}
							else
							{
								echo '<a href="#" onClick="clearSomething(\'ParameterDescript[value][VALUE]['.$v_index.']\');"><img src="../../grafik/na_x.gif" border="0"></a>';
							}

							?><br><?php 
						}
					?>
					</td>
				</tr>
				<?php else: ?>
					<?php 
						foreach ($ParameterDescript['value']['VALUE'] as $v_index => $ValueDesrcipt)
						{
							?><input type="hidden" value="<?php echo htmlspecialchars($ValueDesrcipt['value']);?>" name="ParameterDescript[value][VALUE][<?php echo $v_index; ?>][value]"><?php 
						}
					?>
					<input type="hidden"	value="<?php echo htmlspecialchars($ParameterDescript['value']['DEFAULT'][0]['value']); ?>" 	name="ParameterDescript[value][DEFAULT][0][value]" >					
					<input type="hidden"	value="<?php echo $ParameterDescript['attributes']['quote']; ?>" 	name="ParameterDescript[attributes][quote]" >
					<input type="hidden"	value="<?php echo $ParameterDescript['attributes']['magic']; ?>" 	name="ParameterDescript[attributes][magic]" >
				<?php endif; ?>				
				<tr>
					<td colspan="4" width="482" align="center" valign="center" class="text" style="background-color:#EDE9DF; border-left-color:#C2C2C2; border-left-width:1px; border-left-style:solid; border-right-color:#A3A3A3; border-right-width:1px; border-right-style:solid; border-top-color:#C2C2C2; border-top-width:1px; border-top-style:solid;">
						<b><?php echo $GLOBALS['LOCALE']->gettext('descr_if_param_deprecated');?></b><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-left-color:#C2C2C2; border-left-width:1px; border-left-style:solid; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_date');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<input type="text" class="input136" name="ParameterDescript[attributes][depricated]" value="<?php if(!empty($ParameterDescript['attributes']['depricated'])) echo $ParameterDescript['attributes']['depricated']; ?>" ><br>
					</td>
					<td width="88" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_new_param');?><br>
					</td>
					<td width="153" align="left" valign="center" class="text" style="background-color:#EDE9DF; border-right-color:#A3A3A3; border-right-width:1px; border-right-style:solid; border-bottom-color:#A3A3A3; border-bottom-width:1px; border-bottom-style:solid;">
						<select class="select136" name="ParameterDescript[attributes][new_name]">
							<option></option>
							<?php
								foreach ($ParameterList as $new_param_index => $NewParameterDescript)
								{
									?><option <?php if($NewParameterDescript['attributes']['name'] == $ParameterDescript['attributes']['new_name'] ) echo 'selected'; ?> value="<?php echo $NewParameterDescript['attributes']['name']; ?>" ><?php echo $NewParameterDescript['attributes']['name']?></option><?php 
								}
							?>
						</select><br>
					</td>
				</tr>
				<tr>
					<td colspan="4" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixel.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="88" align="left" valign="top" class="text">
						<?php echo $GLOBALS['LOCALE']->gettext('descr_description');?><br>
						<img src="../../grafik/pixel.gif" width="1" height="8"><br>
						<!--
						<a href="#" class="link">&raquo; <?php echo $GLOBALS['LOCALE']->gettext('descr_new_language');?></a><br>
						-->
					</td>
					<td colspan="3" width="394" align="left" valign="top" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<?php
								if (empty($ParameterDescript['value']['DESCRIPT'])) $ParameterDescript['value']['DESCRIPT'] = array('attributes' => array('lang' =>'en'));
								$ParameterDescript['value']['DESCRIPT'] = array_values($ParameterDescript['value']['DESCRIPT']);
	
								$last_index	= max(0,count($ParameterDescript['value']['DESCRIPT'])-1);
								foreach ($ParameterDescript['value']['DESCRIPT'] as $index => $Description)
								{
									if (empty($Description['attributes']['lang'])) $Example['attributes']['lang']='en';
								?>
							<tr>
								<td align="left" valign="top" class="text">
									<img src="../../grafik/pixel.gif" width="1" height="1"><br>
									<select class="select50" name="ParameterDescript[value][DESCRIPT][<?php echo $index; ?>][attributes][lang]">
									<?php 
									foreach($AvailableLanguages as $option_value => $option_text)
									{
										$option_selected	= ($Description['attributes']['lang'] == $option_value ? 'selected' : '' );
										echo "<option {$option_selected} value='{$option_value}'>{$option_text}</option>";
									}
									?>
									</select><br>
								</td>
								<td align="left" valign="top" class="text">
									<textarea class="textarea287big" name="ParameterDescript[value][DESCRIPT][<?php echo $index; ?>][value]"><?php echo trim(htmlspecialchars($Description['value'])); ?></textarea><?php 
									if ( $index == $last_index )
									{
										echo '<a href="#" onClick="addSomething(\'ParameterDescript[value][DESCRIPT]['.(1+$index).']\');"><img src="../../grafik/na_plus.gif" border="0"></a><a href="#" onClick="clearSomething(\'ParameterDescript[value][DESCRIPT]['.$index.']\');"><img src="../../grafik/na_minus.gif" border="0"></a>';
									}
									else
									{
										echo '<a href="#" onClick="clearSomething(\'ParameterDescript[value][DESCRIPT]['.$index.']\');"><img src="../../grafik/na_x.gif" border="0"></a>';
									}
									?><br>
								</td>
							</tr>								
								<?php
								}
							?>						
						</table>	
					</td>
				</tr>
				<tr>
					<td width="88"><img src="../../grafik/pixel.gif" width="80" height="1"><br></td>
					<td width="153"><img src="../../grafik/pixel.gif" width="145" height="1"><br></td>
					<td width="88"><img src="../../grafik/pixel.gif" width="80" height="1"><br></td>
					<td width="153"><img src="../../grafik/pixel.gif" width="145" height="1"><br></td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
		</td>
	</tr>
	<tr>
		<td width="482"><img src="../../grafik/pixel.gif" width="482" height="1"><br></td>
		<td width="11"><img src="../../grafik/pixel.gif" width="11" height="1"><br></td>
		<td width="482"><img src="../../grafik/pixel.gif" width="482" height="1"><br></td>
	</tr>
</table>
	<input type="hidden" value="<?php echo $_POST['naf_active_parameter']; ?>" name="naf_active_parameter" >
	<input type="hidden" value="" name="naf_switch_parameter" >
	<input type="hidden" value="" name="naf_clear_something" >
	<input type="hidden" value="" name="naf_add_something" >	
	<input type="hidden" value="" name="naf_add_context" >		
</form>

<?php if (!empty($Message)) : ?>
	<script language="JavaScript" type="text/javascript">
	<!--
		alert('<?php echo $Message;?>');		
	//-->
	</script>
<?php endif; ?>
</body>
</html>
Return current item: Netautor Professional