Example #1
0
 public function templateReplay(GWF_AuditLog $log)
 {
     GWF_Website::addJavascriptInline('var al_script=' . $log->getAjaxScript() . ';');
     GWF_Website::addJavascriptInline('var al_times=' . $log->getAjaxTimes() . ';');
     GWF_Website::addJavascriptOnload('alReplay();');
     $tVars = array('log' => $log);
     return $this->module->template('replay.tpl', $tVars);
 }
Example #2
0
 public function validateAccess($eusername, $id, $rand)
 {
     if (false === ($log = GWF_AuditLog::getByID($id))) {
         return $this->module->error('err_log');
     }
     if ($log->getVar('al_eusername') !== $eusername || $log->getVar('al_rand') !== $rand) {
         return GWF_HTML::err('ERR_NO_PERMISSION');
     }
     $this->log = $log;
     return false;
 }
Example #3
0
 public function execute()
 {
     if (false === ($id = Common::getGetInt('id', false))) {
         return GWF_HTML::err('ERR_PARAMETER', array(__FILE__, __LINE__, 'id'));
     }
     if (false === ($log = GWF_AuditLog::getByID($id))) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     GWF_Website::plaintext();
     die($log->getVar('al_data'));
 }
Example #4
0
 public static function getEMail(GWF_AuditLog $log)
 {
     $username = GDO::escape($log->getVar('al_eusername'));
     return self::table(__CLASS__)->selectVar('am_email', "am_username='{$username}'");
 }
Example #5
0
 private static function getMailBodyUser(Module_Audit $module, GWF_AuditLog $log)
 {
     $url = Common::getAbsoluteURL($log->hrefReplay(), false);
     $link = GWF_HTML::anchor($url, $url);
     return sprintf("Hello %s\n\nTo review or share your logfiles on warchall, you may use these links:\nReplay: %s\n\nFrom: %s-%s (%s)\n", $log->getVar('al_eusername'), $link, $log->getVar('al_eusername'), $log->getVar('al_username'), $log->displayDate());
 }