130 lines
3.4 KiB
PHTML
130 lines
3.4 KiB
PHTML
|
<script language="Javascript">
|
||
|
$(document).ready(function(){
|
||
|
$('a.delete').on('click', function(e){
|
||
|
e.preventDefault();
|
||
|
var href = $(this).attr('href');
|
||
|
var title = $(this).attr('title');
|
||
|
if (confirm(title)) {
|
||
|
document.location.href=href;
|
||
|
}
|
||
|
});
|
||
|
$('a.enable').on('click', function(e){
|
||
|
e.preventDefault();
|
||
|
var href = $(this).attr('href');
|
||
|
var title = $(this).attr('title');
|
||
|
if (confirm(title)) {
|
||
|
document.location.href=href;
|
||
|
}
|
||
|
});
|
||
|
$('a.disable').on('click', function(e){
|
||
|
e.preventDefault();
|
||
|
var href = $(this).attr('href');
|
||
|
var title = $(this).attr('title');
|
||
|
if (confirm(title)) {
|
||
|
document.location.href=href;
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
<div id="center">
|
||
|
<h1>GESTION DES CLIENTS</h1>
|
||
|
|
||
|
<h2>Liste des profils utilisateurs</h2>
|
||
|
<div class="paragraph">
|
||
|
<table id="utilisateur">
|
||
|
<?php if (isset($message) && $message != '') {?>
|
||
|
<tr>
|
||
|
<td width="30"> </td>
|
||
|
<td colspan="5" class="StyleInfoData" align="center">
|
||
|
<h3><?=$message?></h3>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<?php } ?>
|
||
|
<tr class="border titre">
|
||
|
<td class="StyleInfoLib">Login</td>
|
||
|
<td class="StyleInfoLib">Actions</td>
|
||
|
<td class="StyleInfoLib">Actif</td>
|
||
|
<td class="StyleInfoLib">Informations</td>
|
||
|
<td class="StyleInfoLib">Référence</td>
|
||
|
</tr>
|
||
|
<?php
|
||
|
if (count($this->utilisateurs)>0) {
|
||
|
foreach ($this->utilisateurs as $uti) {
|
||
|
$lienParams = ' login="'.$uti->login.'"';
|
||
|
?>
|
||
|
<tr class="border">
|
||
|
<td class="StyleInfoData"><?=$uti->login;?></td>
|
||
|
<td align="center" valign="middle">
|
||
|
<a href="<?=$this->url(array(
|
||
|
'controller' => 'dashboard',
|
||
|
'action' => 'user',
|
||
|
'op' => 'edit',
|
||
|
'login' => $uti->login,
|
||
|
))?>" class="edit">
|
||
|
<img src="/themes/default/images/interfaces/edit0.gif" title="Editer le profil utilisateur" width="16" height="16"/>
|
||
|
</a>
|
||
|
<a href="<?=$this->url(array(
|
||
|
'controller' => 'dashboard',
|
||
|
'action' => 'user',
|
||
|
'op' => 'delete',
|
||
|
'login' => $uti->login,
|
||
|
'idUti' => $uti->idUti,
|
||
|
))?>" class="delete" title="Supprimer l'utilisateur <?=$uti->login?>">
|
||
|
<img src="/themes/default/images/interfaces/delete.gif" title="Supprimer le profil utilisateur" width="11" height="11"/>
|
||
|
</a>
|
||
|
</td>
|
||
|
<td class="StyleInfoData">
|
||
|
<?php
|
||
|
if ($uti->actif == 1) {
|
||
|
?>
|
||
|
<a href="<?=$this->url(array(
|
||
|
'controller' => 'dashboard',
|
||
|
'action' => 'user',
|
||
|
'op' => 'disable',
|
||
|
'login' => $uti->login,
|
||
|
'idUti' => $uti->idUti,
|
||
|
))?>" class="disable" title="Désactiver le profil utilisateur <?=$uti->login?>">
|
||
|
<u><font color="green">Oui</font></u>
|
||
|
</a>
|
||
|
<?php
|
||
|
} else {
|
||
|
?>
|
||
|
<a href="<?=$this->url(array(
|
||
|
'controller' => 'dashboard',
|
||
|
'action' => 'user',
|
||
|
'op' => 'enable',
|
||
|
'login' => $uti->login,
|
||
|
'idUti' => $uti->idUti,
|
||
|
))?>" class="enable" title="Activer le profil utilisateur <?=$uti->login?>">
|
||
|
<u><font color="red">Non</font></u>
|
||
|
</a>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
</td>
|
||
|
<td class="StyleInfoData">
|
||
|
<?=$uti->nom.' '.$uti->prenom?><br/>
|
||
|
<a href="mailto:<?=$uti->email?>">
|
||
|
<?=str_replace(array(';',','), array('<br/>', '<br/>'), $uti->email);?>
|
||
|
</a>
|
||
|
</td>
|
||
|
<td class="StyleInfoData"><?=$uti->reference?></td>
|
||
|
</tr>
|
||
|
<?php
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
<tr><td colspan="5"> </td></tr>
|
||
|
<tr>
|
||
|
<td colspan="5" align="center">
|
||
|
<a href="<?=$this->url(array(
|
||
|
'controller' => 'dashboard',
|
||
|
'action' => 'user',
|
||
|
'op' => 'new'
|
||
|
))?>">Créer un profil utilisateur</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
</div>
|
||
|
</div>
|