

<?php $__env->startSection('title',"Analyses"); ?>
<?php $__env->startSection('title_card',$titre); ?>

<?php $__env->startSection('subtitle_card',""); ?>
<?php $__env->startSection('content'); ?>
    <div class="card">
        <div class="card-header">
            <div class="form-group row">
                <div class="row">
                    <div class="btn" >
                        <span class="btn btn-info <?php echo ($benef_type=='A')?'':'btn-sm'; ?>" >
                            <a href="<?php echo url('stats/tdb/A'); ?>" style="color:white;text-decoration: none;" >Allocations</a>
                        </span>
                    </div>
                    <div class="btn" >
                        <span class="btn btn-info <?php echo ($benef_type=='S')?'':'btn-sm'; ?>">
                            <a href="<?php echo url('stats/tdb/S'); ?>" style="color:white;text-decoration: none;" >Aides sociales</a>
                        </span>
                    </div>
                    <div class="btn" >
                        <span class="btn btn-info <?php echo ($benef_type=='R')?'':'btn-sm'; ?>">
                            <a href="<?php echo url('stats/tdb/R'); ?>" style="color:white;text-decoration: none;" >Retraites</a>
                        </span>
                    </div>
                </div>
            </div>
        </div>

        <?php if($titre): ?>
            <div class="card-body">
                <div class='col-lg-max col-lg-offset-1'>
                    <div class='callout callout-info'>
                        <h4 class='bg-alert'>Nombre de bénéficiaires
                            <?php if($benef_type=='A'): ?> d'Allocations <?php endif; ?>
                            <?php if($benef_type=='S'): ?> d'Aides sociales <?php endif; ?>
                            <?php if($benef_type=='R'): ?> de Retraite <?php endif; ?>

                        </h4>
                        <div class="table-responsive">
                            <table id="_table" class="table table-condensed">
                                <tbody>
                                    <th></th>
                                    <?php $__currentLoopData = $t_header; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ref=>$libelle): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <th><?php echo $libelle; ?></th>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    <?php $__currentLoopData = $zones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $zone): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr  class='<?php echo $t_table[$zone]["classe"]; ?>'  style='<?php echo $t_table[$zone]["style"]; ?>'>
                                        <td><?php echo $t_table[$zone]['nom']; ?></td>
                                        <?php foreach($t_header as $ref=>$libelle) { ?>
                                            <td class='<?php echo $t_table[$zone]["classe_".$ref]; ?>'  style='<?php echo $t_table[$zone]["style_".$ref]; ?>'>
                                                <?php echo Form::text($t_table[$zone]['nom'].'_'.$ref, $t_table[$zone]["value_".$ref], 
                                                    [ 'class' => 'form-control', 'readonly','style'=>'text-align:center;']); ?>

                                            </td>
                                        <?php } ?>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <?php if($benef_type=="S"): ?> 
                        <div class='callout callout-info'>
                            <h4>Nombre de bénéficiaire par nombre d'enfants avec allocations</h4>
                            <div class="table-responsive">
                                <table id="_table" class="table table-condensed">
                                    <theader>
                                        <tr>
                                            <th rowspan=2 style='vertical-align:middle'>Zone</th>
                                            <th colspan="<?php echo $maxenfant; ?>" style='text-align:center'>Nb Enfants</th>
                                        </tr>
                                        <tr>
                                            <?php for($i=1;$i<=$maxenfant;$i++): ?>
                                                <th style='text-align:center'><?php echo $i; ?></th>
                                            <?php endfor; ?>
                                        </tr>
                                    </theader>    
                                    <tbody>
                                        <?php $__currentLoopData = $zones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $zone): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr class='<?php echo $t_famille[$zone]["classe"]; ?>' style='<?php echo $t_famille[$zone]["style"]; ?>'>
                                            <td><?php echo $t_famille[$zone]['nom']; ?></td>
                                            <?php for($i=1;$i<=$maxenfant;$i++) { ?>
                                                <td class='<?php echo $t_famille[$zone]["classe"]; ?>' style='<?php echo $t_famille[$zone]["style"]; ?>;text-align:center'>
                                                    <?php echo Form::text($t_famille[$zone]['nom'].'_'.$i, $t_famille[$zone][$i], 
                                                        ['class' => 'form-control', 'readonly','style'=>'text-align:center;']); ?>

                                                </td>
                                            <?php } ?>
                                        </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <?php echo $__env->make("forms.scripts_datatable_btn", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dash', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre2\resources\views/stats/index_tdb.blade.php ENDPATH**/ ?>