<?php 

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

function queue() {
 loadPandabotConfig("../conf/pandabot.conf");
 
 $shm_key=fileinode("../bin/pandabot.php");
 $shm = shm_attach($shm_key, 20480);
 $actForwards=shm_get_var($shm, 1);
 $queue=shm_get_var($shm, 2);
 $botstarttime=shm_get_var($shm, 5);
 $runtime=dhms(time() - $botstarttime);
 
 echo "<b><p style='color:yellow; display: inline;' title='runtime: ".$runtime."'>runt. forwards: </p><p style='color:white; display: inline;'>".$actForwards." &nbsp;&nbsp;</p></b>";
 echo "<b><p style='color:yellow; display: inline;'>queue: </p><p style='color:white; display: inline;'>".$queue."</p></b>";
 
// shm_remove($shm);
// sem_remove(sem_get($shm_key));

} 
?>