mirror of https://github.com/Mowie/Mowie
Removed logfiles app, doesn't work anymore. Will be replaced.
This commit is contained in:
parent
a7b7007346
commit
167608b023
|
@ -1,398 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Logging {
|
||||
|
||||
//globals
|
||||
var $logDir="";
|
||||
var $logFile="";
|
||||
var $countFile="";
|
||||
var $headerTitle="";
|
||||
var $logMode="";
|
||||
var $logNumber="";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @desc
|
||||
Class constructor.
|
||||
Prepares files for first run.
|
||||
Global variables setting.
|
||||
*/
|
||||
function Logging($logDir='log', $logFile='log_', $headerTitle='LOG', $logMode='oneFile', $countFile="counter"){
|
||||
//-----------------------------------------------------
|
||||
//set global variables //es: seteo variables globales
|
||||
$this->logDir=$logDir;
|
||||
$this->logFile=$logFile;
|
||||
if($countFile) $this->countFile=$this->logDir . "/$countFile";
|
||||
$this->headerTitle=$headerTitle;
|
||||
$this->logMode=$logMode;
|
||||
|
||||
|
||||
|
||||
//generate log number //es: genero el NRO DE LOG
|
||||
//set counter file and log folder //es: seteo el archivo contador y la carpeta de logs
|
||||
$countFile=$this->countFile;
|
||||
$logDir=$this->logDir;
|
||||
|
||||
//verify log folder existence //es: verifico que exista la carpeta de logs
|
||||
//if it doesn't I create it //es: si no existe la creo
|
||||
if(!is_dir($logDir)){
|
||||
if(mkdir($logDir)===FALSE){
|
||||
echo "Could not create log dir"; //es: 'No es posible crear el directorio de logs';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Counter INICILIZATION //es: INICIALIZACIÓN del Counter
|
||||
if(file_exists($countFile)===FALSE){
|
||||
//if log counter file does not exist, I create it //es: si el archivo de conteo de logs no existe lo genero
|
||||
touch($countFile);
|
||||
|
||||
//inicializing file in 0 //es: inicializo el archivo en 0
|
||||
$initNumber=0;
|
||||
$fp=fopen($countFile,"a");
|
||||
if(fwrite($fp,$initNumber)===FALSE){
|
||||
echo "Could not write Counter file"; //es: "No es posible escribir el archivo Contador";
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
//------------------------------------------------------------
|
||||
|
||||
|
||||
//INCREMENT Counter //es: AUMENTO del Counter
|
||||
//read counter //es: leo el contador
|
||||
$logNumber=trim(file_get_contents($countFile));
|
||||
$logNumber++; //increment counter //es: incremento el contador
|
||||
|
||||
//set log number in class var //es: seteo la variable de Clase con el nro de log
|
||||
$this->logNumber=$logNumber;
|
||||
|
||||
//write incremented counter value //es: escribo el contador aumentado en 1
|
||||
$fp=fopen($countFile,"w+");
|
||||
if(fwrite($fp,$logNumber)===FALSE){
|
||||
echo "Could not write Counter file"; //es: "No es posible escribir el archivo Contador";
|
||||
}
|
||||
fclose($fp);
|
||||
//-----------------------------------------------------
|
||||
}//end function
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @param String $logString
|
||||
* @desc
|
||||
Recieves the string you want lo log.
|
||||
This function is used by "logThis" function,
|
||||
which offers simplified logging with
|
||||
some practical functions.
|
||||
|
||||
//spanish
|
||||
Recibe la cadena a loggear en el archivo de logs.
|
||||
Esta función es utilizada por "logThis",
|
||||
función que ofrece un uso simplificado de logging
|
||||
con varias funciones prácticas.
|
||||
*/
|
||||
function writeLogging($logString){
|
||||
global $logNumber;
|
||||
|
||||
|
||||
//depending on selected log mode... //es: según el modo de log definido...
|
||||
//use only one log file, or one file per log instance //es: uso un único archivo o un archivo por log
|
||||
if($this->logMode=='oneFilePerLogging'){
|
||||
$logFile=$this->logDir . "/" . $this->logFile . $logNumber . '.log';
|
||||
} else {
|
||||
//"oneFile" mode
|
||||
$logFile=$this->logDir . "/" . $this->logFile . '.log';
|
||||
}
|
||||
|
||||
//in case file does not exist //es: considero que el archivo no exista
|
||||
if(file_exists($logFile)===FALSE){
|
||||
//if log file does not exist, I create it //es: si el archivo de log no existe lo genero
|
||||
touch($logFile);
|
||||
|
||||
//generate file header //es: genero el encabezado del archivo
|
||||
$logHeader =$this->headerTitle . "\n"; //. " " . $logNumber . "\n";
|
||||
$logHeader.='--------------------------------------------------------------------' . "\n";
|
||||
|
||||
$fp=fopen($logFile,"w+");
|
||||
if(fwrite($fp,$logHeader)===FALSE){
|
||||
echo "Could not write LOG Header"; //es: "No es posible escribir el Header del archivo de LOG";
|
||||
}
|
||||
fclose($fp);
|
||||
}//end if fileExists
|
||||
//-----------------------------------
|
||||
|
||||
|
||||
|
||||
//write to log file //es: escribo el archivo de LOG
|
||||
$fp=fopen($logFile,"a");
|
||||
if(fwrite($fp,$logString)===FALSE){
|
||||
echo "Could not write to LOG file"; //es: "No es posible escribir el archivo de LOG";
|
||||
}
|
||||
fclose($fp);
|
||||
}//end function
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @param String $string
|
||||
* @param String $modifier
|
||||
* @desc
|
||||
Writes to LOG File each recieved value.
|
||||
To write the log we use the function "writeLogging".
|
||||
|
||||
Esta función va escribiendo en el archivo de LOG
|
||||
a medida que recibe valores.
|
||||
Para escribir el log se recurre a la función "writeLogging".
|
||||
|
||||
Output: $this->writeLogging()
|
||||
Will directly write to log file
|
||||
*/
|
||||
function logThis($string,$modifier="empty"){
|
||||
//provides a global counter //es: la función provee un contador global
|
||||
global $logThisCounter;
|
||||
|
||||
|
||||
|
||||
|
||||
//for logThisCounter to start in 1 //es: para que el logThisCounter comience en 1
|
||||
if(!isset($logThisCounter)){
|
||||
$logThisCounter=0;
|
||||
}
|
||||
|
||||
|
||||
//set "line" separator //es: seteo el separador "line"
|
||||
$line="\n" . '--------------------------------------------------------------------' . "\n";
|
||||
|
||||
|
||||
|
||||
|
||||
//it uses modifiers only if a log function has not
|
||||
//been passed
|
||||
|
||||
//spanish
|
||||
//uso los modificadores sólo si no se ha seteado el uso
|
||||
//de una función de log en forma directa.
|
||||
//se considera la posibilidad de pasar sólo una línea, por ej,
|
||||
//como: logThis('f:line'), en tal caso no se usan modificadores
|
||||
if(substr($string,0,2)!='f:'){
|
||||
//manejo distintos tipos de modificadores
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$this->writeLogging($string . "\n");
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
$this->writeLogging($string . "\n");
|
||||
break;
|
||||
|
||||
case '2n':
|
||||
$this->writeLogging($string . "\n\n");
|
||||
break;
|
||||
|
||||
case '3n':
|
||||
$this->writeLogging($string . "\n\n\n");
|
||||
break;
|
||||
|
||||
case 'line':
|
||||
$this->writeLogging($string . $line);
|
||||
break;
|
||||
|
||||
case '2line':
|
||||
$this->writeLogging($string . $line . $line);
|
||||
break;
|
||||
|
||||
case 'nLine':
|
||||
$this->writeLogging($string . "\n" . $line);
|
||||
break;
|
||||
|
||||
case '2nLine':
|
||||
$this->writeLogging($string . "\n\n" . $line);
|
||||
break;
|
||||
|
||||
case 'n2Line':
|
||||
$this->writeLogging($string . "\n" . $line . $line);
|
||||
break;
|
||||
}//end switch $modifier
|
||||
} else {
|
||||
//----------------
|
||||
//FUNCTIONS - "F:"
|
||||
//--------------------------------------------------
|
||||
//using a log function passed in $string //es: aquí estoy utilizando una función de log pasada en $string
|
||||
//example: logThis('f:line')
|
||||
switch($string){
|
||||
case 'f:line':
|
||||
$this->writeLogging($line);
|
||||
break;
|
||||
|
||||
case 'f:2line':
|
||||
$this->writeLogging($line . $line);
|
||||
break;
|
||||
|
||||
case 'f:nl':
|
||||
$this->writeLogging("\n");
|
||||
break;
|
||||
|
||||
case 'f:2nl':
|
||||
$this->writeLogging("\n\n");
|
||||
break;
|
||||
|
||||
case 'f:logNumber':
|
||||
$this->writeLogging('+ LOG Number: ' . $this->logNumber . "\n");
|
||||
break;
|
||||
|
||||
case 'f:counter':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($logThisCounter);
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($modifier . $logThisCounter);
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
|
||||
case 'f:counter.nl':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($logThisCounter . "\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($modifier . $logThisCounter . "\n");
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
|
||||
case 'f:nl.counter':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $logThisCounter);
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $modifier . $logThisCounter);
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
|
||||
case 'f:nl.counter.nl':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $logThisCounter . "\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $modifier . $logThisCounter . "\n");
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
}//end switch $string
|
||||
|
||||
}//end if "f:"
|
||||
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------
|
||||
|
||||
/**
|
||||
* @return String $fecha
|
||||
* @desc
|
||||
Return formatted actual date.
|
||||
Example: 28.08.2005 - 01:14
|
||||
|
||||
|
||||
//spanish
|
||||
Devuelve la fecha actual formateada.
|
||||
*/
|
||||
function get_formatted_date(){
|
||||
$fecha=date("d.m.Y - ") . (date("H")) . date(":i");
|
||||
|
||||
return $fecha;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
/**
|
||||
* Delete a file, or a folder and its contents
|
||||
*
|
||||
* @author Aidan Lister <aidan@php.net>
|
||||
* @version 1.0.2
|
||||
* @param string $dirname Directory to delete
|
||||
* @return bool Returns TRUE on success, FALSE on failure
|
||||
*/
|
||||
function rmdirr($dirname)
|
||||
{
|
||||
// Sanity check
|
||||
if (!file_exists($dirname)) {
|
||||
//echo 'dir not exist: ' . $dirname . "<br>\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Simple delete for a file
|
||||
if (is_file($dirname)) {
|
||||
return unlink($dirname); //delete files inside dir //acá elimina los archivos dentro del dir
|
||||
//echo 'DELETED FILE: ' . $dirname . "<br>\n";
|
||||
}
|
||||
|
||||
|
||||
if(is_dir($dirname)){
|
||||
// Loop through the folder
|
||||
$dir = dir($dirname);
|
||||
while (false !== $entry = $dir->read()) {
|
||||
// Skip pointers
|
||||
if ($entry == '.' || $entry == '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Recurse
|
||||
$this->rmdirr("$dirname/$entry");
|
||||
}
|
||||
|
||||
// Clean up
|
||||
$dir->close();
|
||||
return rmdir($dirname); //delete empty dir //acá elimina el directorio que ya quedó vacío
|
||||
//echo 'DELETED DIR : ' . $dirname . "<br>\n";
|
||||
}//fin if is dir
|
||||
|
||||
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @desc
|
||||
Deletes log dir and its contents.
|
||||
|
||||
//spanish
|
||||
Elimina el directorio de Loggings y su contenido
|
||||
para comenzar un nuevo proceso de log desde cero.
|
||||
*/
|
||||
function clean(){
|
||||
$this->rmdirr($this->logDir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} //end class Logging
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
$_CONF['app_name'] = 'Logfiles';
|
||||
$_CONF['app_desc'] = 'Logfiles';
|
||||
$_CONF['app_build'] = 1;
|
||||
$_CONF['app_version'] = 'v0.9 Beta';
|
||||
//$_CONF['base_url'] = 'demomodul/'; //Basisurl des moduls, wenn es über das Frontend aufgerufen wird
|
||||
$_CONF['base_file'] = 'log.php'; //Datei, die angezeigt wird, wenn die basisurl aufgerufen wird
|
||||
$_CONF['menu_top'] = '<i class="fa fa-server"></i> '.$lang->get('log_title'); //Name des Moduls, wie es im Adminbereich im Hauptmenü auftaucht
|
||||
$_CONF['menu'] = ['menu_top' => 'index.php']; //Ein Array mit menüpunkten im Backoffice
|
||||
//$_CONF['dashboard'] = 'dashboard.php'; //Optional, eine Datei, welche im admindashboard angezeigt wird
|
||||
$_CONF['type'] = 'static';
|
||||
$_CONF['install'] = 'install.php';
|
||||
?>
|
|
@ -1,176 +0,0 @@
|
|||
<?php
|
||||
require_once '../../inc/autoload.php';
|
||||
printHeader('Logfiles');
|
||||
?>
|
||||
<div class="main">
|
||||
<?php
|
||||
if (hasPerm('view_logfiles'))
|
||||
{
|
||||
$monate = array('01' => "Januar",
|
||||
'02' => "Februar",
|
||||
'03' => "März",
|
||||
'04' => "April",
|
||||
'05' => "Mai",
|
||||
'06' => "Juni",
|
||||
'07' => "Juli",
|
||||
'08' => "August",
|
||||
'09' => "September",
|
||||
'10' => "Oktober",
|
||||
'11' => "November",
|
||||
'12' => "Dezember");
|
||||
if (isset($_GET['detail']))
|
||||
{
|
||||
$logfile = $_GET['detail'] . '.log';
|
||||
$logN = explode('-', str_replace('.log', '', $logfile));
|
||||
echo '<h1>'. $lang->get('log_detail_title'). ' ' . $logN[2] . '. ' . $monate[$logN[1]] . ' ' . $logN[0] . '</h1>';
|
||||
//var_dump($_SERVER);
|
||||
?>
|
||||
<form action="?detail=<?php echo $_GET['detail']; ?>" method="post">
|
||||
<input type="text" name="filter" value="" placeholder="<?php echo $lang->get('log_filter_logs');?>"/>
|
||||
<input type="submit" value="<?php echo $lang->get('log_filter_logs');?>"/>
|
||||
</form>
|
||||
<?php
|
||||
$i = 0;
|
||||
if (file_exists('../../' . $MCONF['log_uri'] . '/' . $logfile))
|
||||
{
|
||||
$lines = file('../../' . $MCONF['log_uri'] . '/' . $logfile);
|
||||
foreach ($lines as $line_num => $line)//logfile ausgeben
|
||||
{
|
||||
if ($line_num > 1)
|
||||
{
|
||||
if (isset($_POST['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_POST['filter']) !== false)//mit post
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
//echo $line . '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} elseif (isset($_GET['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_GET['filter']) !== false)//mit get
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} else//ungefiltert
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<b>'.$i . ' ' . $lang->get('log_views_total').'</b>';
|
||||
} else
|
||||
{
|
||||
echo '<p>'.$lang->get('log_file_not_found').'</p>';
|
||||
}
|
||||
} elseif (isset($_GET['detailmon']))
|
||||
{
|
||||
$logmon = $_GET['detailmon'];
|
||||
$logmonN = explode('-', $logmon);
|
||||
|
||||
echo '<h1>'.$lang->get('log_detail_title_from').' ' . $monate[$logmonN[0]] . ' ' . $logmonN[1] . '</h1>';
|
||||
?>
|
||||
<form action="?detailmon=<?php echo $_GET['detailmon']; ?>" method="post">
|
||||
<input type="text" name="filter" value="" placeholder="<?php echo $lang->get('log_filter_logs');?>"/>
|
||||
<input type="submit" value="<?php echo $lang->get('log_filter_logs');?>" class="speichern"/>
|
||||
</form>
|
||||
<?php
|
||||
$i = 0;
|
||||
if ($handle = opendir('../../' . $MCONF['log_uri'] . ''))//logs anzeiugen
|
||||
{
|
||||
while ((false !== ($file = readdir($handle))))
|
||||
{
|
||||
if (strpos($file, $logmonN[1] . '-' . $logmonN[0]) !== false)//nur zum monat passende logs anzeigen
|
||||
{
|
||||
$lines = file('../../' . $MCONF['log_uri'] . '/' . $file);
|
||||
foreach ($lines as $line_num => $line)//ausgeben
|
||||
{
|
||||
if ($line_num > 1)
|
||||
{
|
||||
if (isset($_POST['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_POST['filter']) !== false)//mit post
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} elseif (isset($_GET['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_GET['filter']) !== false)//mit get
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} else//ungefiltert
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<b>'.$i . ' ' . $lang->get('log_views_total').'</b>';
|
||||
} else
|
||||
{
|
||||
echo '<h2>'.$lang->get('log_total_pageviews').' ' . file_get_contents('../../' . $MCONF['log_uri'] . '/count.counter') . '</h2>';
|
||||
$monatelogs = [];
|
||||
//monatslogliste erstellen
|
||||
if ($handle = opendir('../../' . $MCONF['log_uri'] . ''))
|
||||
{
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != ".." && $file != 'count.counter')
|
||||
{
|
||||
$strtiel = [];
|
||||
$strtiel = explode('-', str_replace('.log', '', $file));
|
||||
$logsatr = $strtiel[0] . '-' . $strtiel[1];
|
||||
if (!in_array($logsatr, $monatelogs))
|
||||
{
|
||||
$monatelogs[] = $strtiel[0] . '-' . $strtiel[1];
|
||||
}
|
||||
//echo '<a href="?detail='.$file.'">'.$file.'</a><br/>';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
//var_dump($monatelogs);
|
||||
//monatsloglist ausgeben
|
||||
asort($monatelogs);
|
||||
foreach ($monatelogs as $log)
|
||||
{
|
||||
$logN = explode('-', $log);
|
||||
echo '<h2>' . $monate[$logN[1]] . ' ' . $logN[0] . '</h2>';
|
||||
if ($handle = opendir('../../' . $MCONF['log_uri'] . ''))
|
||||
{
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != ".." && strpos($file, $log) !== false)
|
||||
{
|
||||
echo '<a href="?detail=' . str_replace('.log', '', $file) . '">' . str_replace('.log', '', $file) . '</a><br/>';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
echo '<a href="?detailmon=' . $logN[1] . '-' . $logN[0] . '">'.sprintf($lang->get('log_show_full_logs'), $monate[$logN[1]], $logN[0]) . '</a>';
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('missing_permission'));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
require_once '../../inc/footer.php';
|
||||
?>
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
if(isset($_POST['log_folder']))
|
||||
{
|
||||
$CONFIG['General']['log_uri'] = $_POST['log_folder'];
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<h2>Logfiles</h2>
|
||||
<span>Log-Folder</span>
|
||||
<input type="text" name="log_folder"/>
|
||||
<?php
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Logfiles apps
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'German (Deutsch)';
|
||||
$lang['__LangCode__'] = 'de';
|
||||
$lang['__Countrycode__'] = 'de_DE';
|
||||
|
||||
$lang['log_title'] = 'Logfiles';
|
||||
$lang['log_detail_title'] = 'Logfile vom';
|
||||
$lang['log_detail_title_from'] = 'Logfiles von';
|
||||
$lang['log_filter_logs'] = 'Logs Filtern';
|
||||
$lang['log_views_total'] = 'Aufrufe insgesamt.';
|
||||
$lang['log_file_not_found'] = 'Logfile nicht gefunden';
|
||||
$lang['log_total_pageviews'] = 'Gesamte Seitenaufrufe';
|
||||
$lang['log_show_full_logs'] = 'Gesamte Logdateien für %1$s %2$s anzeigen';
|
||||
|
||||
//Permissions
|
||||
$lang['logfiles_perm_view_logfiles_name'] = 'Logfiles ansehen';
|
||||
$lang['logfiles_perm_view_logfiles_description'] = '';
|
|
@ -1,26 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Logfiles apps
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'English (English)';
|
||||
$lang['__LangCode__'] = 'en';
|
||||
$lang['__Countrycode__'] = 'en';
|
||||
|
||||
$lang['log_title'] = 'Logfiles';
|
||||
$lang['log_detail_title'] = 'Logfile of';
|
||||
$lang['log_detail_title_from'] = 'Logfiles from';
|
||||
$lang['log_filter_logs'] = 'Filter logs';
|
||||
$lang['log_views_total'] = 'views in total.';
|
||||
$lang['log_file_not_found'] = 'Logfile not found';
|
||||
$lang['log_total_pageviews'] = 'Total pageviews';
|
||||
$lang['log_show_full_logs'] = 'Show all logfiles from %1$s %2$s';
|
||||
|
||||
//Permissions
|
||||
$lang['logfiles_perm_view_logfiles_name'] = 'View Logfiles';
|
||||
$lang['logfiles_perm_view_logfiles_description'] = '';
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
require_once $appUri.'/Log.class.php';
|
||||
|
||||
$logFileName = date('Y-m-d');
|
||||
$headerTitle = 'Logfiles from '.$_SERVER['SERVER_NAME'];
|
||||
$logMode = 'oneFile';
|
||||
$counterFile = 'count.counter';
|
||||
$log = new Logging($MCONF['log_uri'],$logFileName,$headerTitle, $logMode, $counterFile);
|
||||
|
||||
$charset = '';
|
||||
if(isset($_SERVER['HTTP_ACCEPT_CHARSET']))
|
||||
{
|
||||
$charset = $_SERVER['HTTP_ACCEPT_CHARSET'];
|
||||
}
|
||||
$logstring = $_SERVER['REMOTE_ADDR'].' - '.$_SERVER['SERVER_NAME'].' - ['.date('d.m.Y:H:i:s').'] '.$_SERVER['SERVER_PROTOCOL'].' '.http_response_code().' "'.$_SERVER['REQUEST_METHOD'].' '.$_SERVER['REQUEST_URI'].'" "'.$_SERVER['HTTP_USER_AGENT'].'" '.$charset.' '.$_SERVER['HTTP_ACCEPT_LANGUAGE'].' '.$_SERVER['HTTP_CONNECTION'];
|
||||
$log->logThis($logstring);
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"permissions": [
|
||||
{
|
||||
"key": "view_logfiles",
|
||||
"name": "View Logfiles",
|
||||
"description": "",
|
||||
"critical": false
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue