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); $filename = aecGetParam('filename', 0);