From 0c9414a9fecf2278d468acb1cf184e776b5a15c7 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Sat, 27 Feb 2010 01:04:29 +0100 Subject: Multiple sessions support WIP --- includes/inc_streaminfo.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'includes/inc_streaminfo.php') diff --git a/includes/inc_streaminfo.php b/includes/inc_streaminfo.php index 576bd5d..e41b24f 100755 --- a/includes/inc_streaminfo.php +++ b/includes/inc_streaminfo.php @@ -8,9 +8,11 @@ 3 : Media */ -function writeinfostream($type=0, $name="", $title="", $desc="", $mode="", $category="", $url="", $mediapath="", $subdir="") +function writeinfostream($session, $type=0, $name="", $title="", $desc="", $mode="", $category="", $url="", $mediapath="", $subdir="") { - $infofile = fopen("ram/streaminfo", 'w'); + $ram = "ram/" .$session ."/"; + + $infofile = fopen($ram ."streaminfo", 'w'); fwrite($infofile, "type=" .$type ."\n"); fwrite($infofile, "name=" .$name ."\n"); @@ -26,13 +28,14 @@ function writeinfostream($type=0, $name="", $title="", $desc="", $mode="", $cate } -function readinfostream() +function readinfostream($session) { + $ram = "ram/" .$session ."/"; - if (!file_exists("ram/streaminfo")) + if (!file_exists($session ."streaminfo")) return array(0, "", "", "", ""); - $infofile = fopen("ram/streaminfo", 'r'); + $infofile = fopen($session ."streaminfo", 'r'); if (!$infofile) return array(0, "", "", "", ""); @@ -63,9 +66,4 @@ function readinfostream() return array($type, $name, $title, $desc, $mode, $category, $url, $mediapath, $subdir); } -function infostreamexist() -{ - return file_exists("ram/streaminfo"); -} - ?> -- cgit v1.2.3