public function GetOutput($Db)
 {
     $KillLog = new eveApiKillLog($Db);
     $full_url = FULL_URL;
     // TODO
     $time_start = microtime_float();
     if (!$KillLog->fetch(CHAR_ID, USER_ID, API_KEY, CORP_MODE, CORP_MODE ? CORP_ID : 0)) {
         $this->Output = $KillLog->Error;
         return false;
     }
     $time_end = microtime_float();
     $time_api = $time_end - $time_start;
     $this->Updated = APITime($KillLog);
     $killmail = null;
     if (isset($_GET['kill'])) {
         $kill = $KillLog->All->xpath("/eveapi/result/rowset[@name='kills']/row[@killID=" . $_GET['kill'] . "]");
         if (count($kill) > 0) {
             $killmail = generate_kill($kill[0]);
         }
     }
     if (!$killmail) {
         $this->Title = "PVP Activity for " . USER_NAME;
         if (isset($_GET['kill'])) {
             $this->Output .= "Bad killID!<br>";
         }
         $this->Output .= "<table><tr><td valign=top>\n";
         if (count($KillLog->Kills) > 1) {
             // TODO is this correct?
             $this->Output .= display_log($KillLog->Kills, "Kills");
             $this->Output .= "</td><td valign=top>";
         } else {
             $this->Output .= "<b><span style=\"font-size:80%\">" . strtoupper("[" . (CORP_MODE ? "corp" : "char") . " has no recent kills]") . "</b></span><br><br>";
         }
         if (count($KillLog->Losses) > 1) {
             $this->Output .= display_log($KillLog->Losses, "Losses");
             $this->Output .= "</td>";
         } else {
             $this->Output .= "<b><span style=\"font-size:80%\">" . strtoupper("[" . (CORP_MODE ? "corp" : "char") . " has no recent losses]") . "</b></span><br><br>";
         }
         $this->Output .= "</tr></table>";
     } else {
         $this->Title = "Details for kill " . $_GET['kill'];
         $this->Output .= "<br>Displaying killID " . $_GET['kill'];
         $this->Output .= "<br>[ <a href=\"" . FULL_URL . "&view=kills\">back</a> ]";
         $this->Output .= "<pre>{$killmail}</pre>";
         //}
     }
     $this->Times = getPageTimes($Db, $time_api, microtime_float() - $time_start);
     return true;
 }
示例#2
0
                            <button class="button" type="button" value="{$lang_viewlog_php['view_logs']}" name="back2" id="back2" onclick="window.location='viewlog.php';">{$view_icon}{$lang_viewlog_php['view_logs']}</button>
                            <button class="button" type="button" value="{$lang_viewlog_php['delete_this']}" name="dthis2" id="dthis2" onclick="window.location='viewlog.php?action=dthis&amp;log={$logname}';">{$delete_this_icon}{$lang_viewlog_php['delete_this']}</button>
                    </td>
            </tr>

EOT;
}
$log = $superCage->get->getAlpha('log');
$action = $superCage->get->getAlpha('action');
pageheader('Logs :: ' . $log);
if (!GALLERY_ADMIN_MODE) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
starttable("100%", cpg_fetch_icon('view_logs', 2) . "Logs :: " . $log);
if (isset($action)) {
    if ($action == 'dthis' && isset($log)) {
        log_delete($log);
        unset($log);
    } elseif ($action == 'dall') {
        unset($log);
        log_delete();
    }
}
// If log variable not set or log file's directory is not current directory then display logs list else display log with given name stripping risky characters from it
if (!isset($log) || dirname($log) != '.') {
    display_log_list();
} else {
    display_log($log);
}
endtable();
pagefooter();
示例#3
0
文件: viewlog.php 项目: alencarmo/OCF
EOT;
}
$log = @$_GET['log'];
$action = @$_GET['action'];
pageheader('Logs :: ' . $log);
if (!$USER_DATA['has_admin_access']) {
    // Write access attempt to 'security' log file
    if ($CONFIG['log_mode']) {
        log_write('Denied privileged access to viewlog.php from user ' . $USER_DATA['user_name'] . ' at ' . $_SERVER['REMOTE_HOST'] . ' on ' . date("F j, Y, g:i a"), CPG_SECURITY_LOG);
    }
    cpg_die(CRITICAL_ERROR, $lang_errors['access_denied'], __FILE__, 1);
}
starttable("100%", "Logs :: " . $log);
if (isset($action)) {
    if ($action == 'dthis' && isset($log)) {
        log_delete($log);
        unset($log);
    } elseif ($action == 'dall') {
        unset($log);
        log_delete();
    }
}
// If log variable not set or log file's directory is not current directory then display logs list else display log with given name stripping risky characters from it
if (!isset($log) || dirname($log) != '.') {
    display_log_list();
} else {
    display_log(ereg_replace('\\.|/|%00', '', $log));
}
endtable();
pagefooter();
示例#4
0
文件: logs.php 项目: jefonseca/kimbo
<?php

require_once "includes/functions.inc.php";
require_once "includes/config.inc.php";
$client = $_POST["client"];
$log = display_log("{$client}", "{$log_dir}", "{$log_filter}");
print '<pre>' . $log . '</pre>';