@include('forms.fbncheader')
@include('forms.fdatatables')

<div class="col-lg-10 col-lg-offset-1">



    <h1><i class="fa fa-secteurs"></i>Tables Hyperfile SIALE</h1>
    <div class="table-responsive">
        <table id="_table" class="table table-condensed table-striped table-bordered">
            <thead>
                <tr>
                    <th width='10%'>Table origine SIALE</th>
                    <th width='10%'>Table local</th> 
                    <th width='10%'>Nb Siale</th> 
                    <th width='10%'>Nb Sipre</th>
                    <th width='20%'></th>
                </tr>
            </thead>
 
            <tbody>
                @foreach ($tables as $table=>$dest)
                <?php
                    if($tablehyper_vol[$table]!=$tablesipre_vol[$table]) {
                        $class="bg-danger";
                    } else {
                        $class="bg-success";
                    }
                ?>
                <tr>
                    <td>{!! $table !!}</td>
                    <td>{!! $dest !!}</td>  
                    <td class='{!! $class !!}'>{!! $tablehyper_vol[$table] !!}</td>  
                    <td class='{!! $class !!}'>{!! $tablesipre_vol[$table] !!}</td>                   
                    <td>
                        @if(($table!="BENEF")&&($table!="ENFANTS")
                            &&($table!="BANQUE")
                            &&($table!="CONTROLE_BENEF")
                            &&($table!="COTIS")
                            &&($table!="CREANCIERS")
                            &&($table!="IMPUTATION_MDT")
                            &&($table!="JOURNAL")
                            &&($table!="JOURNA_H")
                            &&($table!="MANDATS")
                            &&($table!="PLAN")
                            &&($table!="SALAIRE")
                            &&($table!="SECTEUR")
                            &&($table!="SOCIETE")
                            &&($table!="SUIVI_SOC")
                            &&($table!="VERSEM")
                            &&($table!="VERSEM_H")
                            &&($table!="VERSEM_HG")
                            
                            )
                            {!! Form::open(['url' => '/param/load_odbc_table', 'method' => 'POST']) !!}
                            <input id="load_odbc_file" name="load_odbc_file" type='hidden' value='{!! $table !!}' />
                            {!! Form::submit('Import ODBC', ['class' => 'btn btn-danger']) !!}
                            {!! Form::close() !!}
                        @else
                            {!! Form::open(['url' => '/param/load_txt_table', 'method' => 'POST']) !!}
                            <input id="load_txt_file" name="load_txt_file" type='hidden' value='{!! $table !!}' />
                            {!! Form::submit('Import TXT', ['class' => 'btn btn-info']) !!}
                            {!! Form::close() !!}
                        @endif
                    </td>
                </tr>
                @endforeach
            </tbody>
 
        </table>
    </div>


</div>

</body></html>
@include('forms.fdatatables_script_2')


