72 lines
2.0 KiB
PHTML
Raw Normal View History

2013-01-09 11:13:44 +00:00
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
?>
2012-04-12 08:09:18 +00:00
<div id="dashboard">
2013-01-09 11:13:44 +00:00
<form method="post" action="">
<select name="year">
<?php for ($i=0 ; $i<=$Years ; $i++ ) {?>
<?php $select=''; if ($YearBegin+$Years-$i==$this->year) $select = ' selected';?>
<option value="<?=$YearBegin+$Years-$i?>"<?=$select?>><?=$YearBegin+$Years-$i?></option>
<?php }?>
</select>
<select name="month">
<?php for ( $i=1 ; $i<=12 ; $i++ ) {?>
<?php $select=''; if ($i==$this->month) $select = ' selected';?>
<option value="<?=$i?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="Ok"/>
</form>
<h2>Liste des ciblages</h2>
<div>
<table>
<tr>
<th><b>Id</b></th>
<th><b>Date de création</b></th>
<th><b>Référence</b></th>
<th><b>Résultat</b></th>
<th><b>Insee</b></th>
<th><b>Actions</b></th>
</tr>
<?php foreach($this->comptages as $comptage): ?>
<tr id="<?=$comptage['idDefinition']?>">
2013-01-09 11:13:44 +00:00
<td><?=$comptage['idDefinition']?></td>
<td><?=$comptage['dateAjout']?></td>
<td><?=$comptage['reference']?></td>
<td><?=$comptage['resultat']?></td>
<td><?=$comptage['uniteInsee']?></td>
<td>
<a href="">Actualiser</a>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
<script>
$('table tr').on('click', function(){
var href = '/gestion/ciblagecriteres/id/'+$(this).attr('id');
if (href!='#' || href!='') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>