<?php
# ------------------------------------------------------------------------------
#
# This file contains the tv control funcionality for the movie player
#
# ------------------------------------------------------------------------------
#
# Copyright (C) 2003 Christian Eheim and Alex Pachikov
#
# This file is part of TVEz (tvez.sourceforge.net).
#
# TVEz is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# TVEz is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with TVEz; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ------------------------------------------------------------------------------
#
# Created on 02/12/2003 by Alex Pachikov
#
# LAST MODIFIED:
# $Date: 2004/01/25 02:11:34 $
# $Revision: 1.2 $
# $Author: eheim $
#
# ------------------------------------------------------------------------------
require "../../config/config_file.php";
require "socket.php";
require "../shared/session.php";
if ( !isset($_SESSION['tvezAccess']) && $LOGIN_ENABLED )
exit;
if (isset($_REQUEST["tvst"]) && $_REQUEST["tvst"]!="")
$tvst = $_REQUEST["tvst"]."\r\n";
elseif (isset($_REQUEST["back"]) && $_REQUEST["back"]!="")
$tvst = $_REQUEST["back"]."\r\n";
elseif (isset($_REQUEST["fwd"]) && $_REQUEST["fwd"]!="")
$tvst = $_REQUEST["fwd"]."\r\n";
elseif (isset($_REQUEST["loop"]) && $_REQUEST["loop"]!="")
$tvst = $_REQUEST["loop"]."\r\n";
list($errno,$ans) = send_command($tvst);
$lines = urlencode($ans);
header("Location: player.php?output=$lines\n\n");
exit();
?>