<!-- Modal -->
<div class="modal fade" id="newsocio" 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">Novo sócio</h4>
            </div>
            <form role="form" method="POST" id="frmNewSocio" >
                <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="usuario" class="form-control">

                                <option value ="" selected >Selecione um cliente</option>

                                <?php
                                $resultUser = mysql_query("SELECT id,username FROM user WHERE nivel = 3 ORDER BY username ASC");

                                while ($rowUser = mysql_fetch_array($resultUser)) {
                                    echo '<option value="' . $rowUser['id'] . '">' . $rowUser['username'] . '</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="4">

                    </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">%</span>
                        <input min="0" max="100" type="number" class="form-control" name="porcent" placeholder="Porcentagem de Locação" 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="btnCancelarNewSocio" >Cancelar</button>
                    <button type="submit" class="btn btn-primary" id="btnSalvarNewSocio" >Salvar</button>                
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
