2012-10-18 14:22:10 -04:00
|
|
|
<?php
|
2012-10-19 09:05:04 -04:00
|
|
|
|
2012-10-18 14:22:10 -04:00
|
|
|
try {
|
2017-12-04 13:25:35 +00:00
|
|
|
if (isset($_REQUEST['status'])) {
|
|
|
|
|
$oServerConf = ServerConf::getSingleton();
|
2012-10-18 14:22:10 -04:00
|
|
|
/*you can use SYS_TEMP or SYS_SYS ON HEAR_BEAT_CONF to save for each workspace*/
|
|
|
|
|
if ($_REQUEST['status']) {
|
|
|
|
|
echo "ACTIVE (Thanks!)";
|
2017-12-04 13:25:35 +00:00
|
|
|
$oServerConf->setHeartbeatProperty('HB_OPTION', 1, 'HEART_BEAT_CONF');
|
|
|
|
|
$oServerConf->unsetHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
2012-10-18 14:22:10 -04:00
|
|
|
} else {
|
|
|
|
|
echo "INACTIVE";
|
2017-12-04 13:25:35 +00:00
|
|
|
$oServerConf->setHeartbeatProperty('HB_OPTION', 0, 'HEART_BEAT_CONF');
|
|
|
|
|
$oServerConf->unsetHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
2012-10-18 14:22:10 -04:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
echo "Nothing to do";
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception $e) {
|
2016-07-27 16:37:21 -04:00
|
|
|
$token = strtotime("now");
|
|
|
|
|
PMException::registerErrorLog($e, $token);
|
2017-12-04 13:25:35 +00:00
|
|
|
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)));
|
2012-10-18 14:22:10 -04:00
|
|
|
}
|