<!-- Modal -->
<div class="modal fade" id="editfuncionariomodal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">Editar Funcionário</h4>
			</div>
			<form  method="POST" id="frmEditFuncionario" >
				<div class="modal-body">                
						<?php
						if ($_SESSION['UsuarioNivel'] == 1) { ?> 
						
							<div class="form-group input-group">
								<span class="input-group-addon"> <i class="fa fa-user-plus fa-fw"></i></span>
								
								<select name="apoio" id="apoio" class="form-control">
									
									<option value ="" >Selecione um Ponto</option>																			
									
									<?php
									
									if ($_SESSION['UsuarioNivel'] == 1 ) {
										$resultUser = mysql_query("SELECT id,nome FROM ponto WHERE id > 0 ORDER BY nome ASC");
									}
									
									if ($_SESSION['UsuarioNivel'] == 3 || $_SESSION['UsuarioNivel'] == 4) {
										$resultUser = mysql_query("SELECT id,nome FROM ponto WHERE id_apoio = ".$_SESSION['UsuarioID']." AND id > 0 ORDER BY nome ASC");
									}
									
									while ($rowUser = mysql_fetch_array($resultUser)) {
										echo '<option value="' . $rowUser['id'] . '">' . $rowUser['nome'] . '</option>';
									}
									?>

								</select>								
							</div>
						<?php 
						}    
						?>						
						<div class="form-group input-group">
							<span class="input-group-addon"> <i class="fa fa-user fa-fw"></i></span>
							<input type="text" class="form-control" name="nome" placeholder="Nome" autofocus required >
							<input type="hidden" class="form-control" name="perfil" value="5">
							<input type="hidden" class="form-control" name="id"  value="<?php echo $editar ?>" >
						</div>
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
							<input type="text" class="form-control" name="login" placeholder="Login" required>
						</div>
						 
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span>
							<input type="password" class="form-control" name="pass" placeholder="Senha" required >
						</div>
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span>
							<input type="password" class="form-control"  name="pass2" placeholder="Confirmar Senha" required>
						</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal" id="btnCancelEditFuncionario" >Cancelar</button>
					<button type="submit" class="btn btn-primary" id="btnSalvarEditFuncionario" >Salvar</button>                
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>
<!-- /.modal -->