From 32b78254c76ebd9a07ad19edf25f1f0846a33bb8 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Sat, 27 Feb 2010 02:12:43 +0100 Subject: Sessions WIP --- includes/inc_home.php | 39 +++++++++++++++++++++++++++++++++------ includes/inc_session.php | 7 ++++++- includes/inc_streaminfo.php | 4 ++-- includes/inc_streaming.php | 7 ++++++- 4 files changed, 47 insertions(+), 10 deletions(-) (limited to 'includes') diff --git a/includes/inc_home.php b/includes/inc_home.php index 0c372ac..bc9a402 100755 --- a/includes/inc_home.php +++ b/includes/inc_home.php @@ -9,20 +9,45 @@ print "\r\n"; print "
\r\n"; // Streaming in progress -$dir_handle = @opendir('ram'); +$dir_handle = @opendir('ram/'); if ($dir_handle) { - print " Streaming...\r\n"; print " \r\n"; + print " \r\n"; + + closedir($dir_handle); } // VDR menus diff --git a/includes/inc_session.php b/includes/inc_session.php index c74d780..5c06c0c 100755 --- a/includes/inc_session.php +++ b/includes/inc_session.php @@ -26,11 +26,14 @@ function sessioncreate($type, $name, $title, $desc, $qname, $qparams, $category, } $cmd = str_replace('%', '%%', $cmd); - exec($cmd); + exec ($cmd); // Write streaminfo writeinfostream($session, $type, $name, $title, $desc, $qname, $category, $url, $mediapath, $subdir); + // Copy status waiter + exec('cp streamstatus.php ram/' .$session); + return $session; } @@ -54,4 +57,6 @@ function sessiondelete($session) $cmd= $subcmd ."rm -rf " .$ram; exec ($cmd); +} + ?> diff --git a/includes/inc_streaminfo.php b/includes/inc_streaminfo.php index e41b24f..4124396 100755 --- a/includes/inc_streaminfo.php +++ b/includes/inc_streaminfo.php @@ -32,10 +32,10 @@ function readinfostream($session) { $ram = "ram/" .$session ."/"; - if (!file_exists($session ."streaminfo")) + if (!file_exists($ram ."streaminfo")) return array(0, "", "", "", ""); - $infofile = fopen($session ."streaminfo", 'r'); + $infofile = fopen($ram ."streaminfo", 'r'); if (!$infofile) return array(0, "", "", "", ""); diff --git a/includes/inc_streaming.php b/includes/inc_streaming.php index 9da377f..a294a9d 100755 --- a/includes/inc_streaming.php +++ b/includes/inc_streaming.php @@ -11,11 +11,15 @@ $ram = "ram/" .$session ."/"; // Get current stream info list($type, $realname, $title, $desc, $mode, $category, $url, $mediapath, $subdir) = readinfostream($session); -print "\r\n"; +print "\r\n"; print "
\r\n"; print "
\r\n"; print "Stop Stream
\r\n"; + +print "
\r\n"; +print "\"home\"
\r\n"; + print "
iStreamdev
\r\n"; print "
\r\n"; @@ -43,6 +47,7 @@ print "
\r\n"; print "
"; print " "; +print " "; print " "; switch ($type) { -- cgit v1.2.3