function launch() { global $interface; global $interface; $interface->setPageTitle('Cron Log'); $logEntries = array(); $cronLogEntry = new CronLogEntry(); $cronLogEntry->orderBy('startTime DESC'); $cronLogEntry->limit(0, 30); $cronLogEntry->find(); while ($cronLogEntry->fetch()) { $logEntries[] = clone $cronLogEntry; } $interface->assign('logEntries', $logEntries); $interface->setTemplate('cronLog.tpl'); $interface->display('layout.tpl'); }
function launch() { global $interface; $interface->setPageTitle('Cron Log'); $logEntries = array(); $cronLogEntry = new CronLogEntry(); $cronLogEntry->orderBy('startTime DESC'); $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; $interface->assign('page', $page); $cronLogEntry->limit(($page - 1) * 30, 30); $cronLogEntry->find(); while ($cronLogEntry->fetch()) { $logEntries[] = clone $cronLogEntry; } $interface->assign('logEntries', $logEntries); $interface->assign('sidebar', 'MyAccount/account-sidebar.tpl'); $interface->setTemplate('cronLog.tpl'); $interface->display('layout.tpl'); }
function getCronNotes() { global $interface; $id = $_REQUEST['id']; $cronLog = new CronLogEntry(); $cronLog->id = $id; if ($cronLog->find(true)) { $interface->assign('popupTitle', "Cron Process {$cronLog->id} Notes"); if (strlen($cronLog->notes) == 0) { $interface->assign('popupContent', "No notes have been entered for this cron run"); } else { $interface->assign('popupContent', "<div class='helpText'>{$cronLog->notes}</div>"); } } else { $interface->assign('popupTitle', "Error"); $interface->assign('popupContent', "We could not find a cron entry with that id. No notes available."); } return $interface->fetch('popup-wrapper.tpl'); }
function getCronNotes() { $id = $_REQUEST['id']; $cronLog = new CronLogEntry(); $cronLog->id = $id; $results = array('title' => '', 'modalBody' => '', 'modalButtons' => ""); if ($cronLog->find(true)) { $results['title'] = "Cron Process {$cronLog->id} Notes"; if (strlen($cronLog->notes) == 0) { $results['modalBody'] = "No notes have been entered for this cron run"; } else { $results['modalBody'] = "<div class='helpText'>{$cronLog->notes}</div>"; } } else { $results['title'] = "Error"; $results['modalBody'] = "We could not find a cron entry with that id. No notes available."; } return json_encode($results); }