<?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.7 $
* @author Stefan Rottensteiner
*/
require_once('../../include/init.inc');
if(!$USER->check_feature('Admin'))
{
$USER->login_call();
}
// --- include necessary functions
includeNaPro( 'form' );
$LOCALE->textdomain('index');
$GFX_Path = $GLOBALS["DC_ENV"]->indexpath."grafik/";
if (!isset($source_path)) $source_path=array();
if (is_string($source_path)) $source_path=explode(" ",$source_path);
if (empty($target_path)) $target_path=$source_path[max(count($source_path)-1,0)];
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><?php echo $LOCALE->gettext('idx_merge'); ?></title>
</head>
<link rel="stylesheet" type="TEXT/CSS" media="screen" href="../../include/netautor.css">
<body class="body2">
<script>
function simulate_button(name,wert,ask)
{
if(ask)
{
doit=confirm(ask);
}
else
{
doit=true;
}
if(doit)
{
document.forms[0].action=document.forms[0].action+"?"+name+"="+escape(wert);
window.setTimeout("document.forms[0].submit();",300);
}
}
</script>
<form action="merge_index.php" method="post">
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><img src="../../grafik/findex/kopf.gif" border="0" alt=""></td>
</tr>
<tr>
<td valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="white" width="138"><img src="../../grafik/findex/links.gif"></td>
<td bgcolor="white" width="203" align="center"><a href="#znuf" onclick="simulate_button('command_ok','command_ok')"><img src="../../grafik/findex/ok.gif" alt="<? echo(get_lang('ok','button')); ?>" border="0" /></a> <a href="#znuf" onclick="window.close()" ><img src="../../grafik/findex/back.gif" alt="<? echo(get_lang('cancel','button')); ?>" border="0" /></a></td>
<td bgcolor="white" width="143"><img src="../../grafik/findex/rechts.gif"></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="484">
<tr>
<td width="7" background="../../grafik/findex/leiste_links.gif"><img src="../../grafik/findex/leiste_links.gif" border="0"></td>
<td align="center" width="464" bgcolor="#ececec">
<br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<?
reset($source_path);
while(List($Number,$Path)=each($source_path))
{
echo("<tr><td><img alt='".($LOCALE->gettext('directory_source'))."' src='".$GFX_Path."index_source_dir.gif' border='0'></td><td><font class='fixklein'><input type='text' size='35' value='$Path' name='source_path[$Number]'></font></td></tr>\r\n");
if (!strpos("index.swish-e",strtolower($Path)))
{
$source_path[$Number]=$Path."/index.swish-e";
}
}
echo("<tr ><td height='2' colspan='2'><hr></td></tr>\r\n");
echo("<tr><td><img alt='".($LOCALE->gettext('directory_target'))."' src='".$GFX_Path."index_target_dir.gif' border='0'></td><td><font class='fixklein'><input type='text' size='35' value='$target_path' name='target_path'></font></td></tr>\r\n");
if (!strpos("index.swish-e",strtolower($target_path)))
{
$target_path.="/index.swish-e";
}
?>
</table>
</td>
<td width="13" background="../../grafik/findex/leiste_rechts.gif"><img src="../../grafik/findex/leiste_rechts.gif" border="0"></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="../../grafik/findex/unten.gif" border="0"></td>
</tr>
</table>
<?
if(!empty($command_ok))
{
includeNaPro( 'swish' );
$SW= create_Swish();
$e = $SW->mergeIndizes($source_path,$target_path);
$e = implode("<br>",&$e);
if ($e) echo("<center>$e</center>");
}
?>
</form>
</body>
</html>