Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/docu/docu_select.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.13 $										  |
   +----------------------------------------------------------------------+*/

	require_once('../../include/init.inc');

	includeNaPro('file,na_functions');
	$docu_cache_path = (empty($GLOBALS['DC_ENV']->docucache) ? $GLOBALS['DC_ENV']->cachepath : $GLOBALS['DC_ENV']->docucache);
	$html_file_name = $docu_cache_path.'function_list.html';
	if (file_exists($html_file_name))
	{
		readfile($html_file_name);
		die();
	}

	function naf_create_function_selector($base_dir,&$count,$Internal=true)
	{
		$result			= '';
		$dir 			= ( $Internal ? $base_dir.'napro4/include/npf_lib/': $GLOBALS['DC_ENV']->external_func_path );
		$logArray 		= array();
		$function_array = naf_create_def($dir,$logArray);
		$last_context 	= '';
		$Internal		= ($Internal?'int':'ext');
		if (is_array($function_array))
		{
			$count = count($function_array);
			foreach($function_array as $function_name => $function_def)
			{
				if ($last_context != $function_def['context'])
				{
					$result.='
								<br>
								<b>'.$function_def['context'].'</b><br>
								<img src="../../grafik/pixel.gif" width="1" height="4"><br>
							';
					$last_context = $function_def['context'];
				}

				$result.='	<img src="../../grafik/point.gif" width="10" height="9">
							<a href="docu_show.php?function_name='.rawurlencode($function_name).'" class="menu">'.$function_name.'</a>
							<br>';


			}
		}
		return $result;
	}

	$base_dir 	= $DC_ENV->startpath;
	$temp_target= $base_dir.'external/npf_lib/na_function_def.dtd';

	if (!file_exists($temp_target))
	{
		File_MkDirs($base_dir.'external/npf_lib/');
		copy($base_dir.'napro4/include/npf_lib/na_function_def.dtd',$temp_target);
		$file_content = implode("\r\n",file($temp_target));
		$file_content = str_replace('internal CDATA "1"','internal CDATA "0"',$file_content);
		$file_handle = fopen($temp_target,'w');
		fwrite($file_handle,$file_content,strlen($file_content));
		fclose($file_handle);
	}

	$int_functions_count = 0;
	$ext_functions_count = 0;

	$int_functions = naf_create_function_selector($base_dir,$int_functions_count,true);
	$ext_functions = naf_create_function_selector($base_dir,$ext_functions_count,false);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>digiconcept/netautor/documentation select</title>
	<link rel="stylesheet" type="text/css" href="../../include/docu.css">
</head>
<body>
<base target="docu_show">

<font class="menu">

<font class="menugreen">
<?php echo($int_functions_count);?>  Internal Functions<br>
</font>
<img src="../../grafik/pixel.gif" width="1" height="4"><br>

<?php echo ($int_functions); ?>

<br><br>

<font class="menugreen">
<?php echo($ext_functions_count);?> External Functions<br>
</font>
<img src="../../grafik/pixel.gif" width="1" height="4"><br>

<?php echo ($ext_functions); ?>

<br><br><br>

</font>

</body>
</html>
<?php 
if (!headers_sent())
{
	if (File_MkDirs(dirname($html_file_name).'/') && ($file_handle=fopen($html_file_name,'wb')))
	{
		$file_content = ob_get_contents();
		fwrite($file_handle,$file_content,strlen($file_content));
		fclose($file_handle);
	}
}
?>
Return current item: Netautor Professional