list contacts with extended infos

This commit is contained in:
Romain Guerrero 2016-02-05 22:26:50 +01:00
parent 0072a8b2f8
commit e3a2dc29df
2 changed files with 34 additions and 12 deletions

View file

@ -23,7 +23,11 @@
global $db; global $db;
//Recupération des nombres des 4 panneaux d'accueil //Recupération des nombres des 4 panneaux d'accueil
$contacts = $db->getFromTableWhere('contacts'); $contacts = $db->getFromTableWhere('contacts', array(), '', false, false, false, array(array(
'table' => 'contacts_infos',
'type' => 'LEFT',
'on' => 'contacts_infos.id_contact = contacts.id'
)));
$this->render('contacts/default', array( $this->render('contacts/default', array(
'contacts' => $contacts, 'contacts' => $contacts,

View file

@ -39,8 +39,17 @@
<thead> <thead>
<tr> <tr>
<th>#</th> <th>#</th>
<?php if (RASPISMS_SETTINGS_EXTENDED_CONTACTS_INFOS) { ?>
<th>Civilité</th>
<th>Prénom</th>
<th>Nom</th> <th>Nom</th>
<th>Numéro</th> <th>Numéro</th>
<th>Date de naissance</th>
<th>Situation</th>
<?php } else { ?>
<th>Nom</th>
<th>Numéro</th>
<?php } ?>
<th style="width:5%;">Sélectionner</th> <th style="width:5%;">Sélectionner</th>
</tr> </tr>
</thead> </thead>
@ -51,8 +60,17 @@
?> ?>
<tr> <tr>
<td><?php secho($contact['id']); ?></td> <td><?php secho($contact['id']); ?></td>
<?php if (RASPISMS_SETTINGS_EXTENDED_CONTACTS_INFOS) { ?>
<td><?php secho($contact['civility']); ?></td>
<td><?php secho($contact['first_name']); ?></td>
<td><?php secho($contact['last_name'] ? $contact['last_name'] : $contact['name']); ?></td>
<td><?php secho($contact['number']); ?></td>
<td><?php secho($contact['birthday']); ?></td>
<td><?php secho($contact['love_situation']); ?></td>
<?php } else { ?>
<td><?php secho($contact['name']); ?></td> <td><?php secho($contact['name']); ?></td>
<td><?php secho($contact['number']); ?></td> <td><?php secho($contact['number']); ?></td>
<?php } ?>
<td><input type="checkbox" value="<?php secho($contact['id']); ?>"></td> <td><input type="checkbox" value="<?php secho($contact['id']); ?>"></td>
</tr> </tr>
<?php <?php