Masquage de la gestion des logs avec un compte non admin

This commit is contained in:
Pierre-Lin Bonnemaison 2015-10-13 19:40:47 +02:00
parent 5fe6a210de
commit 46444f5e69
4 changed files with 48 additions and 40 deletions

View File

@ -42,7 +42,7 @@
<th>Type</th> <th>Type</th>
<th>Date</th> <th>Date</th>
<th>Texte</th> <th>Texte</th>
<th>Sélectionner</th> <?php if ($_SESSION['admin']) { ?><th>Sélectionner</th><?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -55,7 +55,7 @@
<td><span class="fa fa-fw <?php echo internalTools::eventTypeToIcon($event['type']); ?>"></span></td> <td><span class="fa fa-fw <?php echo internalTools::eventTypeToIcon($event['type']); ?>"></span></td>
<td><?php secho($event['at']); ?></td> <td><?php secho($event['at']); ?></td>
<td><?php secho($event['text']); ?></td> <td><?php secho($event['text']); ?></td>
<td><input type="checkbox" value="<?php secho($event['id']); ?>"></td> <?php if ($_SESSION['admin']) { ?><td><input type="checkbox" value="<?php secho($event['id']); ?>"></td><?php } ?>
</tr> </tr>
<?php <?php
} }
@ -64,6 +64,7 @@
</table> </table>
</div> </div>
<nav> <nav>
<?php if ($_SESSION['admin']) { ?>
<div class="text-right col-xs-12 no-padding"> <div class="text-right col-xs-12 no-padding">
<strong>Action groupée :</strong> <strong>Action groupée :</strong>
<div class="btn-group action-dropdown" target="#table-events"> <div class="btn-group action-dropdown" target="#table-events">
@ -73,6 +74,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<?php } ?>
<ul class="pager"> <ul class="pager">
<?php <?php
if ($page) if ($page)

View File

@ -43,7 +43,7 @@
<th>Message</th> <th>Message</th>
<th>Date</th> <th>Date</th>
<th>Commande</th> <th>Commande</th>
<th>Sélectionner</th> <?php if ($_SESSION['admin']) { ?><th>Sélectionner</th><?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -57,7 +57,7 @@
<td><?php secho($received['content']); ?></td> <td><?php secho($received['content']); ?></td>
<td><?php secho($received['at']); ?></td> <td><?php secho($received['at']); ?></td>
<td><?php echo $received['is_command'] ? 'Oui' : 'Non'; ?></td> <td><?php echo $received['is_command'] ? 'Oui' : 'Non'; ?></td>
<td><input type="checkbox" value="<?php secho($received['id']); ?>"></td> <?php if ($_SESSION['admin']) { ?><td><input type="checkbox" value="<?php secho($received['id']); ?>"></td><?php } ?>
</tr> </tr>
<?php <?php
} }
@ -66,6 +66,7 @@
</table> </table>
</div> </div>
<nav> <nav>
<?php if ($_SESSION['admin']) { ?>
<div class="text-right col-xs-12 no-padding"> <div class="text-right col-xs-12 no-padding">
<strong>Action groupée :</strong> <strong>Action groupée :</strong>
<div class="btn-group action-dropdown" target="#table-receiveds"> <div class="btn-group action-dropdown" target="#table-receiveds">
@ -75,6 +76,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<?php } ?>
<ul class="pager"> <ul class="pager">
<?php <?php
if ($page) if ($page)

View File

@ -43,7 +43,7 @@
<th>Message</th> <th>Message</th>
<th>Date</th> <th>Date</th>
<th>Statut</th> <th>Statut</th>
<th>Sélectionner</th> <?php if ($_SESSION['admin']) { ?><th>Sélectionner</th><?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -57,7 +57,7 @@
<td><?php secho($sended['content']); ?></td> <td><?php secho($sended['content']); ?></td>
<td><?php secho($sended['at']); ?></td> <td><?php secho($sended['at']); ?></td>
<td><?php secho($sended['delivered'] ? 'Délivré' : ($sended['failed'] ? 'Échoué' : 'Inconnu')); ?></td> <td><?php secho($sended['delivered'] ? 'Délivré' : ($sended['failed'] ? 'Échoué' : 'Inconnu')); ?></td>
<td><input type="checkbox" value="<?php secho($sended['id']); ?>"></td> <?php if ($_SESSION['admin']) { ?><td><input type="checkbox" value="<?php secho($sended['id']); ?>"></td><?php } ?>
</tr> </tr>
<?php <?php
} }
@ -66,6 +66,7 @@
</table> </table>
</div> </div>
<nav> <nav>
<?php if ($_SESSION['admin']) { ?>
<div class="text-right col-xs-12 no-padding"> <div class="text-right col-xs-12 no-padding">
<strong>Action groupée :</strong> <strong>Action groupée :</strong>
<div class="btn-group action-dropdown" target="#table-sendeds"> <div class="btn-group action-dropdown" target="#table-sendeds">
@ -75,6 +76,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<?php } ?>
<ul class="pager"> <ul class="pager">
<?php <?php
if ($page) if ($page)

View File

@ -40,7 +40,7 @@
<tr> <tr>
<th>#</th> <th>#</th>
<th>Numéro</th> <th>Numéro</th>
<th>Sélectionner</th> <?php if ($_SESSION['admin']) { ?><th>Sélectionner</th><?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -51,7 +51,7 @@
<tr> <tr>
<td><?php secho($smsStop['id']); ?></td> <td><?php secho($smsStop['id']); ?></td>
<td><?php secho($smsStop['number']); ?></td> <td><?php secho($smsStop['number']); ?></td>
<td><input type="checkbox" value="<?php secho($smsStop['id']); ?>"></td> <?php if ($_SESSION['admin']) { ?><td><input type="checkbox" value="<?php secho($smsStop['id']); ?>"></td><?php } ?>
</tr> </tr>
<?php <?php
} }
@ -60,6 +60,7 @@
</table> </table>
</div> </div>
<nav> <nav>
<?php if ($_SESSION['admin']) { ?>
<div class="text-right col-xs-12 no-padding"> <div class="text-right col-xs-12 no-padding">
<strong>Action groupée :</strong> <strong>Action groupée :</strong>
<div class="btn-group action-dropdown" target="#table-smsstop"> <div class="btn-group action-dropdown" target="#table-smsstop">
@ -69,6 +70,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<?php } ?>
<ul class="pager"> <ul class="pager">
<?php <?php
if ($page) if ($page)