90 lines
2.2 KiB
PHP
90 lines
2.2 KiB
PHP
|
<?php
|
|||
|
/**
|
|||
|
* @file
|
|||
|
* Liste des pays
|
|||
|
*
|
|||
|
*/
|
|||
|
|
|||
|
$q = Doctrine_Query::create()
|
|||
|
->select('*')
|
|||
|
->from('Country');
|
|||
|
|
|||
|
$results = $q->execute();
|
|||
|
$results = $results->toArray();
|
|||
|
|
|||
|
?>
|
|||
|
<script>
|
|||
|
$(document).ready(function() {
|
|||
|
$('.status').editable('./modules/graydon/payssave.php', {
|
|||
|
data : "{'actif':'actif','inactif':'incatif'}",
|
|||
|
type : 'select',
|
|||
|
event : 'dblclick',
|
|||
|
indicator : 'Sauvegarde...',
|
|||
|
tooltip : 'Double-Clique pour <20>diter...',
|
|||
|
submitdata : {col: 'status'}
|
|||
|
});
|
|||
|
$('.lib').editable('./modules/graydon/payssave.php', {
|
|||
|
event : 'dblclick',
|
|||
|
indicator : 'Sauvegarde...',
|
|||
|
tooltip : 'Double-Clique pour <20>diter...',
|
|||
|
submitdata : {col: 'lib'}
|
|||
|
});
|
|||
|
$('.code').editable('./modules/graydon/payssave.php', {
|
|||
|
event : 'dblclick',
|
|||
|
indicator : 'Sauvegarde...',
|
|||
|
tooltip : 'Double-Clique pour <20>diter...',
|
|||
|
submitdata : {col: 'code'}
|
|||
|
});
|
|||
|
});
|
|||
|
|
|||
|
</script>
|
|||
|
<table>
|
|||
|
<tr>
|
|||
|
<th>Lib<EFBFBD>l<EFBFBD></th>
|
|||
|
<th>Pays</th>
|
|||
|
<th>Code</th>
|
|||
|
<th>Status</th>
|
|||
|
</tr>
|
|||
|
<?php
|
|||
|
foreach($results as $pays){
|
|||
|
?>
|
|||
|
<tr>
|
|||
|
<td align="center"><div id="<?php print $pays['id']; ?>" class="lib"><?php print $pays['lib'];?></div></td>
|
|||
|
<td align="center"><div id="<?php print $pays['id']; ?>" class="graydon_country"><?php print $pays['graydon_country'];?></div></td>
|
|||
|
<td align="center"><div id="<?php print $pays['id']; ?>" class="code"><?php print $pays['code'];?></div></td>
|
|||
|
<td align="center"><div id="<?php print $pays['id']; ?>" class="status"><?php print $pays['status'];?></div></td>
|
|||
|
</tr>
|
|||
|
<?php
|
|||
|
}
|
|||
|
?>
|
|||
|
</table>
|
|||
|
|
|||
|
<form method="post" action="./?q=graydon/country/add">
|
|||
|
<table>
|
|||
|
<tr><td colspan="4">Ajouter un pays : </td></tr>
|
|||
|
<td align="center"><input type="text" name="lib"/></td>
|
|||
|
<td align="center">
|
|||
|
<select name="graydon_country">
|
|||
|
<?php
|
|||
|
require_once 'intersud/pays.php';
|
|||
|
|
|||
|
foreach($tabPays as $kPays => $vPays ){
|
|||
|
print '<option value="'.$kPays.'">'.$vPays['display'].'</option>';
|
|||
|
}
|
|||
|
?>
|
|||
|
</select>
|
|||
|
</td>
|
|||
|
<td align="center"><input type="text" name="code" size="2"/></td>
|
|||
|
<td align="center">
|
|||
|
<select name="status">
|
|||
|
<option value="actif">actif</option>
|
|||
|
<option value="inactif">inactif</option>
|
|||
|
</select>
|
|||
|
</td>
|
|||
|
<td colspan="4"><input type="submit" name="submit"/></td>
|
|||
|
</table>
|
|||
|
</form>
|
|||
|
<?php
|
|||
|
|
|||
|
|
|||
|
?>
|