public function frontendping($custom = false, $hash = null) { global $aecConfig; if (!empty($aecConfig->cfg['disable_regular_heartbeat']) && empty($custom)) { return; } if (empty($aecConfig->cfg['allow_frontend_heartbeat']) && !empty($custom)) { return; } if (!empty($custom) && !empty($aecConfig->cfg['custom_heartbeat_securehash'])) { if (empty($hash)) { return; } elseif ($hash != $aecConfig->cfg['custom_heartbeat_securehash']) { $short = 'custom heartbeat failure'; $event = 'Custom Frontend Heartbeat attempted, but faile due to false hashcode: "' . $hash . '"'; $tags = 'heartbeat, failure'; $params = array(); $eventlog = new eventLog(); $eventlog->issue($short, $tags, $event, 128, $params); return; } } if (!empty($aecConfig->cfg['allow_frontend_heartbeat']) && !empty($custom)) { aecHeartbeat::ping(0); } elseif (!empty($aecConfig->cfg['heartbeat_cycle'])) { aecHeartbeat::ping($aecConfig->cfg['heartbeat_cycle']); } }
$id = aecGetParam('id', null); if (!is_null($id) && !is_array($id)) { $id = array($id); } $db = JFactory::getDBO(); // Auto Heartbeat renew every one hour to make sure that the admin gets a view as recent as possible $heartbeat = new aecHeartbeat(); $heartbeat->backendping(); if (empty($option)) { $option = aecGetParam('option', '0'); } switch (strtolower($task)) { case 'heartbeat': case 'beat': // Manual Heartbeat $heartbeat = new aecHeartbeat(); $heartbeat->beat(); echo "wolves teeth"; break; case 'copycoupon': $db = JFactory::getDBO(); foreach ($id as $pid) { $c = explode('.', $pid); $row = new Coupon($c[0]); $row->load($c[1]); $row->copy(); } aecRedirect('index.php?option=' . $option . '&task=showCoupons'); break; case 'hacks': $undohack = aecGetParam('undohack', 0);
static function VerifyUser($username) { $heartbeat = new aecHeartbeat(); $heartbeat->frontendping(); $id = aecUserHelper::UserIDfromUsername($username); return AECToolbox::VerifyUserID($id); }
} $layout = trim(aecGetParam('layout', '', true, array('word', 'string', 'clear_nonalnum'))); if (!empty($layout)) { if ($layout != 'default') { $task = $layout; } } } if (!empty($task)) { switch (strtolower($task)) { case 'heartbeat': case 'beat': // Manual Heartbeat $hash = aecGetParam('hash', 0, true, array('word', 'string')); $db = JFactory::getDBO(); $heartbeat = new aecHeartbeat(); $heartbeat->frontendping(true, $hash); break; case 'register': $intro = aecGetParam('intro', 0, true, array('word', 'int')); $usage = aecGetParam('usage', 0, true, array('word', 'string', 'clear_nonalnum')); $group = aecGetParam('group', 0, true, array('word', 'int')); $iFactory = new InvoiceFactory(); $iFactory->create($intro, $usage, $group); break; // Catch hybrid CB registration // Catch hybrid CB registration case 'saveregisters': // Catch hybrid jUser registration // Catch hybrid jUser registration case 'saveuserregistration':