PHP_SMART_HOME_V3/app/views/templates/log.phtml

93 lines
2.6 KiB
PHTML
Raw Normal View History

2020-05-16 15:18:27 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
2020-07-24 16:21:11 +00:00
<?php
$partial = new Partial('head');
$partial->prepare('baseDir', $BASEDIR);
$partial->render();
?>
<title><?php echo $TITLE ?></title>
2020-05-16 15:18:27 +00:00
</head>
<body class="no-transitions">
2020-07-24 16:21:11 +00:00
<div class="row no-gutters main">
<div class="col-md-3 d-sm-none"></div>
<div class="col-md-3 nav-container">
<?php
$partial = new Partial('menu');
$partial->prepare('item', 'log');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>
<div class="col-md-9 main-body">
<div class="col-12 col-sm-9 mx-auto mt-4">
<h1><?php echo $LANGMNG->get('t_Logs'); ?></h1>
2020-07-30 14:31:25 +00:00
<div class="row mb-4">
<div class="col-6 col-lg-3">
<div class="panel alert alert-danger p-4 is-danger">
<h5><?php $LANGMNG->echo('error'); ?></h5>
<?php echo $LOGSTATS['ERROR'];?>
</div>
</div>
<div class="col-6 col-lg-3">
<div class="panel alert alert-warning p-4">
<h5><?php $LANGMNG->echo('warning'); ?></h5>
<?php echo $LOGSTATS['WARNING'];?>
</div>
</div>
<div class="col-6 col-lg-3">
<div class="panel alert alert-warning p-4">
2020-08-03 13:06:43 +00:00
<h5 ><?php $LANGMNG->echo('exeption'); ?></h5>
2020-07-30 14:31:25 +00:00
<?php echo $LOGSTATS['EXEPTION'];?>
</div>
</div>
<div class="col-6 col-lg-3">
<div class="panel alert p-4">
<h5><?php $LANGMNG->echo('log'); ?></h5>
<?php echo $LOGSTATS['INFO'];?>
</div>
</div>
</div>
2020-07-24 16:21:11 +00:00
<label><?php echo $LANGMNG->get('l_logMaxLiveTime') . " " . $LOGTOLIVETIME . " days";?></label></br>
2020-05-16 15:18:27 +00:00
2020-07-24 16:21:11 +00:00
<form method="post" action="">
<div class="field">
<select class="input" name="LogFile">
<?php foreach ($LOGSFILES as $key => $value) { ?>
<optgroup label="<?php echo str_replace("../", "", $key); ?>">
<?php foreach ($value as $valueSub) { ?>
<option value="<?php echo $key . $valueSub; ?>"><?php echo $valueSub; ?></option>
<?php } ?>
</optgroup>
<?php } ?>
</select>
</div>
<div class="field">
<input type="submit" class="button" name="selectFile" value="<?php $LANGMNG->echo('b_select');?>"/>
</div>
</form>
<?php
if (isset($_POST['LogFile'])) {
$file_lines = file($_POST['LogFile']);
echo '<pre style="overflow: auto;">';
foreach ($file_lines as $line) {
echo $line;
}
echo '</pre>';
}
?>
</div>
</div>
<?php
$partial = new Partial('footer');
$partial->prepare('baseDir', BASEDIR);
$partial->render();
//TODO js do main.js
?>
</body>
</html>