*/
$template->set_filenames(array('ct_body' => ADM_TPL . 'acp_maintenance.tpl'));
// First we look wich mode the user has selected
$mode = request_var('mode', '');
// Reset used vars
$uplink_values = array();
$chmod_values = array();
$chmod_path = array();
$testvalue = array();
$logmanager = new log_manager();
$operation_err = false;
$mode_selected = false;
$error_message = '';
// Lets test if chmod was set correctly on the logfiles
for ($i = 1; $i <= 6; $i++) {
    $chmod_path[$i] = $logmanager->create_ct_path($i);
    if (is_writeable($chmod_path[$i]) && is_readable($chmod_path[$i])) {
        $chmod_values[$i] = true;
    } else {
        $chmod_values[$i] = false;
    }
    $chmod_path[$i] = str_replace('./../', '', $chmod_path[$i]);
}
// We don't need the logmanager any longer
unset($logmanager);
// Lets see what the new versions are (Uplink) [original code (C) phpBB Group]
if ($fsock = @fsockopen('www.community.cback.de', 80, $errno, $errstr, 10)) {
    @fwrite($fsock, "GET /uplink/ctracker.txt HTTP/1.1\r\n");
    @fwrite($fsock, "HOST: www.community.cback.de\r\n");
    @fwrite($fsock, "Connection: close\r\n\r\n");
    $get_info = false;
Пример #2
0
    }
    $logmanager->delete_logfile($logid);
    $template->assign_block_vars('infobox', array('L_MESSAGE_TEXT' => $lang['ctracker_log_manager_deleted']));
} elseif ($mode == 'delete_all') {
    for ($i = 2; $i <= 6; $i++) {
        if ($i != 6) {
            // Do not increment the counter for debug entrys
            $logmanager->increment_counter($logmanager->check_log_size($i));
        }
        $logmanager->delete_logfile($i);
    }
    $template->assign_block_vars('infobox', array('L_MESSAGE_TEXT' => $lang['ctracker_log_manager_all_deleted']));
} elseif ($mode == 'view' || $mode == 'downloaddebug') {
    // Header for logfile output
    if ($logid == 6) {
        $filename = file($logmanager->create_ct_path($logid));
        $a = 0;
        $lastclean = 0;
        echo '<tt>';
        for ($i = sizeof($filename) - 1; $i >= 0; $i--) {
            echo $filename[$i] . "<br />\n";
        }
        echo '</tt>';
        //readfile($logmanager->create_ct_path($logid));
        exit;
    }
    // cell 3 has another description if it is the malformed login log
    $logid == 4 || $logid == 5 ? $description_cell_2 = $lang['ctracker_log_manager_cell_2b'] : ($description_cell_2 = $lang['ctracker_log_manager_cell_2a']);
    $template->assign_block_vars('show_log_header', array('L_MESSAGE_TEXT' => $logmanager->check_log_size($logid) == 1 ? sprintf($lang['ctracker_log_manager_showheader1'], append_sid('admin_cracker_tracker.' . PHP_EXT . '?modu=6')) : sprintf($lang['ctracker_log_manager_showheader'], $logmanager->check_log_size($logid), append_sid('admin_cracker_tracker.' . PHP_EXT . '?modu=6')), 'L_LOG_SHOW' => $lang['ctracker_log_manager_showlog'], 'L_LOGCELL1' => $lang['ctracker_log_manager_cell_1'], 'L_LOGCELL2' => $description_cell_2, 'L_LOGCELL3' => $lang['ctracker_log_manager_cell_3'], 'L_LOGCELL4' => $lang['ctracker_log_manager_cell_4'], 'L_LOGCELL5' => $lang['ctracker_log_manager_cell_5'], 'L_LOGCELL6' => $lang['ctracker_log_manager_cell_6']));
    // Template Loop for Logfile output and naturally logfile output itself
    $filename = file($logmanager->create_ct_path($logid));