1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
<DOCTYPE HTML>
<html>
<head>
<title> Biens </title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- cdn pour integrer jquery dans notre appli -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- cdn pour integrer datatable dans notre appli -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.13/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.13/datatables.min.js"></script>
<!-- ajouter bootstrap avant le script -->
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap.min.css" />
<!-- Ajout du script -->
<script type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/dataTables.bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href=<?php echo base_url(); ?>assets/css/style.css>
<link rel="stylesheet" type="text/css" href=<?php echo base_url(); ?>assets/css/bootstrap.css>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container-fluid bg-info blochaut xls" style="height: 100px; margin-bottom: 2%"></div>
<div class="col-md-11">
<div class="col-md-6" style="height: 100px; margin-bottom: 2%">
<?php echo anchor('welcome/ajout','Ajouter un bien', ['class'=>'btn btn-primary glyphicon glyphicon-saved']); ?>
<br><br>
<?php echo form_open('welcome/importcsv',['class'=>'form-horizontal'])?>
<input type="file" name="biens">
<?php echo form_submit(['name'=>'sumbmit', 'value'=>'Envoyer','class'=>'btn btn-success']);?>
<?php echo form_close()?>
</div>
<div class="">
<div><?php //if(isset($error)) echo $error; exit();
?></div>
<?php
if(isset($error)) redirect('welcome',['error'=>$error]);
?>
<table class="table table-striped table-hover " style="font-family: Arial; font-size:14;" id="book-table">
<thead>
<tr>
<th>VALEUR DU BIEN</th>
<th>DUREE D'UTILISATION</th>
<th>TAUX AMORTISSEMENT </th>
<th>VALEUR DE L'AMORTISSEMENT</th>
<th>VALEUR NETTE COMPTABLE </th>
<th>DATE D'ENREGISTREMENT</th>
<th>TRAITEMENTS </th>
</tr>
</thead>
<tbody>
<?php if(count($biens)): ?>
<?php foreach($biens as $bien): ?>
<tr style="" >
<td> <?php
$number = $bien->valbiens;
$nombre = number_format($number, 0, ',', ' ');
echo $nombre." "."FCFA"; ?> </td>
<td><?php echo $bien->durbiens ;?></td>
<td><?php
$taux = $bien->tauxAmort ;
$nombre = number_format($taux, 2, ',', ' ');
echo $nombre." "."%";
?></td>
<td><?php
$valAmort = $bien->valAmort;
$nombre = number_format( $valAmort, 0, ',', ' ');
echo $nombre." "."FCFA";
?></td>
<td><?php
$vnc = $bien->vnc;
$nombre = number_format( $valAmort, 0, ',', ' ');
echo $nombre." "."FCFA";
?>
</td>
<td>
<?php echo $bien->date_ajout ;?>
</td>
<td>
<?php echo anchor("welcome/modifier/{$bien->id}", 'Update', ['class'=>'label label-success ']); ?>
<?php echo anchor("welcome/supprimer/{$bien->id}", 'Delete', ['class'=>'label label-danger'],array('class'=>'delete','onclick'=>'return confirm("Voulez vous vraiment supprimer ?")')); ?>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr> <td rowspan="7"> PAS DE DONNEES A AFFICHER </td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<script language="JavaScript">
function sure(){
return(confirm('Etes-vous sûr de vouloir supprimer cette news ?'));
}
</script>
<script type="text/javascript">
$(document).ready(function() {
//créer une instance de la datatable pour notre tableau
$('#book-table').DataTable(
{
"language": {
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/French.json"
}
}
);
});
</script>
</body>
</html> |
Partager