Location: PHPKode > projects > LDAP Navigator > ldapnavigator-0.9.6/modules/batch/form.php
<?php

include( "./page.header.php" );

$pageTitle = "$config->appName > Batch engine";

$bachActions = array( 
	"add" => "Add attribute",
	"mod" => "Modify attribute",
	"del" => "Delete attribute",
);


echo '<div align=center>';
html::form( $PHP_SELF, "get", 'name="frm"' );
html::hidden( "A", "batch.run" );

$searchparams = $HTTP_GET_VARS;
unset( $searchparams['A'] );

HashToForm( $searchparams );

echo '<table cellspacing=0 style="padding: 4px; border: 1px solid gray;">';
echo "<caption>$pageTitle</caption>\n";

if( $statusMsg ) {
	FormLine( "&nbsp;",   $statusMsg );
}


RowN( "", "Base ",  htmlentities($searchdn) );
RowN( "", "LDAP query filter",   htmlentities($savedQ) );

RowN( "Apply action ", "Attribute", "Value" );

for( $i = 0; $i < 10; $i++ ) {

	$waction = new Popup( "act[$i]", $ldapnav_action[$i], $bachActions, $sbM );
	$wattributename = new TextInput( "attr[$i]", $ldapnav_attr[$i], $tbM );
	$wvalue = new TextInput( "val[$i]", $ldapnav_val[$i], $tbM );
	
	RowN( $waction, $wattributename, $wvalue );

}


// create button bar elements
$wRun = new Button( "Run", "formAction('batch.run' )", "", $btnM );
$wCancel = new Button( "Cancel", "history.go(-1)", "", $btnM );

// display buttons bar
echo "<tr><td class=form colspan=3 align=right>",
		$wRun->toString(), $wCancel->toString(),
	"</td></tr>\n";

echo "</table></form></div>\n";


// JS invoqued by form buttons

?>
<script language="javascript">
<!--
 
function formAction( actionStr )
{ 	
	document.frm.A.value = actionStr;
	document.frm.submit();
}

function Loadfile( url )
{
	window.location = url;
}

// -->
</script>
<?php


include("./page.footer.php");

?> 
Return current item: LDAP Navigator