How to display using ts3admin.class.php all users in Group and information about they (is online?, channel, UID, nickname)
Any examples?
Users in Group online
- fauke
- Erledigt
-
-
Hi,
maybe something like this?PHP
Alles anzeigen<?php // [...] $clientList = $ts3admin->clientList(); $channelList = $ts3admin->channelList(); ?> <table> <tr> <th>#</th> <th>Name</th> <th>Channel</th> <th>Status</th> </tr> <?php foreach($clientList as $clrow => $clvalue) { /* Check if client was talking within the last 5 minutes (= 300 seconds) */ if($clvalue['client_idle_time'] < 300) { $status = "Active"; } else { $status = "Away"; } /* Get channel name */ foreach($channelList as $chrow => $chvalue) { if($chvalue['cid'] == $clvalue['cid']) { $channelName = $chvalue['channel_name']; } } ?> <tr> <td><?php echo $clrow+1; ?></td> <td><?php echo $clvalue['client_nickname']; ?></td> <td><?php echo $channelName; ?></td> <td><?php echo $status; ?></td> </tr> <?php } ?> </table>
Note: This is not tested!You just need to implement the method for your group details. Take a look at ts3admin.class: ts3admin.class » \ts3admin