From f33dd412056f3ee762513d40030f134e7b8ccb9b Mon Sep 17 00:00:00 2001 From: Naglfar Date: Tue, 12 Jan 2021 19:47:21 +0100 Subject: Use video for title only on its own page --- index.php | 2 +- php/definitions.php | 1 + php/rd-procedures.php | 3 +++ php/wd-procedures.php | 5 +++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index cd760d0..0fe6136 100644 --- a/index.php +++ b/index.php @@ -8,7 +8,7 @@ require 'php/wd-procedures.php'; #video management (Write/update data) - <?php printf("%s - %s", $vdata[2], $wsdata[0]) ?> + <?php printf("%s - %s", $title, $wsdata[0]) ?> diff --git a/php/definitions.php b/php/definitions.php index f1909ed..ab82199 100644 --- a/php/definitions.php +++ b/php/definitions.php @@ -3,4 +3,5 @@ $dpath = 'data/'; $common = 'common.mvms'; # common header/footer contents $channel = 'channel'; # Channel index $cpath = 'mvms/'; # Path of the contents +$title = 0; ?> diff --git a/php/rd-procedures.php b/php/rd-procedures.php index 70ba50c..9f4d586 100644 --- a/php/rd-procedures.php +++ b/php/rd-procedures.php @@ -10,7 +10,10 @@ $vdata = explode('/', $_SERVER['REQUEST_URI']); /* 2 security check */ if(!empty($vdata[1])) if(in_array($vdata[1], $vindex)) + { $vid = $vdata[1]; + $title = 1; + } $vdata = file($dpath.$wsdata[4].'/toc/'.$vid, FILE_IGNORE_NEW_LINES); $cindex = file($dpath.$wsdata[4].'/'.$channel, FILE_IGNORE_NEW_LINES); diff --git a/php/wd-procedures.php b/php/wd-procedures.php index 768a44d..d42de46 100644 --- a/php/wd-procedures.php +++ b/php/wd-procedures.php @@ -4,4 +4,9 @@ file_put_contents($dpath.$wsdata[4].'/toc/'.$vid, implode(PHP_EOL, $vdata)); $vdata[1] = date('M j, Y', $vdata[1]); $vdata[] = file_get_contents($dpath.$wsdata[4].'/'.$cpath.$vid); + +if($title) + $title = $vdata[2]; +else + $title = $wsdata[5]; ?> -- cgit 1.4.1-2-gfad0