<form id="myform" method="post" action="<?php echo($return_path); ?>">

<table align="center" width="<?php echo $tables_width ; ?>"  border="2" cellspacing="2" cellpadding="2" bordercolor="#ffffff" bgcolor="#000033">	
	
	<tr align="left">

		<td>
			
			<table width="100%" >
			
				<tr>
					<td align="right" width="105px">
						<label>
							<?php
								if ( $_SESSION['user_type'] == "super_user" ) {
									echo("admin");
								}
								elseif ( $_SESSION['user_type'] == "normal_user" ) {
									echo("user");
								}
								else {
									echo("?????");
								}
							?>
							:&nbsp;
						</label>
					</td>
					<td align="left" colspan="3">
						<input disabled name="aqcm_USER" id="aqcm_USER" type="text" value="<?php echo($_SESSION['login_level']);?>" size="32" class="txtField_A" style="width:320px;" title="<?php echo($_SESSION['login_level']);?>" >
					</td>
				</tr>

				<tr>
				
					<td align="right">
						<label>
							admin cible :&nbsp;
						</label>
					</td>
					
					<td align="left" colspan="3">

						<?php

							echo( '<select name="aqcm_target_admin_id" id="aqcm_target_admin_id" size="1" onchange="change()"  class="txtField_A" style="width:320px;" >' ) ;

							echo( "<option value='pas_de_choix' selected >choisir l'administrateur cible</option>" ) ;
							
							for ($i = 0; $i < sizeof($_SESSION['list_admins']); $i++) {
								
								if ( ( $_SESSION['list_admins'][$i] != $_SESSION['login'] ) && 
								     ( $_SESSION['list_admins_level'][$i] < 127 ) ) {

									echo( '<option value="' . $_SESSION['list_admins'][$i] . '" ' ) ;
									
									if ( $_SESSION['target_admin_id'] == $_SESSION['list_admins'][$i] ) {
										echo( ' ' ) ;
										echo('selected');
									}
									/*
									*/
									
									echo( '>' ) ;
									echo( $_SESSION['list_admins'][$i] . " (" . $_SESSION['list_admins_level'][$i] . ")" ) ;
									echo( '</option>' ) ;
									
								}

							}
							
							echo( '</select>' ) ;

						?>

					</td>
					
				</tr>
				
			</table>

		</td>
		
	</tr>
	
</table>

</form>

<script>
function change(){
    document.getElementById("myform").requestSubmit();
}
</script>
