Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/workflow/procs_suche.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.12 $										  |
   +----------------------------------------------------------------------+*/

/**
 * Search for processes.
 * @author	Marek Kadziela
 * @author	Stefan Rottensteiner
 */

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

includeNaPro( 'file,form,procs,string' );

if(isset($blank))
{
	exit();
}

$process['proc_namealt'] = (empty($process['proc_namealt']) ? '' :  $process['proc_namealt']);

// setzt die Logliste ins Selectfeld ein
function msk_select_proc($process,$suchwort='')
{
	if (empty($process['procs']))
	 return '';

	foreach( $process['procs'] as $i => $data)
	{
		if(is_file($process['proc_path'].$data) && (empty($suchwort) || (!empty($suchwort) && stristr($data,$suchwort))))
		{
			$config = array();
			include($process['proc_path'].$data);
			echo('
				<tr class="bglistgrey">
					<td align="left" valign="top" class="text">
						<a href="#" class="link" onClick="procEdit(\''.substr($data,0,-4).'\');">'.substr($data,0,-4).'</a><br>
					</td>
					<td align="left" valign="top" class="text">'.$process['proc_logpath'].'<br></td>
					<td align="left" valign="top" class="text">'.$process['procs_anz'].'<br></td>
					<td align="left" valign="top" class="text">'.$config['basic']['domax'].'<br></td>
					<td align="left" valign="top" class="text">'.$config['basic']['sleep'].'<br></td>
					<td align="right" valign="top" class="text">
						<a href="#" class="link" onClick="procEdit(\''.substr($data,0,-4).'\');">'.$GLOBALS['LOCALE']->gettext('list_edit').'&nbsp;&raquo;</a><br>
					</td>
				</tr>
			');
		}
	}
}

// Editiermodus abbrechen
if(isset($abort))
{
	$process['proc_name'] = ($editproc == 'create' ? '' : $process['proc_name'] );
	$editproc = '';
}

// Standard -Prozessverzeichnis
$process['proc_path'] = $GLOBALS['DC_ENV']->startpath.'config/workflow/';
File_MkDirs( $process['proc_path'] );
// Standard-Logverzeichnis
$process['proc_logpath'] = $GLOBALS['DC_ENV']->startpath.'logs/';
if(!empty($process['proc_name'])) File_MkDirs( $process['proc_logpath'] );

$process['log_names'] = isset($log_name)?$log_name:false;


// Prozesse einlesen, Prozessfenstergröße checken
$process['procs'] 		= get_procs($process['proc_path']);
$process['procs_anz']	= count($process['procs']);
$leer 				 	= $GLOBALS['LOCALE']->gettext('mess_empty_poclist');
$process['procs'][0] 	= ( $process['procs_anz'] > 0 ? $process["procs"][0] : $leer );

// Daten aus der Edit-Maske übergeben
if(isset($editmask))
{
	$process = convert_process($process, $params);
}

// Prozeß anzeigen
if(isset($show))	$editproc = 'show';

// Prozeß bearbeiten
if(isset($edit))	$editproc = 'edit';

// Logverzeichnis
$process['proc_logpath'] 	= (empty($process['proc_logpath']) 		? $standardlogpath 			: $process['proc_logpath'] );
$process['proc_logpathalt'] = (empty($process['proc_logpathalt']) 	? $process['proc_logpath'] 	: $process['proc_logpathalt'] );
// Korrektur, bei falscher Benutzereingabe
$process['proc_logpath'] = (substr($process['proc_logpath'],-1) == '/' ? $process['proc_logpath'] : $process['proc_logpath'].'/' );
if(!file_exists($process['proc_logpath']) && $editproc)
{
	$DC_ENV->message[] 		= $GLOBALS['LOCALE']->gettext('mess_dir_not_found',array($process['proc_logpath']));
	$DC_ENV->errnr 			= '325';
	$process['proc_logpath']= $process['proc_logpathalt'];
	$process["patherror"] 	= 1;
}

// Daten einlesen -----
if( !empty($editproc) && $editproc != 'create' && empty($editmask) && ( !empty($process['proc_name']) || isset($logshow)) )
{
	$configfile = $process['proc_path'].$process['proc_name'].'.cfg';
	include ($configfile);
	$config['basic']['logtype'] = ($config['basic']['logtype'] == '' ? 'file' : $config['basic']['logtype']);
	$process['content'] = $config;
	$process['content']['params'] = $config['method']['params'];
	$process['focus'] = '"abort"';
}

include('procs_suche.msk');

?>
Return current item: Netautor Professional