Compare commits
14 Commits
master
...
dashboard-
| Author | SHA1 | Date | |
|---|---|---|---|
| 52def87330 | |||
| 2cb756dee6 | |||
| f6327417f0 | |||
| 1178cae46b | |||
| 8e87343105 | |||
| a132feec01 | |||
| 27e0ed4529 | |||
| 0be0427737 | |||
| 90d2421c03 | |||
| dc11391e6c | |||
| e2bf69f8fe | |||
| 225c66b8f8 | |||
| a17652035a | |||
| ccd57f7fdf |
4
getcron
4
getcron
@ -9,6 +9,8 @@ mapfile -t lines < <(crontab -l |grep -v '^#' |grep ' *\s/var/www/stream ')
|
|||||||
|
|
||||||
#echo "User: $1"
|
#echo "User: $1"
|
||||||
#now=$(date '+%Y-%m-%d %H:%M')
|
#now=$(date '+%Y-%m-%d %H:%M')
|
||||||
|
#retrieve and display cron entries
|
||||||
|
crondisplay() {
|
||||||
for line in "${lines[@]}"
|
for line in "${lines[@]}"
|
||||||
do
|
do
|
||||||
#tag=${line##* } _=${tag#*.} dt="${_:0:10} ${_:11:2}:${_:13:2}" _=${_:16} user=${_%%[@:]*}
|
#tag=${line##* } _=${tag#*.} dt="${_:0:10} ${_:11:2}:${_:13:2}" _=${_:16} user=${_%%[@:]*}
|
||||||
@ -18,3 +20,5 @@ do
|
|||||||
dt=$(printf "%02d:%02d %s %d" $h $m $(date -d 2022-$M-01 +%B) $d)
|
dt=$(printf "%02d:%02d %s %d" $h $m $(date -d 2022-$M-01 +%B) $d)
|
||||||
[[ -z $1 || $user = $1 ]] && printf "%-20s %s\n" "$dt" $tag
|
[[ -z $1 || $user = $1 ]] && printf "%-20s %s\n" "$dt" $tag
|
||||||
done |sort
|
done |sort
|
||||||
|
}
|
||||||
|
crondisplay 2>&1 |tee ./web/streams.txt
|
||||||
7
web/dashboard.php
Executable file
7
web/dashboard.php
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
include_once 'header.php'; ?>
|
||||||
|
<div class="dash">
|
||||||
|
<?php
|
||||||
|
echo nl2br(file_get_contents( "streams.txt" ));
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
37
web/header.php
Executable file
37
web/header.php
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
require "check.php";
|
||||||
|
$user=@$_SESSION['user'];
|
||||||
|
if(empty($user)){
|
||||||
|
header('Location: login.php');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Stream Upload</title>
|
||||||
|
<link rel="icon" href="favicon.png">
|
||||||
|
<link rel="stylesheet" href="page.css">
|
||||||
|
<script>
|
||||||
|
function respond(){
|
||||||
|
const feedback = document.getElementById("response");
|
||||||
|
feedback.innerHTML = "<b>File is uploading</b>";
|
||||||
|
}
|
||||||
|
function filename(){
|
||||||
|
var name = document.getElementById("name");
|
||||||
|
name.innerHTML = document.getElementById("input").files[0].name;
|
||||||
|
name.style.fontWeight = "normal";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="header">
|
||||||
|
<div class="user">
|
||||||
|
<p class="user">User: <b><?php echo $user ?></b></p>
|
||||||
|
</div>
|
||||||
|
<div class="menu">
|
||||||
|
<a href="index.php" class="menu-item">Home</a>
|
||||||
|
<a href="dashboard.php" class="menu-item">Scheduled Streams</a>
|
||||||
|
</div>
|
||||||
|
<div class="account">
|
||||||
|
<form action="login.php" method="post">
|
||||||
|
<input id="logoff" type="submit" name="logoff" value="Logoff">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,30 +1,6 @@
|
|||||||
<?php // Schedule page
|
<?php // Schedule page
|
||||||
require "check.php";
|
include_once 'header.php';
|
||||||
$user=@$_SESSION['user'];
|
print('
|
||||||
if(empty($user)){
|
|
||||||
header('Location: login.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
print('<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Stream Upload scheduling</title>
|
|
||||||
<link rel="icon" href="favicon.png">
|
|
||||||
<link rel="stylesheet" href="page.css">
|
|
||||||
<script>
|
|
||||||
function respond(){
|
|
||||||
const feedback = document.getElementById("response");
|
|
||||||
feedback.innerHTML = "<b>File is uploading</b>";
|
|
||||||
}
|
|
||||||
function filename(){
|
|
||||||
var name = document.getElementById("name");
|
|
||||||
name.innerHTML = document.getElementById("input").files[0].name;
|
|
||||||
name.style.fontWeight = "normal";
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<div class="user"><p class="user">User: <b>'.$user.'</b></p>
|
|
||||||
<form action="login.php" method="post">
|
|
||||||
<input id="logoff" type="submit" name="logoff" value="Logoff">
|
|
||||||
</form></div>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="incontainer">
|
<div class="incontainer">
|
||||||
<h1>Stream Upload</h1>
|
<h1>Stream Upload</h1>
|
||||||
|
|||||||
32
web/page.css
32
web/page.css
@ -6,20 +6,39 @@ body {
|
|||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
.user {
|
.user {
|
||||||
display:flex;
|
width: 10%;
|
||||||
width:100%;
|
|
||||||
justify-content:left;
|
justify-content:left;
|
||||||
background-color:#ccc;
|
|
||||||
box-sizing:border-box;
|
|
||||||
}
|
}
|
||||||
p.user {
|
p.user {
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:.9em;
|
padding:.9em;
|
||||||
}
|
}
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
background-color:#ccc;
|
||||||
|
box-sizing:border-box;
|
||||||
|
}
|
||||||
|
.account {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
.menu {
|
||||||
|
padding:.9em;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.menu-item {
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #000;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
#logoff {
|
#logoff {
|
||||||
margin:0;
|
margin:0;
|
||||||
background-color:darkorange;
|
background-color:darkorange;
|
||||||
width:100px;
|
width:100px;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
display:flex;
|
display:flex;
|
||||||
@ -27,11 +46,16 @@ p.user {
|
|||||||
justify-content:center;
|
justify-content:center;
|
||||||
align-items:center;
|
align-items:center;
|
||||||
height:95vh;
|
height:95vh;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.incontainer {
|
.incontainer {
|
||||||
width:325px;
|
width:325px;
|
||||||
max-width:325px;
|
max-width:325px;
|
||||||
}
|
}
|
||||||
|
.dash {
|
||||||
|
padding-top: 50px;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
h4 {
|
h4 {
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
background-color:red;
|
background-color:red;
|
||||||
|
|||||||
@ -60,15 +60,8 @@ session_unset();
|
|||||||
header('Location: login.php');
|
header('Location: login.php');
|
||||||
} ///////////////////////
|
} ///////////////////////
|
||||||
$file=$dir.$name.'.upload';
|
$file=$dir.$name.'.upload';
|
||||||
print('<!DOCTYPE html>
|
include_once "header.php";
|
||||||
<meta charset="utf-8">
|
print('
|
||||||
<title>Stream Upload encoding</title>
|
|
||||||
<link rel="icon" href="favicon.png">
|
|
||||||
<link rel="stylesheet" href="page.css">
|
|
||||||
<div class="user"><p class="user">User: <b>'.$user.'</b></p>
|
|
||||||
<form action="login.php" method="post">
|
|
||||||
<input id="logoff" type="submit" name="logoff" value="Logoff">
|
|
||||||
</form></div>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Encoding</h1>
|
<h1>Encoding</h1>
|
||||||
<p>Uploaded <b>'.$upload.'</b></p>');
|
<p>Uploaded <b>'.$upload.'</b></p>');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user