diff options
66 files changed, 8653 insertions, 2283 deletions
@@ -1,10 +1,67 @@ +Author: Andreas Mair +WWW: http://andreas.vdr-developer.org +E-Mail: mail AT andreas DOT vdr-developer DOT org +VDR-Portal: amair +----------------------------------------------------------- + +2005-03-20: 0.97-am2 +- TV and remote templates have same remote control. + +Added patches: +- fix for timers.conf of vdr1.3.23+ (Submitted by x-stefan @vdrportal.de) +- Localnet Patch; no password request if client ip in given ip range) (Submitted by "Reiner Buehl" <reiner@buehl.net>) + +2005-03-19: +Templates cleanup: +- timer_list.html +- timer_new.html +- toolbar.html +- tv_flash.html +- tv.html + +2005-03-18: +- reworked summary display of recordings +- summary editbox preserves linefeeds while editing timers + +Templates cleanup: +- prog_timeline.html +- rc.html +- rec_edit.html +- rec_list.html + +2005-03-12: +- Added stream button in prog_summmary (suggested by Unimatrix0 @vdrportal.de) + +Templates cleanup: +- at_new.html +- at_timer_list.html +- config.html +- error.html +- index.html +- left.html +- noauth.html +- noperm.html +- prog_details.html (TODO) +- prog_list2.html +- prog_list.html +- prog_summary.html (TODO) + +Added patches: +- vdradmin-0.96_For_vdr-1.3_StoreAutotimerChannelID_And_EventIdCheckDisable.diff (posted at the VDR mailinglist by "Rantanen Teemu" <teemu.rantanen@tekla.com>) +- vdradmin-0.96_OneShot_Timers_English_Only.diff and merged it to "Deutsch" template (posted at the VDR mailinglist by "Rantanen Teemu" <teemu.rantanen@tekla.com>) +- included changes from vdradmin-0.96-3-ctvdr-1 (see HISTORY.ct). + +Changes that have been forgotten while merging previous patches: +- Fixed: timer listing now shows "VPS" instead of "Auto (alt)". +- removed unneeded <br>. They are still used for display only. + 2005-03-06: 0.97-am1 "initial release" This is mainly the lastest vdradmin (v0.97) with different patches applied: - vdradmin-0.97 has been taken from linvdr-0.7. - xpix's BigPatch_0.9pre5 (ported from vdradmin-0.95 to vdradmin-0.97 (see HISTORY.bigpatch). - included changes from vdradmin-0.95-ct-10 (see HISTORY.ct). - included vdradmin-0.95_0.9_pre5_fb1.diff (see HISTORY.macfly). -- included vdradmin-0.96-rename.diff which also needs an applied "vdr-aio21_svdrprename.patch" patch (don't know the author right now). +- included vdradmin-0.96-rename.diff which also needs an applied "vdr-aio21_svdrprename.patch" patch (Author: slime @vdrportal.de). My own changes: - included missing "Was läuft heute?" template (found at www.vdr-portal.de). @@ -12,6 +69,7 @@ My own changes: - Beautified recordings listing (at least in my eyes ;-) - Added "Size" selectbox to TV template. +************************************************************ PLEASE NOTE: - Streaming doesn't work for me in this release. If you get it working please let me know! - All the above mentioned work/patches only deal with the German templates and the default "bilder" skin. Binary files differdiff --git a/README.am b/README.am new file mode 120000 index 0000000..e3278cd --- /dev/null +++ b/README.am @@ -0,0 +1 @@ +HISTORY.am
\ No newline at end of file @@ -0,0 +1,3 @@ +- evtl. JPEG Komprimierungsrate und default TV Größe einstellbar +- fehlende Bilder für "copper" +- streaming diff --git a/contrib/vdradmin-0.97-am1-vdr1.3.23-timer.diff b/contrib/vdradmin-0.97-am1-vdr1.3.23-timer.diff new file mode 100755 index 0000000..14ad12b --- /dev/null +++ b/contrib/vdradmin-0.97-am1-vdr1.3.23-timer.diff @@ -0,0 +1,44 @@ +--- vdradmind.pl.save 2005-03-20 19:38:06.000000000 +0100 ++++ vdradmind.pl 2005-03-20 19:43:51.000000000 +0100 +@@ -1435,26 +1435,25 @@ + substr($stop, 0, 2), $stop > $start ? $3 : $3 + 1, + ($2 - 1), $1); + } else { # regular timer +- $startsse = my_mktime(substr($start, 2, 2), +- substr($start, 0, 2), $dor, (my_strftime("%m") - 1), +- my_strftime("%Y")); ++ $dor =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; ++ $startsse = my_mktime(substr($start, 2, 2), substr($start, 0, 2), $3, ($2 - 1), $1); + + $stopsse = my_mktime(substr($stop, 2, 2), +- substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, +- (my_strftime("%m") - 1), my_strftime("%Y")); ++ substr($stop, 0, 2), $stop > $start ? $3 : $3 + 1, ($2 - 1), $1); + } + +- # move timers which have expired one month into the future +- if(length($dor) != 7 && $stopsse < time) { +- $startsse = my_mktime(substr($start, 2, 2), +- substr($start, 0, 2), $dor, (my_strftime("%m") % 12), +- (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); +- +- $stopsse = my_mktime(substr($stop, 2, 2), +- substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, +- (my_strftime("%m") % 12), +- (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); +- } ++# vdr-1.3.23 changes day format to yyyy-mm-dd ++# # move timers which have expired one month into the future ++# if(length($dor) != 7 && $stopsse < time) { ++# $startsse = my_mktime(substr($start, 2, 2), ++# substr($start, 0, 2), $dor, (my_strftime("%m") % 12), ++# (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); ++# ++# $stopsse = my_mktime(substr($stop, 2, 2), ++# substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, ++# (my_strftime("%m") % 12), ++# (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); ++# } + + if($CONFIG{RECORDINGS} && length($dor) == 7) { # repeating timer + # generate repeating timer entries for up to 28 days diff --git a/lib/File/Temp.pm b/lib/File/Temp.pm new file mode 100644 index 0000000..1266f6c --- /dev/null +++ b/lib/File/Temp.pm @@ -0,0 +1,2245 @@ +package File::Temp; + +=head1 NAME + +File::Temp - return name and handle of a temporary file safely + +=begin __INTERNALS + +=head1 PORTABILITY + +This section is at the top in order to provide easier access to +porters. It is not expected to be rendered by a standard pod +formatting tool. Please skip straight to the SYNOPSIS section if you +are not trying to port this module to a new platform. + +This module is designed to be portable across operating systems and it +currently supports Unix, VMS, DOS, OS/2, Windows and Mac OS +(Classic). When porting to a new OS there are generally three main +issues that have to be solved: + +=over 4 + +=item * + +Can the OS unlink an open file? If it can not then the +C<_can_unlink_opened_file> method should be modified. + +=item * + +Are the return values from C<stat> reliable? By default all the +return values from C<stat> are compared when unlinking a temporary +file using the filename and the handle. Operating systems other than +unix do not always have valid entries in all fields. If C<unlink0> fails +then the C<stat> comparison should be modified accordingly. + +=item * + +Security. Systems that can not support a test for the sticky bit +on a directory can not use the MEDIUM and HIGH security tests. +The C<_can_do_level> method should be modified accordingly. + +=back + +=end __INTERNALS + +=head1 SYNOPSIS + + use File::Temp qw/ tempfile tempdir /; + + $fh = tempfile(); + ($fh, $filename) = tempfile(); + + ($fh, $filename) = tempfile( $template, DIR => $dir); + ($fh, $filename) = tempfile( $template, SUFFIX => '.dat'); + + + $dir = tempdir( CLEANUP => 1 ); + ($fh, $filename) = tempfile( DIR => $dir ); + +Object interface: + + require File::Temp; + use File::Temp (); + + $fh = new File::Temp($template); + $fname = $fh->filename; + + $tmp = new File::Temp( UNLINK => 0, SUFFIX => '.dat' ); + print $tmp "Some data\n"; + print "Filename is $tmp\n"; + +The following interfaces are provided for compatibility with +existing APIs. They should not be used in new code. + +MkTemp family: + + use File::Temp qw/ :mktemp /; + + ($fh, $file) = mkstemp( "tmpfileXXXXX" ); + ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix); + + $tmpdir = mkdtemp( $template ); + + $unopened_file = mktemp( $template ); + +POSIX functions: + + use File::Temp qw/ :POSIX /; + + $file = tmpnam(); + $fh = tmpfile(); + + ($fh, $file) = tmpnam(); + +Compatibility functions: + + $unopened_file = File::Temp::tempnam( $dir, $pfx ); + +=head1 DESCRIPTION + +C<File::Temp> can be used to create and open temporary files in a safe +way. There is both a function interface and an object-oriented +interface. The File::Temp constructor or the tempfile() function can +be used to return the name and the open filehandle of a temporary +file. The tempdir() function can be used to create a temporary +directory. + +The security aspect of temporary file creation is emphasized such that +a filehandle and filename are returned together. This helps guarantee +that a race condition can not occur where the temporary file is +created by another process between checking for the existence of the +file and its opening. Additional security levels are provided to +check, for example, that the sticky bit is set on world writable +directories. See L<"safe_level"> for more information. + +For compatibility with popular C library functions, Perl implementations of +the mkstemp() family of functions are provided. These are, mkstemp(), +mkstemps(), mkdtemp() and mktemp(). + +Additionally, implementations of the standard L<POSIX|POSIX> +tmpnam() and tmpfile() functions are provided if required. + +Implementations of mktemp(), tmpnam(), and tempnam() are provided, +but should be used with caution since they return only a filename +that was valid when function was called, so cannot guarantee +that the file will not exist by the time the caller opens the filename. + +=cut + +# 5.6.0 gives us S_IWOTH, S_IWGRP, our and auto-vivifying filehandls +# People would like a version on 5.005 so give them what they want :-) +use 5.005; +use strict; +use Carp; +use File::Spec 0.8; +use File::Path qw/ rmtree /; +use Fcntl 1.03; +use Errno; +require VMS::Stdio if $^O eq 'VMS'; + +# Need the Symbol package if we are running older perl +require Symbol if $] < 5.006; + +### For the OO interface +use base qw/ IO::Handle /; +use overload '""' => "STRINGIFY"; + + +# use 'our' on v5.6.0 +use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS $DEBUG $KEEP_ALL); + +$DEBUG = 0; +$KEEP_ALL = 0; + +# We are exporting functions + +use base qw/Exporter/; + +# Export list - to allow fine tuning of export table + +@EXPORT_OK = qw{ + tempfile + tempdir + tmpnam + tmpfile + mktemp + mkstemp + mkstemps + mkdtemp + unlink0 + cleanup + }; + +# Groups of functions for export + +%EXPORT_TAGS = ( + 'POSIX' => [qw/ tmpnam tmpfile /], + 'mktemp' => [qw/ mktemp mkstemp mkstemps mkdtemp/], + ); + +# add contents of these tags to @EXPORT +Exporter::export_tags('POSIX','mktemp'); + +# Version number + +$VERSION = '0.16'; + +# This is a list of characters that can be used in random filenames + +my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + a b c d e f g h i j k l m n o p q r s t u v w x y z + 0 1 2 3 4 5 6 7 8 9 _ + /); + +# Maximum number of tries to make a temp file before failing + +use constant MAX_TRIES => 1000; + +# Minimum number of X characters that should be in a template +use constant MINX => 4; + +# Default template when no template supplied + +use constant TEMPXXX => 'X' x 10; + +# Constants for the security level + +use constant STANDARD => 0; +use constant MEDIUM => 1; +use constant HIGH => 2; + +# OPENFLAGS. If we defined the flag to use with Sysopen here this gives +# us an optimisation when many temporary files are requested + +my $OPENFLAGS = O_CREAT | O_EXCL | O_RDWR; + +unless ($^O eq 'MacOS') { + for my $oflag (qw/ NOFOLLOW BINARY LARGEFILE EXLOCK NOINHERIT /) { + my ($bit, $func) = (0, "Fcntl::O_" . $oflag); + no strict 'refs'; + $OPENFLAGS |= $bit if eval { + # Make sure that redefined die handlers do not cause problems + # eg CGI::Carp + local $SIG{__DIE__} = sub {}; + local $SIG{__WARN__} = sub {}; + $bit = &$func(); + 1; + }; + } +} + +# On some systems the O_TEMPORARY flag can be used to tell the OS +# to automatically remove the file when it is closed. This is fine +# in most cases but not if tempfile is called with UNLINK=>0 and +# the filename is requested -- in the case where the filename is to +# be passed to another routine. This happens on windows. We overcome +# this by using a second open flags variable + +my $OPENTEMPFLAGS = $OPENFLAGS; +unless ($^O eq 'MacOS') { + for my $oflag (qw/ TEMPORARY /) { + my ($bit, $func) = (0, "Fcntl::O_" . $oflag); + no strict 'refs'; + $OPENTEMPFLAGS |= $bit if eval { + # Make sure that redefined die handlers do not cause problems + # eg CGI::Carp + local $SIG{__DIE__} = sub {}; + local $SIG{__WARN__} = sub {}; + $bit = &$func(); + 1; + }; + } +} + +# INTERNAL ROUTINES - not to be used outside of package + +# Generic routine for getting a temporary filename +# modelled on OpenBSD _gettemp() in mktemp.c + +# The template must contain X's that are to be replaced +# with the random values + +# Arguments: + +# TEMPLATE - string containing the XXXXX's that is converted +# to a random filename and opened if required + +# Optionally, a hash can also be supplied containing specific options +# "open" => if true open the temp file, else just return the name +# default is 0 +# "mkdir"=> if true, we are creating a temp directory rather than tempfile +# default is 0 +# "suffixlen" => number of characters at end of PATH to be ignored. +# default is 0. +# "unlink_on_close" => indicates that, if possible, the OS should remove +# the file as soon as it is closed. Usually indicates +# use of the O_TEMPORARY flag to sysopen. +# Usually irrelevant on unix + +# Optionally a reference to a scalar can be passed into the function +# On error this will be used to store the reason for the error +# "ErrStr" => \$errstr + +# "open" and "mkdir" can not both be true +# "unlink_on_close" is not used when "mkdir" is true. + +# The default options are equivalent to mktemp(). + +# Returns: +# filehandle - open file handle (if called with doopen=1, else undef) +# temp name - name of the temp file or directory + +# For example: +# ($fh, $name) = _gettemp($template, "open" => 1); + +# for the current version, failures are associated with +# stored in an error string and returned to give the reason whilst debugging +# This routine is not called by any external function +sub _gettemp { + + croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);' + unless scalar(@_) >= 1; + + # the internal error string - expect it to be overridden + # Need this in case the caller decides not to supply us a value + # need an anonymous scalar + my $tempErrStr; + + # Default options + my %options = ( + "open" => 0, + "mkdir" => 0, + "suffixlen" => 0, + "unlink_on_close" => 0, + "ErrStr" => \$tempErrStr, + ); + + # Read the template + my $template = shift; + if (ref($template)) { + # Use a warning here since we have not yet merged ErrStr + carp "File::Temp::_gettemp: template must not be a reference"; + return (); + } + + # Check that the number of entries on stack are even + if (scalar(@_) % 2 != 0) { + # Use a warning here since we have not yet merged ErrStr + carp "File::Temp::_gettemp: Must have even number of options"; + return (); + } + + # Read the options and merge with defaults + %options = (%options, @_) if @_; + + # Make sure the error string is set to undef + ${$options{ErrStr}} = undef; + + # Can not open the file and make a directory in a single call + if ($options{"open"} && $options{"mkdir"}) { + ${$options{ErrStr}} = "doopen and domkdir can not both be true\n"; + return (); + } + + # Find the start of the end of the Xs (position of last X) + # Substr starts from 0 + my $start = length($template) - 1 - $options{"suffixlen"}; + + # Check that we have at least MINX x X (eg 'XXXX") at the end of the string + # (taking suffixlen into account). Any fewer is insecure. + + # Do it using substr - no reason to use a pattern match since + # we know where we are looking and what we are looking for + + if (substr($template, $start - MINX + 1, MINX) ne 'X' x MINX) { + ${$options{ErrStr}} = "The template must end with at least ". + MINX . " 'X' characters\n"; + return (); + } + + # Replace all the X at the end of the substring with a + # random character or just all the XX at the end of a full string. + # Do it as an if, since the suffix adjusts which section to replace + # and suffixlen=0 returns nothing if used in the substr directly + # and generate a full path from the template + + my $path = _replace_XX($template, $options{"suffixlen"}); + + + # Split the path into constituent parts - eventually we need to check + # whether the directory exists + # We need to know whether we are making a temp directory + # or a tempfile + + my ($volume, $directories, $file); + my $parent; # parent directory + if ($options{"mkdir"}) { + # There is no filename at the end + ($volume, $directories, $file) = File::Spec->splitpath( $path, 1); + + # The parent is then $directories without the last directory + # Split the directory and put it back together again + my @dirs = File::Spec->splitdir($directories); + + # If @dirs only has one entry (i.e. the directory template) that means + # we are in the current directory + if ($#dirs == 0) { + $parent = File::Spec->curdir; + } else { + + if ($^O eq 'VMS') { # need volume to avoid relative dir spec + $parent = File::Spec->catdir($volume, @dirs[0..$#dirs-1]); + $parent = 'sys$disk:[]' if $parent eq ''; + } else { + + # Put it back together without the last one + $parent = File::Spec->catdir(@dirs[0..$#dirs-1]); + + # ...and attach the volume (no filename) + $parent = File::Spec->catpath($volume, $parent, ''); + } + + } + + } else { + + # Get rid of the last filename (use File::Basename for this?) + ($volume, $directories, $file) = File::Spec->splitpath( $path ); + + # Join up without the file part + $parent = File::Spec->catpath($volume,$directories,''); + + # If $parent is empty replace with curdir + $parent = File::Spec->curdir + unless $directories ne ''; + + } + + # Check that the parent directories exist + # Do this even for the case where we are simply returning a name + # not a file -- no point returning a name that includes a directory + # that does not exist or is not writable + + unless (-d $parent) { + ${$options{ErrStr}} = "Parent directory ($parent) is not a directory"; + return (); + } + unless (-w $parent) { + ${$options{ErrStr}} = "Parent directory ($parent) is not writable\n"; + return (); + } + + + # Check the stickiness of the directory and chown giveaway if required + # If the directory is world writable the sticky bit + # must be set + + if (File::Temp->safe_level == MEDIUM) { + my $safeerr; + unless (_is_safe($parent,\$safeerr)) { + ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)"; + return (); + } + } elsif (File::Temp->safe_level == HIGH) { + my $safeerr; + unless (_is_verysafe($parent, \$safeerr)) { + ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)"; + return (); + } + } + + + # Now try MAX_TRIES time to open the file + for (my $i = 0; $i < MAX_TRIES; $i++) { + + # Try to open the file if requested + if ($options{"open"}) { + my $fh; + + # If we are running before perl5.6.0 we can not auto-vivify + if ($] < 5.006) { + $fh = &Symbol::gensym; + } + + # Try to make sure this will be marked close-on-exec + # XXX: Win32 doesn't respect this, nor the proper fcntl, + # but may have O_NOINHERIT. This may or may not be in Fcntl. + local $^F = 2; + + # Store callers umask + my $umask = umask(); + + # Set a known umask + umask(066); + + # Attempt to open the file + my $open_success = undef; + if ( $^O eq 'VMS' and $options{"unlink_on_close"} && !$KEEP_ALL) { + # make it auto delete on close by setting FAB$V_DLT bit + $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt'); + $open_success = $fh; + } else { + my $flags = ( ($options{"unlink_on_close"} && !$KEEP_ALL) ? + $OPENTEMPFLAGS : + $OPENFLAGS ); + $open_success = sysopen($fh, $path, $flags, 0600); + } + if ( $open_success ) { + + # Reset umask + umask($umask) if defined $umask; + + # Opened successfully - return file handle and name + return ($fh, $path); + + } else { + # Reset umask + umask($umask) if defined $umask; + + # Error opening file - abort with error + # if the reason was anything but EEXIST + unless ($!{EEXIST}) { + ${$options{ErrStr}} = "Could not create temp file $path: $!"; + return (); + } + + # Loop round for another try + + } + } elsif ($options{"mkdir"}) { + + # Store callers umask + my $umask = umask(); + + # Set a known umask + umask(066); + + # Open the temp directory + if (mkdir( $path, 0700)) { + # created okay + # Reset umask + umask($umask) if defined $umask; + + return undef, $path; + } else { + + # Reset umask + umask($umask) if defined $umask; + + # Abort with error if the reason for failure was anything + # except EEXIST + unless ($!{EEXIST}) { + ${$options{ErrStr}} = "Could not create directory $path: $!"; + return (); + } + + # Loop round for another try + + } + + } else { + + # Return true if the file can not be found + # Directory has been checked previously + + return (undef, $path) unless -e $path; + + # Try again until MAX_TRIES + + } + + # Did not successfully open the tempfile/dir + # so try again with a different set of random letters + # No point in trying to increment unless we have only + # 1 X say and the randomness could come up with the same + # file MAX_TRIES in a row. + + # Store current attempt - in principal this implies that the + # 3rd time around the open attempt that the first temp file + # name could be generated again. Probably should store each + # attempt and make sure that none are repeated + + my $original = $path; + my $counter = 0; # Stop infinite loop + my $MAX_GUESS = 50; + + do { + + # Generate new name from original template + $path = _replace_XX($template, $options{"suffixlen"}); + + $counter++; + + } until ($path ne $original || $counter > $MAX_GUESS); + + # Check for out of control looping + if ($counter > $MAX_GUESS) { + ${$options{ErrStr}} = "Tried to get a new temp name different to the previous value $MAX_GUESS times.\nSomething wrong with template?? ($template)"; + return (); + } + + } + + # If we get here, we have run out of tries + ${ $options{ErrStr} } = "Have exceeded the maximum number of attempts (" + . MAX_TRIES . ") to open temp file/dir"; + + return (); + +} + +# Internal routine to return a random character from the +# character list. Does not do an srand() since rand() +# will do one automatically + +# No arguments. Return value is the random character + +# No longer called since _replace_XX runs a few percent faster if +# I inline the code. This is important if we are creating thousands of +# temporary files. + +sub _randchar { + + $CHARS[ int( rand( $#CHARS ) ) ]; + +} + +# Internal routine to replace the XXXX... with random characters +# This has to be done by _gettemp() every time it fails to +# open a temp file/dir + +# Arguments: $template (the template with XXX), +# $ignore (number of characters at end to ignore) + +# Returns: modified template + +sub _replace_XX { + + croak 'Usage: _replace_XX($template, $ignore)' + unless scalar(@_) == 2; + + my ($path, $ignore) = @_; + + # Do it as an if, since the suffix adjusts which section to replace + # and suffixlen=0 returns nothing if used in the substr directly + # Alternatively, could simply set $ignore to length($path)-1 + # Don't want to always use substr when not required though. + + if ($ignore) { + substr($path, 0, - $ignore) =~ s/X(?=X*\z)/$CHARS[ int( rand( $#CHARS ) ) ]/ge; + } else { + $path =~ s/X(?=X*\z)/$CHARS[ int( rand( $#CHARS ) ) ]/ge; + } + return $path; +} + +# Internal routine to force a temp file to be writable after +# it is created so that we can unlink it. Windows seems to occassionally +# force a file to be readonly when written to certain temp locations +sub _force_writable { + my $file = shift; + my $umask = umask(); + umask(066); + chmod 0600, $file; + umask($umask) if defined $umask; +} + + +# internal routine to check to see if the directory is safe +# First checks to see if the directory is not owned by the +# current user or root. Then checks to see if anyone else +# can write to the directory and if so, checks to see if +# it has the sticky bit set + +# Will not work on systems that do not support sticky bit + +#Args: directory path to check +# Optionally: reference to scalar to contain error message +# Returns true if the path is safe and false otherwise. +# Returns undef if can not even run stat() on the path + +# This routine based on version written by Tom Christiansen + +# Presumably, by the time we actually attempt to create the +# file or directory in this directory, it may not be safe +# anymore... Have to run _is_safe directly after the open. + +sub _is_safe { + + my $path = shift; + my $err_ref = shift; + + # Stat path + my @info = stat($path); + unless (scalar(@info)) { + $$err_ref = "stat(path) returned no values"; + return 0; + }; + return 1 if $^O eq 'VMS'; # owner delete control at file level + + # Check to see whether owner is neither superuser (or a system uid) nor me + # Use the real uid from the $< variable + # UID is in [4] + if ($info[4] > File::Temp->top_system_uid() && $info[4] != $<) { + + Carp::cluck(sprintf "uid=$info[4] topuid=%s \$<=$< path='$path'", + File::Temp->top_system_uid()); + + $$err_ref = "Directory owned neither by root nor the current user" + if ref($err_ref); + return 0; + } + + # check whether group or other can write file + # use 066 to detect either reading or writing + # use 022 to check writability + # Do it with S_IWOTH and S_IWGRP for portability (maybe) + # mode is in info[2] + if (($info[2] & &Fcntl::S_IWGRP) || # Is group writable? + ($info[2] & &Fcntl::S_IWOTH) ) { # Is world writable? + # Must be a directory + unless (-d $path) { + $$err_ref = "Path ($path) is not a directory" + if ref($err_ref); + return 0; + } + # Must have sticky bit set + unless (-k $path) { + $$err_ref = "Sticky bit not set on $path when dir is group|world writable" + if ref($err_ref); + return 0; + } + } + + return 1; +} + +# Internal routine to check whether a directory is safe +# for temp files. Safer than _is_safe since it checks for +# the possibility of chown giveaway and if that is a possibility +# checks each directory in the path to see if it is safe (with _is_safe) + +# If _PC_CHOWN_RESTRICTED is not set, does the full test of each +# directory anyway. + +# Takes optional second arg as scalar ref to error reason + +sub _is_verysafe { + + # Need POSIX - but only want to bother if really necessary due to overhead + require POSIX; + + my $path = shift; + print "_is_verysafe testing $path\n" if $DEBUG; + return 1 if $^O eq 'VMS'; # owner delete control at file level + + my $err_ref = shift; + + # Should Get the value of _PC_CHOWN_RESTRICTED if it is defined + # and If it is not there do the extensive test + my $chown_restricted; + $chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED() + if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1}; + + # If chown_resticted is set to some value we should test it + if (defined $chown_restricted) { + + # Return if the current directory is safe + return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted ); + + } + + # To reach this point either, the _PC_CHOWN_RESTRICTED symbol + # was not avialable or the symbol was there but chown giveaway + # is allowed. Either way, we now have to test the entire tree for + # safety. + + # Convert path to an absolute directory if required + unless (File::Spec->file_name_is_absolute($path)) { + $path = File::Spec->rel2abs($path); + } + + # Split directory into components - assume no file + my ($volume, $directories, undef) = File::Spec->splitpath( $path, 1); + + # Slightly less efficient than having a function in File::Spec + # to chop off the end of a directory or even a function that + # can handle ../ in a directory tree + # Sometimes splitdir() returns a blank at the end + # so we will probably check the bottom directory twice in some cases + my @dirs = File::Spec->splitdir($directories); + + # Concatenate one less directory each time around + foreach my $pos (0.. $#dirs) { + # Get a directory name + my $dir = File::Spec->catpath($volume, + File::Spec->catdir(@dirs[0.. $#dirs - $pos]), + '' + ); + + print "TESTING DIR $dir\n" if $DEBUG; + + # Check the directory + return 0 unless _is_safe($dir,$err_ref); + + } + + return 1; +} + + + +# internal routine to determine whether unlink works on this +# platform for files that are currently open. +# Returns true if we can, false otherwise. + +# Currently WinNT, OS/2 and VMS can not unlink an opened file +# On VMS this is because the O_EXCL flag is used to open the +# temporary file. Currently I do not know enough about the issues +# on VMS to decide whether O_EXCL is a requirement. + +sub _can_unlink_opened_file { + + if ($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'VMS' || $^O eq 'dos' || $^O eq 'MacOS') { + return 0; + } else { + return 1; + } + +} + +# internal routine to decide which security levels are allowed +# see safe_level() for more information on this + +# Controls whether the supplied security level is allowed + +# $cando = _can_do_level( $level ) + +sub _can_do_level { + + # Get security level + my $level = shift; + + # Always have to be able to do STANDARD + return 1 if $level == STANDARD; + + # Currently, the systems that can do HIGH or MEDIUM are identical + if ( $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'MacOS' || $^O eq 'mpeix') { + return 0; + } else { + return 1; + } + +} + +# This routine sets up a deferred unlinking of a specified +# filename and filehandle. It is used in the following cases: +# - Called by unlink0 if an opened file can not be unlinked +# - Called by tempfile() if files are to be removed on shutdown +# - Called by tempdir() if directories are to be removed on shutdown + +# Arguments: +# _deferred_unlink( $fh, $fname, $isdir ); +# +# - filehandle (so that it can be expclicitly closed if open +# - filename (the thing we want to remove) +# - isdir (flag to indicate that we are being given a directory) +# [and hence no filehandle] + +# Status is not referred to since all the magic is done with an END block + +{ + # Will set up two lexical variables to contain all the files to be + # removed. One array for files, another for directories They will + # only exist in this block. + + # This means we only have to set up a single END block to remove + # all files. + + # in order to prevent child processes inadvertently deleting the parent + # temp files we use a hash to store the temp files and directories + # created by a particular process id. + + # %files_to_unlink contains values that are references to an array of + # array references containing the filehandle and filename associated with + # the temp file. + my (%files_to_unlink, %dirs_to_unlink); + + # Set up an end block to use these arrays + END { + cleanup(); + } + + # Cleanup function. Always triggered on END but can be invoked + # manually. + sub cleanup { + if (!$KEEP_ALL) { + # Files + my @files = (exists $files_to_unlink{$$} ? + @{ $files_to_unlink{$$} } : () ); + foreach my $file (@files) { + # close the filehandle without checking its state + # in order to make real sure that this is closed + # if its already closed then I dont care about the answer + # probably a better way to do this + close($file->[0]); # file handle is [0] + + if (-f $file->[1]) { # file name is [1] + _force_writable( $file->[1] ); # for windows + unlink $file->[1] or warn "Error removing ".$file->[1]; + } + } + # Dirs + my @dirs = (exists $dirs_to_unlink{$$} ? + @{ $dirs_to_unlink{$$} } : () ); + foreach my $dir (@dirs) { + if (-d $dir) { + rmtree($dir, $DEBUG, 0); + } + } + + # clear the arrays + @{ $files_to_unlink{$$} } = () + if exists $files_to_unlink{$$}; + @{ $dirs_to_unlink{$$} } = () + if exists $dirs_to_unlink{$$}; + } + } + + + # This is the sub called to register a file for deferred unlinking + # This could simply store the input parameters and defer everything + # until the END block. For now we do a bit of checking at this + # point in order to make sure that (1) we have a file/dir to delete + # and (2) we have been called with the correct arguments. + sub _deferred_unlink { + + croak 'Usage: _deferred_unlink($fh, $fname, $isdir)' + unless scalar(@_) == 3; + + my ($fh, $fname, $isdir) = @_; + + warn "Setting up deferred removal of $fname\n" + if $DEBUG; + + # If we have a directory, check that it is a directory + if ($isdir) { + + if (-d $fname) { + + # Directory exists so store it + # first on VMS turn []foo into [.foo] for rmtree + $fname = VMS::Filespec::vmspath($fname) if $^O eq 'VMS'; + $dirs_to_unlink{$$} = [] + unless exists $dirs_to_unlink{$$}; + push (@{ $dirs_to_unlink{$$} }, $fname); + + } else { + carp "Request to remove directory $fname could not be completed since it does not exist!\n" if $^W; + } + + } else { + + if (-f $fname) { + + # file exists so store handle and name for later removal + $files_to_unlink{$$} = [] + unless exists $files_to_unlink{$$}; + push(@{ $files_to_unlink{$$} }, [$fh, $fname]); + + } else { + carp "Request to remove file $fname could not be completed since it is not there!\n" if $^W; + } + + } + + } + + +} + +=head1 OBJECT-ORIENTED INTERFACE + +This is the primary interface for interacting with +C<File::Temp>. Using the OO interface a temporary file can be created +when the object is constructed and the file can be removed when the +object is no longer required. + +Note that there is no method to obtain the filehandle from the +C<File::Temp> object. The object itself acts as a filehandle. Also, +the object is configured such that it stringifies to the name of the +temporary file. + +=over 4 + +=item B<new> + +Create a temporary file object. + + my $tmp = new File::Temp(); + +by default the object is constructed as if C<tempfile> +was called without options, but with the additional behaviour +that the temporary file is removed by the object destructor +if UNLINK is set to true (the default). + +Supported arguments are the same as for C<tempfile>: UNLINK +(defaulting to true), DIR and SUFFIX. Additionally, the filename +template is specified using the TEMPLATE option. The OPEN option +is not supported (the file is always opened). + + $tmp = new File::Temp( TEMPLATE => 'tempXXXXX', + DIR => 'mydir', + SUFFIX => '.dat'); + +Arguments are case insensitive. + +=cut + +sub new { + my $proto = shift; + my $class = ref($proto) || $proto; + + # read arguments and convert keys to upper case + my %args = @_; + %args = map { uc($_), $args{$_} } keys %args; + + # see if they are unlinking (defaulting to yes) + my $unlink = (exists $args{UNLINK} ? $args{UNLINK} : 1 ); + delete $args{UNLINK}; + + # template (store it in an error so that it will + # disappear from the arg list of tempfile + my @template = ( exists $args{TEMPLATE} ? $args{TEMPLATE} : () ); + delete $args{TEMPLATE}; + + # Protect OPEN + delete $args{OPEN}; + + # Open the file and retain file handle and file name + my ($fh, $path) = tempfile( @template, %args ); + + print "Tmp: $fh - $path\n" if $DEBUG; + + # Store the filename in the scalar slot + ${*$fh} = $path; + + # Store unlink information in hash slot (plus other constructor info) + %{*$fh} = %args; + + # create the object + bless $fh, $class; + + # final method-based configuration + $fh->unlink_on_destroy( $unlink ); + + return $fh; +} + +=item B<filename> + +Return the name of the temporary file associated with this object. + + $filename = $tmp->filename; + +This method is called automatically when the object is used as +a string. + +=cut + +sub filename { + my $self = shift; + return ${*$self}; +} + +sub STRINGIFY { + my $self = shift; + return $self->filename; +} + +=item B<unlink_on_destroy> + +Control whether the file is unlinked when the object goes out of scope. +The file is removed if this value is true and $KEEP_ALL is not. + + $fh->unlink_on_destroy( 1 ); + +Default is for the file to be removed. + +=cut + +sub unlink_on_destroy { + my $self = shift; + if (@_) { + ${*$self}{UNLINK} = shift; + } + return ${*$self}{UNLINK}; +} + +=item B<DESTROY> + +When the object goes out of scope, the destructor is called. This +destructor will attempt to unlink the file (using C<unlink1>) +if the constructor was called with UNLINK set to 1 (the default state +if UNLINK is not specified). + +No error is given if the unlink fails. + +If the global variable $KEEP_ALL is true, the file will not be removed. + +=cut + +sub DESTROY { + my $self = shift; + if (${*$self}{UNLINK} && !$KEEP_ALL) { + print "# ---------> Unlinking $self\n" if $DEBUG; + + # The unlink1 may fail if the file has been closed + # by the caller. This leaves us with the decision + # of whether to refuse to remove the file or simply + # do an unlink without test. Seems to be silly + # to do this when we are trying to be careful + # about security + _force_writable( $self->filename ); # for windows + unlink1( $self, $self->filename ) + or unlink($self->filename); + } +} + +=back + +=head1 FUNCTIONS + +This section describes the recommended interface for generating +temporary files and directories. + +=over 4 + +=item B<tempfile> + +This is the basic function to generate temporary files. +The behaviour of the file can be changed using various options: + + $fh = tempfile(); + ($fh, $filename) = tempfile(); + +Create a temporary file in the directory specified for temporary +files, as specified by the tmpdir() function in L<File::Spec>. + + ($fh, $filename) = tempfile($template); + +Create a temporary file in the current directory using the supplied +template. Trailing `X' characters are replaced with random letters to +generate the filename. At least four `X' characters must be present +at the end of the template. + + ($fh, $filename) = tempfile($template, SUFFIX => $suffix) + +Same as previously, except that a suffix is added to the template +after the `X' translation. Useful for ensuring that a temporary +filename has a particular extension when needed by other applications. +But see the WARNING at the end. + + ($fh, $filename) = tempfile($template, DIR => $dir); + +Translates the template as before except that a directory name +is specified. + + ($fh, $filename) = tempfile($template, UNLINK => 1); + +Return the filename and filehandle as before except that the file is +automatically removed when the program exits (dependent on +$KEEP_ALL). Default is for the file to be removed if a file handle is +requested and to be kept if the filename is requested. In a scalar +context (where no filename is returned) the file is always deleted +either (depending on the operating system) on exit or when it is +closed (unless $KEEP_ALL is true when the temp file is created). + +Use the object-oriented interface if fine-grained control of when +a file is removed is required. + +If the template is not specified, a template is always +automatically generated. This temporary file is placed in tmpdir() +(L<File::Spec>) unless a directory is specified explicitly with the +DIR option. + + $fh = tempfile( $template, DIR => $dir ); + +If called in scalar context, only the filehandle is returned and the +file will automatically be deleted when closed on operating systems +that support this (see the description of tmpfile() elsewhere in this +document). This is the preferred mode of operation, as if you only +have a filehandle, you can never create a race condition by fumbling +with the filename. On systems that can not unlink an open file or can +not mark a file as temporary when it is opened (for example, Windows +NT uses the C<O_TEMPORARY> flag) the file is marked for deletion when +the program ends (equivalent to setting UNLINK to 1). The C<UNLINK> +flag is ignored if present. + + (undef, $filename) = tempfile($template, OPEN => 0); + +This will return the filename based on the template but +will not open this file. Cannot be used in conjunction with +UNLINK set to true. Default is to always open the file +to protect from possible race conditions. A warning is issued +if warnings are turned on. Consider using the tmpnam() +and mktemp() functions described elsewhere in this document +if opening the file is not required. + +Options can be combined as required. + +=cut + +sub tempfile { + + # Can not check for argument count since we can have any + # number of args + + # Default options + my %options = ( + "DIR" => undef, # Directory prefix + "SUFFIX" => '', # Template suffix + "UNLINK" => 0, # Do not unlink file on exit + "OPEN" => 1, # Open file + ); + + # Check to see whether we have an odd or even number of arguments + my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef); + + # Read the options and merge with defaults + %options = (%options, @_) if @_; + + # First decision is whether or not to open the file + if (! $options{"OPEN"}) { + + warn "tempfile(): temporary filename requested but not opened.\nPossibly unsafe, consider using tempfile() with OPEN set to true\n" + if $^W; + + } + + if ($options{"DIR"} and $^O eq 'VMS') { + + # on VMS turn []foo into [.foo] for concatenation + $options{"DIR"} = VMS::Filespec::vmspath($options{"DIR"}); + } + + # Construct the template + + # Have a choice of trying to work around the mkstemp/mktemp/tmpnam etc + # functions or simply constructing a template and using _gettemp() + # explicitly. Go for the latter + + # First generate a template if not defined and prefix the directory + # If no template must prefix the temp directory + if (defined $template) { + if ($options{"DIR"}) { + + $template = File::Spec->catfile($options{"DIR"}, $template); + + } + + } else { + + if ($options{"DIR"}) { + + $template = File::Spec->catfile($options{"DIR"}, TEMPXXX); + + } else { + + $template = File::Spec->catfile(File::Spec->tmpdir, TEMPXXX); + + } + + } + + # Now add a suffix + $template .= $options{"SUFFIX"}; + + # Determine whether we should tell _gettemp to unlink the file + # On unix this is irrelevant and can be worked out after the file is + # opened (simply by unlinking the open filehandle). On Windows or VMS + # we have to indicate temporary-ness when we open the file. In general + # we only want a true temporary file if we are returning just the + # filehandle - if the user wants the filename they probably do not + # want the file to disappear as soon as they close it (which may be + # important if they want a child process to use the file) + # For this reason, tie unlink_on_close to the return context regardless + # of OS. + my $unlink_on_close = ( wantarray ? 0 : 1); + + # Create the file + my ($fh, $path, $errstr); + croak "Error in tempfile() using $template: $errstr" + unless (($fh, $path) = _gettemp($template, + "open" => $options{'OPEN'}, + "mkdir"=> 0 , + "unlink_on_close" => $unlink_on_close, + "suffixlen" => length($options{'SUFFIX'}), + "ErrStr" => \$errstr, + ) ); + + # Set up an exit handler that can do whatever is right for the + # system. This removes files at exit when requested explicitly or when + # system is asked to unlink_on_close but is unable to do so because + # of OS limitations. + # The latter should be achieved by using a tied filehandle. + # Do not check return status since this is all done with END blocks. + _deferred_unlink($fh, $path, 0) if $options{"UNLINK"}; + + # Return + if (wantarray()) { + + if ($options{'OPEN'}) { + return ($fh, $path); + } else { + return (undef, $path); + } + + } else { + + # Unlink the file. It is up to unlink0 to decide what to do with + # this (whether to unlink now or to defer until later) + unlink0($fh, $path) or croak "Error unlinking file $path using unlink0"; + + # Return just the filehandle. + return $fh; + } + + +} + +=item B<tempdir> + +This is the recommended interface for creation of temporary directories. +The behaviour of the function depends on the arguments: + + $tempdir = tempdir(); + +Create a directory in tmpdir() (see L<File::Spec|File::Spec>). + + $tempdir = tempdir( $template ); + +Create a directory from the supplied template. This template is +similar to that described for tempfile(). `X' characters at the end +of the template are replaced with random letters to construct the +directory name. At least four `X' characters must be in the template. + + $tempdir = tempdir ( DIR => $dir ); + +Specifies the directory to use for the temporary directory. +The temporary directory name is derived from an internal template. + + $tempdir = tempdir ( $template, DIR => $dir ); + +Prepend the supplied directory name to the template. The template +should not include parent directory specifications itself. Any parent +directory specifications are removed from the template before +prepending the supplied directory. + + $tempdir = tempdir ( $template, TMPDIR => 1 ); + +Using the supplied template, create the temporary directory in +a standard location for temporary files. Equivalent to doing + + $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir); + +but shorter. Parent directory specifications are stripped from the +template itself. The C<TMPDIR> option is ignored if C<DIR> is set +explicitly. Additionally, C<TMPDIR> is implied if neither a template +nor a directory are supplied. + + $tempdir = tempdir( $template, CLEANUP => 1); + +Create a temporary directory using the supplied template, but +attempt to remove it (and all files inside it) when the program +exits. Note that an attempt will be made to remove all files from +the directory even if they were not created by this module (otherwise +why ask to clean it up?). The directory removal is made with +the rmtree() function from the L<File::Path|File::Path> module. +Of course, if the template is not specified, the temporary directory +will be created in tmpdir() and will also be removed at program exit. + +=cut + +# ' + +sub tempdir { + + # Can not check for argument count since we can have any + # number of args + + # Default options + my %options = ( + "CLEANUP" => 0, # Remove directory on exit + "DIR" => '', # Root directory + "TMPDIR" => 0, # Use tempdir with template + ); + + # Check to see whether we have an odd or even number of arguments + my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef ); + + # Read the options and merge with defaults + %options = (%options, @_) if @_; + + # Modify or generate the template + + # Deal with the DIR and TMPDIR options + if (defined $template) { + + # Need to strip directory path if using DIR or TMPDIR + if ($options{'TMPDIR'} || $options{'DIR'}) { + + # Strip parent directory from the filename + # + # There is no filename at the end + $template = VMS::Filespec::vmspath($template) if $^O eq 'VMS'; + my ($volume, $directories, undef) = File::Spec->splitpath( $template, 1); + + # Last directory is then our template + $template = (File::Spec->splitdir($directories))[-1]; + + # Prepend the supplied directory or temp dir + if ($options{"DIR"}) { + + $template = File::Spec->catdir($options{"DIR"}, $template); + + } elsif ($options{TMPDIR}) { + + # Prepend tmpdir + $template = File::Spec->catdir(File::Spec->tmpdir, $template); + + } + + } + + } else { + + if ($options{"DIR"}) { + + $template = File::Spec->catdir($options{"DIR"}, TEMPXXX); + + } else { + + $template = File::Spec->catdir(File::Spec->tmpdir, TEMPXXX); + + } + + } + + # Create the directory + my $tempdir; + my $suffixlen = 0; + if ($^O eq 'VMS') { # dir names can end in delimiters + $template =~ m/([\.\]:>]+)$/; + $suffixlen = length($1); + } + if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) { + # dir name has a trailing ':' + ++$suffixlen; + } + + my $errstr; + croak "Error in tempdir() using $template: $errstr" + unless ((undef, $tempdir) = _gettemp($template, + "open" => 0, + "mkdir"=> 1 , + "suffixlen" => $suffixlen, + "ErrStr" => \$errstr, + ) ); + + # Install exit handler; must be dynamic to get lexical + if ( $options{'CLEANUP'} && -d $tempdir) { + _deferred_unlink(undef, $tempdir, 1); + } + + # Return the dir name + return $tempdir; + +} + +=back + +=head1 MKTEMP FUNCTIONS + +The following functions are Perl implementations of the +mktemp() family of temp file generation system calls. + +=over 4 + +=item B<mkstemp> + +Given a template, returns a filehandle to the temporary file and the name +of the file. + + ($fh, $name) = mkstemp( $template ); + +In scalar context, just the filehandle is returned. + +The template may be any filename with some number of X's appended +to it, for example F</tmp/temp.XXXX>. The trailing X's are replaced +with unique alphanumeric combinations. + +=cut + + + +sub mkstemp { + + croak "Usage: mkstemp(template)" + if scalar(@_) != 1; + + my $template = shift; + + my ($fh, $path, $errstr); + croak "Error in mkstemp using $template: $errstr" + unless (($fh, $path) = _gettemp($template, + "open" => 1, + "mkdir"=> 0 , + "suffixlen" => 0, + "ErrStr" => \$errstr, + ) ); + + if (wantarray()) { + return ($fh, $path); + } else { + return $fh; + } + +} + + +=item B<mkstemps> + +Similar to mkstemp(), except that an extra argument can be supplied +with a suffix to be appended to the template. + + ($fh, $name) = mkstemps( $template, $suffix ); + +For example a template of C<testXXXXXX> and suffix of C<.dat> +would generate a file similar to F<testhGji_w.dat>. + +Returns just the filehandle alone when called in scalar context. + +=cut + +sub mkstemps { + + croak "Usage: mkstemps(template, suffix)" + if scalar(@_) != 2; + + + my $template = shift; + my $suffix = shift; + + $template .= $suffix; + + my ($fh, $path, $errstr); + croak "Error in mkstemps using $template: $errstr" + unless (($fh, $path) = _gettemp($template, + "open" => 1, + "mkdir"=> 0 , + "suffixlen" => length($suffix), + "ErrStr" => \$errstr, + ) ); + + if (wantarray()) { + return ($fh, $path); + } else { + return $fh; + } + +} + +=item B<mkdtemp> + +Create a directory from a template. The template must end in +X's that are replaced by the routine. + + $tmpdir_name = mkdtemp($template); + +Returns the name of the temporary directory created. +Returns undef on failure. + +Directory must be removed by the caller. + +=cut + +#' # for emacs + +sub mkdtemp { + + croak "Usage: mkdtemp(template)" + if scalar(@_) != 1; + + my $template = shift; + my $suffixlen = 0; + if ($^O eq 'VMS') { # dir names can end in delimiters + $template =~ m/([\.\]:>]+)$/; + $suffixlen = length($1); + } + if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) { + # dir name has a trailing ':' + ++$suffixlen; + } + my ($junk, $tmpdir, $errstr); + croak "Error creating temp directory from template $template\: $errstr" + unless (($junk, $tmpdir) = _gettemp($template, + "open" => 0, + "mkdir"=> 1 , + "suffixlen" => $suffixlen, + "ErrStr" => \$errstr, + ) ); + + return $tmpdir; + +} + +=item B<mktemp> + +Returns a valid temporary filename but does not guarantee +that the file will not be opened by someone else. + + $unopened_file = mktemp($template); + +Template is the same as that required by mkstemp(). + +=cut + +sub mktemp { + + croak "Usage: mktemp(template)" + if scalar(@_) != 1; + + my $template = shift; + + my ($tmpname, $junk, $errstr); + croak "Error getting name to temp file from template $template: $errstr" + unless (($junk, $tmpname) = _gettemp($template, + "open" => 0, + "mkdir"=> 0 , + "suffixlen" => 0, + "ErrStr" => \$errstr, + ) ); + + return $tmpname; +} + +=back + +=head1 POSIX FUNCTIONS + +This section describes the re-implementation of the tmpnam() +and tmpfile() functions described in L<POSIX> +using the mkstemp() from this module. + +Unlike the L<POSIX|POSIX> implementations, the directory used +for the temporary file is not specified in a system include +file (C<P_tmpdir>) but simply depends on the choice of tmpdir() +returned by L<File::Spec|File::Spec>. On some implementations this +location can be set using the C<TMPDIR> environment variable, which +may not be secure. +If this is a problem, simply use mkstemp() and specify a template. + +=over 4 + +=item B<tmpnam> + +When called in scalar context, returns the full name (including path) +of a temporary file (uses mktemp()). The only check is that the file does +not already exist, but there is no guarantee that that condition will +continue to apply. + + $file = tmpnam(); + +When called in list context, a filehandle to the open file and +a filename are returned. This is achieved by calling mkstemp() +after constructing a suitable template. + + ($fh, $file) = tmpnam(); + +If possible, this form should be used to prevent possible +race conditions. + +See L<File::Spec/tmpdir> for information on the choice of temporary +directory for a particular operating system. + +=cut + +sub tmpnam { + + # Retrieve the temporary directory name + my $tmpdir = File::Spec->tmpdir; + + croak "Error temporary directory is not writable" + if $tmpdir eq ''; + + # Use a ten character template and append to tmpdir + my $template = File::Spec->catfile($tmpdir, TEMPXXX); + + if (wantarray() ) { + return mkstemp($template); + } else { + return mktemp($template); + } + +} + +=item B<tmpfile> + +Returns the filehandle of a temporary file. + + $fh = tmpfile(); + +The file is removed when the filehandle is closed or when the program +exits. No access to the filename is provided. + +If the temporary file can not be created undef is returned. +Currently this command will probably not work when the temporary +directory is on an NFS file system. + +=cut + +sub tmpfile { + + # Simply call tmpnam() in a list context + my ($fh, $file) = tmpnam(); + + # Make sure file is removed when filehandle is closed + # This will fail on NFS + unlink0($fh, $file) + or return undef; + + return $fh; + +} + +=back + +=head1 ADDITIONAL FUNCTIONS + +These functions are provided for backwards compatibility +with common tempfile generation C library functions. + +They are not exported and must be addressed using the full package +name. + +=over 4 + +=item B<tempnam> + +Return the name of a temporary file in the specified directory +using a prefix. The file is guaranteed not to exist at the time +the function was called, but such guarantees are good for one +clock tick only. Always use the proper form of C<sysopen> +with C<O_CREAT | O_EXCL> if you must open such a filename. + + $filename = File::Temp::tempnam( $dir, $prefix ); + +Equivalent to running mktemp() with $dir/$prefixXXXXXXXX +(using unix file convention as an example) + +Because this function uses mktemp(), it can suffer from race conditions. + +=cut + +sub tempnam { + + croak 'Usage tempnam($dir, $prefix)' unless scalar(@_) == 2; + + my ($dir, $prefix) = @_; + + # Add a string to the prefix + $prefix .= 'XXXXXXXX'; + + # Concatenate the directory to the file + my $template = File::Spec->catfile($dir, $prefix); + + return mktemp($template); + +} + +=back + +=head1 UTILITY FUNCTIONS + +Useful functions for dealing with the filehandle and filename. + +=over 4 + +=item B<unlink0> + +Given an open filehandle and the associated filename, make a safe +unlink. This is achieved by first checking that the filename and +filehandle initially point to the same file and that the number of +links to the file is 1 (all fields returned by stat() are compared). +Then the filename is unlinked and the filehandle checked once again to +verify that the number of links on that file is now 0. This is the +closest you can come to making sure that the filename unlinked was the +same as the file whose descriptor you hold. + + unlink0($fh, $path) + or die "Error unlinking file $path safely"; + +Returns false on error. The filehandle is not closed since on some +occasions this is not required. + +On some platforms, for example Windows NT, it is not possible to +unlink an open file (the file must be closed first). On those +platforms, the actual unlinking is deferred until the program ends and +good status is returned. A check is still performed to make sure that +the filehandle and filename are pointing to the same thing (but not at +the time the end block is executed since the deferred removal may not +have access to the filehandle). + +Additionally, on Windows NT not all the fields returned by stat() can +be compared. For example, the C<dev> and C<rdev> fields seem to be +different. Also, it seems that the size of the file returned by stat() +does not always agree, with C<stat(FH)> being more accurate than +C<stat(filename)>, presumably because of caching issues even when +using autoflush (this is usually overcome by waiting a while after +writing to the tempfile before attempting to C<unlink0> it). + +Finally, on NFS file systems the link count of the file handle does +not always go to zero immediately after unlinking. Currently, this +command is expected to fail on NFS disks. + +This function is disabled if the global variable $KEEP_ALL is true +and an unlink on open file is supported. If the unlink is to be deferred +to the END block, the file is still registered for removal. + +=cut + +sub unlink0 { + + croak 'Usage: unlink0(filehandle, filename)' + unless scalar(@_) == 2; + + # Read args + my ($fh, $path) = @_; + + cmpstat($fh, $path) or return 0; + + # attempt remove the file (does not work on some platforms) + if (_can_unlink_opened_file()) { + + # return early (Without unlink) if we have been instructed to retain files. + return 1 if $KEEP_ALL; + + # XXX: do *not* call this on a directory; possible race + # resulting in recursive removal + croak "unlink0: $path has become a directory!" if -d $path; + unlink($path) or return 0; + + # Stat the filehandle + my @fh = stat $fh; + + print "Link count = $fh[3] \n" if $DEBUG; + + # Make sure that the link count is zero + # - Cygwin provides deferred unlinking, however, + # on Win9x the link count remains 1 + # On NFS the link count may still be 1 but we cant know that + # we are on NFS + return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0); + + } else { + _deferred_unlink($fh, $path, 0); + return 1; + } + +} + +=item B<cmpstat> + +Compare C<stat> of filehandle with C<stat> of provided filename. This +can be used to check that the filename and filehandle initially point +to the same file and that the number of links to the file is 1 (all +fields returned by stat() are compared). + + cmpstat($fh, $path) + or die "Error comparing handle with file"; + +Returns false if the stat information differs or if the link count is +greater than 1. + +On certain platofms, eg Windows, not all the fields returned by stat() +can be compared. For example, the C<dev> and C<rdev> fields seem to be +different in Windows. Also, it seems that the size of the file +returned by stat() does not always agree, with C<stat(FH)> being more +accurate than C<stat(filename)>, presumably because of caching issues +even when using autoflush (this is usually overcome by waiting a while +after writing to the tempfile before attempting to C<unlink0> it). + +Not exported by default. + +=cut + +sub cmpstat { + + croak 'Usage: cmpstat(filehandle, filename)' + unless scalar(@_) == 2; + + # Read args + my ($fh, $path) = @_; + + warn "Comparing stat\n" + if $DEBUG; + + # Stat the filehandle - which may be closed if someone has manually + # closed the file. Can not turn off warnings without using $^W + # unless we upgrade to 5.006 minimum requirement + my @fh; + { + local ($^W) = 0; + @fh = stat $fh; + } + return unless @fh; + + if ($fh[3] > 1 && $^W) { + carp "unlink0: fstat found too many links; SB=@fh" if $^W; + } + + # Stat the path + my @path = stat $path; + + unless (@path) { + carp "unlink0: $path is gone already" if $^W; + return; + } + + # this is no longer a file, but may be a directory, or worse + unless (-f $path) { + confess "panic: $path is no longer a file: SB=@fh"; + } + + # Do comparison of each member of the array + # On WinNT dev and rdev seem to be different + # depending on whether it is a file or a handle. + # Cannot simply compare all members of the stat return + # Select the ones we can use + my @okstat = (0..$#fh); # Use all by default + if ($^O eq 'MSWin32') { + @okstat = (1,2,3,4,5,7,8,9,10); + } elsif ($^O eq 'os2') { + @okstat = (0, 2..$#fh); + } elsif ($^O eq 'VMS') { # device and file ID are sufficient + @okstat = (0, 1); + } elsif ($^O eq 'dos') { + @okstat = (0,2..7,11..$#fh); + } elsif ($^O eq 'mpeix') { + @okstat = (0..4,8..10); + } + + # Now compare each entry explicitly by number + for (@okstat) { + print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG; + # Use eq rather than == since rdev, blksize, and blocks (6, 11, + # and 12) will be '' on platforms that do not support them. This + # is fine since we are only comparing integers. + unless ($fh[$_] eq $path[$_]) { + warn "Did not match $_ element of stat\n" if $DEBUG; + return 0; + } + } + + return 1; +} + +=item B<unlink1> + +Similar to C<unlink0> except after file comparison using cmpstat, the +filehandle is closed prior to attempting to unlink the file. This +allows the file to be removed without using an END block, but does +mean that the post-unlink comparison of the filehandle state provided +by C<unlink0> is not available. + + unlink1($fh, $path) + or die "Error closing and unlinking file"; + +Usually called from the object destructor when using the OO interface. + +Not exported by default. + +This function is disabled if the global variable $KEEP_ALL is true. + +=cut + +sub unlink1 { + croak 'Usage: unlink1(filehandle, filename)' + unless scalar(@_) == 2; + + # Read args + my ($fh, $path) = @_; + + cmpstat($fh, $path) or return 0; + + # Close the file + close( $fh ) or return 0; + + # Make sure the file is writable (for windows) + _force_writable( $path ); + + # return early (without unlink) if we have been instructed to retain files. + return 1 if $KEEP_ALL; + + # remove the file + return unlink($path); +} + +=item B<cleanup> + +Calling this function will cause any temp files or temp directories +that are registered for removal to be removed. This happens automatically +when the process exits but can be triggered manually if the caller is sure +that none of the temp files are required. This method can be registered as +an Apache callback. + +On OSes where temp files are automatically removed when the temp file +is closed, calling this function will have no effect other than to remove +temporary directories (which may include temporary files). + + File::Temp::cleanup(); + +Not exported by default. + +=back + +=head1 PACKAGE VARIABLES + +These functions control the global state of the package. + +=over 4 + +=item B<safe_level> + +Controls the lengths to which the module will go to check the safety of the +temporary file or directory before proceeding. +Options are: + +=over 8 + +=item STANDARD + +Do the basic security measures to ensure the directory exists and +is writable, that the umask() is fixed before opening of the file, +that temporary files are opened only if they do not already exist, and +that possible race conditions are avoided. Finally the L<unlink0|"unlink0"> +function is used to remove files safely. + +=item MEDIUM + +In addition to the STANDARD security, the output directory is checked +to make sure that it is owned either by root or the user running the +program. If the directory is writable by group or by other, it is then +checked to make sure that the sticky bit is set. + +Will not work on platforms that do not support the C<-k> test +for sticky bit. + +=item HIGH + +In addition to the MEDIUM security checks, also check for the +possibility of ``chown() giveaway'' using the L<POSIX|POSIX> +sysconf() function. If this is a possibility, each directory in the +path is checked in turn for safeness, recursively walking back to the +root directory. + +For platforms that do not support the L<POSIX|POSIX> +C<_PC_CHOWN_RESTRICTED> symbol (for example, Windows NT) it is +assumed that ``chown() giveaway'' is possible and the recursive test +is performed. + +=back + +The level can be changed as follows: + + File::Temp->safe_level( File::Temp::HIGH ); + +The level constants are not exported by the module. + +Currently, you must be running at least perl v5.6.0 in order to +run with MEDIUM or HIGH security. This is simply because the +safety tests use functions from L<Fcntl|Fcntl> that are not +available in older versions of perl. The problem is that the version +number for Fcntl is the same in perl 5.6.0 and in 5.005_03 even though +they are different versions. + +On systems that do not support the HIGH or MEDIUM safety levels +(for example Win NT or OS/2) any attempt to change the level will +be ignored. The decision to ignore rather than raise an exception +allows portable programs to be written with high security in mind +for the systems that can support this without those programs failing +on systems where the extra tests are irrelevant. + +If you really need to see whether the change has been accepted +simply examine the return value of C<safe_level>. + + $newlevel = File::Temp->safe_level( File::Temp::HIGH ); + die "Could not change to high security" + if $newlevel != File::Temp::HIGH; + +=cut + +{ + # protect from using the variable itself + my $LEVEL = STANDARD; + sub safe_level { + my $self = shift; + if (@_) { + my $level = shift; + if (($level != STANDARD) && ($level != MEDIUM) && ($level != HIGH)) { + carp "safe_level: Specified level ($level) not STANDARD, MEDIUM or HIGH - ignoring\n" if $^W; + } else { + # Dont allow this on perl 5.005 or earlier + if ($] < 5.006 && $level != STANDARD) { + # Cant do MEDIUM or HIGH checks + croak "Currently requires perl 5.006 or newer to do the safe checks"; + } + # Check that we are allowed to change level + # Silently ignore if we can not. + $LEVEL = $level if _can_do_level($level); + } + } + return $LEVEL; + } +} + +=item TopSystemUID + +This is the highest UID on the current system that refers to a root +UID. This is used to make sure that the temporary directory is +owned by a system UID (C<root>, C<bin>, C<sys> etc) rather than +simply by root. + +This is required since on many unix systems C</tmp> is not owned +by root. + +Default is to assume that any UID less than or equal to 10 is a root +UID. + + File::Temp->top_system_uid(10); + my $topid = File::Temp->top_system_uid; + +This value can be adjusted to reduce security checking if required. +The value is only relevant when C<safe_level> is set to MEDIUM or higher. + +=cut + +{ + my $TopSystemUID = 10; + $TopSystemUID = 197108 if $^O eq 'interix'; # "Administrator" + sub top_system_uid { + my $self = shift; + if (@_) { + my $newuid = shift; + croak "top_system_uid: UIDs should be numeric" + unless $newuid =~ /^\d+$/s; + $TopSystemUID = $newuid; + } + return $TopSystemUID; + } +} + +=item B<$KEEP_ALL> + +Controls whether temporary files and directories should be retained +regardless of any instructions in the program to remove them +automatically. This is useful for debugging but should not be used in +production code. + + $File::Temp::KEEP_ALL = 1; + +Default is for files to be removed as requested by the caller. + +In some cases, files will only be retained if this variable is true +when the file is created. This means that you can not create a temporary +file, set this variable and expect the temp file to still be around +when the program exits. + +=item B<$DEBUG> + +Controls whether debugging messages should be enabled. + + $File::Temp::DEBUG = 1; + +Default is for debugging mode to be disabled. + +=back + +=head1 WARNING + +For maximum security, endeavour always to avoid ever looking at, +touching, or even imputing the existence of the filename. You do not +know that that filename is connected to the same file as the handle +you have, and attempts to check this can only trigger more race +conditions. It's far more secure to use the filehandle alone and +dispense with the filename altogether. + +If you need to pass the handle to something that expects a filename +then, on a unix system, use C<"/dev/fd/" . fileno($fh)> for arbitrary +programs, or more generally C<< "+<=&" . fileno($fh) >> for Perl +programs. You will have to clear the close-on-exec bit on that file +descriptor before passing it to another process. + + use Fcntl qw/F_SETFD F_GETFD/; + fcntl($tmpfh, F_SETFD, 0) + or die "Can't clear close-on-exec flag on temp fh: $!\n"; + +=head2 Temporary files and NFS + +Some problems are associated with using temporary files that reside +on NFS file systems and it is recommended that a local filesystem +is used whenever possible. Some of the security tests will most probably +fail when the temp file is not local. Additionally, be aware that +the performance of I/O operations over NFS will not be as good as for +a local disk. + +=head2 Forking + +In some cases files created by File::Temp are removed from within an +END block. Since END blocks are triggered when a child process exits +(unless C<POSIX::_exit()> is used by the child) File::Temp takes care +to only remove those temp files created by a particular process ID. This +means that a child will not attempt to remove temp files created by the +parent process. + +=head2 BINMODE + +The file returned by File::Temp will have been opened in binary mode +if such a mode is available. If that is not correct, use the binmode() +function to change the mode of the filehandle. + +=head1 HISTORY + +Originally began life in May 1999 as an XS interface to the system +mkstemp() function. In March 2000, the OpenBSD mkstemp() code was +translated to Perl for total control of the code's +security checking, to ensure the presence of the function regardless of +operating system and to help with portability. The module was shipped +as a standard part of perl from v5.6.1. + +=head1 SEE ALSO + +L<POSIX/tmpnam>, L<POSIX/tmpfile>, L<File::Spec>, L<File::Path> + +See L<IO::File> and L<File::MkTemp>, L<Apachae::TempFile> for +different implementations of temporary file handling. + +=head1 AUTHOR + +Tim Jenness E<lt>tjenness@cpan.orgE<gt> + +Copyright (C) 1999-2005 Tim Jenness and the UK Particle Physics and +Astronomy Research Council. All Rights Reserved. This program is free +software; you can redistribute it and/or modify it under the same +terms as Perl itself. + +Original Perl implementation loosely based on the OpenBSD C code for +mkstemp(). Thanks to Tom Christiansen for suggesting that this module +should be written and providing ideas for code improvements and +security enhancements. + +=cut + +1; diff --git a/lib/Temp/File-Temp-0.12/ChangeLog b/lib/Temp/File-Temp-0.12/ChangeLog new file mode 100644 index 0000000..1b716ca --- /dev/null +++ b/lib/Temp/File-Temp-0.12/ChangeLog @@ -0,0 +1,143 @@ +2001-02-22 Tim Jenness <timj@jach.hawaii.edu> + + --- RELEASE V0.12 --- + + * t/posix.t: The unlink0 tests now skip on failure + + * t/mktemp.t: The unlink0 tests now skip on failure + + * Temp.pm (tmpfile): tmpfile returns undef on failure rather than + croaking. + +2001-02-21 Timothy Jenness <t.jenness@jach.hawaii.edu> + + * Temp.pm: + -Add fix for CGI::Carp + [Thanks to John Labovitz <johnl@valiha.inside.sealabs.com>] + - Use error string to propogate reason rather than a carp + +2000-11-24 Tim Jenness <timj@jach.hawaii.edu> + + --- RELEASE V0.11 ---- + + * t/tempfile.t: Add a test to make sure the file is present after + close and another to use tempfile in a scalar context. + + * Temp.pm: Fix bug on NT with O_TEMPORARY causing the file to be + removed before the program exits. + + ---- RELEASE V0.10 ---- + + * Temp.pm: Incorporate fixes up to bleedperl 7825. Cross platform + fixes. + + * t/security.t: Incorporate fixes from bleedperl 7825 - adds more + cross platform support and more skips on the basis that this is + not testing your system security, just the module. + +2000-08-16 Tim Jenness <timj@jach.hawaii.edu> + + * Temp.pm (_gettemp): Dont use VMS::Stdio if we want the file + to remain after closing. + +2000-08-15 Tim Jenness <timj@jach.hawaii.edu> + + * Temp.pm (_can_do_level): cygwin patch + +2000-08-14 Tim Jenness <timj@jach.hawaii.edu> + + * Temp.pm: Add OPENTEMPFLAGS to support UNLINK=>0 + More tweaks to VMS support (now uses VMS::Stdio) + +2000-07-26 Tim Jenness <timj@jach.hawaii.edu> + + * Release V0.09 to CPAN + + * README: Update for V0.09 + +2000-07-25 Tim Jenness <timj@jach.hawaii.edu> + + * t/security.t: OS/2 can not do the security tests. + + * Temp.pm: Add Support for VMS and OS/2 + +2000-05-15 Tim Jenness <timj@jach.hawaii.edu> + + * Release V0.08 to CPAN + + * t/mktemp.t: Skip the test for unlink0 if it fails since in most + cases this indicates an NFS problem. + + * Temp.pm (_can_do_level): Add check to make sure an OS can handle + the required safe level + (safe_level): Check the level can be supported before allowing it + to change + (END): Change order of cleanup so that files are removed ahead of + temp dirs (since files may be in the temp dirs) + +2000-05-08 Tim Jenness <timj@jach.hawaii.edu> + + * Temp.pm: Reorganize END block + + * t/tempfile.t: Correct tests for new position of END{} block + + * t/security.t: Correct tests for new position of END{} block + + * t/posix.t: add # to print output + + * t/tempfile.t: Add # to print output + + * t/mktemp.t: Add # to print output + + * t/security.t: Add # to print output + +2000-04-28 Tim Jenness <timj@jach.hawaii.edu> + + * Temp.pm: Calculate OPENFLAGS outside of subroutine. This + improves speed of the commands by nearly a factor of 3. + (_replace_XX): Inline the character replacement code rather than + using _randchar subroutine. Improves performance by an additional 8%. + +2000-04-27 Tim Jenness <t.jenness@jach.hawaii.edu> + + * t/posix.t: Add explicit autoflush on filehandle + + * t/mktemp.t: Add explicit autoflush on filehandle + + * Temp.pm: (unlink0): Disallow HIGH and MEDIUM tests if running + perl 5.005 or earlier. + + * t/security.t: Specify perl version to allow for tests + + * Add support for perl 5.005 (remove 'our' and auto-vivifying file + handles). VERSION NUMBER NOW 0.07 + + * README: Update in preparation for V0.06 + + * Temp.pm (_deferred_unlink): Add new internal routine to centralise the + configuring of END blocks. This also fixes a bug where only the + first file was being unlinked in the END block (due to scoping). + + (_can_unlink_opened_file): Rename from _can_unlink. Will now + return false if running on Windows. + + (_is_verysafe): If _PC_CHOWN_RESTRICTED is not available assume + that "chown giveaway" is possible anyway. + + (unlink0): If can not unlink an open file, simply defer removal + until later. + + (_gettemp): Add O_NOINHERIT and O_TEMPORARY flags to sysopen if + they are available (Thanks to Tom Christiansen for this) + + * t/mktemp.t: Add test + + * t/posix.t: Add test + + * t/security.t: Add test + + * t/tempfile.t: Add test + +2000-03-14 Tim Jenness <t.jenness@jach.hawaii.edu> + + * Release v0.05 to CPAN diff --git a/lib/Temp/File-Temp-0.12/MANIFEST b/lib/Temp/File-Temp-0.12/MANIFEST new file mode 100644 index 0000000..295d5fb --- /dev/null +++ b/lib/Temp/File-Temp-0.12/MANIFEST @@ -0,0 +1,11 @@ +MANIFEST +Makefile.PL +README +Temp.pm +t/mktemp.t +t/posix.t +t/tempfile.t +t/security.t +ChangeLog +misc/benchmark.pl +misc/results.txt diff --git a/lib/Temp/File-Temp-0.12/Makefile b/lib/Temp/File-Temp-0.12/Makefile new file mode 100644 index 0000000..deb9438 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/Makefile @@ -0,0 +1,734 @@ +# This Makefile is for the File::Temp extension to perl. +# +# It was generated automatically by MakeMaker version +# 6.17 (Revision: 1.133) from the contents of +# Makefile.PL. Don't edit this file, edit Makefile.PL instead. +# +# ANY CHANGES MADE HERE WILL BE LOST! +# +# MakeMaker ARGV: () +# +# MakeMaker Parameters: + +# ABSTRACT_FROM => q[Temp.pm] +# AUTHOR => q[Tim Jenness <t.jenness@jach.hawaii.edu>] +# NAME => q[File::Temp] +# PREREQ_PM => { Fcntl=>q[1.03], File::Spec=>q[0.8], File::Path=>undef } +# VERSION_FROM => q[Temp.pm] +# dist => { COMPRESS=>q[gzip -9f] } + +# --- MakeMaker post_initialize section: + + +# --- MakeMaker const_config section: + +# These definitions are from config.sh (via /usr/lib/perl5/5.8.5/i686-linux/Config.pm) + +# They may have been overridden via Makefile.PL or on the command line +AR = ar +CC = gcc +CCCDLFLAGS = -fPIC +CCDLFLAGS = -rdynamic +DLEXT = so +DLSRC = dl_dlopen.xs +LD = gcc +LDDLFLAGS = -shared -L/usr/local/lib +LDFLAGS = -L/usr/local/lib +LIBC = /lib/libc-2.3.4.so +LIB_EXT = .a +OBJ_EXT = .o +OSNAME = linux +OSVERS = 2.6.10-gentoo-r4 +RANLIB = : +SITELIBEXP = /usr/lib/perl5/site_perl/5.8.5 +SITEARCHEXP = /usr/lib/perl5/site_perl/5.8.5/i686-linux +SO = so +EXE_EXT = +FULL_AR = /usr/bin/ar +VENDORARCHEXP = /usr/lib/perl5/vendor_perl/5.8.5/i686-linux +VENDORLIBEXP = /usr/lib/perl5/vendor_perl/5.8.5 + + +# --- MakeMaker constants section: +AR_STATIC_ARGS = cr +DIRFILESEP = / +NAME = File::Temp +NAME_SYM = File_Temp +VERSION = 0.12 +VERSION_MACRO = VERSION +VERSION_SYM = 0_12 +DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" +XS_VERSION = 0.12 +XS_VERSION_MACRO = XS_VERSION +XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" +INST_ARCHLIB = blib/arch +INST_SCRIPT = blib/script +INST_BIN = blib/bin +INST_LIB = blib/lib +INST_MAN1DIR = blib/man1 +INST_MAN3DIR = blib/man3 +MAN1EXT = 1 +MAN3EXT = 3pm +INSTALLDIRS = site +DESTDIR = +PREFIX = +PERLPREFIX = /usr +SITEPREFIX = /usr +VENDORPREFIX = /usr +INSTALLPRIVLIB = $(PERLPREFIX)/lib/perl5/5.8.5 +DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) +INSTALLSITELIB = $(SITEPREFIX)/lib/perl5/site_perl/5.8.5 +DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) +INSTALLVENDORLIB = $(VENDORPREFIX)/lib/perl5/vendor_perl/5.8.5 +DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) +INSTALLARCHLIB = $(PERLPREFIX)/lib/perl5/5.8.5/i686-linux +DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) +INSTALLSITEARCH = $(SITEPREFIX)/lib/perl5/site_perl/5.8.5/i686-linux +DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) +INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5/vendor_perl/5.8.5/i686-linux +DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) +INSTALLBIN = $(PERLPREFIX)/bin +DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) +INSTALLSITEBIN = $(SITEPREFIX)/bin +DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) +INSTALLVENDORBIN = $(VENDORPREFIX)/bin +DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) +INSTALLSCRIPT = $(PERLPREFIX)/bin +DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) +INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1 +DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) +INSTALLSITEMAN1DIR = $(SITEPREFIX)/share/man/man1 +DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) +INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1 +DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) +INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3 +DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) +INSTALLSITEMAN3DIR = $(SITEPREFIX)/share/man/man3 +DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) +INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3 +DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) +PERL_LIB = /usr/lib/perl5/5.8.5 +PERL_ARCHLIB = /usr/lib/perl5/5.8.5/i686-linux +LIBPERL_A = libperl.a +FIRST_MAKEFILE = Makefile +MAKEFILE_OLD = $(FIRST_MAKEFILE).old +MAKE_APERL_FILE = $(FIRST_MAKEFILE).aperl +PERLMAINCC = $(CC) +PERL_INC = /usr/lib/perl5/5.8.5/i686-linux/CORE +PERL = /usr/bin/perl5.8.5 +FULLPERL = /usr/bin/perl5.8.5 +ABSPERL = $(PERL) +PERLRUN = $(PERL) +FULLPERLRUN = $(FULLPERL) +ABSPERLRUN = $(ABSPERL) +PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" +FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" +ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" +PERL_CORE = 0 +PERM_RW = 644 +PERM_RWX = 755 + +MAKEMAKER = /usr/lib/perl5/5.8.5/ExtUtils/MakeMaker.pm +MM_VERSION = 6.17 +MM_REVISION = 1.133 + +# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). +# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) +# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) +# DLBASE = Basename part of dynamic library. May be just equal BASEEXT. +FULLEXT = File/Temp +BASEEXT = Temp +PARENT_NAME = File +DLBASE = $(BASEEXT) +VERSION_FROM = Temp.pm +OBJECT = +LDFROM = $(OBJECT) +LINKTYPE = dynamic + +# Handy lists of source code files: +XS_FILES = +C_FILES = +O_FILES = +H_FILES = +MAN1PODS = +MAN3PODS = Temp.pm + +# Where is the Config information that we are using/depend on +CONFIGDEP = $(PERL_ARCHLIB)$(DIRFILESEP)Config.pm $(PERL_INC)$(DIRFILESEP)config.h + +# Where to build things +INST_LIBDIR = $(INST_LIB)/File +INST_ARCHLIBDIR = $(INST_ARCHLIB)/File + +INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) +INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) + +INST_STATIC = +INST_DYNAMIC = +INST_BOOT = + +# Extra linker info +EXPORT_LIST = +PERL_ARCHIVE = +PERL_ARCHIVE_AFTER = + + +TO_INST_PM = Temp.pm + +PM_TO_BLIB = Temp.pm \ + $(INST_LIB)/File/Temp.pm + + +# --- MakeMaker platform_constants section: +MM_Unix_VERSION = 1.42 +PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc + + +# --- MakeMaker tool_autosplit section: +# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto +AUTOSPLITFILE = $(PERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' + + + +# --- MakeMaker tool_xsubpp section: + + +# --- MakeMaker tools_other section: +SHELL = /bin/sh +CHMOD = chmod +CP = cp +MV = mv +NOOP = $(SHELL) -c true +NOECHO = @ +RM_F = rm -f +RM_RF = rm -rf +TEST_F = test -f +TOUCH = touch +UMASK_NULL = umask 0 +DEV_NULL = > /dev/null 2>&1 +MKPATH = $(PERLRUN) "-MExtUtils::Command" -e mkpath +EQUALIZE_TIMESTAMP = $(PERLRUN) "-MExtUtils::Command" -e eqtime +ECHO = echo +ECHO_N = echo -n +UNINST = 0 +VERBINST = 0 +MOD_INSTALL = $(PERLRUN) -MExtUtils::Install -e 'install({@ARGV}, '\''$(VERBINST)'\'', 0, '\''$(UNINST)'\'');' +DOC_INSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e perllocal_install +UNINSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e uninstall +WARN_IF_OLD_PACKLIST = $(PERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist + + +# --- MakeMaker makemakerdflt section: +makemakerdflt: all + $(NOECHO) $(NOOP) + + +# --- MakeMaker dist section: +TAR = tar +TARFLAGS = cvf +ZIP = zip +ZIPFLAGS = -r +COMPRESS = gzip -9f +SUFFIX = .gz +SHAR = shar +PREOP = $(NOECHO) $(NOOP) +POSTOP = $(NOECHO) $(NOOP) +TO_UNIX = $(NOECHO) $(NOOP) +CI = ci -u +RCS_LABEL = rcs -Nv$(VERSION_SYM): -q +DIST_CP = best +DIST_DEFAULT = tardist +DISTNAME = File-Temp +DISTVNAME = File-Temp-0.12 + + +# --- MakeMaker macro section: + + +# --- MakeMaker depend section: + + +# --- MakeMaker cflags section: + + +# --- MakeMaker const_loadlibs section: + + +# --- MakeMaker const_cccmd section: + + +# --- MakeMaker post_constants section: + + +# --- MakeMaker pasthru section: + +PASTHRU = LIB="$(LIB)"\ + LIBPERL_A="$(LIBPERL_A)"\ + LINKTYPE="$(LINKTYPE)"\ + PREFIX="$(PREFIX)"\ + OPTIMIZE="$(OPTIMIZE)"\ + PASTHRU_DEFINE="$(PASTHRU_DEFINE)"\ + PASTHRU_INC="$(PASTHRU_INC)" + + +# --- MakeMaker special_targets section: +.SUFFIXES: .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) + +.PHONY: all config static dynamic test linkext manifest + + + +# --- MakeMaker c_o section: + + +# --- MakeMaker xs_c section: + + +# --- MakeMaker xs_o section: + + +# --- MakeMaker top_targets section: +all :: pure_all manifypods + $(NOECHO) $(NOOP) + + +pure_all :: config pm_to_blib subdirs linkext + $(NOECHO) $(NOOP) + +subdirs :: $(MYEXTLIB) + $(NOECHO) $(NOOP) + +config :: $(FIRST_MAKEFILE) $(INST_LIBDIR)$(DIRFILESEP).exists + $(NOECHO) $(NOOP) + +config :: $(INST_ARCHAUTODIR)$(DIRFILESEP).exists + $(NOECHO) $(NOOP) + +config :: $(INST_AUTODIR)$(DIRFILESEP).exists + $(NOECHO) $(NOOP) + +$(INST_AUTODIR)/.exists :: /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h + $(NOECHO) $(MKPATH) $(INST_AUTODIR) + $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h $(INST_AUTODIR)/.exists + + -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_AUTODIR) + +$(INST_LIBDIR)/.exists :: /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h + $(NOECHO) $(MKPATH) $(INST_LIBDIR) + $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h $(INST_LIBDIR)/.exists + + -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_LIBDIR) + +$(INST_ARCHAUTODIR)/.exists :: /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h + $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) + $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h $(INST_ARCHAUTODIR)/.exists + + -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR) + +config :: $(INST_MAN3DIR)$(DIRFILESEP).exists + $(NOECHO) $(NOOP) + + +$(INST_MAN3DIR)/.exists :: /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h + $(NOECHO) $(MKPATH) $(INST_MAN3DIR) + $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.5/i686-linux/CORE/perl.h $(INST_MAN3DIR)/.exists + + -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_MAN3DIR) + +help: + perldoc ExtUtils::MakeMaker + + +# --- MakeMaker linkext section: + +linkext :: $(LINKTYPE) + $(NOECHO) $(NOOP) + + +# --- MakeMaker dlsyms section: + + +# --- MakeMaker dynamic section: + +dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) + $(NOECHO) $(NOOP) + + +# --- MakeMaker dynamic_bs section: + +BOOTSTRAP = + + +# --- MakeMaker dynamic_lib section: + + +# --- MakeMaker static section: + +## $(INST_PM) has been moved to the all: target. +## It remains here for awhile to allow for old usage: "make static" +static :: $(FIRST_MAKEFILE) $(INST_STATIC) + $(NOECHO) $(NOOP) + + +# --- MakeMaker static_lib section: + + +# --- MakeMaker manifypods section: + +POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" +POD2MAN = $(POD2MAN_EXE) + + +manifypods : pure_all \ + Temp.pm \ + Temp.pm + $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW)\ + Temp.pm $(INST_MAN3DIR)/File::Temp.$(MAN3EXT) + + + + +# --- MakeMaker processPL section: + + +# --- MakeMaker installbin section: + + +# --- MakeMaker subdirs section: + +# none + +# --- MakeMaker clean_subdirs section: +clean_subdirs : + $(NOECHO) $(NOOP) + + +# --- MakeMaker clean section: + +# Delete temporary files but do not touch installed files. We don't delete +# the Makefile here so a later make realclean still has a makefile to use. + +clean :: clean_subdirs + -$(RM_RF) ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all $(INST_ARCHAUTODIR)/extralibs.ld perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core core.*perl.*.? *perl.core core.[0-9] core.[0-9][0-9] core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9][0-9] + -$(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) + + +# --- MakeMaker realclean_subdirs section: +realclean_subdirs : + $(NOECHO) $(NOOP) + + +# --- MakeMaker realclean section: + +# Delete temporary files (via clean) and also delete installed files +realclean purge :: clean realclean_subdirs + $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR) + $(RM_RF) $(DISTVNAME) + $(RM_F) $(MAKEFILE_OLD) $(FIRST_MAKEFILE) $(INST_LIB)/File/Temp.pm + + +# --- MakeMaker metafile section: +metafile : + $(NOECHO) $(ECHO) '# http://module-build.sourceforge.net/META-spec.html' > META.yml + $(NOECHO) $(ECHO) '#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#' >> META.yml + $(NOECHO) $(ECHO) 'name: File-Temp' >> META.yml + $(NOECHO) $(ECHO) 'version: 0.12' >> META.yml + $(NOECHO) $(ECHO) 'version_from: Temp.pm' >> META.yml + $(NOECHO) $(ECHO) 'installdirs: site' >> META.yml + $(NOECHO) $(ECHO) 'requires:' >> META.yml + $(NOECHO) $(ECHO) ' Fcntl: 1.03' >> META.yml + $(NOECHO) $(ECHO) ' File::Path: ' >> META.yml + $(NOECHO) $(ECHO) ' File::Spec: 0.8' >> META.yml + $(NOECHO) $(ECHO) '' >> META.yml + $(NOECHO) $(ECHO) 'distribution_type: module' >> META.yml + $(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.17' >> META.yml + + +# --- MakeMaker metafile_addtomanifest section: +metafile_addtomanifest: + $(NOECHO) $(PERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \ + -e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' + + +# --- MakeMaker dist_basics section: +distclean :: realclean distcheck + $(NOECHO) $(NOOP) + +distcheck : + $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck + +skipcheck : + $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck + +manifest : + $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest + +veryclean : realclean + $(RM_F) *~ *.orig */*~ */*.orig + + + +# --- MakeMaker dist_core section: + +dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) + $(NOECHO) $(PERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ + -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' + +tardist : $(DISTVNAME).tar$(SUFFIX) + $(NOECHO) $(NOOP) + +uutardist : $(DISTVNAME).tar$(SUFFIX) + uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu + +$(DISTVNAME).tar$(SUFFIX) : distdir + $(PREOP) + $(TO_UNIX) + $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) + $(RM_RF) $(DISTVNAME) + $(COMPRESS) $(DISTVNAME).tar + $(POSTOP) + +zipdist : $(DISTVNAME).zip + $(NOECHO) $(NOOP) + +$(DISTVNAME).zip : distdir + $(PREOP) + $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) + $(RM_RF) $(DISTVNAME) + $(POSTOP) + +shdist : distdir + $(PREOP) + $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar + $(RM_RF) $(DISTVNAME) + $(POSTOP) + + +# --- MakeMaker distdir section: +distdir : metafile metafile_addtomanifest + $(RM_RF) $(DISTVNAME) + $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ + -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" + + + +# --- MakeMaker dist_test section: + +disttest : distdir + cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL + cd $(DISTVNAME) && $(MAKE) $(PASTHRU) + cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) + + +# --- MakeMaker dist_ci section: + +ci : + $(PERLRUN) "-MExtUtils::Manifest=maniread" \ + -e "@all = keys %{ maniread() };" \ + -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \ + -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" + + +# --- MakeMaker install section: + +install :: all pure_install doc_install + +install_perl :: all pure_perl_install doc_perl_install + +install_site :: all pure_site_install doc_site_install + +install_vendor :: all pure_vendor_install doc_vendor_install + +pure_install :: pure_$(INSTALLDIRS)_install + +doc_install :: doc_$(INSTALLDIRS)_install + +pure__install : pure_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + +doc__install : doc_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + +pure_perl_install :: + $(NOECHO) $(MOD_INSTALL) \ + read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLPRIVLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ + $(INST_BIN) $(DESTINSTALLBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ + $(SITEARCHEXP)/auto/$(FULLEXT) + + +pure_site_install :: + $(NOECHO) $(MOD_INSTALL) \ + read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLSITELIB) \ + $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ + $(INST_BIN) $(DESTINSTALLSITEBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ + $(PERL_ARCHLIB)/auto/$(FULLEXT) + +pure_vendor_install :: + $(NOECHO) $(MOD_INSTALL) \ + read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLVENDORLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ + $(INST_BIN) $(DESTINSTALLVENDORBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) + +doc_perl_install :: + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod + -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) + -$(NOECHO) $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLPRIVLIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLARCHLIB)/perllocal.pod + +doc_site_install :: + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod + -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) + -$(NOECHO) $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLSITELIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLARCHLIB)/perllocal.pod + +doc_vendor_install :: + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod + -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) + -$(NOECHO) $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLVENDORLIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLARCHLIB)/perllocal.pod + + +uninstall :: uninstall_from_$(INSTALLDIRS)dirs + +uninstall_from_perldirs :: + $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist + +uninstall_from_sitedirs :: + $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist + +uninstall_from_vendordirs :: + $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist + + +# --- MakeMaker force section: +# Phony target to force checking subdirectories. +FORCE: + $(NOECHO) $(NOOP) + + +# --- MakeMaker perldepend section: + + +# --- MakeMaker makefile section: + +# We take a very conservative approach here, but it's worth it. +# We move Makefile to Makefile.old here to avoid gnu make looping. +$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) + $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" + $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." + $(NOECHO) $(RM_F) $(MAKEFILE_OLD) + $(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) + -$(MAKE) -f $(MAKEFILE_OLD) clean $(DEV_NULL) || $(NOOP) + $(PERLRUN) Makefile.PL + $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" + $(NOECHO) $(ECHO) "==> Please rerun the make command. <==" + false + + + +# --- MakeMaker staticmake section: + +# --- MakeMaker makeaperl section --- +MAP_TARGET = perl +FULLPERL = /usr/bin/perl5.8.5 + +$(MAP_TARGET) :: static $(MAKE_APERL_FILE) + $(MAKE) -f $(MAKE_APERL_FILE) $@ + +$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) + $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) + $(NOECHO) $(PERLRUNINST) \ + Makefile.PL DIR= \ + MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ + MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= + + +# --- MakeMaker test section: + +TEST_VERBOSE=0 +TEST_TYPE=test_$(LINKTYPE) +TEST_FILE = test.pl +TEST_FILES = t/*.t +TESTDB_SW = -d + +testdb :: testdb_$(LINKTYPE) + +test :: $(TEST_TYPE) + +test_dynamic :: pure_all + PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) + +testdb_dynamic :: pure_all + PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) + +test_ : test_dynamic + +test_static :: test_dynamic +testdb_static :: testdb_dynamic + + +# --- MakeMaker ppd section: +# Creates a PPD (Perl Package Description) for a binary distribution. +ppd: + $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="0,12,0,0">' > $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <TITLE>$(DISTNAME)</TITLE>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <ABSTRACT>return name and handle of a temporary file safely</ABSTRACT>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <AUTHOR>Tim Jenness <t.jenness@jach.hawaii.edu></AUTHOR>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <DEPENDENCY NAME="Fcntl" VERSION="1,03,0,0" />' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <DEPENDENCY NAME="File-Path" VERSION="0,0,0,0" />' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <DEPENDENCY NAME="File-Spec" VERSION="0,8,0,0" />' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <OS NAME="$(OSNAME)" />' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i686-linux" />' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd + + +# --- MakeMaker pm_to_blib section: + +pm_to_blib: $(TO_INST_PM) + $(NOECHO) $(PERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')'\ + Temp.pm $(INST_LIB)/File/Temp.pm + $(NOECHO) $(TOUCH) $@ + +# --- MakeMaker selfdocument section: + + +# --- MakeMaker postamble section: + + +# End. diff --git a/lib/Temp/File-Temp-0.12/Makefile.PL b/lib/Temp/File-Temp-0.12/Makefile.PL new file mode 100644 index 0000000..638e77f --- /dev/null +++ b/lib/Temp/File-Temp-0.12/Makefile.PL @@ -0,0 +1,17 @@ +use ExtUtils::MakeMaker; + +# Write the makefile +WriteMakefile( + 'NAME' => 'File::Temp', + 'VERSION_FROM' => 'Temp.pm', # finds $VERSION + + 'PREREQ_PM' => { + File::Spec => 0.8, + Fcntl => 1.03, + File::Path => undef, + }, + 'dist' => { COMPRESS => "gzip -9f" }, + ($] >= 5.005 ? ## Add these new keywords supported since 5.005 + (ABSTRACT_FROM => 'Temp.pm', + AUTHOR => 'Tim Jenness <t.jenness@jach.hawaii.edu>') : ()), +); diff --git a/lib/Temp/File-Temp-0.12/README b/lib/Temp/File-Temp-0.12/README new file mode 100644 index 0000000..07874fc --- /dev/null +++ b/lib/Temp/File-Temp-0.12/README @@ -0,0 +1,161 @@ +File::Temp - provides functions for generating temporary files + +This is release V0.12 of File::Temp. This module can be used to +generate temporary files (providing a filename and filehandle) or directories. +Possible race conditions are avoided and some security checks are performed +(eg making sure the sticky bit is set on world writeable temp directories). + +It could be considered to be in a beta state since it has only been +tested on six operating systems. + +Please let me know if it fails on other operating systems. + +INSTALLATION + + % perl Makefile.PL + % make + % make test + % make install + +TEST FAILURES + +Test failures from lib/ftmp-security saying "system possibly insecure" + +Firstly, test failures from the ftmp-security are not necessarily +serious or indicative of a real security threat. That being said, +they bear investigating. + +The tests may fail for the following reasons. Note that each of the +tests is run both in the building directory and the temporary +directory, as returned by File::Spec->tmpdir(). + +(1) If the directory the tests are being run is owned by somebody else +than the user running the tests, or root (uid 0). This failure can +happen if the Perl source code distribution is unpacked in a way that +the user ids in the distribution package are used as-is. Some tar +programs do this. + +(2) If the directory the test are being run in is writable by group +or by other (remember: with UNIX/POSIX semantics, write access to +a directory means the right to add/remove files in that directory), +and there is no sticky bit set in the directory. 'Sticky bit' is +a feature used in some UNIXes to give extra protection to files: if +the bit is on a directory, no one but the owner (or the root) can remove +that file even if the permissions of the directory would allow file +removal by others. This failure can happen if the permissions in the +directory simply are a bit too liberal for the tests' liking. This +may or may not be a real problem: it depends on the permissions policy +used on this particular directory/project/system/site. This failure +can also happen if the system either doesn't support the sticky bit +(this is the case with many non-UNIX platforms: in principle the +File::Temp should know about these platforms and skip the tests), or +if the system supports the sticky bit but for some reason or reasons +it is not being used. This is for example the case with HP-UX: as of +HP-UX release 11.00, the sticky bit is very much supported, but HP-UX +doesn't use it on its /tmp directory as shipped. Also as with the +permissions, some local policy might dictate that the stickiness is +not used. + +(3) If the system supports the POSIX 'chown giveaway' feature and if +any of the parent directories of the temporary file back to the root +directory are 'unsafe', using the definitions given above in (1) and +(2). + +See the documentation for the File::Temp module for more information +about the various security aspects. + +REQUIREMENTS + +Requires perl 5.005 or newer. +Perl 5.6.0 will give access to extra security checks. + +Written completely in Perl. XS is not required. + +File::Spec greater than or equal to 0.8 is required. +Fcntl from perl5.5.670 or higher [but will work without it]. +The above two modules are standard on Perl 5.6 + +PLATFORMS + +Tested on the following platforms: + + RedHat Linux 7, perl 5.6.0 + Solaris 2.6, perl 5.6.0 + Windows NT 4, perl 5.6.0 + VMS, perl5.7.0 + OS/2, perl5.7.0 + DOS/DJGPP, perl5.7.0 + + RedHat Linux 6.1, perl 5.005_03 + Digital Unix 4.0, perl 5.005_03 + +File::Temp is a standard Perl module as of perl 5.7.0 and 5.6.1. + +Still may need work on non-Unix platforms to adjust test severity (for example +stickyness test does not work on NT, and neither does unlink on an open +file). MEDIUM and HIGH security checks have only been tested on Unix. +Porting notes are provided at the start of Temp.pm. + +AUTHOR + +Tim Jenness <t.jenness@jach.hawaii.edu> + +Copyright (C) 1999 - 2001 Tim Jenness and the UK Particle Physics and +Astronomy Research Council. All Rights Reserved. This program is free +software; you can redistribute it and/or modify it under the same +terms as Perl itself. + +CHANGES IN THIS RELEASE + +V0.12: + - Fix problem with Fcntl warnings on CGI and CGI::Carp + [Thanks to John Labovitz <johnl@valiha.inside.sealabs.com>] + - Remove most of the carp warnings and wrap all information into a + single croak (this allows security failures to die without + additional warnings getting in the way) + +V0.11: + - Fix bug on NT with O_TEMPORARY. The file was removed on close + rather than on exit + +V0.10: + - More fixes for VMS + - Add DOS/DJGPP support + - Make security test less prone to failure on insecure systems + since we are testing the module rather than the system. + - Security tests is run in build dir and tmpdir + +V0.09: + - Add VMS support + - OS/2 can not understand sticky bits + +V0.08: + - Improve performance by a factor of 3 over V0.07 + - Simplify the END block code + - Ignore requests for HIGH or MEDIUM safety on platforms that + can not support it (rather than generating a fatal error) + - Add OS/2 to list of platforms that can not unlink open file + +V0.07: + - Add support for perl 5.005. On perl 5.005 the HIGH and + MEDIUM security levels are not supported due to changes in + the Fcntl module. + + - A benchmark has been added to the misc directory to compare + IO::File->new_tmpfile, File::Temp and a simple creation wrapper + around POSIX::tmpnam. On my Linux system File::Temp::tempfile() + is an order of magnitude slower than the other two...... + +V0.06: + - Add a test suite + - Fix unlinking during the END blocks (was only removing the + first file generated) + - unlink0 can now be run on WinNT - the unlink of the file + is now deferred to an END block since can not unlink an + open file on WinNT + - If the POSIX _PC_CHOWN_RESTRICTED symbol is not available + it is assumed that "chown giveaway" is allowed. + + +V0.05: + - First release to CPAN diff --git a/lib/Temp/File-Temp-0.12/Temp.pm b/lib/Temp/File-Temp-0.12/Temp.pm new file mode 100644 index 0000000..b686682 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/Temp.pm @@ -0,0 +1,1863 @@ +package File::Temp; + +=head1 NAME + +File::Temp - return name and handle of a temporary file safely + +=begin __INTERNALS + +=head1 PORTABILITY + +This module is designed to be portable across operating systems +and it currently supports Unix, VMS, DOS, OS/2 and Windows. When +porting to a new OS there are generally three main issues +that have to be solved: + +=over 4 + +=item * + +Can the OS unlink an open file? If it can not then the +C<_can_unlink_opened_file> method should be modified. + +=item * + +Are the return values from C<stat> reliable? By default all the +return values from C<stat> are compared when unlinking a temporary +file using the filename and the handle. Operating systems other than +unix do not always have valid entries in all fields. If C<unlink0> fails +then the C<stat> comparison should be modified accordingly. + +=item * + +Security. Systems that can not support a test for the sticky bit +on a directory can not use the MEDIUM and HIGH security tests. +The C<_can_do_level> method should be modified accordingly. + +=back + +=end __INTERNALS + +=head1 SYNOPSIS + + use File::Temp qw/ tempfile tempdir /; + + $dir = tempdir( CLEANUP => 1 ); + ($fh, $filename) = tempfile( DIR => $dir ); + + ($fh, $filename) = tempfile( $template, DIR => $dir); + ($fh, $filename) = tempfile( $template, SUFFIX => '.dat'); + + $fh = tempfile(); + +MkTemp family: + + use File::Temp qw/ :mktemp /; + + ($fh, $file) = mkstemp( "tmpfileXXXXX" ); + ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix); + + $tmpdir = mkdtemp( $template ); + + $unopened_file = mktemp( $template ); + +POSIX functions: + + use File::Temp qw/ :POSIX /; + + $file = tmpnam(); + $fh = tmpfile(); + + ($fh, $file) = tmpnam(); + ($fh, $file) = tmpfile(); + + +Compatibility functions: + + $unopened_file = File::Temp::tempnam( $dir, $pfx ); + +=begin later + +Objects (NOT YET IMPLEMENTED): + + require File::Temp; + + $fh = new File::Temp($template); + $fname = $fh->filename; + +=end later + +=head1 DESCRIPTION + +C<File::Temp> can be used to create and open temporary files in a safe way. +The tempfile() function can be used to return the name and the open +filehandle of a temporary file. The tempdir() function can +be used to create a temporary directory. + +The security aspect of temporary file creation is emphasized such that +a filehandle and filename are returned together. This helps guarantee +that a race condition can not occur where the temporary file is +created by another process between checking for the existence of the +file and its opening. Additional security levels are provided to +check, for example, that the sticky bit is set on world writable +directories. See L<"safe_level"> for more information. + +For compatibility with popular C library functions, Perl implementations of +the mkstemp() family of functions are provided. These are, mkstemp(), +mkstemps(), mkdtemp() and mktemp(). + +Additionally, implementations of the standard L<POSIX|POSIX> +tmpnam() and tmpfile() functions are provided if required. + +Implementations of mktemp(), tmpnam(), and tempnam() are provided, +but should be used with caution since they return only a filename +that was valid when function was called, so cannot guarantee +that the file will not exist by the time the caller opens the filename. + +=cut + +# 5.6.0 gives us S_IWOTH, S_IWGRP, our and auto-vivifying filehandls +# People would like a version on 5.005 so give them what they want :-) +use 5.005; +use strict; +use Carp; +use File::Spec 0.8; +use File::Path qw/ rmtree /; +use Fcntl 1.03; +use Errno; +require VMS::Stdio if $^O eq 'VMS'; + +# Need the Symbol package if we are running older perl +require Symbol if $] < 5.006; + + +# use 'our' on v5.6.0 +use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS $DEBUG); + +$DEBUG = 0; + +# We are exporting functions + +use base qw/Exporter/; + +# Export list - to allow fine tuning of export table + +@EXPORT_OK = qw{ + tempfile + tempdir + tmpnam + tmpfile + mktemp + mkstemp + mkstemps + mkdtemp + unlink0 + }; + +# Groups of functions for export + +%EXPORT_TAGS = ( + 'POSIX' => [qw/ tmpnam tmpfile /], + 'mktemp' => [qw/ mktemp mkstemp mkstemps mkdtemp/], + ); + +# add contents of these tags to @EXPORT +Exporter::export_tags('POSIX','mktemp'); + +# Version number + +$VERSION = '0.12'; + +# This is a list of characters that can be used in random filenames + +my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + a b c d e f g h i j k l m n o p q r s t u v w x y z + 0 1 2 3 4 5 6 7 8 9 _ + /); + +# Maximum number of tries to make a temp file before failing + +use constant MAX_TRIES => 10; + +# Minimum number of X characters that should be in a template +use constant MINX => 4; + +# Default template when no template supplied + +use constant TEMPXXX => 'X' x 10; + +# Constants for the security level + +use constant STANDARD => 0; +use constant MEDIUM => 1; +use constant HIGH => 2; + +# OPENFLAGS. If we defined the flag to use with Sysopen here this gives +# us an optimisation when many temporary files are requested + +my $OPENFLAGS = O_CREAT | O_EXCL | O_RDWR; + +for my $oflag (qw/ FOLLOW BINARY LARGEFILE EXLOCK NOINHERIT /) { + my ($bit, $func) = (0, "Fcntl::O_" . $oflag); + no strict 'refs'; + $OPENFLAGS |= $bit if eval { + # Make sure that redefined die handlers do not cause problems + # eg CGI::Carp + local $SIG{__DIE__} = sub {}; + local $SIG{__WARN__} = sub {}; + $bit = &$func(); + 1; + }; +} + +# On some systems the O_TEMPORARY flag can be used to tell the OS +# to automatically remove the file when it is closed. This is fine +# in most cases but not if tempfile is called with UNLINK=>0 and +# the filename is requested -- in the case where the filename is to +# be passed to another routine. This happens on windows. We overcome +# this by using a second open flags variable + +my $OPENTEMPFLAGS = $OPENFLAGS; +for my $oflag (qw/ TEMPORARY /) { + my ($bit, $func) = (0, "Fcntl::O_" . $oflag); + no strict 'refs'; + $OPENTEMPFLAGS |= $bit if eval { + # Make sure that redefined die handlers do not cause problems + # eg CGI::Carp + local $SIG{__DIE__} = sub {}; + local $SIG{__WARN__} = sub {}; + $bit = &$func(); + 1; + }; +} + +# INTERNAL ROUTINES - not to be used outside of package + +# Generic routine for getting a temporary filename +# modelled on OpenBSD _gettemp() in mktemp.c + +# The template must contain X's that are to be replaced +# with the random values + +# Arguments: + +# TEMPLATE - string containing the XXXXX's that is converted +# to a random filename and opened if required + +# Optionally, a hash can also be supplied containing specific options +# "open" => if true open the temp file, else just return the name +# default is 0 +# "mkdir"=> if true, we are creating a temp directory rather than tempfile +# default is 0 +# "suffixlen" => number of characters at end of PATH to be ignored. +# default is 0. +# "unlink_on_close" => indicates that, if possible, the OS should remove +# the file as soon as it is closed. Usually indicates +# use of the O_TEMPORARY flag to sysopen. +# Usually irrelevant on unix + +# Optionally a reference to a scalar can be passed into the function +# On error this will be used to store the reason for the error +# "ErrStr" => \$errstr + +# "open" and "mkdir" can not both be true +# "unlink_on_close" is not used when "mkdir" is true. + +# The default options are equivalent to mktemp(). + +# Returns: +# filehandle - open file handle (if called with doopen=1, else undef) +# temp name - name of the temp file or directory + +# For example: +# ($fh, $name) = _gettemp($template, "open" => 1); + +# for the current version, failures are associated with +# stored in an error string and returned to give the reason whilst debugging +# This routine is not called by any external function +sub _gettemp { + + croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);' + unless scalar(@_) >= 1; + + # the internal error string - expect it to be overridden + # Need this in case the caller decides not to supply us a value + # need an anonymous scalar + my $tempErrStr; + + # Default options + my %options = ( + "open" => 0, + "mkdir" => 0, + "suffixlen" => 0, + "unlink_on_close" => 0, + "ErrStr" => \$tempErrStr, + ); + + # Read the template + my $template = shift; + if (ref($template)) { + # Use a warning here since we have not yet merged ErrStr + carp "File::Temp::_gettemp: template must not be a reference"; + return (); + } + + # Check that the number of entries on stack are even + if (scalar(@_) % 2 != 0) { + # Use a warning here since we have not yet merged ErrStr + carp "File::Temp::_gettemp: Must have even number of options"; + return (); + } + + # Read the options and merge with defaults + %options = (%options, @_) if @_; + + # Make sure the error string is set to undef + ${$options{ErrStr}} = undef; + + # Can not open the file and make a directory in a single call + if ($options{"open"} && $options{"mkdir"}) { + ${$options{ErrStr}} = "doopen and domkdir can not both be true\n"; + return (); + } + + # Find the start of the end of the Xs (position of last X) + # Substr starts from 0 + my $start = length($template) - 1 - $options{"suffixlen"}; + + # Check that we have at least MINX x X (eg 'XXXX") at the end of the string + # (taking suffixlen into account). Any fewer is insecure. + + # Do it using substr - no reason to use a pattern match since + # we know where we are looking and what we are looking for + + if (substr($template, $start - MINX + 1, MINX) ne 'X' x MINX) { + ${$options{ErrStr}} = "The template must contain at least ". + MINX . " 'X' characters\n"; + return (); + } + + # Replace all the X at the end of the substring with a + # random character or just all the XX at the end of a full string. + # Do it as an if, since the suffix adjusts which section to replace + # and suffixlen=0 returns nothing if used in the substr directly + # and generate a full path from the template + + my $path = _replace_XX($template, $options{"suffixlen"}); + + + # Split the path into constituent parts - eventually we need to check + # whether the directory exists + # We need to know whether we are making a temp directory + # or a tempfile + + my ($volume, $directories, $file); + my $parent; # parent directory + if ($options{"mkdir"}) { + # There is no filename at the end + ($volume, $directories, $file) = File::Spec->splitpath( $path, 1); + + # The parent is then $directories without the last directory + # Split the directory and put it back together again + my @dirs = File::Spec->splitdir($directories); + + # If @dirs only has one entry that means we are in the current + # directory + if ($#dirs == 0) { + $parent = File::Spec->curdir; + } else { + + if ($^O eq 'VMS') { # need volume to avoid relative dir spec + $parent = File::Spec->catdir($volume, @dirs[0..$#dirs-1]); + $parent = 'sys$disk:[]' if $parent eq ''; + } else { + + # Put it back together without the last one + $parent = File::Spec->catdir(@dirs[0..$#dirs-1]); + + # ...and attach the volume (no filename) + $parent = File::Spec->catpath($volume, $parent, ''); + } + + } + + } else { + + # Get rid of the last filename (use File::Basename for this?) + ($volume, $directories, $file) = File::Spec->splitpath( $path ); + + # Join up without the file part + $parent = File::Spec->catpath($volume,$directories,''); + + # If $parent is empty replace with curdir + $parent = File::Spec->curdir + unless $directories ne ''; + + } + + # Check that the parent directories exist + # Do this even for the case where we are simply returning a name + # not a file -- no point returning a name that includes a directory + # that does not exist or is not writable + + unless (-d $parent) { + ${$options{ErrStr}} = "Parent directory ($parent) is not a directory"; + return (); + } + unless (-w _) { + ${$options{ErrStr}} = "Parent directory ($parent) is not writable\n"; + return (); + } + + + # Check the stickiness of the directory and chown giveaway if required + # If the directory is world writable the sticky bit + # must be set + + if (File::Temp->safe_level == MEDIUM) { + my $safeerr; + unless (_is_safe($parent,\$safeerr)) { + ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)"; + return (); + } + } elsif (File::Temp->safe_level == HIGH) { + my $safeerr; + unless (_is_verysafe($parent, \$safeerr)) { + ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)"; + return (); + } + } + + + # Now try MAX_TRIES time to open the file + for (my $i = 0; $i < MAX_TRIES; $i++) { + + # Try to open the file if requested + if ($options{"open"}) { + my $fh; + + # If we are running before perl5.6.0 we can not auto-vivify + if ($] < 5.006) { + $fh = &Symbol::gensym; + } + + # Try to make sure this will be marked close-on-exec + # XXX: Win32 doesn't respect this, nor the proper fcntl, + # but may have O_NOINHERIT. This may or may not be in Fcntl. + local $^F = 2; + + # Store callers umask + my $umask = umask(); + + # Set a known umask + umask(066); + + # Attempt to open the file + my $open_success = undef; + if ( $^O eq 'VMS' and $options{"unlink_on_close"} ) { + # make it auto delete on close by setting FAB$V_DLT bit + $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt'); + $open_success = $fh; + } else { + my $flags = ( $options{"unlink_on_close"} ? + $OPENTEMPFLAGS : + $OPENFLAGS ); + $open_success = sysopen($fh, $path, $flags, 0600); + } + if ( $open_success ) { + + # Reset umask + umask($umask); + + # Opened successfully - return file handle and name + return ($fh, $path); + + } else { + # Reset umask + umask($umask); + + # Error opening file - abort with error + # if the reason was anything but EEXIST + unless ($!{EEXIST}) { + ${$options{ErrStr}} = "Could not create temp file $path: $!"; + return (); + } + + # Loop round for another try + + } + } elsif ($options{"mkdir"}) { + + # Store callers umask + my $umask = umask(); + + # Set a known umask + umask(066); + + # Open the temp directory + if (mkdir( $path, 0700)) { + # created okay + # Reset umask + umask($umask); + + return undef, $path; + } else { + + # Reset umask + umask($umask); + + # Abort with error if the reason for failure was anything + # except EEXIST + unless ($!{EEXIST}) { + ${$options{ErrStr}} = "Could not create directory $path: $!"; + return (); + } + + # Loop round for another try + + } + + } else { + + # Return true if the file can not be found + # Directory has been checked previously + + return (undef, $path) unless -e $path; + + # Try again until MAX_TRIES + + } + + # Did not successfully open the tempfile/dir + # so try again with a different set of random letters + # No point in trying to increment unless we have only + # 1 X say and the randomness could come up with the same + # file MAX_TRIES in a row. + + # Store current attempt - in principal this implies that the + # 3rd time around the open attempt that the first temp file + # name could be generated again. Probably should store each + # attempt and make sure that none are repeated + + my $original = $path; + my $counter = 0; # Stop infinite loop + my $MAX_GUESS = 50; + + do { + + # Generate new name from original template + $path = _replace_XX($template, $options{"suffixlen"}); + + $counter++; + + } until ($path ne $original || $counter > $MAX_GUESS); + + # Check for out of control looping + if ($counter > $MAX_GUESS) { + ${$options{ErrStr}} = "Tried to get a new temp name different to the previous value $MAX_GUESS times.\nSomething wrong with template?? ($template)"; + return (); + } + + } + + # If we get here, we have run out of tries + ${ $options{ErrStr} } = "Have exceeded the maximum number of attempts (" + . MAX_TRIES . ") to open temp file/dir"; + + return (); + +} + +# Internal routine to return a random character from the +# character list. Does not do an srand() since rand() +# will do one automatically + +# No arguments. Return value is the random character + +# No longer called since _replace_XX runs a few percent faster if +# I inline the code. This is important if we are creating thousands of +# temporary files. + +sub _randchar { + + $CHARS[ int( rand( $#CHARS ) ) ]; + +} + +# Internal routine to replace the XXXX... with random characters +# This has to be done by _gettemp() every time it fails to +# open a temp file/dir + +# Arguments: $template (the template with XXX), +# $ignore (number of characters at end to ignore) + +# Returns: modified template + +sub _replace_XX { + + croak 'Usage: _replace_XX($template, $ignore)' + unless scalar(@_) == 2; + + my ($path, $ignore) = @_; + + # Do it as an if, since the suffix adjusts which section to replace + # and suffixlen=0 returns nothing if used in the substr directly + # Alternatively, could simply set $ignore to length($path)-1 + # Don't want to always use substr when not required though. + + if ($ignore) { + substr($path, 0, - $ignore) =~ s/X(?=X*\z)/$CHARS[ int( rand( $#CHARS ) ) ]/ge; + } else { + $path =~ s/X(?=X*\z)/$CHARS[ int( rand( $#CHARS ) ) ]/ge; + } + + return $path; +} + +# internal routine to check to see if the directory is safe +# First checks to see if the directory is not owned by the +# current user or root. Then checks to see if anyone else +# can write to the directory and if so, checks to see if +# it has the sticky bit set + +# Will not work on systems that do not support sticky bit + +#Args: directory path to check +# Optionally: reference to scalar to contain error message +# Returns true if the path is safe and false otherwise. +# Returns undef if can not even run stat() on the path + +# This routine based on version written by Tom Christiansen + +# Presumably, by the time we actually attempt to create the +# file or directory in this directory, it may not be safe +# anymore... Have to run _is_safe directly after the open. + +sub _is_safe { + + my $path = shift; + my $err_ref = shift; + + # Stat path + my @info = stat($path); + unless (scalar(@info)) { + $$err_ref = "stat(path) returned no values"; + return 0; + }; + return 1 if $^O eq 'VMS'; # owner delete control at file level + + # Check to see whether owner is neither superuser (or a system uid) nor me + # Use the real uid from the $< variable + # UID is in [4] + if ($info[4] > File::Temp->top_system_uid() && $info[4] != $<) { + + Carp::cluck(sprintf "uid=$info[4] topuid=%s \$<=$< path='$path'", + File::Temp->top_system_uid()); + + $$err_ref = "Directory owned neither by root nor the current user" + if ref($err_ref); + return 0; + } + + # check whether group or other can write file + # use 066 to detect either reading or writing + # use 022 to check writability + # Do it with S_IWOTH and S_IWGRP for portability (maybe) + # mode is in info[2] + if (($info[2] & &Fcntl::S_IWGRP) || # Is group writable? + ($info[2] & &Fcntl::S_IWOTH) ) { # Is world writable? + # Must be a directory + unless (-d _) { + $$err_ref = "Path ($path) is not a directory" + if ref($err_ref); + return 0; + } + # Must have sticky bit set + unless (-k _) { + $$err_ref = "Sticky bit not set on $path when dir is group|world writable" + if ref($err_ref); + return 0; + } + } + + return 1; +} + +# Internal routine to check whether a directory is safe +# for temp files. Safer than _is_safe since it checks for +# the possibility of chown giveaway and if that is a possibility +# checks each directory in the path to see if it is safe (with _is_safe) + +# If _PC_CHOWN_RESTRICTED is not set, does the full test of each +# directory anyway. + +# Takes optional second arg as scalar ref to error reason + +sub _is_verysafe { + + # Need POSIX - but only want to bother if really necessary due to overhead + require POSIX; + + my $path = shift; + print "_is_verysafe testing $path\n" if $DEBUG; + return 1 if $^O eq 'VMS'; # owner delete control at file level + + my $err_ref = shift; + + # Should Get the value of _PC_CHOWN_RESTRICTED if it is defined + # and If it is not there do the extensive test + my $chown_restricted; + $chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED() + if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1}; + + # If chown_resticted is set to some value we should test it + if (defined $chown_restricted) { + + # Return if the current directory is safe + return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted ); + + } + + # To reach this point either, the _PC_CHOWN_RESTRICTED symbol + # was not avialable or the symbol was there but chown giveaway + # is allowed. Either way, we now have to test the entire tree for + # safety. + + # Convert path to an absolute directory if required + unless (File::Spec->file_name_is_absolute($path)) { + $path = File::Spec->rel2abs($path); + } + + # Split directory into components - assume no file + my ($volume, $directories, undef) = File::Spec->splitpath( $path, 1); + + # Slightly less efficient than having a a function in File::Spec + # to chop off the end of a directory or even a function that + # can handle ../ in a directory tree + # Sometimes splitdir() returns a blank at the end + # so we will probably check the bottom directory twice in some cases + my @dirs = File::Spec->splitdir($directories); + + # Concatenate one less directory each time around + foreach my $pos (0.. $#dirs) { + # Get a directory name + my $dir = File::Spec->catpath($volume, + File::Spec->catdir(@dirs[0.. $#dirs - $pos]), + '' + ); + + print "TESTING DIR $dir\n" if $DEBUG; + + # Check the directory + return 0 unless _is_safe($dir,$err_ref); + + } + + return 1; +} + + + +# internal routine to determine whether unlink works on this +# platform for files that are currently open. +# Returns true if we can, false otherwise. + +# Currently WinNT, OS/2 and VMS can not unlink an opened file +# On VMS this is because the O_EXCL flag is used to open the +# temporary file. Currently I do not know enough about the issues +# on VMS to decide whether O_EXCL is a requirement. + +sub _can_unlink_opened_file { + + if ($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'VMS' || $^O eq 'dos') { + return 0; + } else { + return 1; + } + +} + +# internal routine to decide which security levels are allowed +# see safe_level() for more information on this + +# Controls whether the supplied security level is allowed + +# $cando = _can_do_level( $level ) + +sub _can_do_level { + + # Get security level + my $level = shift; + + # Always have to be able to do STANDARD + return 1 if $level == STANDARD; + + # Currently, the systems that can do HIGH or MEDIUM are identical + if ( $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'cygwin' || $^O eq 'dos') { + return 0; + } else { + return 1; + } + +} + +# This routine sets up a deferred unlinking of a specified +# filename and filehandle. It is used in the following cases: +# - Called by unlink0 if an opened file can not be unlinked +# - Called by tempfile() if files are to be removed on shutdown +# - Called by tempdir() if directories are to be removed on shutdown + +# Arguments: +# _deferred_unlink( $fh, $fname, $isdir ); +# +# - filehandle (so that it can be expclicitly closed if open +# - filename (the thing we want to remove) +# - isdir (flag to indicate that we are being given a directory) +# [and hence no filehandle] + +# Status is not referred to since all the magic is done with an END block + +{ + # Will set up two lexical variables to contain all the files to be + # removed. One array for files, another for directories + # They will only exist in this block + # This means we only have to set up a single END block to remove all files + # @files_to_unlink contains an array ref with the filehandle and filename + my (@files_to_unlink, @dirs_to_unlink); + + # Set up an end block to use these arrays + END { + # Files + foreach my $file (@files_to_unlink) { + # close the filehandle without checking its state + # in order to make real sure that this is closed + # if its already closed then I dont care about the answer + # probably a better way to do this + close($file->[0]); # file handle is [0] + + if (-f $file->[1]) { # file name is [1] + unlink $file->[1] or warn "Error removing ".$file->[1]; + } + } + # Dirs + foreach my $dir (@dirs_to_unlink) { + if (-d $dir) { + rmtree($dir, $DEBUG, 1); + } + } + + } + + # This is the sub called to register a file for deferred unlinking + # This could simply store the input parameters and defer everything + # until the END block. For now we do a bit of checking at this + # point in order to make sure that (1) we have a file/dir to delete + # and (2) we have been called with the correct arguments. + sub _deferred_unlink { + + croak 'Usage: _deferred_unlink($fh, $fname, $isdir)' + unless scalar(@_) == 3; + + my ($fh, $fname, $isdir) = @_; + + warn "Setting up deferred removal of $fname\n" + if $DEBUG; + + # If we have a directory, check that it is a directory + if ($isdir) { + + if (-d $fname) { + + # Directory exists so store it + # first on VMS turn []foo into [.foo] for rmtree + $fname = VMS::Filespec::vmspath($fname) if $^O eq 'VMS'; + push (@dirs_to_unlink, $fname); + + } else { + carp "Request to remove directory $fname could not be completed since it does not exist!\n" if $^W; + } + + } else { + + if (-f $fname) { + + # file exists so store handle and name for later removal + push(@files_to_unlink, [$fh, $fname]); + + } else { + carp "Request to remove file $fname could not be completed since it is not there!\n" if $^W; + } + + } + + } + + +} + +=head1 FUNCTIONS + +This section describes the recommended interface for generating +temporary files and directories. + +=over 4 + +=item B<tempfile> + +This is the basic function to generate temporary files. +The behaviour of the file can be changed using various options: + + ($fh, $filename) = tempfile(); + +Create a temporary file in the directory specified for temporary +files, as specified by the tmpdir() function in L<File::Spec>. + + ($fh, $filename) = tempfile($template); + +Create a temporary file in the current directory using the supplied +template. Trailing `X' characters are replaced with random letters to +generate the filename. At least four `X' characters must be present +in the template. + + ($fh, $filename) = tempfile($template, SUFFIX => $suffix) + +Same as previously, except that a suffix is added to the template +after the `X' translation. Useful for ensuring that a temporary +filename has a particular extension when needed by other applications. +But see the WARNING at the end. + + ($fh, $filename) = tempfile($template, DIR => $dir); + +Translates the template as before except that a directory name +is specified. + + ($fh, $filename) = tempfile($template, UNLINK => 1); + +Return the filename and filehandle as before except that the file is +automatically removed when the program exits. Default is for the file +to be removed if a file handle is requested and to be kept if the +filename is requested. In a scalar context (where no filename is +returned) the file is always deleted either on exit or when it is closed. + +If the template is not specified, a template is always +automatically generated. This temporary file is placed in tmpdir() +(L<File::Spec>) unless a directory is specified explicitly with the +DIR option. + + $fh = tempfile( $template, DIR => $dir ); + +If called in scalar context, only the filehandle is returned +and the file will automatically be deleted when closed (see +the description of tmpfile() elsewhere in this document). +This is the preferred mode of operation, as if you only +have a filehandle, you can never create a race condition +by fumbling with the filename. On systems that can not unlink +an open file or can not mark a file as temporary when it is opened +(for example, Windows NT uses the C<O_TEMPORARY> flag)) +the file is marked for deletion when the program ends (equivalent +to setting UNLINK to 1). The C<UNLINK> flag is ignored if present. + + (undef, $filename) = tempfile($template, OPEN => 0); + +This will return the filename based on the template but +will not open this file. Cannot be used in conjunction with +UNLINK set to true. Default is to always open the file +to protect from possible race conditions. A warning is issued +if warnings are turned on. Consider using the tmpnam() +and mktemp() functions described elsewhere in this document +if opening the file is not required. + +Options can be combined as required. + +=cut + +sub tempfile { + + # Can not check for argument count since we can have any + # number of args + + # Default options + my %options = ( + "DIR" => undef, # Directory prefix + "SUFFIX" => '', # Template suffix + "UNLINK" => 0, # Do not unlink file on exit + "OPEN" => 1, # Open file + ); + + # Check to see whether we have an odd or even number of arguments + my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef); + + # Read the options and merge with defaults + %options = (%options, @_) if @_; + + # First decision is whether or not to open the file + if (! $options{"OPEN"}) { + + warn "tempfile(): temporary filename requested but not opened.\nPossibly unsafe, consider using tempfile() with OPEN set to true\n" + if $^W; + + } + + if ($options{"DIR"} and $^O eq 'VMS') { + + # on VMS turn []foo into [.foo] for concatenation + $options{"DIR"} = VMS::Filespec::vmspath($options{"DIR"}); + } + + # Construct the template + + # Have a choice of trying to work around the mkstemp/mktemp/tmpnam etc + # functions or simply constructing a template and using _gettemp() + # explicitly. Go for the latter + + # First generate a template if not defined and prefix the directory + # If no template must prefix the temp directory + if (defined $template) { + if ($options{"DIR"}) { + + $template = File::Spec->catfile($options{"DIR"}, $template); + + } + + } else { + + if ($options{"DIR"}) { + + $template = File::Spec->catfile($options{"DIR"}, TEMPXXX); + + } else { + + $template = File::Spec->catfile(File::Spec->tmpdir, TEMPXXX); + + } + + } + + # Now add a suffix + $template .= $options{"SUFFIX"}; + + # Determine whether we should tell _gettemp to unlink the file + # On unix this is irrelevant and can be worked out after the file is + # opened (simply by unlinking the open filehandle). On Windows or VMS + # we have to indicate temporary-ness when we open the file. In general + # we only want a true temporary file if we are returning just the + # filehandle - if the user wants the filename they probably do not + # want the file to disappear as soon as they close it. + # For this reason, tie unlink_on_close to the return context regardless + # of OS. + my $unlink_on_close = ( wantarray ? 0 : 1); + + # Create the file + my ($fh, $path, $errstr); + croak "Error in tempfile() using $template: $errstr" + unless (($fh, $path) = _gettemp($template, + "open" => $options{'OPEN'}, + "mkdir"=> 0 , + "unlink_on_close" => $unlink_on_close, + "suffixlen" => length($options{'SUFFIX'}), + "ErrStr" => \$errstr, + ) ); + + # Set up an exit handler that can do whatever is right for the + # system. This removes files at exit when requested explicitly or when + # system is asked to unlink_on_close but is unable to do so because + # of OS limitations. + # The latter should be achieved by using a tied filehandle. + # Do not check return status since this is all done with END blocks. + _deferred_unlink($fh, $path, 0) if $options{"UNLINK"}; + + # Return + if (wantarray()) { + + if ($options{'OPEN'}) { + return ($fh, $path); + } else { + return (undef, $path); + } + + } else { + + # Unlink the file. It is up to unlink0 to decide what to do with + # this (whether to unlink now or to defer until later) + unlink0($fh, $path) or croak "Error unlinking file $path using unlink0"; + + # Return just the filehandle. + return $fh; + } + + +} + +=item B<tempdir> + +This is the recommended interface for creation of temporary directories. +The behaviour of the function depends on the arguments: + + $tempdir = tempdir(); + +Create a directory in tmpdir() (see L<File::Spec|File::Spec>). + + $tempdir = tempdir( $template ); + +Create a directory from the supplied template. This template is +similar to that described for tempfile(). `X' characters at the end +of the template are replaced with random letters to construct the +directory name. At least four `X' characters must be in the template. + + $tempdir = tempdir ( DIR => $dir ); + +Specifies the directory to use for the temporary directory. +The temporary directory name is derived from an internal template. + + $tempdir = tempdir ( $template, DIR => $dir ); + +Prepend the supplied directory name to the template. The template +should not include parent directory specifications itself. Any parent +directory specifications are removed from the template before +prepending the supplied directory. + + $tempdir = tempdir ( $template, TMPDIR => 1 ); + +Using the supplied template, creat the temporary directory in +a standard location for temporary files. Equivalent to doing + + $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir); + +but shorter. Parent directory specifications are stripped from the +template itself. The C<TMPDIR> option is ignored if C<DIR> is set +explicitly. Additionally, C<TMPDIR> is implied if neither a template +nor a directory are supplied. + + $tempdir = tempdir( $template, CLEANUP => 1); + +Create a temporary directory using the supplied template, but +attempt to remove it (and all files inside it) when the program +exits. Note that an attempt will be made to remove all files from +the directory even if they were not created by this module (otherwise +why ask to clean it up?). The directory removal is made with +the rmtree() function from the L<File::Path|File::Path> module. +Of course, if the template is not specified, the temporary directory +will be created in tmpdir() and will also be removed at program exit. + +=cut + +# ' + +sub tempdir { + + # Can not check for argument count since we can have any + # number of args + + # Default options + my %options = ( + "CLEANUP" => 0, # Remove directory on exit + "DIR" => '', # Root directory + "TMPDIR" => 0, # Use tempdir with template + ); + + # Check to see whether we have an odd or even number of arguments + my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef ); + + # Read the options and merge with defaults + %options = (%options, @_) if @_; + + # Modify or generate the template + + # Deal with the DIR and TMPDIR options + if (defined $template) { + + # Need to strip directory path if using DIR or TMPDIR + if ($options{'TMPDIR'} || $options{'DIR'}) { + + # Strip parent directory from the filename + # + # There is no filename at the end + $template = VMS::Filespec::vmspath($template) if $^O eq 'VMS'; + my ($volume, $directories, undef) = File::Spec->splitpath( $template, 1); + + # Last directory is then our template + $template = (File::Spec->splitdir($directories))[-1]; + + # Prepend the supplied directory or temp dir + if ($options{"DIR"}) { + + $template = File::Spec->catdir($options{"DIR"}, $template); + + } elsif ($options{TMPDIR}) { + + # Prepend tmpdir + $template = File::Spec->catdir(File::Spec->tmpdir, $template); + + } + + } + + } else { + + if ($options{"DIR"}) { + + $template = File::Spec->catdir($options{"DIR"}, TEMPXXX); + + } else { + + $template = File::Spec->catdir(File::Spec->tmpdir, TEMPXXX); + + } + + } + + # Create the directory + my $tempdir; + my $suffixlen = 0; + if ($^O eq 'VMS') { # dir names can end in delimiters + $template =~ m/([\.\]:>]+)$/; + $suffixlen = length($1); + } + + my $errstr; + croak "Error in tempdir() using $template: $errstr" + unless ((undef, $tempdir) = _gettemp($template, + "open" => 0, + "mkdir"=> 1 , + "suffixlen" => $suffixlen, + "ErrStr" => \$errstr, + ) ); + + # Install exit handler; must be dynamic to get lexical + if ( $options{'CLEANUP'} && -d $tempdir) { + _deferred_unlink(undef, $tempdir, 1); + } + + # Return the dir name + return $tempdir; + +} + +=back + +=head1 MKTEMP FUNCTIONS + +The following functions are Perl implementations of the +mktemp() family of temp file generation system calls. + +=over 4 + +=item B<mkstemp> + +Given a template, returns a filehandle to the temporary file and the name +of the file. + + ($fh, $name) = mkstemp( $template ); + +In scalar context, just the filehandle is returned. + +The template may be any filename with some number of X's appended +to it, for example F</tmp/temp.XXXX>. The trailing X's are replaced +with unique alphanumeric combinations. + +=cut + + + +sub mkstemp { + + croak "Usage: mkstemp(template)" + if scalar(@_) != 1; + + my $template = shift; + + my ($fh, $path, $errstr); + croak "Error in mkstemp using $template: $errstr" + unless (($fh, $path) = _gettemp($template, + "open" => 1, + "mkdir"=> 0 , + "suffixlen" => 0, + "ErrStr" => \$errstr, + ) ); + + if (wantarray()) { + return ($fh, $path); + } else { + return $fh; + } + +} + + +=item B<mkstemps> + +Similar to mkstemp(), except that an extra argument can be supplied +with a suffix to be appended to the template. + + ($fh, $name) = mkstemps( $template, $suffix ); + +For example a template of C<testXXXXXX> and suffix of C<.dat> +would generate a file similar to F<testhGji_w.dat>. + +Returns just the filehandle alone when called in scalar context. + +=cut + +sub mkstemps { + + croak "Usage: mkstemps(template, suffix)" + if scalar(@_) != 2; + + + my $template = shift; + my $suffix = shift; + + $template .= $suffix; + + my ($fh, $path, $errstr); + croak "Error in mkstemps using $template: $errstr" + unless (($fh, $path) = _gettemp($template, + "open" => 1, + "mkdir"=> 0 , + "suffixlen" => length($suffix), + "ErrStr" => \$errstr, + ) ); + + if (wantarray()) { + return ($fh, $path); + } else { + return $fh; + } + +} + +=item B<mkdtemp> + +Create a directory from a template. The template must end in +X's that are replaced by the routine. + + $tmpdir_name = mkdtemp($template); + +Returns the name of the temporary directory created. +Returns undef on failure. + +Directory must be removed by the caller. + +=cut + +#' # for emacs + +sub mkdtemp { + + croak "Usage: mkdtemp(template)" + if scalar(@_) != 1; + + my $template = shift; + my $suffixlen = 0; + if ($^O eq 'VMS') { # dir names can end in delimiters + $template =~ m/([\.\]:>]+)$/; + $suffixlen = length($1); + } + my ($junk, $tmpdir, $errstr); + croak "Error creating temp directory from template $template\: $errstr" + unless (($junk, $tmpdir) = _gettemp($template, + "open" => 0, + "mkdir"=> 1 , + "suffixlen" => $suffixlen, + "ErrStr" => \$errstr, + ) ); + + return $tmpdir; + +} + +=item B<mktemp> + +Returns a valid temporary filename but does not guarantee +that the file will not be opened by someone else. + + $unopened_file = mktemp($template); + +Template is the same as that required by mkstemp(). + +=cut + +sub mktemp { + + croak "Usage: mktemp(template)" + if scalar(@_) != 1; + + my $template = shift; + + my ($tmpname, $junk, $errstr); + croak "Error getting name to temp file from template $template: $errstr" + unless (($junk, $tmpname) = _gettemp($template, + "open" => 0, + "mkdir"=> 0 , + "suffixlen" => 0, + "ErrStr" => \$errstr, + ) ); + + return $tmpname; +} + +=back + +=head1 POSIX FUNCTIONS + +This section describes the re-implementation of the tmpnam() +and tmpfile() functions described in L<POSIX> +using the mkstemp() from this module. + +Unlike the L<POSIX|POSIX> implementations, the directory used +for the temporary file is not specified in a system include +file (C<P_tmpdir>) but simply depends on the choice of tmpdir() +returned by L<File::Spec|File::Spec>. On some implementations this +location can be set using the C<TMPDIR> environment variable, which +may not be secure. +If this is a problem, simply use mkstemp() and specify a template. + +=over 4 + +=item B<tmpnam> + +When called in scalar context, returns the full name (including path) +of a temporary file (uses mktemp()). The only check is that the file does +not already exist, but there is no guarantee that that condition will +continue to apply. + + $file = tmpnam(); + +When called in list context, a filehandle to the open file and +a filename are returned. This is achieved by calling mkstemp() +after constructing a suitable template. + + ($fh, $file) = tmpnam(); + +If possible, this form should be used to prevent possible +race conditions. + +See L<File::Spec/tmpdir> for information on the choice of temporary +directory for a particular operating system. + +=cut + +sub tmpnam { + + # Retrieve the temporary directory name + my $tmpdir = File::Spec->tmpdir; + + croak "Error temporary directory is not writable" + if $tmpdir eq ''; + + # Use a ten character template and append to tmpdir + my $template = File::Spec->catfile($tmpdir, TEMPXXX); + + if (wantarray() ) { + return mkstemp($template); + } else { + return mktemp($template); + } + +} + +=item B<tmpfile> + +In scalar context, returns the filehandle of a temporary file. + + $fh = tmpfile(); + +The file is removed when the filehandle is closed or when the program +exits. No access to the filename is provided. + +If the temporary file can not be created undef is returned. +Currently this command will probably not work when the temporary +directory is on an NFS file system. + +=cut + +sub tmpfile { + + # Simply call tmpnam() in a list context + my ($fh, $file) = tmpnam(); + + # Make sure file is removed when filehandle is closed + # This will fail on NFS + unlink0($fh, $file) + or return undef; + + return $fh; + +} + +=back + +=head1 ADDITIONAL FUNCTIONS + +These functions are provided for backwards compatibility +with common tempfile generation C library functions. + +They are not exported and must be addressed using the full package +name. + +=over 4 + +=item B<tempnam> + +Return the name of a temporary file in the specified directory +using a prefix. The file is guaranteed not to exist at the time +the function was called, but such guarantees are good for one +clock tick only. Always use the proper form of C<sysopen> +with C<O_CREAT | O_EXCL> if you must open such a filename. + + $filename = File::Temp::tempnam( $dir, $prefix ); + +Equivalent to running mktemp() with $dir/$prefixXXXXXXXX +(using unix file convention as an example) + +Because this function uses mktemp(), it can suffer from race conditions. + +=cut + +sub tempnam { + + croak 'Usage tempnam($dir, $prefix)' unless scalar(@_) == 2; + + my ($dir, $prefix) = @_; + + # Add a string to the prefix + $prefix .= 'XXXXXXXX'; + + # Concatenate the directory to the file + my $template = File::Spec->catfile($dir, $prefix); + + return mktemp($template); + +} + +=back + +=head1 UTILITY FUNCTIONS + +Useful functions for dealing with the filehandle and filename. + +=over 4 + +=item B<unlink0> + +Given an open filehandle and the associated filename, make a safe +unlink. This is achieved by first checking that the filename and +filehandle initially point to the same file and that the number of +links to the file is 1 (all fields returned by stat() are compared). +Then the filename is unlinked and the filehandle checked once again to +verify that the number of links on that file is now 0. This is the +closest you can come to making sure that the filename unlinked was the +same as the file whose descriptor you hold. + + unlink0($fh, $path) or die "Error unlinking file $path safely"; + +Returns false on error. The filehandle is not closed since on some +occasions this is not required. + +On some platforms, for example Windows NT, it is not possible to +unlink an open file (the file must be closed first). On those +platforms, the actual unlinking is deferred until the program ends and +good status is returned. A check is still performed to make sure that +the filehandle and filename are pointing to the same thing (but not at +the time the end block is executed since the deferred removal may not +have access to the filehandle). + +Additionally, on Windows NT not all the fields returned by stat() can +be compared. For example, the C<dev> and C<rdev> fields seem to be +different. Also, it seems that the size of the file returned by stat() +does not always agree, with C<stat(FH)> being more accurate than +C<stat(filename)>, presumably because of caching issues even when +using autoflush (this is usually overcome by waiting a while after +writing to the tempfile before attempting to C<unlink0> it). + +Finally, on NFS file systems the link count of the file handle does +not always go to zero immediately after unlinking. Currently, this +command is expected to fail on NFS disks. + +=cut + +sub unlink0 { + + croak 'Usage: unlink0(filehandle, filename)' + unless scalar(@_) == 2; + + # Read args + my ($fh, $path) = @_; + + warn "Unlinking $path using unlink0\n" + if $DEBUG; + + # Stat the filehandle + my @fh = stat $fh; + + if ($fh[3] > 1 && $^W) { + carp "unlink0: fstat found too many links; SB=@fh" if $^W; + } + + # Stat the path + my @path = stat $path; + + unless (@path) { + carp "unlink0: $path is gone already" if $^W; + return; + } + + # this is no longer a file, but may be a directory, or worse + unless (-f _) { + confess "panic: $path is no longer a file: SB=@fh"; + } + + # Do comparison of each member of the array + # On WinNT dev and rdev seem to be different + # depending on whether it is a file or a handle. + # Cannot simply compare all members of the stat return + # Select the ones we can use + my @okstat = (0..$#fh); # Use all by default + if ($^O eq 'MSWin32') { + @okstat = (1,2,3,4,5,7,8,9,10); + } elsif ($^O eq 'os2') { + @okstat = (0, 2..$#fh); + } elsif ($^O eq 'VMS') { # device and file ID are sufficient + @okstat = (0, 1); + } elsif ($^O eq 'dos') { + @okstat = (0,2..7,11..$#fh); + } + + # Now compare each entry explicitly by number + for (@okstat) { + print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG; + # Use eq rather than == since rdev, blksize, and blocks (6, 11, + # and 12) will be '' on platforms that do not support them. This + # is fine since we are only comparing integers. + unless ($fh[$_] eq $path[$_]) { + warn "Did not match $_ element of stat\n" if $DEBUG; + return 0; + } + } + + # attempt remove the file (does not work on some platforms) + if (_can_unlink_opened_file()) { + # XXX: do *not* call this on a directory; possible race + # resulting in recursive removal + croak "unlink0: $path has become a directory!" if -d $path; + unlink($path) or return 0; + + # Stat the filehandle + @fh = stat $fh; + + print "Link count = $fh[3] \n" if $DEBUG; + + # Make sure that the link count is zero + # - Cygwin provides deferred unlinking, however, + # on Win9x the link count remains 1 + # On NFS the link count may still be 1 but we cant know that + # we are on NFS + return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0); + + } else { + _deferred_unlink($fh, $path, 0); + return 1; + } + +} + +=back + +=head1 PACKAGE VARIABLES + +These functions control the global state of the package. + +=over 4 + +=item B<safe_level> + +Controls the lengths to which the module will go to check the safety of the +temporary file or directory before proceeding. +Options are: + +=over 8 + +=item STANDARD + +Do the basic security measures to ensure the directory exists and +is writable, that the umask() is fixed before opening of the file, +that temporary files are opened only if they do not already exist, and +that possible race conditions are avoided. Finally the L<unlink0|"unlink0"> +function is used to remove files safely. + +=item MEDIUM + +In addition to the STANDARD security, the output directory is checked +to make sure that it is owned either by root or the user running the +program. If the directory is writable by group or by other, it is then +checked to make sure that the sticky bit is set. + +Will not work on platforms that do not support the C<-k> test +for sticky bit. + +=item HIGH + +In addition to the MEDIUM security checks, also check for the +possibility of ``chown() giveaway'' using the L<POSIX|POSIX> +sysconf() function. If this is a possibility, each directory in the +path is checked in turn for safeness, recursively walking back to the +root directory. + +For platforms that do not support the L<POSIX|POSIX> +C<_PC_CHOWN_RESTRICTED> symbol (for example, Windows NT) it is +assumed that ``chown() giveaway'' is possible and the recursive test +is performed. + +=back + +The level can be changed as follows: + + File::Temp->safe_level( File::Temp::HIGH ); + +The level constants are not exported by the module. + +Currently, you must be running at least perl v5.6.0 in order to +run with MEDIUM or HIGH security. This is simply because the +safety tests use functions from L<Fcntl|Fcntl> that are not +available in older versions of perl. The problem is that the version +number for Fcntl is the same in perl 5.6.0 and in 5.005_03 even though +they are different versions. + +On systems that do not support the HIGH or MEDIUM safety levels +(for example Win NT or OS/2) any attempt to change the level will +be ignored. The decision to ignore rather than raise an exception +allows portable programs to be written with high security in mind +for the systems that can support this without those programs failing +on systems where the extra tests are irrelevant. + +If you really need to see whether the change has been accepted +simply examine the return value of C<safe_level>. + + $newlevel = File::Temp->safe_level( File::Temp::HIGH ); + die "Could not change to high security" + if $newlevel != File::Temp::HIGH; + +=cut + +{ + # protect from using the variable itself + my $LEVEL = STANDARD; + sub safe_level { + my $self = shift; + if (@_) { + my $level = shift; + if (($level != STANDARD) && ($level != MEDIUM) && ($level != HIGH)) { + carp "safe_level: Specified level ($level) not STANDARD, MEDIUM or HIGH - ignoring\n" if $^W; + } else { + # Dont allow this on perl 5.005 or earlier + if ($] < 5.006 && $level != STANDARD) { + # Cant do MEDIUM or HIGH checks + croak "Currently requires perl 5.006 or newer to do the safe checks"; + } + # Check that we are allowed to change level + # Silently ignore if we can not. + $LEVEL = $level if _can_do_level($level); + } + } + return $LEVEL; + } +} + +=item TopSystemUID + +This is the highest UID on the current system that refers to a root +UID. This is used to make sure that the temporary directory is +owned by a system UID (C<root>, C<bin>, C<sys> etc) rather than +simply by root. + +This is required since on many unix systems C</tmp> is not owned +by root. + +Default is to assume that any UID less than or equal to 10 is a root +UID. + + File::Temp->top_system_uid(10); + my $topid = File::Temp->top_system_uid; + +This value can be adjusted to reduce security checking if required. +The value is only relevant when C<safe_level> is set to MEDIUM or higher. + +=back + +=cut + +{ + my $TopSystemUID = 10; + sub top_system_uid { + my $self = shift; + if (@_) { + my $newuid = shift; + croak "top_system_uid: UIDs should be numeric" + unless $newuid =~ /^\d+$/s; + $TopSystemUID = $newuid; + } + return $TopSystemUID; + } +} + +=head1 WARNING + +For maximum security, endeavour always to avoid ever looking at, +touching, or even imputing the existence of the filename. You do not +know that that filename is connected to the same file as the handle +you have, and attempts to check this can only trigger more race +conditions. It's far more secure to use the filehandle alone and +dispense with the filename altogether. + +If you need to pass the handle to something that expects a filename +then, on a unix system, use C<"/dev/fd/" . fileno($fh)> for arbitrary +programs, or more generally C<< "+<=&" . fileno($fh) >> for Perl +programs. You will have to clear the close-on-exec bit on that file +descriptor before passing it to another process. + + use Fcntl qw/F_SETFD F_GETFD/; + fcntl($tmpfh, F_SETFD, 0) + or die "Can't clear close-on-exec flag on temp fh: $!\n"; + +=head2 Temporary files and NFS + +Some problems are associated with using temporary files that reside +on NFS file systems and it is recommended that a local filesystem +is used whenever possible. Some of the security tests will most probably +fail when the temp file is not local. Additionally, be aware that +the performance of I/O operations over NFS will not be as good as for +a local disk. + +=head1 HISTORY + +Originally began life in May 1999 as an XS interface to the system +mkstemp() function. In March 2000, the OpenBSD mkstemp() code was +translated to Perl for total control of the code's +security checking, to ensure the presence of the function regardless of +operating system and to help with portability. + +=head1 SEE ALSO + +L<POSIX/tmpnam>, L<POSIX/tmpfile>, L<File::Spec>, L<File::Path> + +See L<IO::File> and L<File::MkTemp> for different implementations of +temporary file handling. + +=head1 AUTHOR + +Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt> + +Copyright (C) 1999-2001 Tim Jenness and the UK Particle Physics and +Astronomy Research Council. All Rights Reserved. This program is free +software; you can redistribute it and/or modify it under the same +terms as Perl itself. + +Original Perl implementation loosely based on the OpenBSD C code for +mkstemp(). Thanks to Tom Christiansen for suggesting that this module +should be written and providing ideas for code improvements and +security enhancements. + +=cut + + +1; diff --git a/lib/Temp/File-Temp-0.12/blib/arch/auto/File/Temp/.exists b/lib/Temp/File-Temp-0.12/blib/arch/auto/File/Temp/.exists new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/blib/arch/auto/File/Temp/.exists diff --git a/lib/Temp/File-Temp-0.12/blib/lib/auto/File/Temp/.exists b/lib/Temp/File-Temp-0.12/blib/lib/auto/File/Temp/.exists new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/blib/lib/auto/File/Temp/.exists diff --git a/lib/Temp/File-Temp-0.12/blib/man3/.exists b/lib/Temp/File-Temp-0.12/blib/man3/.exists new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/blib/man3/.exists diff --git a/lib/Temp/File-Temp-0.12/blib/man3/File::Temp.3pm b/lib/Temp/File-Temp-0.12/blib/man3/File::Temp.3pm new file mode 100644 index 0000000..1b7e1f4 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/blib/man3/File::Temp.3pm @@ -0,0 +1,681 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Temp 3" +.TH Temp 3 "2001-02-23" "perl v5.8.5" "User Contributed Perl Documentation" +.SH "NAME" +File::Temp \- return name and handle of a temporary file safely +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use File::Temp qw/ tempfile tempdir /; +.Ve +.PP +.Vb 2 +\& $dir = tempdir( CLEANUP => 1 ); +\& ($fh, $filename) = tempfile( DIR => $dir ); +.Ve +.PP +.Vb 2 +\& ($fh, $filename) = tempfile( $template, DIR => $dir); +\& ($fh, $filename) = tempfile( $template, SUFFIX => '.dat'); +.Ve +.PP +.Vb 1 +\& $fh = tempfile(); +.Ve +.PP +MkTemp family: +.PP +.Vb 1 +\& use File::Temp qw/ :mktemp /; +.Ve +.PP +.Vb 2 +\& ($fh, $file) = mkstemp( "tmpfileXXXXX" ); +\& ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix); +.Ve +.PP +.Vb 1 +\& $tmpdir = mkdtemp( $template ); +.Ve +.PP +.Vb 1 +\& $unopened_file = mktemp( $template ); +.Ve +.PP +\&\s-1POSIX\s0 functions: +.PP +.Vb 1 +\& use File::Temp qw/ :POSIX /; +.Ve +.PP +.Vb 2 +\& $file = tmpnam(); +\& $fh = tmpfile(); +.Ve +.PP +.Vb 2 +\& ($fh, $file) = tmpnam(); +\& ($fh, $file) = tmpfile(); +.Ve +.PP +Compatibility functions: +.PP +.Vb 1 +\& $unopened_file = File::Temp::tempnam( $dir, $pfx ); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`File::Temp\*(C'\fR can be used to create and open temporary files in a safe way. +The \fItempfile()\fR function can be used to return the name and the open +filehandle of a temporary file. The \fItempdir()\fR function can +be used to create a temporary directory. +.PP +The security aspect of temporary file creation is emphasized such that +a filehandle and filename are returned together. This helps guarantee +that a race condition can not occur where the temporary file is +created by another process between checking for the existence of the +file and its opening. Additional security levels are provided to +check, for example, that the sticky bit is set on world writable +directories. See \*(L"safe_level\*(R" for more information. +.PP +For compatibility with popular C library functions, Perl implementations of +the \fImkstemp()\fR family of functions are provided. These are, \fImkstemp()\fR, +\&\fImkstemps()\fR, \fImkdtemp()\fR and \fImktemp()\fR. +.PP +Additionally, implementations of the standard \s-1POSIX\s0 +\&\fItmpnam()\fR and \fItmpfile()\fR functions are provided if required. +.PP +Implementations of \fImktemp()\fR, \fItmpnam()\fR, and \fItempnam()\fR are provided, +but should be used with caution since they return only a filename +that was valid when function was called, so cannot guarantee +that the file will not exist by the time the caller opens the filename. +.SH "FUNCTIONS" +.IX Header "FUNCTIONS" +This section describes the recommended interface for generating +temporary files and directories. +.IP "\fBtempfile\fR" 4 +.IX Item "tempfile" +This is the basic function to generate temporary files. +The behaviour of the file can be changed using various options: +.Sp +.Vb 1 +\& ($fh, $filename) = tempfile(); +.Ve +.Sp +Create a temporary file in the directory specified for temporary +files, as specified by the \fItmpdir()\fR function in File::Spec. +.Sp +.Vb 1 +\& ($fh, $filename) = tempfile($template); +.Ve +.Sp +Create a temporary file in the current directory using the supplied +template. Trailing `X' characters are replaced with random letters to +generate the filename. At least four `X' characters must be present +in the template. +.Sp +.Vb 1 +\& ($fh, $filename) = tempfile($template, SUFFIX => $suffix) +.Ve +.Sp +Same as previously, except that a suffix is added to the template +after the `X' translation. Useful for ensuring that a temporary +filename has a particular extension when needed by other applications. +But see the \s-1WARNING\s0 at the end. +.Sp +.Vb 1 +\& ($fh, $filename) = tempfile($template, DIR => $dir); +.Ve +.Sp +Translates the template as before except that a directory name +is specified. +.Sp +.Vb 1 +\& ($fh, $filename) = tempfile($template, UNLINK => 1); +.Ve +.Sp +Return the filename and filehandle as before except that the file is +automatically removed when the program exits. Default is for the file +to be removed if a file handle is requested and to be kept if the +filename is requested. In a scalar context (where no filename is +returned) the file is always deleted either on exit or when it is closed. +.Sp +If the template is not specified, a template is always +automatically generated. This temporary file is placed in \fItmpdir()\fR +(File::Spec) unless a directory is specified explicitly with the +\&\s-1DIR\s0 option. +.Sp +.Vb 1 +\& $fh = tempfile( $template, DIR => $dir ); +.Ve +.Sp +If called in scalar context, only the filehandle is returned +and the file will automatically be deleted when closed (see +the description of \fItmpfile()\fR elsewhere in this document). +This is the preferred mode of operation, as if you only +have a filehandle, you can never create a race condition +by fumbling with the filename. On systems that can not unlink +an open file or can not mark a file as temporary when it is opened +(for example, Windows \s-1NT\s0 uses the \f(CW\*(C`O_TEMPORARY\*(C'\fR flag)) +the file is marked for deletion when the program ends (equivalent +to setting \s-1UNLINK\s0 to 1). The \f(CW\*(C`UNLINK\*(C'\fR flag is ignored if present. +.Sp +.Vb 1 +\& (undef, $filename) = tempfile($template, OPEN => 0); +.Ve +.Sp +This will return the filename based on the template but +will not open this file. Cannot be used in conjunction with +\&\s-1UNLINK\s0 set to true. Default is to always open the file +to protect from possible race conditions. A warning is issued +if warnings are turned on. Consider using the \fItmpnam()\fR +and \fImktemp()\fR functions described elsewhere in this document +if opening the file is not required. +.Sp +Options can be combined as required. +.IP "\fBtempdir\fR" 4 +.IX Item "tempdir" +This is the recommended interface for creation of temporary directories. +The behaviour of the function depends on the arguments: +.Sp +.Vb 1 +\& $tempdir = tempdir(); +.Ve +.Sp +Create a directory in \fItmpdir()\fR (see File::Spec). +.Sp +.Vb 1 +\& $tempdir = tempdir( $template ); +.Ve +.Sp +Create a directory from the supplied template. This template is +similar to that described for \fItempfile()\fR. `X' characters at the end +of the template are replaced with random letters to construct the +directory name. At least four `X' characters must be in the template. +.Sp +.Vb 1 +\& $tempdir = tempdir ( DIR => $dir ); +.Ve +.Sp +Specifies the directory to use for the temporary directory. +The temporary directory name is derived from an internal template. +.Sp +.Vb 1 +\& $tempdir = tempdir ( $template, DIR => $dir ); +.Ve +.Sp +Prepend the supplied directory name to the template. The template +should not include parent directory specifications itself. Any parent +directory specifications are removed from the template before +prepending the supplied directory. +.Sp +.Vb 1 +\& $tempdir = tempdir ( $template, TMPDIR => 1 ); +.Ve +.Sp +Using the supplied template, creat the temporary directory in +a standard location for temporary files. Equivalent to doing +.Sp +.Vb 1 +\& $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir); +.Ve +.Sp +but shorter. Parent directory specifications are stripped from the +template itself. The \f(CW\*(C`TMPDIR\*(C'\fR option is ignored if \f(CW\*(C`DIR\*(C'\fR is set +explicitly. Additionally, \f(CW\*(C`TMPDIR\*(C'\fR is implied if neither a template +nor a directory are supplied. +.Sp +.Vb 1 +\& $tempdir = tempdir( $template, CLEANUP => 1); +.Ve +.Sp +Create a temporary directory using the supplied template, but +attempt to remove it (and all files inside it) when the program +exits. Note that an attempt will be made to remove all files from +the directory even if they were not created by this module (otherwise +why ask to clean it up?). The directory removal is made with +the \fIrmtree()\fR function from the File::Path module. +Of course, if the template is not specified, the temporary directory +will be created in \fItmpdir()\fR and will also be removed at program exit. +.SH "MKTEMP FUNCTIONS" +.IX Header "MKTEMP FUNCTIONS" +The following functions are Perl implementations of the +\&\fImktemp()\fR family of temp file generation system calls. +.IP "\fBmkstemp\fR" 4 +.IX Item "mkstemp" +Given a template, returns a filehandle to the temporary file and the name +of the file. +.Sp +.Vb 1 +\& ($fh, $name) = mkstemp( $template ); +.Ve +.Sp +In scalar context, just the filehandle is returned. +.Sp +The template may be any filename with some number of X's appended +to it, for example \fI/tmp/temp.XXXX\fR. The trailing X's are replaced +with unique alphanumeric combinations. +.IP "\fBmkstemps\fR" 4 +.IX Item "mkstemps" +Similar to \fImkstemp()\fR, except that an extra argument can be supplied +with a suffix to be appended to the template. +.Sp +.Vb 1 +\& ($fh, $name) = mkstemps( $template, $suffix ); +.Ve +.Sp +For example a template of \f(CW\*(C`testXXXXXX\*(C'\fR and suffix of \f(CW\*(C`.dat\*(C'\fR +would generate a file similar to \fItesthGji_w.dat\fR. +.Sp +Returns just the filehandle alone when called in scalar context. +.IP "\fBmkdtemp\fR" 4 +.IX Item "mkdtemp" +Create a directory from a template. The template must end in +X's that are replaced by the routine. +.Sp +.Vb 1 +\& $tmpdir_name = mkdtemp($template); +.Ve +.Sp +Returns the name of the temporary directory created. +Returns undef on failure. +.Sp +Directory must be removed by the caller. +.IP "\fBmktemp\fR" 4 +.IX Item "mktemp" +Returns a valid temporary filename but does not guarantee +that the file will not be opened by someone else. +.Sp +.Vb 1 +\& $unopened_file = mktemp($template); +.Ve +.Sp +Template is the same as that required by \fImkstemp()\fR. +.SH "POSIX FUNCTIONS" +.IX Header "POSIX FUNCTIONS" +This section describes the re-implementation of the \fItmpnam()\fR +and \fItmpfile()\fR functions described in \s-1POSIX\s0 +using the \fImkstemp()\fR from this module. +.PP +Unlike the \s-1POSIX\s0 implementations, the directory used +for the temporary file is not specified in a system include +file (\f(CW\*(C`P_tmpdir\*(C'\fR) but simply depends on the choice of \fItmpdir()\fR +returned by File::Spec. On some implementations this +location can be set using the \f(CW\*(C`TMPDIR\*(C'\fR environment variable, which +may not be secure. +If this is a problem, simply use \fImkstemp()\fR and specify a template. +.IP "\fBtmpnam\fR" 4 +.IX Item "tmpnam" +When called in scalar context, returns the full name (including path) +of a temporary file (uses \fImktemp()\fR). The only check is that the file does +not already exist, but there is no guarantee that that condition will +continue to apply. +.Sp +.Vb 1 +\& $file = tmpnam(); +.Ve +.Sp +When called in list context, a filehandle to the open file and +a filename are returned. This is achieved by calling \fImkstemp()\fR +after constructing a suitable template. +.Sp +.Vb 1 +\& ($fh, $file) = tmpnam(); +.Ve +.Sp +If possible, this form should be used to prevent possible +race conditions. +.Sp +See \*(L"tmpdir\*(R" in File::Spec for information on the choice of temporary +directory for a particular operating system. +.IP "\fBtmpfile\fR" 4 +.IX Item "tmpfile" +In scalar context, returns the filehandle of a temporary file. +.Sp +.Vb 1 +\& $fh = tmpfile(); +.Ve +.Sp +The file is removed when the filehandle is closed or when the program +exits. No access to the filename is provided. +.Sp +If the temporary file can not be created undef is returned. +Currently this command will probably not work when the temporary +directory is on an \s-1NFS\s0 file system. +.SH "ADDITIONAL FUNCTIONS" +.IX Header "ADDITIONAL FUNCTIONS" +These functions are provided for backwards compatibility +with common tempfile generation C library functions. +.PP +They are not exported and must be addressed using the full package +name. +.IP "\fBtempnam\fR" 4 +.IX Item "tempnam" +Return the name of a temporary file in the specified directory +using a prefix. The file is guaranteed not to exist at the time +the function was called, but such guarantees are good for one +clock tick only. Always use the proper form of \f(CW\*(C`sysopen\*(C'\fR +with \f(CW\*(C`O_CREAT | O_EXCL\*(C'\fR if you must open such a filename. +.Sp +.Vb 1 +\& $filename = File::Temp::tempnam( $dir, $prefix ); +.Ve +.Sp +Equivalent to running \fImktemp()\fR with \f(CW$dir\fR/$prefixXXXXXXXX +(using unix file convention as an example) +.Sp +Because this function uses \fImktemp()\fR, it can suffer from race conditions. +.SH "UTILITY FUNCTIONS" +.IX Header "UTILITY FUNCTIONS" +Useful functions for dealing with the filehandle and filename. +.IP "\fBunlink0\fR" 4 +.IX Item "unlink0" +Given an open filehandle and the associated filename, make a safe +unlink. This is achieved by first checking that the filename and +filehandle initially point to the same file and that the number of +links to the file is 1 (all fields returned by \fIstat()\fR are compared). +Then the filename is unlinked and the filehandle checked once again to +verify that the number of links on that file is now 0. This is the +closest you can come to making sure that the filename unlinked was the +same as the file whose descriptor you hold. +.Sp +.Vb 1 +\& unlink0($fh, $path) or die "Error unlinking file $path safely"; +.Ve +.Sp +Returns false on error. The filehandle is not closed since on some +occasions this is not required. +.Sp +On some platforms, for example Windows \s-1NT\s0, it is not possible to +unlink an open file (the file must be closed first). On those +platforms, the actual unlinking is deferred until the program ends and +good status is returned. A check is still performed to make sure that +the filehandle and filename are pointing to the same thing (but not at +the time the end block is executed since the deferred removal may not +have access to the filehandle). +.Sp +Additionally, on Windows \s-1NT\s0 not all the fields returned by \fIstat()\fR can +be compared. For example, the \f(CW\*(C`dev\*(C'\fR and \f(CW\*(C`rdev\*(C'\fR fields seem to be +different. Also, it seems that the size of the file returned by \fIstat()\fR +does not always agree, with \f(CW\*(C`stat(FH)\*(C'\fR being more accurate than +\&\f(CW\*(C`stat(filename)\*(C'\fR, presumably because of caching issues even when +using autoflush (this is usually overcome by waiting a while after +writing to the tempfile before attempting to \f(CW\*(C`unlink0\*(C'\fR it). +.Sp +Finally, on \s-1NFS\s0 file systems the link count of the file handle does +not always go to zero immediately after unlinking. Currently, this +command is expected to fail on \s-1NFS\s0 disks. +.SH "PACKAGE VARIABLES" +.IX Header "PACKAGE VARIABLES" +These functions control the global state of the package. +.IP "\fBsafe_level\fR" 4 +.IX Item "safe_level" +Controls the lengths to which the module will go to check the safety of the +temporary file or directory before proceeding. +Options are: +.RS 4 +.IP "\s-1STANDARD\s0" 8 +.IX Item "STANDARD" +Do the basic security measures to ensure the directory exists and +is writable, that the \fIumask()\fR is fixed before opening of the file, +that temporary files are opened only if they do not already exist, and +that possible race conditions are avoided. Finally the unlink0 +function is used to remove files safely. +.IP "\s-1MEDIUM\s0" 8 +.IX Item "MEDIUM" +In addition to the \s-1STANDARD\s0 security, the output directory is checked +to make sure that it is owned either by root or the user running the +program. If the directory is writable by group or by other, it is then +checked to make sure that the sticky bit is set. +.Sp +Will not work on platforms that do not support the \f(CW\*(C`\-k\*(C'\fR test +for sticky bit. +.IP "\s-1HIGH\s0" 8 +.IX Item "HIGH" +In addition to the \s-1MEDIUM\s0 security checks, also check for the +possibility of ``\fIchown()\fR giveaway'' using the \s-1POSIX\s0 +\&\fIsysconf()\fR function. If this is a possibility, each directory in the +path is checked in turn for safeness, recursively walking back to the +root directory. +.Sp +For platforms that do not support the \s-1POSIX\s0 +\&\f(CW\*(C`_PC_CHOWN_RESTRICTED\*(C'\fR symbol (for example, Windows \s-1NT\s0) it is +assumed that ``\fIchown()\fR giveaway'' is possible and the recursive test +is performed. +.RE +.RS 4 +.Sp +The level can be changed as follows: +.Sp +.Vb 1 +\& File::Temp->safe_level( File::Temp::HIGH ); +.Ve +.Sp +The level constants are not exported by the module. +.Sp +Currently, you must be running at least perl v5.6.0 in order to +run with \s-1MEDIUM\s0 or \s-1HIGH\s0 security. This is simply because the +safety tests use functions from Fcntl that are not +available in older versions of perl. The problem is that the version +number for Fcntl is the same in perl 5.6.0 and in 5.005_03 even though +they are different versions. +.Sp +On systems that do not support the \s-1HIGH\s0 or \s-1MEDIUM\s0 safety levels +(for example Win \s-1NT\s0 or \s-1OS/2\s0) any attempt to change the level will +be ignored. The decision to ignore rather than raise an exception +allows portable programs to be written with high security in mind +for the systems that can support this without those programs failing +on systems where the extra tests are irrelevant. +.Sp +If you really need to see whether the change has been accepted +simply examine the return value of \f(CW\*(C`safe_level\*(C'\fR. +.Sp +.Vb 3 +\& $newlevel = File::Temp->safe_level( File::Temp::HIGH ); +\& die "Could not change to high security" +\& if $newlevel != File::Temp::HIGH; +.Ve +.RE +.IP "TopSystemUID" 4 +.IX Item "TopSystemUID" +This is the highest \s-1UID\s0 on the current system that refers to a root +\&\s-1UID\s0. This is used to make sure that the temporary directory is +owned by a system \s-1UID\s0 (\f(CW\*(C`root\*(C'\fR, \f(CW\*(C`bin\*(C'\fR, \f(CW\*(C`sys\*(C'\fR etc) rather than +simply by root. +.Sp +This is required since on many unix systems \f(CW\*(C`/tmp\*(C'\fR is not owned +by root. +.Sp +Default is to assume that any \s-1UID\s0 less than or equal to 10 is a root +\&\s-1UID\s0. +.Sp +.Vb 2 +\& File::Temp->top_system_uid(10); +\& my $topid = File::Temp->top_system_uid; +.Ve +.Sp +This value can be adjusted to reduce security checking if required. +The value is only relevant when \f(CW\*(C`safe_level\*(C'\fR is set to \s-1MEDIUM\s0 or higher. +.SH "WARNING" +.IX Header "WARNING" +For maximum security, endeavour always to avoid ever looking at, +touching, or even imputing the existence of the filename. You do not +know that that filename is connected to the same file as the handle +you have, and attempts to check this can only trigger more race +conditions. It's far more secure to use the filehandle alone and +dispense with the filename altogether. +.PP +If you need to pass the handle to something that expects a filename +then, on a unix system, use \f(CW\*(C`"/dev/fd/" . fileno($fh)\*(C'\fR for arbitrary +programs, or more generally \f(CW\*(C`"+<=&" . fileno($fh)\*(C'\fR for Perl +programs. You will have to clear the close-on-exec bit on that file +descriptor before passing it to another process. +.PP +.Vb 3 +\& use Fcntl qw/F_SETFD F_GETFD/; +\& fcntl($tmpfh, F_SETFD, 0) +\& or die "Can't clear close-on-exec flag on temp fh: $!\en"; +.Ve +.Sh "Temporary files and \s-1NFS\s0" +.IX Subsection "Temporary files and NFS" +Some problems are associated with using temporary files that reside +on \s-1NFS\s0 file systems and it is recommended that a local filesystem +is used whenever possible. Some of the security tests will most probably +fail when the temp file is not local. Additionally, be aware that +the performance of I/O operations over \s-1NFS\s0 will not be as good as for +a local disk. +.SH "HISTORY" +.IX Header "HISTORY" +Originally began life in May 1999 as an \s-1XS\s0 interface to the system +\&\fImkstemp()\fR function. In March 2000, the OpenBSD \fImkstemp()\fR code was +translated to Perl for total control of the code's +security checking, to ensure the presence of the function regardless of +operating system and to help with portability. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\*(L"tmpnam\*(R" in \s-1POSIX\s0, \*(L"tmpfile\*(R" in \s-1POSIX\s0, File::Spec, File::Path +.PP +See IO::File and File::MkTemp for different implementations of +temporary file handling. +.SH "AUTHOR" +.IX Header "AUTHOR" +Tim Jenness <t.jenness@jach.hawaii.edu> +.PP +Copyright (C) 1999\-2001 Tim Jenness and the \s-1UK\s0 Particle Physics and +Astronomy Research Council. All Rights Reserved. This program is free +software; you can redistribute it and/or modify it under the same +terms as Perl itself. +.PP +Original Perl implementation loosely based on the OpenBSD C code for +\&\fImkstemp()\fR. Thanks to Tom Christiansen for suggesting that this module +should be written and providing ideas for code improvements and +security enhancements. diff --git a/lib/Temp/File-Temp-0.12/misc/benchmark.pl b/lib/Temp/File-Temp-0.12/misc/benchmark.pl new file mode 100755 index 0000000..bdea837 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/misc/benchmark.pl @@ -0,0 +1,42 @@ +#!/usr/local/bin/perl -w + +# Simple benchmark of temporary file creation (no filename just a handle) +# Uses the following: +# - temporary file creation created by IO::File +# - temporary file creation using File::Temp (uses security checking) +# - A roll-our-own wrapper on top of POSIX::tempnam (essentially +# a compact form of File::Temp without all the extras) taken from +# the Perl cookbook + +# Would not + +use strict; +use Benchmark; +use IO::File; +use POSIX qw/ tmpnam /; +use File::Temp qw/ tempfile /; +use Symbol; + +# Benchmark IO::File and File::Temp + +timethese(10000, { + 'IO::File' => sub { + my $fh = IO::File::new_tmpfile || die $ !; + }, + 'File::Temp::tempfile' => sub { + my $fh = tempfile() || die $ !; + }, + 'POSIX::tmpnam' => sub { + my $fh = gensym;; + my $name; + for (;;) { + $name = tmpnam(); + sysopen( $fh, $name, O_RDWR | O_CREAT | O_EXCL ) + && last; + } + unlink $name; + } + } + ); + + diff --git a/lib/Temp/File-Temp-0.12/misc/results.txt b/lib/Temp/File-Temp-0.12/misc/results.txt new file mode 100644 index 0000000..b73196a --- /dev/null +++ b/lib/Temp/File-Temp-0.12/misc/results.txt @@ -0,0 +1,33 @@ +This file contains the results of the File::Temp benchmark script +by File::Temp version, perl version and OS. + +On Windows NT, currently have problems with this benchmark since it +runs into a file limit after a while (this is because unlinking of the +open file is deferred until the end of the program rather than closing +it and unlinking it explcitly round the loop). + +Times are in CPU seconds. + +VERSION PERL OS File::Temp/s IO::File/s POSIX::tmpnam + +0.07 5.6.0 linux(1) 22.4 1.7 2.1 + 5.005_03 linux(1) 33.6 1.6 2.1 + +0.08 5.6.0 linux(1) 8.1 1.7 2.1 + 5.005_03 linux(1) 8.4 1.6 2.1 + + 5.6.0 solaris(2) 32.3 237.0 229.5 + + 5.005_03 dig.unix(3) 153.2 44.9 51.5 + + + + +1. A 600 MHz pentium III running RedHat 6.1 + +2. A Sparc Ultra 1 running Solaris 2.6. /tmp local, /var/tmp on NFS + (/var/tmp is the default temp location on Solaris and is used by + POSIX::tmpnam whereas /tmp is used by File::Temp since that is the + location specified by File::Spec) + +3. DEC 3000 Alpha running digital unix 4.0. diff --git a/lib/Temp/File-Temp-0.12/pm_to_blib b/lib/Temp/File-Temp-0.12/pm_to_blib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/pm_to_blib diff --git a/lib/Temp/File-Temp-0.12/t/mktemp.t b/lib/Temp/File-Temp-0.12/t/mktemp.t new file mode 100755 index 0000000..2014e30 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/t/mktemp.t @@ -0,0 +1,110 @@ +#!/usr/local/bin/perl -w + +# Test for mktemp family of commands in File::Temp +# Use STANDARD safe level for these tests + +use strict; +use Test; +BEGIN { plan tests => 9 } + +use File::Spec; +use File::Path; +use File::Temp qw/ :mktemp unlink0 /; +use FileHandle; + +ok(1); + +# MKSTEMP - test + +# Create file in temp directory +my $template = File::Spec->catfile(File::Spec->tmpdir, 'wowserXXXX'); + +(my $fh, $template) = mkstemp($template); + +print "# MKSTEMP: FH is $fh File is $template fileno=".fileno($fh)."\n"; +# Check if the file exists +ok( (-e $template) ); + +# Autoflush +$fh->autoflush(1) if $] >= 5.006; + +# Try printing something to the file +my $string = "woohoo\n"; +print $fh $string; + +# rewind the file +ok(seek( $fh, 0, 0)); + +# Read from the file +my $line = <$fh>; + +# compare with previous string +ok($string, $line); + +# Tidy up +# This test fails on Windows NT since it seems that the size returned by +# stat(filehandle) does not always equal the size of the stat(filename) +# This must be due to caching. In particular this test writes 7 bytes +# to the file which are not recognised by stat(filename) +# Simply waiting 3 seconds seems to be enough for the system to update + +if ($^O eq 'MSWin32') { + sleep 3; +} +my $status = unlink0($fh, $template); +if ($status) { + ok( $status ); +} else { + skip("Skip test failed probably due to \$TMPDIR being on NFS",1); +} + +# MKSTEMPS +# File with suffix. This is created in the current directory so +# may be problematic on NFS + +$template = "suffixXXXXXX"; +my $suffix = ".dat"; + +($fh, my $fname) = mkstemps($template, $suffix); + +print "# MKSTEMPS: File is $template -> $fname fileno=".fileno($fh)."\n"; +# Check if the file exists +ok( (-e $fname) ); + +# This fails if you are running on NFS +# If this test fails simply skip it rather than doing a hard failure +$status = unlink0($fh, $fname); + +if ($status) { + ok($status); +} else { + skip("Skip test failed probably due to cwd being on NFS",1) +} + +# MKDTEMP +# Temp directory + +$template = File::Spec->catdir(File::Spec->tmpdir, 'tmpdirXXXXXX'); + +my $tmpdir = mkdtemp($template); + +print "# MKDTEMP: Name is $tmpdir from template $template\n"; + +ok( (-d $tmpdir ) ); + +# Need to tidy up after myself +rmtree($tmpdir); + +# MKTEMP +# Just a filename, not opened + +$template = File::Spec->catfile(File::Spec->tmpdir, 'mytestXXXXXX'); + +my $tmpfile = mktemp($template); + +print "# MKTEMP: Tempfile is $template -> $tmpfile\n"; + +# Okay if template no longer has XXXXX in + + +ok( ($tmpfile !~ /XXXXX$/) ); diff --git a/lib/Temp/File-Temp-0.12/t/posix.t b/lib/Temp/File-Temp-0.12/t/posix.t new file mode 100755 index 0000000..b63fb29 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/t/posix.t @@ -0,0 +1,77 @@ +#!/usr/local/bin/perl -w +# Test for File::Temp - POSIX functions + +use strict; +use Test; +BEGIN { plan tests => 7} + +use File::Temp qw/ :POSIX unlink0 /; +use FileHandle; +ok(1); + +# TMPNAM - scalar + +print "# TMPNAM: in a scalar context: \n"; +my $tmpnam = tmpnam(); + +# simply check that the file does not exist +# Not a 100% water tight test though if another program +# has managed to create one in the meantime. +ok( !(-e $tmpnam )); + +print "# TMPNAM file name: $tmpnam\n"; + +# TMPNAM list context +# Not strict posix behaviour +(my $fh, $tmpnam) = tmpnam(); + +print "# TMPNAM: in list context: $fh $tmpnam\n"; + +# File is opened - make sure it exists +ok( (-e $tmpnam )); + +# Unlink it - a possible NFS issue again if TMPDIR is not a local disk +my $status = unlink0($fh, $tmpnam); +if ($status) { + ok( $status ); +} else { + skip("Skip test failed probably due to \$TMPDIR being on NFS",1); +} + +# TMPFILE + +$fh = tmpfile(); + +if (defined $fh) { + ok( $fh ); + print "# TMPFILE: tmpfile got FH $fh\n"; + + $fh->autoflush(1) if $] >= 5.006; + + # print something to it + my $original = "Hello a test\n"; + print "# TMPFILE: Wrote line: $original"; + print $fh $original + or die "Error printing to tempfile\n"; + + # rewind it + ok( seek($fh,0,0) ); + + # Read from it + my $line = <$fh>; + + print "# TMPFILE: Read line: $line"; + ok( $original, $line); + + close($fh); + +} else { + # Skip all the remaining tests + foreach (1..3) { + skip("Skip test failed probably due to \$TMPDIR being on NFS",1); + } +} + + + + diff --git a/lib/Temp/File-Temp-0.12/t/security.t b/lib/Temp/File-Temp-0.12/t/security.t new file mode 100755 index 0000000..f08f6db --- /dev/null +++ b/lib/Temp/File-Temp-0.12/t/security.t @@ -0,0 +1,136 @@ +#!/usr/bin/perl -w +# Test for File::Temp - Security levels + +# Some of the security checking will not work on all platforms +# Test a simple open in the cwd and tmpdir foreach of the +# security levels + +use Test; +BEGIN { plan tests => 13 } + +use strict; +use File::Spec; + +# Set up END block - this needs to happen before we load +# File::Temp since this END block must be evaluated after the +# END block configured by File::Temp +my @files; # list of files to remove +END { foreach (@files) { ok( !(-e $_) )} } + +use File::Temp qw/ tempfile unlink0 /; +ok(1); + +# The high security tests must currently be skipped on some platforms +my $skipplat = ( ( + # No sticky bits. + $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'dos' + ) ? 1 : 0 ); + +# Can not run high security tests in perls before 5.6.0 +my $skipperl = ($] < 5.006 ? 1 : 0 ); + +# Determine whether we need to skip things and why +my $skip = 0; +if ($skipplat) { + $skip = "Skip Not supported on this platform"; +} elsif ($skipperl) { + $skip = "Skip Perl version must be v5.6.0 for these tests"; + +} + +print "# We will be skipping some tests : $skip\n" if $skip; + +# start off with basic checking + +File::Temp->safe_level( File::Temp::STANDARD ); + +print "# Testing with STANDARD security...\n"; + +&test_security(0); + +# Try medium + +File::Temp->safe_level( File::Temp::MEDIUM ) + unless $skip; + +print "# Testing with MEDIUM security...\n"; + +# Now we need to start skipping tests +&test_security($skip); + +# Try HIGH + +File::Temp->safe_level( File::Temp::HIGH ) + unless $skip; + +print "# Testing with HIGH security...\n"; + +&test_security($skip); + +exit; + +# Subroutine to open two temporary files. +# one is opened in the current dir and the other in the temp dir + +sub test_security { + + # Read in the skip flag + my $skip = shift; + + # If we are skipping we need to simply fake the correct number + # of tests -- we dont use skip since the tempfile() commands will + # fail with MEDIUM/HIGH security before the skip() command would be run + if ($skip) { + + skip($skip,1); + skip($skip,1); + + # plus we need an end block so the tests come out in the right order + eval q{ END { skip($skip,1); skip($skip,1) } 1; } || die; + + return; + } + + # Create the tempfile + my $template = "tmpXXXXX"; + my ($fh1, $fname1) = eval { tempfile ( $template, + DIR => File::Spec->tmpdir, + UNLINK => 1, + ); + }; + + if (defined $fname1) { + print "# fname1 = $fname1\n"; + ok( (-e $fname1) ); + push(@files, $fname1); # store for end block + } elsif (File::Temp->safe_level() != File::Temp::STANDARD) { + my $skip2 = "Skip system possibly insecure, see INSTALL, section 'make test'"; + skip($skip2, 1); + # plus we need an end block so the tests come out in the right order + eval q{ END { skip($skip2,1); } 1; } || die; + } else { + ok(0); + } + + # Explicitly + if ( $< < File::Temp->top_system_uid() ){ + skip("Skip Test inappropriate for root", 1); + eval q{ END { skip($skip,1); } 1; } || die; + return; + } + my ($fh2, $fname2) = eval { tempfile ($template, UNLINK => 1 ); }; + if (defined $fname2) { + print "# fname2 = $fname2\n"; + ok( (-e $fname2) ); + push(@files, $fname2); # store for end block + close($fh2); + } elsif (File::Temp->safe_level() != File::Temp::STANDARD) { + my $skip2 = "Skip system possibly insecure, see INSTALL, section 'make test'"; + skip($skip2, 1); + # plus we need an end block so the tests come out in the right order + eval q{ END { skip($skip2,1); } 1; } || die; + } else { + ok(0); + } + +} diff --git a/lib/Temp/File-Temp-0.12/t/tempfile.t b/lib/Temp/File-Temp-0.12/t/tempfile.t new file mode 100644 index 0000000..6e3fa94 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/t/tempfile.t @@ -0,0 +1,140 @@ +#!/usr/local/bin/perl -w +# Test for File::Temp - tempfile function + +use strict; +use Test; +BEGIN { plan tests => 20} +use File::Spec; + +# Will need to check that all files were unlinked correctly +# Set up an END block here to do it + +# Arrays containing list of dirs/files to test +my (@files, @dirs, @still_there); + +# And a test for files that should still be around +# These are tidied up +END { + foreach (@still_there) { + ok( -f $_ ); + ok( unlink( $_ ) ); + ok( !(-f $_) ); + } +} + +# Loop over an array hoping that the files dont exist +END { foreach (@files) { ok( !(-e $_) )} } + +# And a test for directories +END { foreach (@dirs) { ok( !(-d $_) )} } + +# Need to make sure that the END blocks are setup before +# the ones that File::Temp configures since END blocks are evaluated +# in revers order and we need to check the files *after* File::Temp +# removes them +use File::Temp qw/ tempfile tempdir/; + +# Now we start the tests properly +ok(1); + + +# Tempfile +# Open tempfile in some directory, unlink at end +my ($fh, $tempfile) = tempfile( + UNLINK => 1, + SUFFIX => '.txt', + ); + +ok( (-f $tempfile) ); +# Should still be around after closing +ok( close( $fh ) ); +ok( (-f $tempfile) ); +# Check again at exit +push(@files, $tempfile); + +# TEMPDIR test +# Create temp directory in current dir +my $template = 'tmpdirXXXXXX'; +print "# Template: $template\n"; +my $tempdir = tempdir( $template , + DIR => File::Spec->curdir, + CLEANUP => 1, + ); + +print "# TEMPDIR: $tempdir\n"; + +ok( (-d $tempdir) ); +push(@dirs, $tempdir); + +# Create file in the temp dir +($fh, $tempfile) = tempfile( + DIR => $tempdir, + UNLINK => 1, + SUFFIX => '.dat', + ); + +print "# TEMPFILE: Created $tempfile\n"; + +ok( (-f $tempfile)); +push(@files, $tempfile); + +# Test tempfile +# ..and again +($fh, $tempfile) = tempfile( + DIR => $tempdir, + ); + + +ok( (-f $tempfile )); +push(@files, $tempfile); + +print "# TEMPFILE: Created $tempfile\n"; + +# and another (with template) + +($fh, $tempfile) = tempfile( 'helloXXXXXXX', + DIR => $tempdir, + UNLINK => 1, + SUFFIX => '.dat', + ); + +print "# TEMPFILE: Created $tempfile\n"; + +ok( (-f $tempfile) ); +push(@files, $tempfile); + + +# Create a temporary file that should stay around after +# it has been closed +($fh, $tempfile) = tempfile( 'permXXXXXXX', UNLINK => 0 ); +print "# TEMPFILE: Created $tempfile\n"; +ok( -f $tempfile ); +ok( close( $fh ) ); +push( @still_there, $tempfile); # check at END + +# Would like to create a temp file and just retrieve the handle +# but the test is problematic since: +# - We dont know the filename so we cant check that it is tidied +# correctly +# - The unlink0 required on unix for tempfile creation will fail +# on NFS +# Try to do what we can. +# Tempfile croaks on error so we need an eval +$fh = eval { tempfile( 'ftmpXXXXX', DIR => File::Spec->tmpdir ) }; + +if ($fh) { + + # print something to it to make sure something is there + ok( print $fh "Test\n" ); + + # Close it - can not check it is gone since we dont know the name + ok( close($fh) ); + +} else { + skip "Skip Failed probably due to NFS", 1; + skip "Skip Failed probably due to NFS", 1; +} + +# Now END block will execute to test the removal of directories +print "# End of tests. Execute END blocks\n"; + diff --git a/template/Deutsch/at_new.html b/template/Deutsch/at_new.html index 4620454..cf26836 100644 --- a/template/Deutsch/at_new.html +++ b/template/Deutsch/at_new.html @@ -2,7 +2,7 @@ <head> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> + <title><tmpl_if newtimer>Neuen Auto Timer anlegen<tmpl_else>Auto Timer editieren</tmpl_if></title> <link href="style.css" rel="stylesheet" media="screen"> <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> </head> @@ -15,11 +15,11 @@ <p class="einzug_ohnetop"><b><tmpl_if newtimer>Neuen Auto Timer anlegen<tmpl_else>Auto Timer editieren</tmpl_if></b></p> </td> <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> - <tmpl_if name="help_url"> - <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> - <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" align="right" valign="top" alt="Hilfe"></a> - </td> - </tmpl_if> +<tmpl_if name="help_url"> + <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> + <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" align="right" valign="top" alt="Hilfe"></a> + </td> +</tmpl_if> <td width="15" background="bilder/nav_button_back_end.gif"> </td> </tr> </table> @@ -35,13 +35,21 @@ <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Auto Timer Aktiv:</td> <td height="25" background="bilder/uebersicht_mitte.gif"> - <tmpl_if name="active"> - <input type="radio" name="active" value="1" checked>ja - <input type="radio" name="active" value="0">nein - <tmpl_else> - <input type="radio" name="active" value="1">ja - <input type="radio" name="active" value="0" checked>nein - </tmpl_if> +<tmpl_if name="oneshot"> + <input type="radio" name="active" value="1">ja + <input type="radio" name="active" value="0">nein + <input type="radio" name="active" value="2" checked>einmal +<tmpl_else> + <tmpl_if name="active"> + <input type="radio" name="active" value="1" checked>ja + <input type="radio" name="active" value="0">nein + <input type="radio" name="active" value="2">einmal + <tmpl_else> + <input type="radio" name="active" value="1">ja + <input type="radio" name="active" value="0" checked>nein + <input type="radio" name="active" value="2">einmal + </tmpl_if> +</tmpl_if> </td> <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> </tr> @@ -69,9 +77,9 @@ <td height="25" background="bilder/uebersicht_mitte_dark.gif"> <select name="channel" size="1"> <option value="0">alle Sender</option> - <tmpl_loop channels> +<tmpl_loop channels> <option value="<tmpl_var vdr_id>" <tmpl_if cur> selected</tmpl_if>><tmpl_var name></option> - </tmpl_loop> +</tmpl_loop> </select> </td> <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> @@ -122,13 +130,13 @@ <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> <td height="25" background="bilder/uebersicht_mitte.gif">Done Aktiv:</td> <td height="25" background="bilder/uebersicht_mitte.gif"> - <tmpl_if name="done"> - <input type="radio" name="done" value="1" checked>ja - <input type="radio" name="done" value="0">nein - <tmpl_else> - <input type="radio" name="done" value="1">ja - <input type="radio" name="done" value="0" checked>nein - </tmpl_if> +<tmpl_if name="done"> + <input type="radio" name="done" value="1" checked>ja + <input type="radio" name="done" value="0">nein +<tmpl_else> + <input type="radio" name="done" value="1">ja + <input type="radio" name="done" value="0" checked>nein +</tmpl_if> </td> <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> </tr> @@ -148,7 +156,10 @@ </tr> </table> <br> - <input type="submit" name="save" value="Speichern"><input type="submit" name="exit" value="Abbrechen"> <input type="hidden" name="aktion" value="at_timer_save"> <input type="hidden" name="id" value="<tmpl_var id>"> + <input type="submit" name="save" value="Speichern"> + <input type="submit" name="exit" value="Abbrechen"> + <input type="hidden" name="aktion" value="at_timer_save"> + <input type="hidden" name="id" value="<tmpl_var id>"> </form> </body> diff --git a/template/Deutsch/at_timer_list.html b/template/Deutsch/at_timer_list.html index 2727420..403bccc 100644 --- a/template/Deutsch/at_timer_list.html +++ b/template/Deutsch/at_timer_list.html @@ -2,162 +2,194 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>Auto Timer</title> + <link href="style.css" rel="stylesheet" media="screen"> + <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> +</head> - </head> - - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> - <tr> - <td valign="middle" width="200" background="bilder/nav_button_back.gif"> - <p class="einzug_ohnetop"><b>Auto Timer</b></p> - </td> - <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> - <td align="right" width="203" background="bilder/nav_button_back_mitte.gif"> - <table width="180" border="0" cellspacing="0" cellpadding="0"> - <tr height="20"> - <td width="12" height="20" background="bilder/gbutton_left.gif"></td> - <td align="center" height="20" background="bilder/gbutton_middle.gif"><a href="<tmpl_var naturl>"> - <div class="gbutton"> - Neuer Auto Timer</div> - </a></td> - <td width="12" height="20" background="bilder/gbutton_right.gif"></td> - <td></td> - </tr> - </table> - </td> - <tmpl_if name="help_url"> - <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> - <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" align="right" valign="top" alt="Hilfe"></a> - </td> - </tmpl_if> - <td width="15" background="bilder/nav_button_back_end.gif"> </td> - </tr> - </table> - <br> - <form action="<tmpl_var url>" method="get" name="FormName"> +<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> + <tr> + <td valign="middle" width="200" background="bilder/nav_button_back.gif"> + <p class="einzug_ohnetop"><b>Auto Timer</b></p> + </td> + <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> + <td align="right" width="203" background="bilder/nav_button_back_mitte.gif"> + <table width="180" border="0" cellspacing="0" cellpadding="0"> + <tr height="20"> + <td width="12" height="20" background="bilder/gbutton_left.gif"></td> + <td align="center" height="20" background="bilder/gbutton_middle.gif"> + <a href="<tmpl_var naturl>"><div class="gbutton">Neuer Auto Timer</div></a> + </td> + <td width="12" height="20" background="bilder/gbutton_right.gif"></td> + <td></td> + </tr> + </table> + </td> +<tmpl_if name="help_url"> + <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> + <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" align="right" valign="top" alt="Hilfe"></a> + </td> +</tmpl_if> + <td width="15" background="bilder/nav_button_back_end.gif"> </td> + </tr> + </table> + <br> + <form action="<tmpl_var url>" method="get" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="30"> <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> </td> <td width="70" background="bilder/uebersicht_oben<tmpl_if sortbyactive>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbyactive><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbyactiveurl>"><font color="black"><b>Aktiv</b></font></a></p> - </td> - <td width="15%" background="bilder/uebersicht_oben<tmpl_if sortbychannel>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbychannel><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbychannelurl>"><font color="black"><b>Sender</b></font></a></p> - </td> - <td width="15%" background="bilder/uebersicht_oben<tmpl_if sortbystart>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbystart><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbystarturl>"><font color="black"><b>Start</b></font></a></p> - </td> - <td width="15%" background="bilder/uebersicht_oben<tmpl_if sortbystop>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbystop><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbystopurl>"><font color="black"><b>Stop</b></font></a></p> - </td> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbyactiveurl>">Aktiv + <tmpl_if sortbyactive> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="10%" background="bilder/uebersicht_oben<tmpl_if sortbychannel>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbychannelurl>">Sender + <tmpl_if sortbychannel> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="40" background="bilder/uebersicht_oben<tmpl_if sortbystart>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbystarturl>">Start + <tmpl_if sortbystart> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="40" background="bilder/uebersicht_oben<tmpl_if sortbystop>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbystopurl>">Stop + <tmpl_if sortbystop> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> <td background="bilder/uebersicht_oben<tmpl_if sortbypattern>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbypattern><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbypatternurl>"><font color="black"><b>Name</b></font></a></p> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbypatternurl>">Name + <tmpl_if sortbypattern> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> </td> <td width="30" background="bilder/uebersicht_oben.gif"> </td> <td width="30" background="bilder/uebersicht_oben.gif"> </td> <td align="right" width="30" background="bilder/uebersicht_oben.gif"> </td> <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - <tmpl_loop at_timer_loop> + +<tmpl_loop at_timer_loop> <tr> <td valign="top" width="30" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> <td valign="top" width="70" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbyactive>_selected</tmpl_if>.gif"> - <p class="einzug_liste"> - <tmpl_if active><img src="bilder/poempl_gruen.gif" alt="" width="19" height="19" align="absmiddle" border="0"> <a href="<tmpl_var toggleurl>"><font color="black">Ja</font></a><tmpl_else><img src="bilder/poempl_rot.gif" alt="" width="19" height="19" align="absmiddle" border="0"> <a href="<tmpl_var toggleurl>"><font color="black">Nein</font></a></tmpl_if> - </p> - </td> - <td valign="top" width="15%" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbychannel>_selected</tmpl_if>.gif"> - <p class="einzug_liste"> - <tmpl_if channel> - <tmpl_var channel> - <tmpl_else> - - - </tmpl_if></p> - </td> - <td valign="top" width="15%" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbystart>_selected</tmpl_if>.gif"> - <p class="einzug_liste"> - <tmpl_if start> - <tmpl_var start> - <tmpl_else> - - - </tmpl_if> - </p> - </td> - <td valign="top" width="15%" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbystop>_selected</tmpl_if>.gif"> - <p class="einzug_liste"> - <tmpl_if stop> - <tmpl_var stop> - <tmpl_else> - - - </tmpl_if> - </p> - </td> + <p class="einzug_liste"> + <tmpl_if active> + <img src="bilder/poempl_gruen.gif" alt="" width="19" height="19" align="absmiddle" border="0"> + <a href="<tmpl_var toggleurl>"><font color="black">Ja</font></a> + <tmpl_else> + <img src="bilder/poempl_rot.gif" alt="" width="19" height="19" align="absmiddle" border="0"> + <a href="<tmpl_var toggleurl>"><font color="black">Nein</font></a> + </tmpl_if> + </p> + </td> + <td valign="top" width="120" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbychannel>_selected</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if channel><tmpl_var channel><tmpl_else>-</tmpl_if> + </p> + </td> + <td valign="top" width="40" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbystart>_selected</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if start><tmpl_var start><tmpl_else>-</tmpl_if> + </p> + </td> + <td valign="top" width="40" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbystop>_selected</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if stop><tmpl_var stop><tmpl_else>-</tmpl_if> + </p> + </td> <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbypattern>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var pattern></p> - </td> + <p class="einzug_liste"> + <tmpl_var pattern> + </p> + </td> <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><a href="<tmpl_var modurl>"><img src="bilder/edit.gif" alt="" height="17" width="17" border="0"></a></p> - </td> + <p class="einzug_liste"> + <a href="<tmpl_var modurl>"><img src="bilder/edit.gif" alt="" height="17" width="17" border="0"></a> + </p> + </td> <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><a href="javascript:del('<tmpl_var delurl>');"><img src="bilder/delete.gif" alt="" height="17" width="17" border="0"></a></p> - </td> + <p class="einzug_liste"> + <a href="javascript:del('<tmpl_var delurl>');"><img src="bilder/delete.gif" alt="" height="17" width="17" border="0"></a> + </p> + </td> <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><input type="checkbox" name="xxxx_<tmpl_var id>"></p> - </td> + <p class="einzug_liste"><input type="checkbox" name="xxxx_<tmpl_var id>"></p> + </td> <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> </tr> - </tmpl_loop> +</tmpl_loop> + <tr> <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td width="50" background="bilder/uebersicht_unten.gif"> </td> - <td width="15%" background="bilder/uebersicht_unten.gif"> </td> - <td width="15%" background="bilder/uebersicht_unten.gif"> </td> - <td width="15%" background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> + <td colspan="8" background="bilder/uebersicht_unten.gif"> </td> <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - <tr> - <td colspan="5" valign="top"> - <table width="150" border="0" cellspacing="0" cellpadding="0"> - <br> - <tr height="20"> - <td width="12" height="20" background="bilder/gbutton_left.gif"></td> - <td align="center" height="20" background="bilder/gbutton_middle.gif"> - - <a href="<tmpl_var force_update_url>"><div class="gbutton">Manuelles Update</div></a> - - </td> - <td width="12" height="20" background="bilder/gbutton_right.gif"></td> - </tr> - </table></td> - <td colspan="4" align="right"><br> - <table width="260" border="0" cellspacing="0" cellpadding="0"> - <tr height="20"> - <td width="12" height="20" background="bilder/gbutton_left.gif"></td> - <td align="center" height="20" background="bilder/gbutton_middle.gif"> - - <a href="javascript:mdel();"><div class="gbutton">Ausgewählte Auto Timer löschen</div></a> - - </td> - <td width="12" height="20" background="bilder/gbutton_right.gif"></td> - </tr> - </table> - </td> - <td valign="top" width="30"></td> - </tr> - </table> - <input type="hidden" name="aktion" value="at_timer_delete"> - </form> - </body> + <tr> + <td colspan="5" valign="top"> + <table width="150" border="0" cellspacing="0" cellpadding="0"> + <br> + <tr height="20"> + <td width="12" height="20" background="bilder/gbutton_left.gif"></td> + <td align="center" height="20" background="bilder/gbutton_middle.gif"> + <a href="<tmpl_var force_update_url>"><div class="gbutton">Manuelles Update</div></a> + </td> + <td width="12" height="20" background="bilder/gbutton_right.gif"></td> + </tr> + </table> + </td> + <td colspan="4" align="right"> + <br> + <table width="260" border="0" cellspacing="0" cellpadding="0"> + <tr height="20"> + <td width="12" height="20" background="bilder/gbutton_left.gif"></td> + <td align="center" height="20" background="bilder/gbutton_middle.gif"> + <a href="javascript:mdel();"><div class="gbutton">Ausgewählte Auto Timer löschen</div></a> + </td> + <td width="12" height="20" background="bilder/gbutton_right.gif"></td> + </tr> + </table> + </td> + <td valign="top" width="30"></td> + </tr> + </table> + <input type="hidden" name="aktion" value="at_timer_delete"> + </form> +</body> </html> diff --git a/template/Deutsch/bilder/auge.jpg b/template/Deutsch/bilder/auge.jpg Binary files differindex cd975b0..cd975b0 100755..100644 --- a/template/Deutsch/bilder/auge.jpg +++ b/template/Deutsch/bilder/auge.jpg diff --git a/template/Deutsch/bilder/info.jpg b/template/Deutsch/bilder/info.jpg Binary files differindex de7cfc6..de7cfc6 100755..100644 --- a/template/Deutsch/bilder/info.jpg +++ b/template/Deutsch/bilder/info.jpg diff --git a/template/Deutsch/bilder/info_disabled.jpg b/template/Deutsch/bilder/info_disabled.jpg Binary files differnew file mode 100644 index 0000000..7e6419e --- /dev/null +++ b/template/Deutsch/bilder/info_disabled.jpg diff --git a/template/Deutsch/bilder/luecke.gif b/template/Deutsch/bilder/luecke.gif Binary files differindex a15ade9..a15ade9 100755..100644 --- a/template/Deutsch/bilder/luecke.gif +++ b/template/Deutsch/bilder/luecke.gif diff --git a/template/Deutsch/bilder/lupe.jpg b/template/Deutsch/bilder/lupe.jpg Binary files differindex cd2252c..cd2252c 100755..100644 --- a/template/Deutsch/bilder/lupe.jpg +++ b/template/Deutsch/bilder/lupe.jpg diff --git a/template/Deutsch/bilder/poempl_grau.gif b/template/Deutsch/bilder/poempl_grau.gif Binary files differindex c397bbc..c397bbc 100755..100644 --- a/template/Deutsch/bilder/poempl_grau.gif +++ b/template/Deutsch/bilder/poempl_grau.gif diff --git a/template/Deutsch/bilder/poempl_grau2.gif b/template/Deutsch/bilder/poempl_grau2.gif Binary files differindex db90eae..db90eae 100755..100644 --- a/template/Deutsch/bilder/poempl_grau2.gif +++ b/template/Deutsch/bilder/poempl_grau2.gif diff --git a/template/Deutsch/bilder/poempl_rot.gif b/template/Deutsch/bilder/poempl_rot.gif Binary files differindex ef2daac..093bfdc 100644 --- a/template/Deutsch/bilder/poempl_rot.gif +++ b/template/Deutsch/bilder/poempl_rot.gif diff --git a/template/Deutsch/bilder/rec.jpg b/template/Deutsch/bilder/rec.jpg Binary files differindex 187626b..187626b 100755..100644 --- a/template/Deutsch/bilder/rec.jpg +++ b/template/Deutsch/bilder/rec.jpg diff --git a/template/Deutsch/config.html b/template/Deutsch/config.html index c1f7605..279a89d 100644 --- a/template/Deutsch/config.html +++ b/template/Deutsch/config.html @@ -1,445 +1,401 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title><tmpl_var titel></title> + <link href="style.css" rel="stylesheet" media="screen"> + <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> +</head> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title><tmpl_var titel></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> - </head> - - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <form action="<tmpl_var url>" method="get" name="FormName"> - <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> +<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> + <form action="<tmpl_var url>" method="get" name="FormName"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> <tr> <td valign="middle" width="200" background="bilder/nav_button_back.gif"> <p class="einzug_ohnetop"><b>Konfiguration</b></p> </td> <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> - <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"><tmpl_if name="help_url"><a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" alt="Hilfe"></a></tmpl_if></td> + <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> +<tmpl_if name="help_url"> + <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" alt="Hilfe"></a> +</tmpl_if> + </td> <td width="15" background="bilder/nav_button_back_end.gif"> </td> </tr> </table> <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td></td> - <td width="10"></td> - <td></td> - </tr> - <tr> - <td valign="top"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Allgemeine Einstellungen:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Sprache / Template:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><select name="LANGUAGE" size="1"> - <tmpl_loop name="LANGLIST"> - <option value="<tmpl_var name>" <tmpl_if aklang> selected</tmpl_if>> - <tmpl_var name> - </option> - </tmpl_loop> - </select></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Startseite:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><select name="LOGINPAGE" size="1"> - <tmpl_loop name="LOGINPAGES"> - <option value="<tmpl_var id>" <tmpl_if current> selected</tmpl_if>> - <tmpl_var name> - </option> - </tmpl_loop> - </select></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Anzahl der DVB Karten:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="RECORDINGS" value="<tmpl_var RECORDINGS>" size="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Skin:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><select name="SKIN" size="1"> - <tmpl_loop name="SKINLIST"> - <option value="<tmpl_var name>" <tmpl_if sel> selected</tmpl_if>><tmpl_var name></option> - </tmpl_loop> - </select></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Identifikation: </b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr height="25"> - <td colspan="3" height="25"> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Benutzername:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="USERNAME" value="<tmpl_var USERNAME>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Passwort:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="password" name="PASSWORD" value="<tmpl_var PASSWORD>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Gast Zugang:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"> <tmpl_if guest_account> - <input type="radio" name="GUEST_ACCOUNT" value="1" checked>ja <input type="radio" name="GUEST_ACCOUNT" value="0">nein - <tmpl_else> - <input type="radio" name="GUEST_ACCOUNT" value="1">ja <input type="radio" name="GUEST_ACCOUNT" value="0" checked>nein - </tmpl_if></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Gast Benutzername:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="USERNAME_GUEST" value="<tmpl_var USERNAME_GUEST>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Gast Passwort:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="password" name="PASSWORD_GUEST" value="<tmpl_var PASSWORD_GUEST>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - </table> - </td> - </tr> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" height="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Zeitleiste: </b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr height="25"> - <td colspan="3" height="25"> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Stunden:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="ZEITRAHMEN" value="<tmpl_var ZEITRAHMEN>" size="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeiten:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TIMES" value="<tmpl_var TIMES>" size="16"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - </table> - </td> - </tr> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" height="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - </td> - <td valign="top" width="10"></td> - <td valign="top"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Auto Timer:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> - <td height="25" background="bilder/uebersicht_mitte.gif">Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"> <tmpl_if at_func> - <input type="radio" name="AT_FUNC" value="1" checked>an <input type="radio" name="AT_FUNC" value="0">aus - <tmpl_else> - <input type="radio" name="AT_FUNC" value="1">an <input type="radio" name="AT_FUNC" value="0" checked>aus - </tmpl_if></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Timeout für Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="AT_TIMEOUT" value="<tmpl_var AT_TIMEOUT>" size="4"> minuten</td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Lebenszeit für neuen Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="AT_LIFETIME" value="<tmpl_var AT_LIFETIME>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Priorität für neuen Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="AT_PRIORITY" value="<tmpl_var AT_PRIORITY>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <!-- - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Zeitpuffer Anfang:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="textfieldName" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeitpuffer Ende:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="textfieldName" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - // --> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Timer:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Lebenszeit für neuen Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="TM_LIFETIME" value="<tmpl_var TM_LIFETIME>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Priorität für neuen Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TM_PRIORITY" value="<tmpl_var TM_PRIORITY>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Zeitpuffer Anfang:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="TM_MARGIN_BEGIN" value="<tmpl_var TM_MARGIN_BEGIN>" size="3"> minuten</td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeitpuffer Ende:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TM_MARGIN_END" value="<tmpl_var TM_MARGIN_END>" size="3"> minuten</td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Streaming:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">HTTP Port von StreamDev: (auch möglich 3000/ts)</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="ST_STREAMDEV_PORT" value="<tmpl_var ST_STREAMDEV_PORT>" size="10"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Bandbreite des Streams:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><select name="STREAMTYPE" size="1"> - <tmpl_loop name="STREAMTYPELIST"> - <option value="<tmpl_var name>" <tmpl_if sel> selected</tmpl_if>> - <tmpl_var name> - </option> - </tmpl_loop> - </select></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Pfad der Aufnahmen:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="VIDEODIR" value="<tmpl_var VIDEODIR>" size="10" maxlength="256"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan="3"> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="black"> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_oben.gif"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="40%" height="30" background="bilder/uebersicht_oben.gif"> - <div align="left"> - <b>Selektive Kanalauswahl:</b></div> - </td> - <td bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_oben.gif"> </td> - <td bgcolor="#c6c6c6" width="45%" height="30" background="bilder/uebersicht_oben.gif"> - <div align="center"></div> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_oben.gif"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_links.gif"></td> - <td width="40%" height="30" background="bilder/uebersicht_mitte.gif">in der Programmübersicht:</td> - <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte.gif"> - <tmpl_if CHANNELS_WANTED_PRG> - <input type="radio" name="CHANNELS_WANTED_PRG" value="1" checked>ja <input type="radio" name="CHANNELS_WANTED_PRG" value="0">nein - <tmpl_else> - <input type="radio" name="CHANNELS_WANTED_PRG" value="1">ja <input type="radio" name="CHANNELS_WANTED_PRG" value="0" checked>nein - </tmpl_if> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_links_dark.gif"></td> - <td width="40%" height="30" background="bilder/uebersicht_mitte_dark.gif">in "Was läuft jetzt?":</td> - <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte_dark.gif"> - <tmpl_if CHANNELS_WANTED_SUMMARY> - <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="1" checked>ja <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="0">nein - <tmpl_else> - <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="1">ja <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="0" checked>nein - </tmpl_if> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_links.gif"></td> - <td width="40%" height="30" background="bilder/uebersicht_mitte.gif">in "Auto Timer?":</td> - <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte.gif"> - <tmpl_if CHANNELS_WANTED_AUTOTIMER> - <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="1" checked>ja <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="0">nein - <tmpl_else> - <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="1">ja <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="0" checked>nein - </tmpl_if> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr> - <td bgcolor="#dfdcdc" width="30" background="bilder/uebersicht_links.gif"></td> - <td width="40%" background="bilder/uebersicht_mitte.gif"> - <div align="center"> - <p><br> - - Alle Sender<br> - <select name="all_channels" size="8" multiple> - <tmpl_loop name="ALL_CHANNELS"> - <option value="<tmpl_var vdr_id>"> - <tmpl_var name> - </option> - </tmpl_loop> - </select></p> - </div> - </td> - <td background="bilder/uebersicht_mitte.gif"> - <div align="center"> - <p><br> - </p> - <p><input type="submit" name="submit" value=">>>>>"></p> - <p><input type="submit" name="submit" value="<<<<<"></p> - <p></p> - </div> - </td> - <td width="45%" background="bilder/uebersicht_mitte.gif"> - <div align="center"> - <p><br> - - Angezeigte Sender<br> - <select name="selected_channels" size="8" multiple> - <tmpl_loop name="SELECTED_CHANNELS"> - <option value="<tmpl_var vdr_id>"> - <tmpl_var name> - </option> - </tmpl_loop> - </select></p> - </div> - </td> - <td bgcolor="#dfdcdc" width="30" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="30"> - <td bgcolor="#dfdcdc" width="30" height="30" background="bilder/uebersicht_links.gif"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td width="40%" height="30" background="bilder/uebersicht_unten.gif"></td> - <td height="30" background="bilder/uebersicht_unten.gif"></td> - <td width="45%" height="30" background="bilder/uebersicht_unten.gif"></td> - <td bgcolor="#dfdcdc" width="30" height="30" background="bilder/uebersicht_rechts.gif"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table></td> - </tr> - </table> - <br> - <input type="submit" name="save" value="Speichern"><input type="submit" name="apply" value="Anwenden"> <input type="hidden" name="aktion" value="conf_list"> - </form> - </body> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td></td> + <td width="10"></td> + <td></td> + </tr> + <tr> + <td valign="top"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_oben.gif"><b>Allgemeine Einstellungen:</b></td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Sprache / Template:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"> + <select name="LANGUAGE" size="1"> +<tmpl_loop name="LANGLIST"> + <option value="<tmpl_var name>" <tmpl_if aklang> selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> + </td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Startseite:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"> + <select name="LOGINPAGE" size="1"> +<tmpl_loop name="LOGINPAGES"> + <option value="<tmpl_var id>" <tmpl_if current> selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> + </td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Anzahl der DVB Karten:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="RECORDINGS" value="<tmpl_var RECORDINGS>" size="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Skin:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"> + <select name="SKIN" size="1"> +<tmpl_loop name="SKINLIST"> + <option value="<tmpl_var name>" <tmpl_if sel> selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> + </td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr> + <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" background="bilder/uebersicht_unten.gif"> </td> + <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + <br> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_oben.gif"><b>Identifikation:</b></td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Benutzername:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="USERNAME" value="<tmpl_var USERNAME>" size="12"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Passwort:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="password" name="PASSWORD" value="<tmpl_var PASSWORD>" size="12"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Gast Zugang:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"> +<tmpl_if guest_account> + <input type="radio" name="GUEST_ACCOUNT" value="1" checked>ja + <input type="radio" name="GUEST_ACCOUNT" value="0">nein +<tmpl_else> + <input type="radio" name="GUEST_ACCOUNT" value="1">ja + <input type="radio" name="GUEST_ACCOUNT" value="0" checked>nein +</tmpl_if> + </td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Gast Benutzername:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="USERNAME_GUEST" value="<tmpl_var USERNAME_GUEST>" size="12"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Gast Passwort:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="password" name="PASSWORD_GUEST" value="<tmpl_var PASSWORD_GUEST>" size="12"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_unten.gif"> </td> + <td width="30" height="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + <br> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_oben.gif"><b>Zeitleiste:</b></td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Stunden:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="ZEITRAHMEN" value="<tmpl_var ZEITRAHMEN>" size="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeiten:</td> + <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TIMES" value="<tmpl_var TIMES>" size="16"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_unten.gif"> </td> + <td width="30" height="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + </td> + <td valign="top" width="10"></td> + <td valign="top"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Auto Timer:</b></td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> + <td height="25" background="bilder/uebersicht_mitte.gif">Auto Timer:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"> +<tmpl_if at_func> + <input type="radio" name="AT_FUNC" value="1" checked>an + <input type="radio" name="AT_FUNC" value="0">aus +<tmpl_else> + <input type="radio" name="AT_FUNC" value="1">an + <input type="radio" name="AT_FUNC" value="0" checked>aus +</tmpl_if> + </td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Timeout für Auto Timer:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="AT_TIMEOUT" value="<tmpl_var AT_TIMEOUT>" size="4"> minuten</td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Lebenszeit für neuen Auto Timer:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="AT_LIFETIME" value="<tmpl_var AT_LIFETIME>" size="2" maxlength="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Priorität für neuen Auto Timer:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="AT_PRIORITY" value="<tmpl_var AT_PRIORITY>" size="2" maxlength="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> +<!-- + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Zeitpuffer Anfang:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="textfieldName" size="2" maxlength="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeitpuffer Ende:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="textfieldName" size="2" maxlength="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> +// --> + <tr> + <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" background="bilder/uebersicht_unten.gif"> </td> + <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + <br> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Timer:</b></td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Lebenszeit für neuen Timer:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="TM_LIFETIME" value="<tmpl_var TM_LIFETIME>" size="2" maxlength="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Priorität für neuen Timer:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TM_PRIORITY" value="<tmpl_var TM_PRIORITY>" size="2" maxlength="2"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Zeitpuffer Anfang:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="TM_MARGIN_BEGIN" value="<tmpl_var TM_MARGIN_BEGIN>" size="3"> minuten</td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeitpuffer Ende:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TM_MARGIN_END" value="<tmpl_var TM_MARGIN_END>" size="3"> minuten</td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr> + <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" background="bilder/uebersicht_unten.gif"> </td> + <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + <br> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Streaming:</b></td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">HTTP Port von StreamDev: (auch möglich 3000/ts)</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="ST_STREAMDEV_PORT" value="<tmpl_var ST_STREAMDEV_PORT>" size="10"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> + <td height="25" background="bilder/uebersicht_mitte_dark.gif">Bandbreite des Streams:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"> + <select name="STREAMTYPE" size="1"> +<tmpl_loop name="STREAMTYPELIST"> + <option value="<tmpl_var name>" <tmpl_if sel> selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> + </td> + <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> + <td height="25" background="bilder/uebersicht_mitte.gif">Pfad der Aufnahmen:</td> + <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="VIDEODIR" value="<tmpl_var VIDEODIR>" size="20" maxlength="256"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr> + <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td colspan="2" background="bilder/uebersicht_unten.gif"> </td> + <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + </td> + </tr> + <tr> + <td colspan="3"> + <br> + <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="black"> + <tr height="30"> + <td width="30" height="30" background="bilder/uebersicht_oben.gif"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td width="40%" height="30" background="bilder/uebersicht_oben.gif"> + <div align="left"><b>Selektive Kanalauswahl:</b></div> + </td> + <td bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_oben.gif"> </td> + <td bgcolor="#c6c6c6" width="45%" height="30" background="bilder/uebersicht_oben.gif"> + <div align="center"></div> + </td> + <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_oben.gif"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + <tr height="30"> + <td width="30" height="30" background="bilder/uebersicht_links.gif"></td> + <td width="40%" height="30" background="bilder/uebersicht_mitte.gif">in der Programmübersicht:</td> + <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte.gif"> +<tmpl_if CHANNELS_WANTED_PRG> + <input type="radio" name="CHANNELS_WANTED_PRG" value="1" checked>ja + <input type="radio" name="CHANNELS_WANTED_PRG" value="0">nein +<tmpl_else> + <input type="radio" name="CHANNELS_WANTED_PRG" value="1">ja + <input type="radio" name="CHANNELS_WANTED_PRG" value="0" checked>nein +</tmpl_if> + </td> + <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="30"> + <td width="30" height="30" background="bilder/uebersicht_links_dark.gif"></td> + <td width="40%" height="30" background="bilder/uebersicht_mitte_dark.gif">in "Was läuft jetzt?":</td> + <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte_dark.gif"> +<tmpl_if CHANNELS_WANTED_SUMMARY> + <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="1" checked>ja + <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="0">nein +<tmpl_else> + <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="1">ja + <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="0" checked>nein +</tmpl_if> + </td> + <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts_dark.gif"></td> + </tr> + <tr height="30"> + <td width="30" height="30" background="bilder/uebersicht_links.gif"></td> + <td width="40%" height="30" background="bilder/uebersicht_mitte.gif">in "Auto Timer?":</td> + <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte.gif"> +<tmpl_if CHANNELS_WANTED_AUTOTIMER> + <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="1" checked>ja + <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="0">nein +<tmpl_else> + <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="1">ja + <input type="radio" name="CHANNELS_WANTED_AUTOTIMER" value="0" checked>nein +</tmpl_if> + </td> + <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr> + <td bgcolor="#dfdcdc" width="30" background="bilder/uebersicht_links.gif"></td> + <td width="40%" align="center" background="bilder/uebersicht_mitte.gif"> + <br> + <select name="all_channels" size="8" multiple> +<tmpl_loop name="ALL_CHANNELS"> + <option value="<tmpl_var vdr_id>"><tmpl_var name></option> +</tmpl_loop> + </select> + </td> + <td align="center" valign="middle" background="bilder/uebersicht_mitte.gif"> + <input type="submit" name="submit" value=">>>>>"><br> + <input type="submit" name="submit" value="<<<<<"> + </td> + <td width="45%" align="center" background="bilder/uebersicht_mitte.gif"> + <br> + <select name="selected_channels" size="8" multiple> +<tmpl_loop name="SELECTED_CHANNELS"> + <option value="<tmpl_var vdr_id>"><tmpl_var name></option> +</tmpl_loop> + </select> + </td> + <td bgcolor="#dfdcdc" width="30" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tr height="30"> + <td bgcolor="#dfdcdc" width="30" height="30" background="bilder/uebersicht_links.gif"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> + <td width="40%" height="30" background="bilder/uebersicht_unten.gif"></td> + <td height="30" background="bilder/uebersicht_unten.gif"></td> + <td width="45%" height="30" background="bilder/uebersicht_unten.gif"></td> + <td bgcolor="#dfdcdc" width="30" height="30" background="bilder/uebersicht_rechts.gif"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> + <input type="submit" name="save" value="Speichern"><input type="submit" name="apply" value="Anwenden"> <input type="hidden" name="aktion" value="conf_list"> + </form> +</body> </html> diff --git a/template/Deutsch/config.html.orig b/template/Deutsch/config.html.orig deleted file mode 100644 index 753f045..0000000 --- a/template/Deutsch/config.html.orig +++ /dev/null @@ -1,335 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html> - - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title><tmpl_var titel></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> - </head> - - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <form action="<tmpl_var url>" method="get" name="FormName"> - <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> - <tr> - <td valign="middle" width="200" background="bilder/nav_button_back.gif"> - <p class="einzug_ohnetop"><b>Konfiguration</b></p> - </td> - <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> - <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"><tmpl_if name="help_url"><a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" alt="Hilfe"></a></tmpl_if></td> - <td width="15" background="bilder/nav_button_back_end.gif"> </td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td></td> - <td width="10"></td> - <td></td> - </tr> - <tr> - <td valign="top"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Allgemeine Einstellungen:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Sprache / Template:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><select name="LANGUAGE" size="1"> - <tmpl_loop name="LANGLIST"> - <option value="<tmpl_var name>" <tmpl_if aklang> selected</tmpl_if>> - <tmpl_var name> - </option> - </tmpl_loop> - </select></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Startseite:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><select name="LOGINPAGE" size="1"> - <tmpl_loop name="LOGINPAGES"> - <option value="<tmpl_var id>" <tmpl_if current> selected</tmpl_if>> - <tmpl_var name> - </option> - </tmpl_loop> - </select></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Anzahl der DVB Karten:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="RECORDINGS" value="<tmpl_var RECORDINGS>" size="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Identifikation: </b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr height="25"> - <td colspan="3" height="25"> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Benutzername:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="USERNAME" value="<tmpl_var USERNAME>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Passwort:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="password" name="PASSWORD" value="<tmpl_var PASSWORD>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Gast Zugang:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"> <tmpl_if guest_account> - <input type="radio" name="GUEST_ACCOUNT" value="1" checked>ja <input type="radio" name="GUEST_ACCOUNT" value="0">nein - <tmpl_else> - <input type="radio" name="GUEST_ACCOUNT" value="1">ja <input type="radio" name="GUEST_ACCOUNT" value="0" checked>nein - </tmpl_if></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Gast Benutzername:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="USERNAME_GUEST" value="<tmpl_var USERNAME_GUEST>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Gast Passwort:</td> - <td width="40%" height="25" background="bilder/uebersicht_mitte.gif"><input type="password" name="PASSWORD_GUEST" value="<tmpl_var PASSWORD_GUEST>" size="12"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - </table> - </td> - </tr> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" height="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - </td> - <td valign="top" width="10"></td> - <td valign="top"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Auto Timer:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> - <td height="25" background="bilder/uebersicht_mitte.gif">Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"> <tmpl_if at_func> - <input type="radio" name="AT_FUNC" value="1" checked>an <input type="radio" name="AT_FUNC" value="0">aus - <tmpl_else> - <input type="radio" name="AT_FUNC" value="1">an <input type="radio" name="AT_FUNC" value="0" checked>aus - </tmpl_if></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Timeout für Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="AT_TIMEOUT" value="<tmpl_var AT_TIMEOUT>" size="4"> minuten</td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Lebenszeit für neuen Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="AT_LIFETIME" value="<tmpl_var AT_LIFETIME>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Priorität für neuen Auto Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="AT_PRIORITY" value="<tmpl_var AT_PRIORITY>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <!-- - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Zeitpuffer Anfang:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="textfieldName" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeitpuffer Ende:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="textfieldName" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - // --> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" height="30" background="bilder/uebersicht_oben.gif"><b>Einstellungen für Timer:</b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td colspan="3"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Lebenszeit für neuen Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="TM_LIFETIME" value="<tmpl_var TM_LIFETIME>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Priorität für neuen Timer:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TM_PRIORITY" value="<tmpl_var TM_PRIORITY>" size="2" maxlength="2"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> - <td height="25" background="bilder/uebersicht_mitte.gif">Zeitpuffer Anfang:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="TM_MARGIN_BEGIN" value="<tmpl_var TM_MARGIN_BEGIN>" size="3"> minuten</td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links_dark.gif"></td> - <td height="25" background="bilder/uebersicht_mitte_dark.gif">Zeitpuffer Ende:</td> - <td width="30%" height="25" background="bilder/uebersicht_mitte_dark.gif"><input type="text" name="TM_MARGIN_END" value="<tmpl_var TM_MARGIN_END>" size="3"> minuten</td> - <td width="30" height="25" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - </table></td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="100%" background="bilder/uebersicht_unten.gif"> </td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan="3"> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="black"> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_oben.gif"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td width="40%" height="30" background="bilder/uebersicht_oben.gif"> - <div align="left"> - <b>Selektive Kanalauswahl:</b></div> - </td> - <td bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_oben.gif"> </td> - <td bgcolor="#c6c6c6" width="45%" height="30" background="bilder/uebersicht_oben.gif"> - <div align="center"></div> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_oben.gif"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_links.gif"></td> - <td width="40%" height="30" background="bilder/uebersicht_mitte.gif">in der Programmübersicht:</td> - <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte.gif"> - <tmpl_if CHANNELS_WANTED_PRG> - <input type="radio" name="CHANNELS_WANTED_PRG" value="1" checked>ja <input type="radio" name="CHANNELS_WANTED_PRG" value="0">nein - <tmpl_else> - <input type="radio" name="CHANNELS_WANTED_PRG" value="1">ja <input type="radio" name="CHANNELS_WANTED_PRG" value="0" checked>nein - </tmpl_if> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_links_dark.gif"></td> - <td width="40%" height="30" background="bilder/uebersicht_mitte_dark.gif">in "Was läuft jetzt?":</td> - <td colspan="2" bgcolor="#c6c6c6" height="30" background="bilder/uebersicht_mitte_dark.gif"> - <tmpl_if CHANNELS_WANTED_SUMMARY> - <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="1" checked>ja <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="0">nein - <tmpl_else> - <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="1">ja <input type="radio" name="CHANNELS_WANTED_SUMMARY" value="0" checked>nein - </tmpl_if> - </td> - <td bgcolor="#c6c6c6" width="30" height="30" background="bilder/uebersicht_rechts_dark.gif"></td> - </tr> - <tr> - <td bgcolor="#dfdcdc" width="30" background="bilder/uebersicht_links.gif"></td> - <td width="40%" background="bilder/uebersicht_mitte.gif"> - <div align="center"> - <p><br> - - Alle Sender<br> - <select name="all_channels" size="8" multiple> - <tmpl_loop name="ALL_CHANNELS"> - <option value="<tmpl_var vdr_id>"> - <tmpl_var name> - </option> - </tmpl_loop> - </select></p> - </div> - </td> - <td background="bilder/uebersicht_mitte.gif"> - <div align="center"> - <p><br> - </p> - <p><input type="submit" name="submit" value=">>>>>"></p> - <p><input type="submit" name="submit" value="<<<<<"></p> - <p></p> - </div> - </td> - <td width="45%" background="bilder/uebersicht_mitte.gif"> - <div align="center"> - <p><br> - - Angezeigte Sender<br> - <select name="selected_channels" size="8" multiple> - <tmpl_loop name="SELECTED_CHANNELS"> - <option value="<tmpl_var vdr_id>"> - <tmpl_var name> - </option> - </tmpl_loop> - </select></p> - </div> - </td> - <td bgcolor="#dfdcdc" width="30" background="bilder/uebersicht_rechts.gif"></td> - </tr> - <tr height="30"> - <td bgcolor="#dfdcdc" width="30" height="30" background="bilder/uebersicht_links.gif"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td width="40%" height="30" background="bilder/uebersicht_unten.gif"></td> - <td height="30" background="bilder/uebersicht_unten.gif"></td> - <td width="45%" height="30" background="bilder/uebersicht_unten.gif"></td> - <td bgcolor="#dfdcdc" width="30" height="30" background="bilder/uebersicht_rechts.gif"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table></td> - </tr> - </table> - <br> - <input type="submit" name="save" value="Speichern"><input type="submit" name="apply" value="Anwenden"> <input type="hidden" name="aktion" value="conf_list"> - </form> - </body> - -</html> diff --git a/template/Deutsch/copper/auge.jpg b/template/Deutsch/copper/auge.jpg Binary files differindex d672cb5..d672cb5 100755..100644 --- a/template/Deutsch/copper/auge.jpg +++ b/template/Deutsch/copper/auge.jpg diff --git a/template/Deutsch/copper/fern_back.jpg b/template/Deutsch/copper/fern_back.jpg Binary files differindex a9d0287..a9d0287 100755..100644 --- a/template/Deutsch/copper/fern_back.jpg +++ b/template/Deutsch/copper/fern_back.jpg diff --git a/template/Deutsch/copper/info.jpg b/template/Deutsch/copper/info.jpg Binary files differindex b58efb8..b58efb8 100755..100644 --- a/template/Deutsch/copper/info.jpg +++ b/template/Deutsch/copper/info.jpg diff --git a/template/Deutsch/copper/luecke.gif b/template/Deutsch/copper/luecke.gif Binary files differindex 44bbac7..44bbac7 100755..100644 --- a/template/Deutsch/copper/luecke.gif +++ b/template/Deutsch/copper/luecke.gif diff --git a/template/Deutsch/copper/lupe.jpg b/template/Deutsch/copper/lupe.jpg Binary files differindex 2d84a81..2d84a81 100755..100644 --- a/template/Deutsch/copper/lupe.jpg +++ b/template/Deutsch/copper/lupe.jpg diff --git a/template/Deutsch/copper/rec.jpg b/template/Deutsch/copper/rec.jpg Binary files differindex 140e45b..140e45b 100755..100644 --- a/template/Deutsch/copper/rec.jpg +++ b/template/Deutsch/copper/rec.jpg diff --git a/template/Deutsch/error.html b/template/Deutsch/error.html index 081e956..e08017d 100644 --- a/template/Deutsch/error.html +++ b/template/Deutsch/error.html @@ -1,18 +1,17 @@ <html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <title>Error!</title>
- </head>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Error!</title>
+</head>
- <body bgcolor="#f0f0f0">
- <div align="center">
- <img src="bilder/sauerei.gif" height="230" width="177" border="0"><br>
- <font color="red">
- <tmpl_var name="error">
- </font><br>
- </div>
- <p></p>
- </body>
+<body bgcolor="#f0f0f0">
+ <div align="center">
+ <img src="bilder/sauerei.gif" height="230" width="177" border="0">
+ <br>
+ <font color="red"><tmpl_var name="error"></font>
+ <br>
+ </div>
+</body>
</html>
diff --git a/template/Deutsch/index.html b/template/Deutsch/index.html index 394c273..46ed7bb 100644 --- a/template/Deutsch/index.html +++ b/template/Deutsch/index.html @@ -2,22 +2,21 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title>VDR Admin <tmpl_var version> (<tmpl_var host>)</title> - <link href="bilder/favicon.ico" rel="shortcut icon"> - </head> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>VDR Admin <tmpl_var version> (<tmpl_var host>)</title> + <link href="bilder/favicon.ico" rel="shortcut icon"> +</head> - <frameset border="0" cols="165,*" frameborder="no" framespacing="0"> - <frame name="nav" noresize src="left.html"> - <frame name="main" noresize src="<tmpl_var loginpage>"> - <noframes> +<frameset border="0" cols="165,*" frameborder="no" framespacing="0"> + <frame name="nav" noresize src="left.html"> + <frame name="main" noresize src="<tmpl_var loginpage>"> - <body bgcolor="#ffffff"> - <p></p> - </body> - - </noframes> - </frameset> + <noframes> + <body bgcolor="#ffffff"> + <p>Ihr Browser unterstützt keine Frames!</p> + </body> + </noframes> +</frameset> </html> diff --git a/template/Deutsch/left.html b/template/Deutsch/left.html index 16f9e42..affb26f 100644 --- a/template/Deutsch/left.html +++ b/template/Deutsch/left.html @@ -2,142 +2,85 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> - <link href="navi.css" rel="stylesheet" media="screen"> - <script> - <!-- +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>VDRAdmin</title> + <link href="navi.css" rel="stylesheet" media="screen"> + + <script> + <!-- function rc_open() { //window.open("./vdradmin.pl?aktion=rc_show", "_blank", "width=200, height=640, resizable=no, scrollbars=no, status=no, toolbar=no"); - window.open("./vdradmin.pl?aktion=rc_show", "_blank", "width=201, height=460, resizable=no, scrollbars=no, status=no, toolbar=no"); + window.open("./vdradmin.pl?aktion=rc_show", "_blank", "width=213, height=510, resizable=no, scrollbars=no, status=no, toolbar=no"); } function tv_open() { - window.open("./vdradmin.pl?aktion=tv_show", "_blank", "width=490, height=295, resizable=yes, scrollbars=no, status=no, toolbar=no"); + window.open("./vdradmin.pl?aktion=tv_show", "_blank", "width=615, height=548, resizable=yes, scrollbars=no, status=no, toolbar=no"); } - // --> - </script> - </head> + // --> + </script> +</head> - <body background="bilder/back.gif" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> - <form action="vdradmin.pl" method="get" name="FormName" target="main"> - <table width="150" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td><br> - <a href="./" target="_top"><img src="bilder/linvdr.gif" alt="" height="50" width="150" border="0"></a></td> - </tr> - <tr> - <td> </td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_summary" target="main">Was läuft jetzt?</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_list2" target="main">Was läuft heute?</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_timeline" target="main">Zeitleiste</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_list" target="main">Programmübersicht</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=timer_list" target="main">Timer</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=at_timer_list" target="main">Auto Timer</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=rec_list" target="main">Aufnahmen</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=conf_list" target="main">Konfiguration</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="javascript:rc_open();">Fernbedienung</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr height="25"> - <td height="25"><span class="navi"> <a href="javascript:tv_open();">Fernseher</a></span></td> - </tr> - <tr height="2"> - <td bgcolor="white" height="2" background="bilder/separator.png"></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td> - Suche nach:<br> <b><input type="text" name="search" size="15"></b><input type="hidden" name="aktion" value="prog_summary"><br> - <input type="submit" name="submit" value="go!"></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - <tr> - <td></td> - </tr> - </table> - </form> - </body> +<body background="bilder/back.gif" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> + <form action="vdradmin.pl" method="get" name="FormName" target="main"> + <table width="150" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td> + <br> + <a href="./" target="_top"><img src="bilder/linvdr.gif" alt="" height="50" width="150" border="0"></a> + </td> + </tr> + <tr><td> </td></tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_summary" target="main">Was läuft jetzt?</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_list2" target="main">Was läuft heute?</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_timeline" target="main">Zeitleiste</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=prog_list" target="main">Programmübersicht</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=timer_list" target="main">Timer</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=at_timer_list" target="main">Auto Timer</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=rec_list" target="main">Aufnahmen</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="vdradmin.pl?aktion=conf_list" target="main">Konfiguration</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="javascript:rc_open();">Fernbedienung</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr height="25"> + <td height="25"><span class="navi"> <a href="javascript:tv_open();">Fernseher</a></span></td> + </tr> + <tr height="2"><td bgcolor="white" height="2" background="bilder/separator.png"></td></tr> + <tr><td> </td></tr> + <tr> + <td> + <b><input type="text" name="search" size="15"></b><br> + <input type="submit" name="submit" value="Suchen"> + <input type="hidden" name="aktion" value="prog_summary"> + </td> + </tr> + </table> + </form> +</body> </html> diff --git a/template/Deutsch/library.js b/template/Deutsch/library.js index fdf4a0b..e27dce5 100644 --- a/template/Deutsch/library.js +++ b/template/Deutsch/library.js @@ -2,25 +2,33 @@ // this is part of VDR Admin // function open_help(url) { - window.open(url, "_blank", "width=500, height=460, resizable=yes, scrollbars=yes, status=no, toolbar=no"); + window.open(url, "_blank", "width=500, height=460, resizable=yes, scrollbars=yes, status=no, toolbar=no"); } + function del(suffix) { - check=confirm("Timer löschen?"); - if(check) window.location.href=suffix; + check=confirm("Timer löschen?"); + if(check) window.location.href=suffix; } + function change(suffix) { - check=confirm("Timerstatus ändern?"); - if(check) window.location.href=suffix; + check=confirm("Timerstatus ändern?"); + if(check) window.location.href=suffix; } + function mdel() { - check=confirm("Ausgewählte Timer wirklich löschen?"); + check=confirm("Ausgewählte Timer wirklich löschen?"); if(check) document.FormName.submit(); } + function callurl( url ) { image = new Image(); - image.src = url; + image.src = url; } + function popup(URL) { - window.open(URL, '_new', 'width=450, height=250, scrollbars=auto, resizable=yes'); + window.open(URL, '_new', 'width=450, height=250, scrollbars=auto, resizable=yes'); } +function toolbar(URL) { + window.open(URL, '_new', 'width=200, height=50'); +} diff --git a/template/Deutsch/noauth.html b/template/Deutsch/noauth.html index 10eff18..769aed4 100644 --- a/template/Deutsch/noauth.html +++ b/template/Deutsch/noauth.html @@ -1,13 +1,12 @@ <html> - <head> - <title>Authorization Required</title> - </head> - - <body> - <h1>Authorization Required</h2> +<head> + <title>Authorization Required</title> +</head> - <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.<p> +<body> + <h1>Authorization Required</h2> - </body> -</html> + <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.<p> +</body> +</html> diff --git a/template/Deutsch/noperm.html b/template/Deutsch/noperm.html index a0e4e49..8f99768 100644 --- a/template/Deutsch/noperm.html +++ b/template/Deutsch/noperm.html @@ -1,12 +1,11 @@ <html> - <head> - <title><tmpl_var title></title> - </head> - - <body> - <h1><tmpl_var h1></h1> +<head> + <title><tmpl_var title></title> +</head> - <p><tmpl_var error><p><hr> - </body> -</html> +<body> + <h1><tmpl_var h1></h1> + <p><tmpl_var error><p><hr> +</body> +</html> diff --git a/template/Deutsch/prog_detail.html b/template/Deutsch/prog_detail.html index a097629..7dc285b 100644 --- a/template/Deutsch/prog_detail.html +++ b/template/Deutsch/prog_detail.html @@ -2,39 +2,45 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title><tmpl_var title></title> - <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> - <link href="style.css" rel="stylesheet" media="screen"> - </head> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title><tmpl_var title></title> + <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> + <link href="style.css" rel="stylesheet" media="screen"> +</head> - <body bgcolor="#c4cdd7"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> - <td height="30" valign="middle" background="bilder/uebersicht_oben.gif"><b><tmpl_var channel_name><tmpl_if date> | <tmpl_var date> <tmpl_var start> - <tmpl_var stop></tmpl_if></b></td> - <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - <tr> - <td width="30" background="bilder/uebersicht_links.gif"> </td> - <td bgcolor="#c4cdd7" background="bilder/uebersicht_mitte.gif"><b><tmpl_var title></b><br><tmpl_if subtitle><b><nobr><tmpl_var subtitle></nobr></b> <br></tmpl_if> - <tmpl_var text> <br> +<body bgcolor="#c4cdd7"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30"><img src="bilder/uebersicht_oben_links.gif" alt="" width="30" height="30" border="0"></td> + <td height="30" valign="middle" background="bilder/uebersicht_oben.gif"> + <b><tmpl_var channel_name><tmpl_if date> | <tmpl_var date> <tmpl_var start> - <tmpl_var stop></tmpl_if></b> + </td> + <td width="30" height="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + <tr> + <td width="30" background="bilder/uebersicht_links.gif"> </td> + <td bgcolor="#c4cdd7" background="bilder/uebersicht_mitte.gif"> + <b><tmpl_var title></b><br> + <tmpl_if subtitle> + <i><nobr><tmpl_var subtitle></nobr></i><br><br> + </tmpl_if> + <tmpl_var text><br><br> <a href="javascript:window.close()">[schließen]</a> <tmpl_if date> - <a href="javascript:callurl('<tmpl_var switchurl>')">[umschalten]</a> - <a href="javascript:window.close();opener.location.href='<tmpl_var recurl>'">[aufnehmen]</a> - <a href="vdradmin.pl?search=<tmpl_var title>&aktion=prog_summary&submit=go11)" target="main">[wiederholungen]</a> + <a href="javascript:callurl('<tmpl_var switchurl>')">[umschalten]</a> + <a href="javascript:window.close();opener.location.href='<tmpl_var recurl>'">[aufnehmen]</a> + <a href="vdradmin.pl?search=<tmpl_var title>&aktion=prog_summary&submit=go11)" target="main">[wiederholungen]</a> </tmpl_if> - </td> - <td width="30" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tr> - <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td background="bilder/uebersicht_unten.gif"></td> - <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> - </tr> - </table> - </body> + </td> + <td width="30" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tr> + <td width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> + <td background="bilder/uebersicht_unten.gif"></td> + <td width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> + </tr> + </table> +</body> </html> diff --git a/template/Deutsch/prog_list.html b/template/Deutsch/prog_list.html index 35f6681..ab7a122 100644 --- a/template/Deutsch/prog_list.html +++ b/template/Deutsch/prog_list.html @@ -2,94 +2,97 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script language="JavaScript" src="library.js"></script> - </head> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>Programmübersicht</title> + <link href="style.css" rel="stylesheet" media="screen"> + <script language="JavaScript" src="library.js"></script> +</head> - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <form action="<tmpl_var url>" method="get" name="FormName"> +<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> + <form action="<tmpl_var url>" method="get" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> <tr> <td valign="left" width="200" background="bilder/nav_button_back.gif"> <p class="einzug_ohnetop"> - <a href="javascript:callurl('<tmpl_var switchurl>');"><b><tmpl_var progname></b></a> + <a href="javascript:callurl('<tmpl_var switchurl>');"><b><tmpl_var progname></b></a> <a href="<tmpl_var streamurl>"><img src="bilder/stream.jpg" alt="" height="17" align="center" border="0"></a> </p> </td> <td align="right" background="bilder/nav_button_back_mitte.gif">Programmauswahl: - <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=prog_list&vdr_id=' + this.options[this.selectedIndex].value,'main')"> - <tmpl_loop chanloop> - <tmpl_if current> - <option value="<tmpl_var vdr_id>" selected><tmpl_var name></option> - <tmpl_else> - <option value="<tmpl_var vdr_id>"><tmpl_var name></option> - </tmpl_if> - </tmpl_loop> - </select> <input type="submit" name="submit" value="Go!"> - <a href="javascript:toolbar('<tmpl_var toolbarurl>');" target="toolbar"><img src="bilder/spacer.gif" border="0"></a> + <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=prog_list&vdr_id=' + this.options[this.selectedIndex].value,'main')"> +<tmpl_loop chanloop> + <option value="<tmpl_var vdr_id>" <tmpl_if current>selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> + <input type="submit" name="submit" value="Go!"> + <a href="javascript:toolbar('<tmpl_var toolbarurl>');" target="toolbar"><img src="bilder/spacer.gif" border="0"></a> </td> <td width="15" background="bilder/nav_button_back_end.gif"> </td> </tr> </table> <input type="hidden" name="aktion" value="prog_list"> - </form> - <tmpl_loop loop> - <tmpl_if newd> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td valign="top" width="30"> - <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> - </td> - <td colspan="3" background="bilder/uebersicht_oben.gif"> - <p><b><tmpl_var title></b></p> - </td> - <td align="right" background="bilder/uebersicht_oben.gif"><tmpl_if prev_channel><a href="<tmpl_var prev_channel>"><img src="bilder/pfeile_nachlinks.gif" border="0"></a><tmpl_else><img src="bilder/pfeile_nachlinks_soft.gif" border="0"></tmpl_if><tmpl_if next_channel><a href="<tmpl_var next_channel>"><img src="bilder/pfeile_nachrechts.gif" border="0"></a><tmpl_else><img src="bilder/pfeile_nachrechts_soft.gif" border="0"></tmpl_if></td> - <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tmpl_else> - <tmpl_unless endd> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"><a name="<tmpl_var anchor>"></a> </td> - <td valign="top" width="170" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var emit> - <tmpl_var duration> Uhr</p> - </td> - <td valign="top" width="652" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><b><tmpl_var title></b><br><tmpl_unless subtitle><br></tmpl_unless><tmpl_var subtitle> </p> - </td> - <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_if infurl><a href="javascript:popup('<tmpl_var infurl>');"><img src="bilder/info_button.gif" border="0"></a><tmpl_else><img src="bilder/info_button_disabled.gif" border="0"></tmpl_if></p> - </td> - <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><b><a class="rec" href="<tmpl_var recurl>"><img src="bilder/rec_button.gif" border="0"></a></b></p> - </td> - <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> - </tr> - </tmpl_unless> - </tmpl_if> - <tmpl_if endd> - <tr> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - </table> - <br> - </tmpl_if> - </tmpl_loop> - </body> + </form> + +<tmpl_loop loop> + <tmpl_if newd> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td valign="top" width="30"> + <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> + </td> + <td colspan="3" background="bilder/uebersicht_oben.gif"> + <p><b><tmpl_var title></b></p> + </td> + <td align="right" background="bilder/uebersicht_oben.gif"> + <tmpl_if prev_channel><a href="<tmpl_var prev_channel>"><img src="bilder/pfeile_nachlinks.gif" border="0"></a><tmpl_else><img src="bilder/pfeile_nachlinks_soft.gif" border="0"></tmpl_if><tmpl_if next_channel><a href="<tmpl_var next_channel>"><img src="bilder/pfeile_nachrechts.gif" border="0"></a><tmpl_else><img src="bilder/pfeile_nachrechts_soft.gif" border="0"></tmpl_if> + </td> + <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + <tr height="10"> + <td valign="top" width="30" height="10" background="bilder/uebersicht_links.gif"></td> + <td colspan="4" height="10" background="bilder/uebersicht_mitte.gif"></td> + <td valign="top" width="30" height="10" background="bilder/uebersicht_rechts.gif"></td> + </tr> + <tmpl_else> + <tmpl_unless endd> + <tr> + <td valign="top" width="30" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"><a name="<tmpl_var anchor>"></a> </td> + <td valign="top" width="170" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"><tmpl_var emit> - <tmpl_var duration> Uhr</p> + </td> + <td valign="top" width="652" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"> + <b><tmpl_var title></b><br> + <i><tmpl_var subtitle></i><br> + </p> + </td> + <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if infurl> + <a href="javascript:popup('<tmpl_var infurl>');"><img src="bilder/info_button.gif" border="0"></a> + <tmpl_else> + <img src="bilder/info_button_disabled.gif" border="0"> + </tmpl_if> + </p> + </td> + <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"><a class="rec" href="<tmpl_var recurl>"><img src="bilder/rec_button.gif" border="0"></a></p> + </td> + <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> + </tr> + </tmpl_unless> + </tmpl_if> + <tmpl_if endd> + <tr> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> + <td colspan="4" background="bilder/uebersicht_unten.gif"></td> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + </table> + <br> + </tmpl_if> +</tmpl_loop> +</body> </html> diff --git a/template/Deutsch/prog_list2.html b/template/Deutsch/prog_list2.html index d22ae10..8480271 100644 --- a/template/Deutsch/prog_list2.html +++ b/template/Deutsch/prog_list2.html @@ -2,12 +2,12 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script language="JavaScript"> - <!-- +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title></title> + <link href="style.css" rel="stylesheet" media="screen"> + <script language="JavaScript"> + <!-- function popup(URL) { window.open(URL, '_new', 'width=440, height=250'); } @@ -21,88 +21,85 @@ image.src = url; document.switchimage.src = image.src; } - // --> - </script> - </head> + // --> + </script> +</head> - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <form action="<tmpl_var url>" method="get" name="FormName"> +<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> + <form action="<tmpl_var url>" method="get" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> <tr> <td valign="middle" width="200" background="bilder/nav_button_back.gif"> <p class="einzug_ohnetop"></b></a></p> </td> <td align="right" background="bilder/nav_button_back_mitte.gif">Programmauswahl: - <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=prog_list&vdr_id=' + this.options[this.selectedIndex].value,'main')"> - <tmpl_loop chanloop> - <tmpl_if current> - <option value="<tmpl_var vdr_id>" selected><tmpl_var name></option> - <tmpl_else> - <option value="<tmpl_var vdr_id>"><tmpl_var name></option> - </tmpl_if> - </tmpl_loop> - </select> <input type="submit" name="submit" value="Go!"> - <a href="javascript:toolbar('<tmpl_var toolbarurl>');" target="toolbar"><img src="bilder/spacer.gif" border="0"></a> + <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=prog_list&vdr_id=' + this.options[this.selectedIndex].value,'main')"> +<tmpl_loop chanloop> + <option value="<tmpl_var vdr_id>" <tmpl_if current>selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> <input type="submit" name="submit" value="Go!"> + <a href="javascript:toolbar('<tmpl_var toolbarurl>');" target="toolbar"><img src="bilder/spacer.gif" border="0"></a> </td> <td width="15" background="bilder/nav_button_back_end.gif"> </td> </tr> </table> <input type="hidden" name="aktion" value="prog_list"> - </form> - <tmpl_loop loop> - <tmpl_if newd> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td valign="top" width="30"> - <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> - </td> - <td colspan="3" background="bilder/uebersicht_oben.gif"> - <p><b><tmpl_var title></b></p> - </td> - <td align="right" background="bilder/uebersicht_oben.gif"></td> - <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tmpl_else> - <tmpl_unless endd> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"><a name="<tmpl_var anchor>"></a> </td> - <td valign="top" width="170" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var emit> - <tmpl_var duration> Uhr</p> - </td> - <td valign="top" width="652" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><b><tmpl_var title></b><br><tmpl_unless subtitle><br></tmpl_unless><tmpl_var subtitle> </p> - </td> - <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_if infurl><a href="javascript:popup('<tmpl_var infurl>');"><img src="bilder/info_button.gif" border="0"></a><tmpl_else><img src="bilder/info_button_disabled.gif" border="0"></tmpl_if></p> - </td> - <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><b><a class="rec" href="<tmpl_var recurl>"><img src="bilder/rec_button.gif" border="0"></a></b></p> - </td> - <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> - </tr> - </tmpl_unless> - </tmpl_if> - <tmpl_if endd> - <tr> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - </table> - <br> - </tmpl_if> - </tmpl_loop> - </body> + </form> + +<tmpl_loop loop> + <tmpl_if newd> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td valign="top" width="30"> + <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> + </td> + <td colspan="3" background="bilder/uebersicht_oben.gif"> + <p><b><tmpl_var title></b></p> + </td> + <td align="right" background="bilder/uebersicht_oben.gif"></td> + <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + <tr> + <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tmpl_else> + <tmpl_unless endd> + <tr> + <td valign="top" width="30" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"><a name="<tmpl_var anchor>"></a> </td> + <td valign="top" width="170" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"><tmpl_var emit> - <tmpl_var duration> Uhr</p> + </td> + <td valign="top" width="652" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"><b><tmpl_var title></b><br><tmpl_unless subtitle><br></tmpl_unless><tmpl_var subtitle> </p> + </td> + <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"><tmpl_if infurl><a href="javascript:popup('<tmpl_var infurl>');"><img src="bilder/info_button.gif" border="0"></a><tmpl_else><img src="bilder/info_button_disabled.gif" border="0"></tmpl_if></p> + </td> + <td align="right" valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"><b><a class="rec" href="<tmpl_var recurl>"><img src="bilder/rec_button.gif" border="0"></a></b></p> + </td> + <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> + </tr> + </tmpl_unless> + </tmpl_if> + <tmpl_if endd> + <tr> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + </table> + <br> + </tmpl_if> +</tmpl_loop> +</body> </html> diff --git a/template/Deutsch/prog_summary.html b/template/Deutsch/prog_summary.html index 60405b6..d7ef72d 100644 --- a/template/Deutsch/prog_summary.html +++ b/template/Deutsch/prog_summary.html @@ -2,16 +2,16 @@ <html> - <head> - <meta http-equiv="refresh" content="600; URL=vdradmin.pl?aktion=prog_summary"> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title>VDRAdmin - Was läuft jetzt?</title> - <link href="style.css" rel="stylesheet" media="screen"> - <script language="JavaScript" src="library.js"></script> - </head> +<head> + <meta http-equiv="refresh" content="600; URL=vdradmin.pl?aktion=prog_summary"> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>VDRAdmin - Was läuft jetzt?</title> + <link href="style.css" rel="stylesheet" media="screen"> + <script language="JavaScript" src="library.js"></script> +</head> - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <form action="<tmpl_var url>" method="get" name="FormName"> +<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> + <form action="<tmpl_var url>" method="get" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> <tr> <td valign="middle" width="100" background="bilder/nav_button_back.gif"> @@ -19,100 +19,87 @@ </td> <td align="right" background="bilder/nav_button_back_mitte.gif">Was läuft: <a href="<tmpl_var nowurl>">jetzt</a> | um: </td> <td align="right" width="50" background="bilder/nav_button_back_mitte.gif"> - <input type="text" name="time" size="5" value="<tmpl_var now>"> - <input type="hidden" name="aktion" value="prog_summary"> + <input type="text" name="time" size="5" value="<tmpl_var now>"> + <input type="hidden" name="aktion" value="prog_summary"> </td> <td width="15" background="bilder/nav_button_back_end.gif"> </td> </tr> </table> <br> - <table width="816" border="0" cellspacing="0" cellpadding="0"> - <tmpl_loop rows> + + <table border="0" cellspacing="0" cellpadding="0"> +<tmpl_loop rows> <tr> - <tmpl_loop day> - <tmpl_if longdate> + <tmpl_loop day> + <tmpl_if longdate> <td valign="top" width="272" background="bilder/top.gif"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td width="60%"> - <a name="<tmpl_var anchor>"></a> - <p class="einzug"> - <a href="<tmpl_var proglink>"><b><tmpl_var progname></b></a></p> - </td> - <td align="right"><p class="einzug"><tmpl_if start><tmpl_var start>-<tmpl_var stop></tmpl_if></p></td> - </tr> - </table> - <div class="einzug_ohnetop"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr valign="middle"> + <td width="60%"> + <a name="<tmpl_var anchor>"> + <p class="einzug"> + <a href="<tmpl_var proglink>"><b><tmpl_var progname></b></a> + <a href="<tmpl_var streamurl>" title='Stream ...'>[S]</a> + </p></a> + </td> + <td align="right"> + <p class="einzug"> + <tmpl_if start><tmpl_var start>-<tmpl_var stop></tmpl_if> + </p> + </td> + </tr> + </table> + + <div class="einzug_ohnetop"> <tmpl_var longdate><br> <b><tmpl_var title></b><br> - <b><tmpl_var subtitle></b><br> - <tmpl_if summary><tmpl_var summary> <a href="javascript:popup('<tmpl_var infurl>');">mehr</a></tmpl_if> + <tmpl_if subtitle> + <i><tmpl_var subtitle></i><br> + </tmpl_if> <br> + <tmpl_if summary><tmpl_var summary> <a href="javascript:popup('<tmpl_var infurl>');">mehr</a></tmpl_if> <br> - </div> - </td> - <tmpl_else> - <td valign="top" width="272"> + <br> + </div> </td> - </tmpl_if> - </tmpl_loop> + <tmpl_else> + <td valign="top" width="272"></td> + </tmpl_if> + </tmpl_loop> </tr> <tr> - <tmpl_loop status> - <tmpl_if recurl> - <!--td valign="top" width="272"> - <a href="javascript:switch_channel('<tmpl_var switchurl>');"><img src="bilder/tv_umschalten_mitback2.jpg" alt="" height="38" width="91" border="0"></a> - <a href="<tmpl_var streamurl>"><img src="bilder/stream_mitback2.jpg" alt="" height="38" width="90" border="0"></a> - <a href="<tmpl_var recurl>"><img src="bilder/rec_mitback2.jpg" alt="" height="38" width="91" border="0"></a> - </td--> - <td valign="top" width="272"> - <TABLE WIDTH=272 BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR> - - <TD> - <a href="javascript:callurl('<tmpl_var switchurl>');"> - <img src="bilder/auge.jpg" width="71" height="38" border="0" alt="TV - umschalten" - onmouseover="window.status='TV - umschalten';return true" ></a> - </TD> - - - <TD> - <!-- Sendungs Titel und Subtitel --> - <a href="vdradmin.pl?search=<tmpl_var title>&aktion=prog_summary&submit=go11)"> - <img src="bilder/lupe.jpg" width="63" height="38" border="0" alt="Nach wiederholungen suchen" - onmouseover="window.status='Nach wiederholungen suchen';return true" ></a> - </TD> - - - <tmpl_if summary> - <TD> - <a href="javascript:popup('<tmpl_var infurl>');"> - <img src="bilder/info.jpg" width="64" height="38" border="0" alt="mehr Infos" - onmouseover="window.status='mehr Infos';return true" ></a> - <tmpl_else> - <TD> - <img src="bilder/luecke.gif" width="64" height="38" border="0" - </tmpl_if> - </TD> - - - <TD> - <a href="<tmpl_var recurl>"> - <img src="bilder/rec.jpg" width="74" height="38" border="0" alt="Sendung aufnehmen" - onmouseover="window.status='Sendung aufnehmen';return true" ></a> - </TD> - - </TR> - </TABLE> - </td> - <tmpl_else> + <tmpl_loop status> + <tmpl_if recurl> <td valign="top" width="272"> + <table width="272" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <a href="javascript:callurl('<tmpl_var switchurl>');"><img src="bilder/auge.jpg" width="71" height="38" border="0" alt="TV - umschalten" onmouseover="window.status='TV - umschalten';return true"></a> + </td> + <td> + <!-- Sendungs Titel und Subtitel --> + <a href="vdradmin.pl?search=<tmpl_var title>&aktion=prog_summary&submit=go11)"><img src="bilder/lupe.jpg" width="63" height="38" border="0" alt="Nach wiederholungen suchen" onmouseover="window.status='Nach wiederholungen suchen';return true"></a> + </td> + <td> + <tmpl_if summary> + <a href="javascript:popup('<tmpl_var infurl>');"><img src="bilder/info.jpg" width="64" height="38" border="0" alt="mehr Infos" onmouseover="window.status='mehr Infos';return true" ></a> + <tmpl_else> + <img src="bilder/info_disabled.jpg" width="64" height="38" border="0"> + </tmpl_if> + </td> + <td> + <a href="<tmpl_var recurl>"><img src="bilder/rec.jpg" width="74" height="38" border="0" alt="Sendung aufnehmen" onmouseover="window.status='Sendung aufnehmen';return true" ></a> + </td> + </tr> + </table> </td> - </tmpl_if> - </tmpl_loop> + <tmpl_else> + <td valign="top" width="272"></td> + </tmpl_if> + </tmpl_loop> </tr> - </tmpl_loop> +</tmpl_loop> </table> - </form> - </body> + </form> +</body> </html> diff --git a/template/Deutsch/prog_timeline.html b/template/Deutsch/prog_timeline.html index 836c992..77dbb15 100755..100644 --- a/template/Deutsch/prog_timeline.html +++ b/template/Deutsch/prog_timeline.html @@ -1,10 +1,11 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> - <head> - <meta http-equiv="refresh" content="600; URL=vdradmin.pl?aktion=prog_timeline"> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title>VDRAdmin - Was läuft jetzt?</title> +<head> + <meta http-equiv="refresh" content="600; URL=vdradmin.pl?aktion=prog_timeline"> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>VDRAdmin - Was läuft jetzt?</title> + <?%- breite = 600; seite = 100; @@ -20,9 +21,9 @@ diff_minute = jetzt_minute - akt_minute; IF date.format(date.now, '%H:%M') == date.format(now_sec, '%H:%M'); - akt_sekunde = now_sec - (diff_minute * 60); + akt_sekunde = now_sec - (diff_minute * 60); ELSE; - akt_sekunde = now_sec; + akt_sekunde = now_sec; END; bis = 60 * zeitrahmen; @@ -34,17 +35,21 @@ z = 0; einheit = ((breite / bis) + 0.5) | format('%i'); -%?> - <link href="style.css" rel="stylesheet" media="screen"> - <style type="text/css"> - #prgtable { border-left-width:1px;border-left-color:#c4cdd7;border-left-style:solid; border-bottom-width:1px;border-bottom-color:#c4cdd7;border-bottom-style:solid; padding:2px;} - #timertable { background:red; border-left-width:1px;border-left-color:#ffcdd7;border-left-style:solid; border-bottom-width:1px;border-bottom-color:#ffcdd7;border-bottom-style:solid; padding:2px;} - <?% IF jetzt_stunde >= akt_stunde && jetzt_stunde < akt_stunde + zeitrahmen %?> - #zeitleiste { position:absolute; filter:Alpha(opacity=50); top:150px; left:<?% left + seite + (einheit * diff_minute) + 30 %?>px; width:1px; height:<?% shows.keys.size * 21 + 2 %?>px; z-index:10; background:red; z-index:2; } - <?% END %?> + + <link href="style.css" rel="stylesheet" media="screen"> + <style type="text/css"> + #prgtable { border-left-width:1px; border-left-color:#c4cdd7; border-left-style:solid; border-bottom-width:1px; border-bottom-color:#c4cdd7; border-bottom-style:solid; padding:2px; } + #timertable { background:red; border-left-width:1px; border-left-color:#ffcdd7; border-left-style:solid; border-bottom-width:1px; border-bottom-color:#ffcdd7; border-bottom-style:solid; padding:2px; } + +<?% IF jetzt_stunde >= akt_stunde && jetzt_stunde < akt_stunde + zeitrahmen %?> + #zeitleiste { position:absolute; filter:Alpha(opacity=50); top:150px; left:<?% left + seite + (einheit * diff_minute) + 30 %?>px; width:1px; height:<?% shows.keys.size * 21 + 2 %?>px; z-index:10; background:red; z-index:2; } +<?% END %?> + #bigtable { position:absolute; top:100px; left: <?% left %?>px; z-index: 1; } - </style> - <script language="JavaScript" src="library.js"></script> - <script language="JavaScript"> + </style> + + <script language="JavaScript" src="library.js"></script> + <script language="JavaScript"> function Go(x) { if(x =="nothing") { document.forms[0].reset(); @@ -55,175 +60,204 @@ document.forms[0].elements[0].blur(); } } - </script> - </head> + </script> +</head> <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> <form action="<?% nowurl %?>" method="get" name="FormName"> - <table width="<?% breite + seite + 80 %?>" border="0" cellspacing="0" cellpadding="0" height="39" style='position:absolute; left:<?% left %?>; top: 20px'> - <tr> - <td valign="middle" background="bilder/nav_button_back.gif"> - <nobr><p class="einzug_ohnetop"><b><?% now %?></b></p> - </td> - <td align="right" background="bilder/nav_button_back_mitte.gif">Was läuft: - <select size=1 name="Auswahl" onChange="Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)" style="width:100px"; width="100"> - <option value="<?% nowurl %?>">jetzt</option> - <?% FOREACH timer = times %?> - <?% timer_o_dopp = timer | replace('\:', '') %?> - <option value="<?% nowurl %?>&time=<?% timer_o_dopp %?>" <?% "selected" IF now == timer %?>><?% timer %?></option> - <?% END %?> - </select> - | um: - </td> - <td align="right" width="50" background="bilder/nav_button_back_mitte.gif"> - <input type="text" name="time" size="5" value="<?% now %?>"> - <input type="hidden" name="aktion" value="prog_timeline"> - </td> - <td width="15" background="bilder/nav_button_back_end.gif"> </td> - </tr> - </table> - <br> -<!-- Vertikal ansicht TOP --> -<span id="zeitleiste" class="zeitleiste"><img src="bilder/spacer.gif" width="1" height=1 border=0></span> - -<!-- Zeitleiste --> -<table width="<?% breite + seite + 40 %?>" border="0" cellspacing="0" cellpadding="0" name="bigtable" id="bigtable"> - <tr> - <td valign="top" width="30"> - <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> - </td> - <td colspan="3" width='<?% breite + seite %?>' background="bilder/uebersicht_oben.gif"><b>Timeline: <?% date.format(akt_sekunde, '%H:%M') %?> bis <?% date.format(bis_sec, '%H:%M') %?></b></td> - <td align="right" background="bilder/uebersicht_oben.gif"><nobr><?% IF akt_stunde <= jetzt_stunde %?><img src="bilder/pfeile_nachlinks_soft.gif" border="0"><?% ELSE %?><a href="<?% nowurl %?>&time=<?% akt_stunde - zeitrahmen | format('%02d') %?><?% akt_minute | format('%02d') %?>"><img src="bilder/pfeile_nachlinks.gif" border="0"></a><?% END %?><a href="<?% nowurl %?>&time=<?% bis_stunde | format('%02d') %?><?% akt_minute | format('%02d') %?>"><img src="bilder/pfeile_nachrechts.gif" border="0"></a></td> - <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td background="bilder/uebersicht_mitte.gif"> </td> - <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> - <td colspan="4"> -<table border=0 cellpadding=0 cellspacing=0 width="1"> - <tr> - <td bgcolor="#e6eff9"><img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0><br></td> - <?% WHILE minute < bis %?> - <td colspan="6" bgcolor='<?% minute % 60 ? "#e6eff9" : "#d5dee8" %?>'> - <img src="bilder/spacer.gif" width="<?% einheit * 30 %?>" height=1 border=0><br> - <?% zeit = akt_sekunde + (minute * 60) %?> - <b><?% date.format(zeit, '%H:%M') %?></b> - </td> - <?% minute = minute + 30 %?> - <?% END %?> - </tr> - <?% minute = 0 %?> - <tr> - <td bgcolor="#e6eff9"><img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0><br></td> - <?% WHILE minute < bis %?> - <td width='1%' align=left valign=bottom bgcolor='<?% minute % 10 ? "#e6eff9" : "#d5dee8" %?>'> - <?% IF minute % 15 %?> - <img src="bilder/pixel.gif" width="1" height=5 border=0> - <?% ELSE %?> - <img src="bilder/pixel.gif" width="1" height=10 border=0> - <?% END %?> - </td> - <?% minute = minute + 5 %?> + <table width="<?% breite + seite + 80 %?>" border="0" cellspacing="0" cellpadding="0" height="39" style='position:absolute; left:<?% left %?>; top: 20px'> + <tr> + <td valign="middle" background="bilder/nav_button_back.gif"> + <nobr><p class="einzug_ohnetop"><b><?% now %?></b></p></nobr> + </td> + <td align="right" background="bilder/nav_button_back_mitte.gif"> + Was läuft: + <select size=1 name="Auswahl" onChange="Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)" style="width:100px"; width="100"> + <option value="<?% nowurl %?>">jetzt</option> +<?% FOREACH timer = times %?> + <?% timer_o_dopp = timer | replace('\:', '') %?> + <option value="<?% nowurl %?>&time=<?% timer_o_dopp %?>" <?% "selected" IF now == timer %?>><?% timer %?></option> +<?% END %?> + </select> + | um: + </td> + <td align="right" width="50" background="bilder/nav_button_back_mitte.gif"> + <input type="text" name="time" size="5" value="<?% now %?>"> + <input type="hidden" name="aktion" value="prog_timeline"> + </td> + <td width="15" background="bilder/nav_button_back_end.gif"> </td> + </tr> + </table> + <br> + + <!-- Vertikal ansicht TOP --> + <span id="zeitleiste" class="zeitleiste"><img src="bilder/spacer.gif" width="1" height=1 border=0></span> + + <!-- Zeitleiste --> + <table width="<?% breite + seite + 40 %?>" border="0" cellspacing="0" cellpadding="0" name="bigtable" id="bigtable"> + <tr> + <td valign="top" width="30"> + <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> + </td> + <td colspan="3" width='<?% breite + seite %?>' background="bilder/uebersicht_oben.gif"> + <b>Timeline: <?% date.format(akt_sekunde, '%H:%M') %?> bis <?% date.format(bis_sec, '%H:%M') %?></b> + </td> + <td align="right" background="bilder/uebersicht_oben.gif"> + <nobr> +<?% IF akt_stunde <= jetzt_stunde %?> + <img src="bilder/pfeile_nachlinks_soft.gif" border="0"> +<?% ELSE %?> + <a href="<?% nowurl %?>&time=<?% akt_stunde - zeitrahmen | format('%02d') %?><?% akt_minute | format('%02d') %?>"><img src="bilder/pfeile_nachlinks.gif" border="0"></a> +<?% END %?> + <a href="<?% nowurl %?>&time=<?% bis_stunde | format('%02d') %?><?% akt_minute | format('%02d') %?>"><img src="bilder/pfeile_nachrechts.gif" border="0"></a> + </nobr> + </td> + <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + <tr> + <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td background="bilder/uebersicht_mitte.gif"> </td> + <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tr> + <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> + <td colspan="4"> + <table border=0 cellpadding=0 cellspacing=0 width="1"> + <tr> + <td bgcolor="#e6eff9"><img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0><br></td> +<?% WHILE minute < bis %?> + <td colspan="6" bgcolor='<?% minute % 60 ? "#e6eff9" : "#d5dee8" %?>'> + <img src="bilder/spacer.gif" width="<?% einheit * 30 %?>" height=1 border=0> + <br> + <?% zeit = akt_sekunde + (minute * 60) %?> + <b><?% date.format(zeit, '%H:%M') %?></b> + </td> + <?% minute = minute + 30 %?> +<?% END %?> + </tr> +<?% minute = 0 %?> + <tr> + <td bgcolor="#e6eff9"> + <img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0> + <br> + </td> +<?% WHILE minute < bis %?> + <td width='1%' align=left valign=bottom bgcolor='<?% minute % 10 ? "#e6eff9" : "#d5dee8" %?>'> + <?% IF minute % 15 %?> + <img src="bilder/pixel.gif" width="1" height=5 border=0> + <?% ELSE %?> + <img src="bilder/pixel.gif" width="1" height=10 border=0> <?% END %?> - </tr> -</table> -<table border=0 cellpadding=0 cellspacing=0 width="1"> + </td> + <?% minute = minute + 5 %?> +<?% END %?> + </tr> + </table> + <table border=0 cellpadding=0 cellspacing=0 width="1"> + <!-- Sendernamen --> - <?% b = 0; +<?% b = 0; FOREACH name = shows.keys.nsort; old_stop_minute = -1; chars = seite / 10 | format('%i'); b = b + 1 %?> - <tr> - <td valign='top' bgcolor='<?% b % 2 ? "#d5dee8" : "#e6eff9" %?>'> - <img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0><br> - <a href="<?% shows.${name}.first.proglink %?>"><b><?% shows.${name}.first.progname | truncate(chars) %?></b></a> - </td> -<!-- Programm --> - <td colspan="<?% (bis / 5) %?>" bgcolor='<?% b % 2 ? "#d5dee8" : "#e6eff9" %?>'><?% - z = 0; - FOREACH show = shows.${name}; - start_stunde = date.format(show.start, '%H') - akt_stunde; -# start_stunde = (start_stunde < 0 ? 0 : start_stunde); - start_minute = date.format(show.start, '%M') - akt_minute; - start_minute = (start_stunde * 60 ) + start_minute; - - show.stop = show.stop - 60; - stop_stunde = date.format(show.stop, '%H') - akt_stunde; - stop_stunde = (stop_stunde < 0 ? 0 : stop_stunde); - stop_minute = date.format(show.stop, '%M') - akt_minute; - stop_minute = (stop_stunde * 60 )+ stop_minute; - - IF start_minute < akt_minute; start_minute = 0; END; - IF stop_minute > bis_minute; stop_minute = bis_minute; END; - - laenge = stop_minute - start_minute; - laenge_pix = laenge * einheit; - laenge_chars = ((laenge_pix / 10) + 0.5) | format('%i'); - NEXT IF start_minute >= bis_minute; - IF start_minute >= old_stop_minute; - start_minute = start_minute + 1 IF start_minute == old_stop_minute; - %?> + <tr> + <td valign='top' bgcolor='<?% b % 2 ? "#d5dee8" : "#e6eff9" %?>'> + <img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0> + <br> + <a href="<?% shows.${name}.first.proglink %?>"><b><?% shows.${name}.first.progname | truncate(chars) %?></b></a> + </td> + <!-- Programm --> + <td colspan="<?% (bis / 5) %?>" bgcolor='<?% b % 2 ? "#d5dee8" : "#e6eff9" %?>'> + <?% + z = 0; + FOREACH show = shows.${name}; + start_stunde = date.format(show.start, '%H') - akt_stunde; +# start_stunde = (start_stunde < 0 ? 0 : start_stunde); + start_minute = date.format(show.start, '%M') - akt_minute; + start_minute = (start_stunde * 60 ) + start_minute; + + show.stop = show.stop - 60; + stop_stunde = date.format(show.stop, '%H') - akt_stunde; + stop_stunde = (stop_stunde < 0 ? 0 : stop_stunde); + stop_minute = date.format(show.stop, '%M') - akt_minute; + stop_minute = (stop_stunde * 60 )+ stop_minute; + + IF start_minute < akt_minute; start_minute = 0; END; + IF stop_minute > bis_minute; stop_minute = bis_minute; END; + + laenge = stop_minute - start_minute; + laenge_pix = laenge * einheit; + laenge_chars = ((laenge_pix / 10) + 0.5) | format('%i'); + NEXT IF start_minute >= bis_minute; + IF start_minute >= old_stop_minute; + start_minute = start_minute + 1 IF start_minute == old_stop_minute; +%?> <?% IF start_minute > akt_minute && ! z %?> <?% diff = (start_minute - akt_minute) * einheit %?> - <table border=0 align=left cellpadding=0 cellspacing=0> - <td width="1"> - <img src='bilder/spacer.gif' width='<?% diff %?>' height='8' border=0 align=left hspace=0> - </td> - </table> - <?% END %?> + <table border=0 align=left cellpadding=0 cellspacing=0> + <td width="1"> + <img src='bilder/spacer.gif' width='<?% diff %?>' height='8' border=0 align=left hspace=0> + </td> + </table> + <?% END %?> <?% IF old_stop_minute + 1 < start_minute && z %?> <?% diff = (start_minute - old_stop_minute - 1) * einheit %?> - <img title="DiffMinute: <?% start_minute - old_stop_minute - 1 %?>" src='bilder/spacer.gif' width='<?% diff %?>' height='8' border=0 align=left hspace=0> - <?% END %?> - <?% bg_color = date.now > show.start && date.now < show.stop ? "#f7fffA" : "#e6eee9"; - bg_color = show.timer ? "#ffeee9" : bg_color %?> - <table border=0 align=left cellpadding=0 cellspacing=0 id="<?% show.timer ? "timertable" : "prgtable" %?>"> - <td width="1" bgcolor="<?% bg_color %?>"> - <img src="bilder/spacer.gif" width="<?% laenge_pix %?>" height=1 border=0 hspace=0><br> - <nobr> - <?% IF show.summary %?><a href="javascript:popup('./vdradmin.pl?aktion=prog_detail&epg_id=<?% show.anchor %?>&vdr_id=<?% show.vdr_id %?>');"><?% END %?> - <?% IF laenge_chars > 2 %?> - <span title='<?% show.title %?>'><?% show.title | truncate( laenge_chars ) %?></div> - <?% ELSE %?> - <img src='bilder/spacer.gif' width='1' height='8' border=0 hspace=0> - <?% END %?> - <?% IF show.summary %?></a><?% END %?> - </td></table> - <?% - END; + <img title="DiffMinute: <?% start_minute - old_stop_minute - 1 %?>" src='bilder/spacer.gif' width='<?% diff %?>' height='8' border=0 align=left hspace=0> + <?% END %?> + <?% bg_color = date.now > show.start && date.now < show.stop ? "#f7fffA" : "#e6eee9"; bg_color = show.timer ? "#ffeee9" : bg_color %?> + + <table border=0 align=left cellpadding=0 cellspacing=0 id="<?% show.timer ? "timertable" : "prgtable" %?>"> + <tr> + <td width="1" bgcolor="<?% bg_color %?>"> + <img src="bilder/spacer.gif" width="<?% laenge_pix %?>" height=1 border=0 hspace=0> + <br> + <nobr> + <?% IF show.summary %?> + <a href="javascript:popup('./vdradmin.pl?aktion=prog_detail&epg_id=<?% show.anchor %?>&vdr_id=<?% show.vdr_id %?>');"> + <?% END %?> + <?% IF laenge_chars > 2 %?> + <span title='<?% show.title %?>'><?% show.title | truncate( laenge_chars ) %?></div> + <?% ELSE %?> + <img src='bilder/spacer.gif' width='1' height='8' border=0 hspace=0> + <?% END %?> + <?% IF show.summary %?> + </a> + <?% END %?> + </nobr> + </td> + </tr> + </table> + + <?% END; z = z + 1; old_start_minute = start_minute; old_stop_minute = stop_minute; - END %?> - </td> - </tr> + END %?> + </td> + </tr> <?% END %?> -</table> + </table> + </td> <!-- Vertikal ansicht END --> - <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> - </td> -</tr> -<tr> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> -</tr> -</table> - </form> - </body> + <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tr> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td background="bilder/uebersicht_unten.gif"> </td> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + </table> + </form> +</body> </html> diff --git a/template/Deutsch/rc.html b/template/Deutsch/rc.html index 9aad289..ed72873 100644 --- a/template/Deutsch/rc.html +++ b/template/Deutsch/rc.html @@ -2,109 +2,114 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title><tmpl_var host> - Fernbedienung</title> - <script language="JavaScript"> - <!-- - function switch_channel(url) { - Now = new Date(); - document.switchimage.src = url + "&" + Now.getTime(); - } +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title><tmpl_var host> - Fernbedienung</title> + <script language="JavaScript"> + <!-- + function switch_channel(url) { + Now = new Date(); + document.switchimage.src = url + "&" + Now.getTime(); + } //--> - </script> - </head> + </script> +</head> - <body background="bilder/fern_back.jpg" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> - <table width="200" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td></td> - </tr> - <tr> - <td></td> - <td></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_power>');"><img src="bilder/fern_03.jpg" alt="" height="27" width="68" border="0"></a></td> - </tr> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td></td> - </tr> - <tr> - <td><a href="javascript:switch_channel('<tmpl_var surl_1>');"><img src="bilder/fern_05.jpg" alt="" height="28" width="67" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_2>');"><img src="bilder/fern_06.jpg" alt="" height="28" width="66" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_3>');"><img src="bilder/fern_07.jpg" alt="" height="28" width="67" border="0"></a></td> - </tr> - <tr> - <td><a href="javascript:switch_channel('<tmpl_var surl_4>');"><img src="bilder/fern_08.jpg" alt="" height="28" width="67" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_5>');"><img src="bilder/fern_09.jpg" alt="" height="28" width="66" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_6>');"><img src="bilder/fern_10.jpg" alt="" height="28" width="67" border="0"></a></td> - </tr> - <tr> - <td><a href="javascript:switch_channel('<tmpl_var surl_7>');"><img src="bilder/fern_11.jpg" alt="" height="28" width="67" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_8>');"><img src="bilder/fern_12.jpg" alt="" height="28" width="66" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_9>');"><img src="bilder/fern_13.jpg" alt="" height="28" width="67" border="0"></a></td> - </tr> - <tr> - <td></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_0>');"><img src="bilder/fern_15.jpg" alt="" height="28" width="66" border="0"></a></td> - <td></td> - </tr> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td></td> - </tr> - <tr> - <td><a href="javascript:switch_channel('<tmpl_var surl_menu>');"><img src="bilder/fern_18.jpg" alt="" height="27" width="67" border="0"></a></td> - <td></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_back>');"><img src="bilder/fern_19.jpg" alt="" height="27" width="67" border="0"></a></td> - </tr> - <tr> - <td colspan="3"><a href="javascript:switch_channel('<tmpl_var surl_red>');"><img src="bilder/fern_22.jpg" alt="" height="28" width="50" border="0"></a><a href="javascript:switch_channel('<tmpl_var surl_green>');"><img src="bilder/fern_23.jpg" alt="" height="28" width="49" border="0"></a><a href="javascript:switch_channel('<tmpl_var surl_yellow>');"><img src="bilder/fern_24.jpg" alt="" height="28" width="51" border="0"></a><a href="javascript:switch_channel('<tmpl_var surl_blue>');"><img src="bilder/fern_25.jpg" alt="" height="28" width="50" border="0"></a></td> - </tr> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td></td> - </tr> - <tr> - <td></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_up>');"><img src="bilder/fern_28.jpg" alt="" height="27" width="66" border="0"></a></td> - <td></td> - </tr> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td></td> - </tr> - <tr> - <td><a href="javascript:switch_channel('<tmpl_var surl_left>');"><img src="bilder/fern_31.jpg" alt="" height="27" width="67" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_ok>');"><img src="bilder/fern_32.jpg" alt="" height="27" width="66" border="0"></a></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_right>');"><img src="bilder/fern_33.jpg" alt="" height="27" width="67" border="0"></a></td> - </tr> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td></td> - </tr> - <tr> - <td></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_down>');"><img src="bilder/fern_36.jpg" alt="" height="27" width="66" border="0"></a></td> - <td></td> - </tr> - <tr> - <td></td> - <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> - <td><img src="bilder/spacer.gif" name="switchimage" width="1" height="1"> </td> - </tr> - <tr> - <td><a href="javascript:switch_channel('<tmpl_var surl_volminus>');"><img src="bilder/fern_39.jpg" alt="" height="27" width="67" border="0"></a></td> - <td></td> - <td><a href="javascript:switch_channel('<tmpl_var surl_volplus>');"><img src="bilder/fern_40.jpg" alt="" height="27" width="67" border="0"></a></td> - </tr> - </table> - </body> +<body bgcolor="#000000" leftmargin="2" marginheight="2" marginwidth="2" topmargin="2"> + <table width="200" border="0" cellspacing="0" cellpadding="0" background="bilder/fern_back.jpg"> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td></td> + <td></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_power>');"><img src="bilder/fern_03.jpg" alt="" height="27" width="68" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('<tmpl_var surl_1>');"><img src="bilder/fern_05.jpg" alt="" height="28" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_2>');"><img src="bilder/fern_06.jpg" alt="" height="28" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_3>');"><img src="bilder/fern_07.jpg" alt="" height="28" width="67" border="0"></a></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('<tmpl_var surl_4>');"><img src="bilder/fern_08.jpg" alt="" height="28" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_5>');"><img src="bilder/fern_09.jpg" alt="" height="28" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_6>');"><img src="bilder/fern_10.jpg" alt="" height="28" width="67" border="0"></a></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('<tmpl_var surl_7>');"><img src="bilder/fern_11.jpg" alt="" height="28" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_8>');"><img src="bilder/fern_12.jpg" alt="" height="28" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_9>');"><img src="bilder/fern_13.jpg" alt="" height="28" width="67" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_0>');"><img src="bilder/fern_15.jpg" alt="" height="28" width="66" border="0"></a></td> + <td></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('<tmpl_var surl_menu>');"><img src="bilder/fern_18.jpg" alt="" height="27" width="67" border="0"></a></td> + <td></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_back>');"><img src="bilder/fern_19.jpg" alt="" height="27" width="67" border="0"></a></td> + </tr> + <tr> + <td colspan="3"><a href="javascript:switch_channel('<tmpl_var surl_red>');"><img src="bilder/fern_22.jpg" alt="" height="28" width="50" border="0"></a><a href="javascript:switch_channel('<tmpl_var surl_green>');"><img src="bilder/fern_23.jpg" alt="" height="28" width="49" border="0"></a><a href="javascript:switch_channel('<tmpl_var surl_yellow>');"><img src="bilder/fern_24.jpg" alt="" height="28" width="51" border="0"></a><a href="javascript:switch_channel('<tmpl_var surl_blue>');"><img src="bilder/fern_25.jpg" alt="" height="28" width="50" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_up>');"><img src="bilder/fern_28.jpg" alt="" height="27" width="66" border="0"></a></td> + <td></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('<tmpl_var surl_left>');"><img src="bilder/fern_31.jpg" alt="" height="27" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_ok>');"><img src="bilder/fern_32.jpg" alt="" height="27" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_right>');"><img src="bilder/fern_33.jpg" alt="" height="27" width="67" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_down>');"><img src="bilder/fern_36.jpg" alt="" height="27" width="66" border="0"></a></td> + <td></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td><img src="bilder/spacer.gif" name="switchimage" width="1" height="1"> </td> + </tr> + <tr> + <td><a href="javascript:switch_channel('<tmpl_var surl_volminus>');"><img src="bilder/fern_39.jpg" alt="" height="27" width="67" border="0"></a></td> + <td></td> + <td><a href="javascript:switch_channel('<tmpl_var surl_volplus>');"><img src="bilder/fern_40.jpg" alt="" height="27" width="67" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + </table> +</body> </html> diff --git a/template/Deutsch/rec_edit.html b/template/Deutsch/rec_edit.html index 2449506..dcc38d6 100644 --- a/template/Deutsch/rec_edit.html +++ b/template/Deutsch/rec_edit.html @@ -1,4 +1,5 @@ <html> + <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>VDRAdmin - Aufnahme Umbenennen</title> @@ -17,31 +18,31 @@ </table> <br> <div align="left"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr height="30"> - <td width="30" height="30" background="bilder/uebersicht_oben_links.gif"> </td> - <td height="30" background="bilder/uebersicht_oben.gif"> </td> - <td height="30" background="bilder/uebersicht_oben.gif"> </td> - <td width="30" height="30" background="bilder/uebersicht_oben_rechts.gif"> </td> - </tr> - <tr height="25"> - <td width="30" height="15" background="bilder/uebersicht_links.gif"> </td> - <td height="15" background="bilder/uebersicht_mitte.gif"> </td> - <td height="15" background="bilder/uebersicht_mitte.gif"> </td> - <td width="30" height="15" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> - <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Alter Titel der Aufnahme</td> - <td height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="title" value="<tmpl_var title>" size="55" readonly></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tr height="25"> - <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> - <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Neuer Titel der Aufnahme</td> - <td height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="nn" value="<tmpl_var title>" size="55"></td> - <td width="30" height="25" background="bilder/uebersicht_rechts.gif"> </td> - </tr> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr height="30"> + <td width="30" height="30" background="bilder/uebersicht_oben_links.gif"> </td> + <td height="30" background="bilder/uebersicht_oben.gif"> </td> + <td height="30" background="bilder/uebersicht_oben.gif"> </td> + <td width="30" height="30" background="bilder/uebersicht_oben_rechts.gif"> </td> + </tr> + <tr height="25"> + <td width="30" height="15" background="bilder/uebersicht_links.gif"> </td> + <td height="15" background="bilder/uebersicht_mitte.gif"> </td> + <td height="15" background="bilder/uebersicht_mitte.gif"> </td> + <td width="30" height="15" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> + <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Alter Titel der Aufnahme</td> + <td height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="title" value="<tmpl_var title>" size="55" readonly></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tr height="25"> + <td width="30" height="25" background="bilder/uebersicht_links.gif"> </td> + <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Neuer Titel der Aufnahme</td> + <td height="25" background="bilder/uebersicht_mitte.gif"><input type="text" name="nn" value="<tmpl_var title>" size="55"></td> + <td width="30" height="25" background="bilder/uebersicht_rechts.gif"> </td> + </tr> <tr height="30"> <td width="30" height="30" background="bilder/uebersicht_unten_links.gif"> </td> <td height="30" background="bilder/uebersicht_unten.gif"> </td> diff --git a/template/Deutsch/rec_list.html b/template/Deutsch/rec_list.html index 86638c1..015ef36 100644 --- a/template/Deutsch/rec_list.html +++ b/template/Deutsch/rec_list.html @@ -2,131 +2,194 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> - </head> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title></title> + <link href="style.css" rel="stylesheet" media="screen"> + <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> + <script type="text/javascript" language"JavaScript"> + <!-- + function del(suffix) { + check=confirm("Aufnahme löschen?"); + if(check) window.location.href=suffix; + } + function popup(URL) { + window.open(URL, '_new', 'width=400, height=250'); + } + function mdel() { + check=confirm("Ausgewählte Aufnahmen wirklich löschen?"); + if(check) document.FormName.submit(); + } + // --> + </script> +</head> - <body background="bilder/cback.png" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> - <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> - <tr> - <td valign="middle" width="300" background="bilder/nav_button_back.gif"> - <p class="einzug_ohnetop"><b>Aufnahmen</b></p> - </td> - <td colspan="2" align="right" background="bilder/nav_button_back_mitte.gif"> - <tmpl_if disk_total> - Total: - <tmpl_var minutes_total> - ( - <tmpl_var disk_total> - ) | Frei: - <tmpl_var minutes_free> - ( - <tmpl_var disk_free> - ) - </tmpl_if> </td> - <tmpl_if name="help_url"><td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> - <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" valign="top" alt="Hilfe"></a></td></tmpl_if> - <td width="15" background="bilder/nav_button_back_end.gif"> </td> - </tr> - </table> - <br> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td> <tmpl_loop path> >> <tmpl_if url><a href="<tmpl_var url>"><tmpl_var name></a><tmpl_else><tmpl_var name></tmpl_if></tmpl_loop></td> - </tr> - </table> - <br> - <form action="<tmpl_var url>" method="get" name="FormName"> +<body background="bilder/cback.png" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> + <tr> + <td valign="middle" width="300" background="bilder/nav_button_back.gif"> + <p class="einzug_ohnetop"><b>Aufnahmen</b></p> + </td> + <td colspan="2" align="right" background="bilder/nav_button_back_mitte.gif"> + <tmpl_if disk_total> + Total: <tmpl_var minutes_total> (<tmpl_var disk_total>) + | Frei: <tmpl_var minutes_free> (<tmpl_var disk_free>) + </tmpl_if> + + </td> +<tmpl_if name="help_url"> + <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> + <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" valign="top" alt="Hilfe"></a> + </td> +</tmpl_if> + <td width="15" background="bilder/nav_button_back_end.gif"> </td> + </tr> + </table> + + <br> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td> + +<tmpl_loop path> + >><tmpl_if url><a href="<tmpl_var url>"><tmpl_var name></a><tmpl_else><tmpl_var name></tmpl_if> +</tmpl_loop> + </td> + </tr> + </table> + + <br> + <form action="<tmpl_var url>" method="get" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="30"> <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> </td> - <td colspan="2" background="bilder/uebersicht_oben<tmpl_if sortbydate>_selected</tmpl_if>.gif"><p class="einzug_liste_headlines"><tmpl_if sortbydate><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbydateurl>"><font color="black"><b>Datum</b></font></a></td> - <td colspan="2" background="bilder/uebersicht_oben<tmpl_if sortbytime>_selected</tmpl_if>.gif"><p class="einzug_liste_headlines"><tmpl_if sortbytime><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbytimeurl>"><font color="black"><b>Uhrzeit</b></font></a></td> - <td background="bilder/uebersicht_oben<tmpl_if sortbyname>_selected</tmpl_if>.gif"><p class="einzug_liste_headlines"><tmpl_if sortbyname><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbynameurl>"><font color="black"><b>Name</b></font></a></p> + <td colspan="2" background="bilder/uebersicht_oben<tmpl_if sortbydate>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbydateurl>">Datum + <tmpl_if sortbydate> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td colspan="2" background="bilder/uebersicht_oben<tmpl_if sortbytime>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbytimeurl>">Uhrzeit + <tmpl_if sortbytime> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> </td> - <td width="30" background="bilder/uebersicht_oben.gif"> </td> - <td width="30" background="bilder/uebersicht_oben.gif"> </td> - <td align="right" width="30" background="bilder/uebersicht_oben.gif"> </td> - <td align="right" width="70" background="bilder/uebersicht_oben.gif"> </td> + <td background="bilder/uebersicht_oben<tmpl_if sortbyname>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbynameurl>">Name + <tmpl_if sortbyname> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="30" background="bilder/uebersicht_oben.gif"> </td> + <td width="30" background="bilder/uebersicht_oben.gif"> </td> + <td width="30" background="bilder/uebersicht_oben.gif"> </td> + <td width="70" background="bilder/uebersicht_oben.gif"> </td> <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - <tmpl_loop recloop> + +<tmpl_loop recloop> <tr height="25"> - <td valign="top" width="30" height="22" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> - <td valign="top" align="right" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbydate>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var date></p> - </td> - <td valign="top" align="left" width="10" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbydate>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_if isfolder> Gesamt</tmpl_if></p> - </td> - <td valign="top" align="right" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbytime>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var time></p> - </td> - <td valign="top" width="10" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbytime>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_if isfolder> Neu</tmpl_if><tmpl_if new> Neu</tmpl_if></p> - </td> - <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbyname>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_if isfolder><img align="absmiddle" src="bilder/folder.gif" border="0"> <a href="<tmpl_var infurl>"><b><font color="black"><tmpl_var name></font></b></a><tmpl_else><a href="javascript:popup('<tmpl_var infurl>');"><b><tmpl_var name></b></a></tmpl_if></p> - </td> - <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_unless isfolder><a href="<tmpl_var editurl>"><img src="bilder/edit.gif" alt="" height="17" width="17" border="0"></a></tmpl_unless></p> - </td> - - <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_unless isfolder><a href="javascript:del('<tmpl_var delurl>');"><img src="bilder/delete.gif" alt="" height="17" width="17" border="0"></a></tmpl_unless></p> - </td> - <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_unless isfolder><input type="checkbox" name="xxxx_<tmpl_var id>"></tmpl_unless></p> - </td> - <td align="center" valign="top" width="70" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_unless isfolder><a href="<tmpl_var streamurl>"> <img src="bilder/stream.jpg" alt="" height="17" border="0"></a></tmpl_unless></p> - </td> + <td valign="top" width="30" height="22" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> + <td valign="top" align="right" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbydate>_selected</tmpl_if>.gif"> + <p class="einzug_liste"><tmpl_var date></p> + </td> + <td valign="top" align="left" width="10" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbydate>_selected</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if isfolder> Gesamt</tmpl_if> + </p> + </td> + <td valign="top" align="right" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbytime>_selected</tmpl_if>.gif"> + <p class="einzug_liste"><tmpl_var time></p> + </td> + <td valign="top" width="10" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbytime>_selected</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if isfolder> + Neu + <tmp_else> + <tmpl_if new>Neu</tmpl_if> + </tmpl_if> + </p> + </td> + <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbyname>_selected</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_if isfolder> + <img align="absmiddle" src="bilder/folder.gif" border="0"> + <a href="<tmpl_var infurl>"><b><font color="black"><tmpl_var name></font></b></a> + <tmpl_else> + <a href="javascript:popup('<tmpl_var infurl>');"><b><tmpl_var name></b></a> + </tmpl_if> + </p> + </td> + <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_unless isfolder> + <a href="<tmpl_var editurl>"><img src="bilder/edit.gif" alt="" height="17" width="17" border="0"></a> + </tmpl_unless> + </p> + </td> + <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_unless isfolder> + <a href="javascript:del('<tmpl_var delurl>');"><img src="bilder/delete.gif" alt="" height="17" width="17" border="0"></a> + </tmpl_unless> + </p> + </td> + <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_unless isfolder><input type="checkbox" name="xxxx_<tmpl_var id>"></tmpl_unless> + </p> + </td> + <td align="center" valign="top" width="70" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> + <p class="einzug_liste"> + <tmpl_unless isfolder> + <a href="<tmpl_var streamurl>"> <img src="bilder/stream.jpg" alt="" height="17" border="0"></a> + </tmpl_unless> + </p> + </td> <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> </tr> - </tmpl_loop> +</tmpl_loop> + <tr> <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="70" background="bilder/uebersicht_unten.gif"> </td> + <td colspan="9" background="bilder/uebersicht_unten.gif"> </td> <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - <tr> - <td valign="top" width="30"> </td> - <td> </td> - <td> </td> - <td> </td> - <td> </td> - <td colspan="5" align="right"><br> - <table width="280" border="0" cellspacing="0" cellpadding="0"> - <tr height="20"> - <td width="12" height="20" background="bilder/gbutton_left.gif"></td> - <td align="center" height="20" background="bilder/gbutton_middle.gif"> - - <a href="javascript:mdel();"><div class="gbutton">Ausgewählte Aufnahmen löschen</div></a> - - </td> - <td width="12" height="20" background="bilder/gbutton_right.gif"></td> - </tr> - </table> - </td> - <td valign="top" width="30"> </td> - </tr> - </table> - <input type="hidden" name="aktion" value="rec_delete"> - </form> - <br> - </body> - + <tr> + <td colspan="5"> </td> + <td colspan="5" align="right"><br> + <table width="280" border="0" cellspacing="0" cellpadding="0"> + <tr height="20"> + <td width="12" height="20" background="bilder/gbutton_left.gif"></td> + <td align="center" height="20" background="bilder/gbutton_middle.gif"> + <a href="javascript:mdel();"><div class="gbutton">Ausgewählte Aufnahmen löschen</div></a> + </td> + <td width="12" height="20" background="bilder/gbutton_right.gif"></td> + </tr> + </table> + </td> + <td valign="top" width="30"> </td> + </tr> + </table> + <input type="hidden" name="aktion" value="rec_delete"> + </form> +</body> </html> diff --git a/template/Deutsch/style.css b/template/Deutsch/style.css index 96cf065..8d2cabb 100644 --- a/template/Deutsch/style.css +++ b/template/Deutsch/style.css @@ -15,6 +15,10 @@ a.rec:link { color: #c00; text-decoration: none } a.rec:visited { color: #000; text-decoration: none } a.rec:hover { color: #cc0000; text-decoration: underline } a.rec:active { color: #000; text-decoration: underline } +a.sort:link { color: black; text-decoration: none; font-weight: bold } +a.sort:visited { color: black; text-decoration: none; font-weight: bold } +a.sort:hover { color: black; text-decoration: underline; font-weight: bold } +a.sort:active { color: black; text-decoration: underline; font-weight: bold } .headline { font-weight: bold; font-size: 14px; margin-top: 20px; margin-bottom: 20px } .subheadline { color: #039; font-weight: bold } .kleine { font-size: 10px } diff --git a/template/Deutsch/timer_list.html b/template/Deutsch/timer_list.html index dfea3fb..27e74b1 100644 --- a/template/Deutsch/timer_list.html +++ b/template/Deutsch/timer_list.html @@ -2,17 +2,17 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title></title> - <link href="style.css" rel="stylesheet" media="screen"> - <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> - <style type="text/css"> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>Timer</title> + <link href="style.css" rel="stylesheet" media="screen"> + <script type="text/javascript" language="JavaScript1.2" src="library.js"></script> + <style type="text/css"> #prgtable { border-left-width:1px;border-left-color:#000000;border-left-style:solid; border-right-width:1px;border-right-color:#000000;border-right-style:solid;} - </style> - </head> + </style> +</head> - <body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> +<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20"> <?% farbenix1="#d5dee8"; @@ -25,62 +25,58 @@ faktor=2.2; %?> - <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" height="39"> + <tr> + <td valign="middle" width="200" background="bilder/nav_button_back.gif"> + <p class="einzug_ohnetop"><b>Timer</b></p> + </td> + <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> + <td align="right" width="203" background="bilder/nav_button_back_mitte.gif"> + <table width="130" border="0" cellspacing="0" cellpadding="0"> + <tr height="20"> + <td width="12" height="20" background="bilder/gbutton_left.gif"></td> + <td align="center" height="20" background="bilder/gbutton_middle.gif"> + <a href="<tmpl_var nturl>"><div class="gbutton">Neuer Timer</div></a> + </td> + <td width="12" height="20" background="bilder/gbutton_right.gif"></td> + </tr> + </table> + </td> +<tmpl_if help_url> + <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> + <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" alt="Hilfe"></a> + </td> +</tmpl_if> + <td width="15" background="bilder/nav_button_back_end.gif"> </td> + </tr> + </table> + + <br> + <form action="<tmpl_var url>" method="get" name="FormName1"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td valign="middle" width="200" background="bilder/nav_button_back.gif"> - <p class="einzug_ohnetop"><b>Timer</b></p> + <td valign="top" width="30"> + <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> </td> - <td align="right" background="bilder/nav_button_back_mitte.gif"> </td> - <td align="right" width="203" background="bilder/nav_button_back_mitte.gif"> - <table width="130" border="0" cellspacing="0" cellpadding="0"> - <tr height="20"> - <td width="12" height="20" background="bilder/gbutton_left.gif"></td> - <td align="center" height="20" background="bilder/gbutton_middle.gif"> - - <a href="<tmpl_var nturl>"><div class="gbutton">Neuer Timer</div></a> - - </td> - <td width="12" height="20" background="bilder/gbutton_right.gif"></td> - </tr> - </table> - </td> - <tmpl_if help_url> - <td align="right" width="35" background="bilder/nav_button_back_mitte.gif"> - <a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" alt="Hilfe"></a></td></tmpl_if> - <td width="15" background="bilder/nav_button_back_end.gif"> </td> + <td background="bilder/uebersicht_oben.gif"> + <p><b><tmpl_var title></b></p> + </td> + <td background="bilder/uebersicht_oben.gif" align="right"> + <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=timer_list&timer=' + this.options[this.selectedIndex].value,'main')"> +<tmpl_loop day_loop> + <option value="<tmpl_var sortfield>" <tmpl_if current>selected</tmpl_if>><tmpl_var day></option> +</tmpl_loop> + </select> + </td> + <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - </table> - - <br> - <form action="<tmpl_var url>" method="get" name="FormName1"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td valign="top" width="30"> - <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> - </td> - <td background="bilder/uebersicht_oben.gif"> - <p><b><tmpl_var title></b></p> - </td> - <td background="bilder/uebersicht_oben.gif" align="right"> - <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=timer_list&timer=' + this.options[this.selectedIndex].value,'main')"> - <tmpl_loop day_loop> - <tmpl_if current> - <option value="<tmpl_var sortfield>" selected><tmpl_var day></option> - <tmpl_else> - <option value="<tmpl_var sortfield>"><tmpl_var day></option> - </tmpl_if> - </tmpl_loop> - </select> - </td> - <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - <tr> - <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> - <td colspan="2" background="bilder/uebersicht_mitte.gif"> - <br> - <table cellspacing=0 cellpadding=0 border=0> - <tr> - <td bgcolor="<?% farbenix2 %?>" height=20 width=100><img src="bilder/spacer.gif" width="100" height=1 border=0><br> </td> + <tr> + <td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td> + <td colspan="2" background="bilder/uebersicht_mitte.gif"> + <br> + <table cellspacing=0 cellpadding=0 border=0> + <tr> + <td bgcolor="<?% farbenix2 %?>" height=20 width=100><img src="bilder/spacer.gif" width="100" height=1 border=0><br> </td> <?% stunde=0; pos=0; @@ -93,14 +89,15 @@ END; ende=((stunde * 60 / faktor) +0.5 ) | format('%i'); %?> - <td bgcolor="<?% farbe %?>" align="center"><img src="bilder/spacer.gif" width="<?% ende-pos %?>" height=1 border=0><br><?% stunde - 1 %?></td> + + <td bgcolor="<?% farbe %?>" align="center"><img src="bilder/spacer.gif" width="<?% ende-pos %?>" height=1 border=0><br><?% stunde - 1 %?></td> <?% pos=ende; - END; %?> - </tr> - </table> + </tr> + </table> + <?% programm=0; sender=""; @@ -110,10 +107,16 @@ bgfarbe=((programm % 2) == 0) ? farbenix1 : farbenix2; sender=timer.cdesc; %?> - <table cellspacing=0 cellpadding=0 border=0><tr><td bgcolor="#000000" height=1><img src="bilder/spacer.gif" width="<?% tablaenge + 100 %?>" height=1 border=0></td></tr></table> - <table cellspacing=0 cellpadding=0 border=0> - <tr> - <td bgcolor="<?% bgfarbe %?>" height=20 width=100><img src="bilder/spacer.gif" width="100" height=1 border=0><br><b><?% sender | truncate(11) %?></b></td> + <table cellspacing=0 cellpadding=0 border=0> + <tr> + <td bgcolor="#000000" height=1><img src="bilder/spacer.gif" width="<?% tablaenge + 100 %?>" height=1 border=0></td> + </tr> + </table> + + <table cellspacing=0 cellpadding=0 border=0> + <tr> + <td bgcolor="<?% bgfarbe %?>" height=20 width=100><img src="bilder/spacer.gif" width="100" height=1 border=0><br><b><?% sender | truncate(11) %?></b></td> + <?% pos=0; FOREACH sendung = timers; @@ -141,18 +144,20 @@ IF start>pos; %?> - <td bgcolor="<?% bgfarbe %?>"><img src="bilder/spacer.gif" width="<?% start-pos %?>" height=1 border=0><br></td> + <td bgcolor="<?% bgfarbe %?>"><img src="bilder/spacer.gif" width="<?% start-pos %?>" height=1 border=0><br></td> + <?% pos=start; END; IF ende - pos < 2; %?> - <td bgcolor="<?% progfarbe %?>"><span title="<?% sendung.title %?>"><img src="bilder/spacer.gif" width="<?% ende - pos %?>" height=20 border=0></span></td> + <td bgcolor="<?% progfarbe %?>"><span title="<?% sendung.title %?>"><img src="bilder/spacer.gif" width="<?% ende - pos %?>" height=20 border=0></span></td> + <?% ELSE; - %?> - <td bgcolor="<?% progfarbe %?>" id="prgtable"><span title="<?% sendung.title %?>"><img src="bilder/spacer.gif" width="<?% ende - pos - 2 %?>" height=20 border=0></span></td> + <td bgcolor="<?% progfarbe %?>" id="prgtable"><span title="<?% sendung.title %?>"><img src="bilder/spacer.gif" width="<?% ende - pos - 2 %?>" height=20 border=0></span></td> + <?% END; pos=ende; @@ -160,64 +165,120 @@ END; IF pos<tablaenge; %?> - <td bgcolor="<?% bgfarbe %?>"><img src="bilder/spacer.gif" width="<?% tablaenge - pos %?>" height=1 border=0><br></td> + <td bgcolor="<?% bgfarbe %?>"><img src="bilder/spacer.gif" width="<?% tablaenge - pos %?>" height=1 border=0><br></td> + <?% END; %?> - </tr> - </table> + </tr> + </table> <?% programm=programm+1; END; END; %?> - <table cellspacing=0 cellpadding=0 border=0><tr><td bgcolor="#000000" height=1><img src="bilder/spacer.gif" width="<?% tablaenge + 100 %?>" height=1 border=0></td></tr></table> - </td> - <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> - </tr> - <tr> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td colspan="2" background="bilder/uebersicht_unten.gif"> </td> - <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> - </tr> - </table> + + <table cellspacing=0 cellpadding=0 border=0> + <tr> + <td bgcolor="#000000" height=1><img src="bilder/spacer.gif" width="<?% tablaenge + 100 %?>" height=1 border=0></td> + </tr> + </table> + </td> + <td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td> + </tr> + <tr> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> + <td colspan="2" background="bilder/uebersicht_unten.gif"> </td> + <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> + </tr> + </table> <input type="hidden" name="aktion" value="timer_list"> - </form> - <br> - <form action="<tmpl_var url>" method="get" name="FormName"> + </form> + + <br> + <form action="<tmpl_var url>" method="get" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="30"> <p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p> </td> <td width="70" background="bilder/uebersicht_oben<tmpl_if sortbyactive>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbyactive><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbyactiveurl>"><font color="black"><b>Aktiv</b></font></a></p> - </td> - <td background="bilder/uebersicht_oben<tmpl_if sortbychannel>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbychannel><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbychannelurl>"><font color="black"><b>Sender</b></font></a></p> - </td> - <td background="bilder/uebersicht_oben<tmpl_if sortbyday>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbyday><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbydayurl>"><font color="black"><b>Tag</b></font></a></p> - </td> - <td background="bilder/uebersicht_oben<tmpl_if sortbystart>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbystart><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbystarturl>"><font color="black"><b>Start</b></font></a></p> - </td> - <td background="bilder/uebersicht_oben<tmpl_if sortbystop>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbystop><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbystopurl>"><font color="black"><b>Stop</b></font></a></p> - </td> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbyactiveurl>">Aktiv + <tmpl_if sortbyactive> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="10%" background="bilder/uebersicht_oben<tmpl_if sortbychannel>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbychannelurl>">Sender + <tmpl_if sortbychannel> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="40" background="bilder/uebersicht_oben<tmpl_if sortbyday>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbydayurl>">Tag + <tmpl_if sortbyday> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="40" background="bilder/uebersicht_oben<tmpl_if sortbystart>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbystarturl>">Start + <tmpl_if sortbystart> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> + <td width="40" background="bilder/uebersicht_oben<tmpl_if sortbystop>_selected</tmpl_if>.gif"> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbystopurl>">Stop + <tmpl_if sortbystop> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> + </td> <td background="bilder/uebersicht_oben<tmpl_if sortbyname>_selected</tmpl_if>.gif"> - <p class="einzug_liste_headlines"><tmpl_if sortbyname><tmpl_if desc><img src="bilder/sortiert_desc.gif" alt="" width="9" height="11" border="0"> <tmpl_else><img src="bilder/sortiert_asc.gif" alt="" width="9" height="11" border="0"> </tmpl_if></tmpl_if><a href="<tmpl_var sortbynameurl>"><font color="black"><b>Name</b></font></a></p> + <nobr class="einzug_liste_headlines"> + <a class="sort" href="<tmpl_var sortbynameurl>">Name + <tmpl_if sortbyname> + <img src="bilder/sortiert_<tmpl_if desc>desc<tmpl_else>asc</tmpl_if>.gif" alt="" width="9" height="11" border="0"> + <tmpl_else> + <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0"> + </tmpl_if> + </a> + </nobr> </td> <td width="30" background="bilder/uebersicht_oben.gif"> </td> <td width="30" background="bilder/uebersicht_oben.gif"> </td> - <td align="right" width="30" background="bilder/uebersicht_oben.gif"> </td> + <td width="30" background="bilder/uebersicht_oben.gif"> </td> <td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - <tmpl_loop timer_loop> + +<tmpl_loop timer_loop> <tr> <td valign="top" width="30" background="bilder/uebersicht_links<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> <td valign="top" width="70" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbyactive>_selected</tmpl_if>.gif"> - <p class="einzug_liste"> + <p class="einzug_liste"> <tmpl_if expr="(active%32768) == 0"> <img src="bilder/poempl_grau.gif" alt="Diese Aufnahme ist deaktiviert" width="19" height="19" align="absmiddle" border="0"> <tmpl_else> @@ -233,72 +294,74 @@ </tmpl_if> </tmpl_if> </tmpl_if> - - <a href="javascript:change('<tmpl_var toggleurl>&timer=<?% current %?>');"><font color="black"> -<tmpl_if expr="active == 1">Ja</tmpl_if> -<tmpl_if expr="(active%32768) == 0">Nein</tmpl_if> -<tmpl_if expr="active == 5">VPS</tmpl_if> -<tmpl_if expr="active == 32769">Auto</tmpl_if> -</font></a> -</p> - </td> + + <a href="javascript:change('<tmpl_var toggleurl>&timer=<?% current %?>');"> + <font color="black"> + <tmpl_if expr="active == 1">Ja</tmpl_if> + <tmpl_if expr="(active%32768) == 0">Nein</tmpl_if> + <tmpl_if expr="active == 5">VPS</tmpl_if> + <tmpl_if expr="active == 32769">Auto</tmpl_if> + </font> + </a> + </p> + </td> <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbychannel>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var cdesc></p> - </td> + <p class="einzug_liste"><tmpl_var cdesc></p> + </td> <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbyday>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var dor></p> - </td> + <p class="einzug_liste"><tmpl_var dor></p> + </td> <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbystart>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var start></p> - </td> + <p class="einzug_liste"><tmpl_var start></p> + </td> <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbystop>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_var stop></p> - </td> + <p class="einzug_liste"><tmpl_var stop></p> + </td> <td valign="top" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if><tmpl_if sortbyname>_selected</tmpl_if>.gif"> - <p class="einzug_liste"><tmpl_if recording><img align="absmiddle" src="bilder/rec.gif" border="0"> </tmpl_if><tmpl_if infurl><a href="javascript:popup('<tmpl_var infurl>');"><tmpl_var title></a><tmpl_else><tmpl_var title></tmpl_if></p> - </td> + <p class="einzug_liste"> + <tmpl_if recording><img align="absmiddle" src="bilder/rec.gif" border="0"> </tmpl_if> + <tmpl_if infurl> + <a href="javascript:popup('<tmpl_var infurl>');"><tmpl_var title></a> + <tmpl_else> + <tmpl_var title> + </tmpl_if> + </p> + </td> <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><a href="<tmpl_var modurl>"><img src="bilder/edit.gif" alt="" height="17" width="17" border="0"></a></p> - </td> + <p class="einzug_liste"><a href="<tmpl_var modurl>"><img src="bilder/edit.gif" alt="" height="17" width="17" border="0"></a></p> + </td> <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><a href="javascript:del('<tmpl_var delurl>');"><img src="bilder/delete.gif" alt="" height="17" width="17" border="0"></a></p> - </td> + <p class="einzug_liste"><a href="javascript:del('<tmpl_var delurl>');"><img src="bilder/delete.gif" alt="" height="17" width="17" border="0"></a></p> + </td> <td align="center" valign="top" width="30" background="bilder/uebersicht_mitte<tmpl_if __ODD__>_dark</tmpl_if>.gif"> - <p class="einzug_liste"><input type="checkbox" name="xxxx_<tmpl_var id>"></p> - </td> + <p class="einzug_liste"><input type="checkbox" name="xxxx_<tmpl_var id>"></p> + </td> <td valign="top" width="30" background="bilder/uebersicht_rechts<tmpl_if __ODD__>_dark</tmpl_if>.gif"> </td> </tr> - </tmpl_loop> +</tmpl_loop> + <tr> <td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td> - <td width="50" background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> - <td width="30" background="bilder/uebersicht_unten.gif"> </td> + <td colspan="9" background="bilder/uebersicht_unten.gif"> </td> <td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td> </tr> - <tr> - <td valign="top" colspan="6"></td> - <td colspan="4" align="right"><br> - <table width="230" border="0" cellspacing="0" cellpadding="0"> - <tr height="20"> - <td width="12" height="20" background="bilder/gbutton_left.gif"></td> - <td align="center" height="20" background="bilder/gbutton_middle.gif"> - - <a href="javascript:mdel();"><div class="gbutton">Ausgewählte Timer löschen</div></a> - - </td> - <td width="12" height="20" background="bilder/gbutton_right.gif"></td> - </tr> - </table> - <input type="hidden" name="aktion" value="timer_delete"></td> - <td valign="top" width="30"></td> - </tr> - </table></form> - </body> + <tr> + <td valign="top" colspan="6"></td> + <td colspan="4" align="right"><br> + <table width="230" border="0" cellspacing="0" cellpadding="0"> + <tr height="20"> + <td width="12" height="20" background="bilder/gbutton_left.gif"></td> + <td align="center" height="20" background="bilder/gbutton_middle.gif"> + <a href="javascript:mdel();"><div class="gbutton">Ausgewählte Timer löschen</div></a> + </td> + <td width="12" height="20" background="bilder/gbutton_right.gif"></td> + </tr> + </table> + </td> + <td valign="top" width="30"></td> + </tr> + </table> + <input type="hidden" name="aktion" value="timer_delete"> + </form> +</body> </html> diff --git a/template/Deutsch/timer_new.html b/template/Deutsch/timer_new.html index 05edd42..0651a0d 100644 --- a/template/Deutsch/timer_new.html +++ b/template/Deutsch/timer_new.html @@ -63,13 +63,8 @@ <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Timer Aktiv</td> <td height="25" background="bilder/uebersicht_mitte.gif"> - <tmpl_if active> - <input type="radio" name="active" value="1" checked>ja - <input type="radio" name="active" value="0">nein - <tmpl_else> - <input type="radio" name="active" value="1">ja - <input type="radio" name="active" value="0" checked>nein - </tmpl_if> + <input type="radio" name="active" value="1" <tmpl_if active>checked</tmpl_if>>ja + <input type="radio" name="active" value="0" <tmpl_unless active>checked</tmpl_unless>>nein </td> <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> </tr> @@ -90,9 +85,9 @@ <td width="20%" height="25" background="bilder/uebersicht_mitte.gif">Sender</td> <td height="25" background="bilder/uebersicht_mitte.gif"> <select name="channel" size="1"> - <tmpl_loop name="channels"> - <option value="<tmpl_var vdr_id>" <tmpl_if current>selected</tmpl_if>><tmpl_var name="name"></option> - </tmpl_loop> +<tmpl_loop name="channels"> + <option value="<tmpl_var vdr_id>" <tmpl_if current>selected</tmpl_if>><tmpl_var name="name"></option> +</tmpl_loop> </select> </td> <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> @@ -159,8 +154,7 @@ </tr> <tr height="30"> <td width="30" height="30"><img src="bilder/uebersicht_unten_links.gif" alt="" width="30" height="30" border="0"></td> - <td height="30" background="bilder/uebersicht_unten.gif"></td> - <td height="30" background="bilder/uebersicht_unten.gif"></td> + <td colspan="2" height="30" background="bilder/uebersicht_unten.gif"></td> <td width="30" height="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" width="30" height="30" border="0"></td> </tr> </table> diff --git a/template/Deutsch/toolbar.html b/template/Deutsch/toolbar.html index 596874f..d3ad11d 100644 --- a/template/Deutsch/toolbar.html +++ b/template/Deutsch/toolbar.html @@ -2,39 +2,37 @@ <html> - <head> - <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> - <title>Toolbar</title> - </head> +<head> + <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> + <title>Toolbar</title> +</head> - <body bgcolor="#ffffff"> - <form action="<tmpl_var url>" method="get" name="FormName"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td> - <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=prog_list&vdr_id=' + this.options[this.selectedIndex].value,'main')"> - <tmpl_loop chanloop> - <tmpl_if current> - <option value="<tmpl_var vdr_id>" selected><tmpl_var name></option> - <tmpl_else> - <option value="<tmpl_var vdr_id>"><tmpl_var name></option> - </tmpl_if> - </tmpl_loop> - </select> <input type="submit" name="submit" value="Go!"> - </td> - <td></td> - </tr> - <tr> - <td></td> - <td></td> - </tr> - <tr> - <td></td> - <td></td> - </tr> - </table> - <p></p> - </form> - </body> +<body bgcolor="#ffffff"> + <form action="<tmpl_var url>" method="get" name="FormName"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td> + <select name="vdr_id" size="1" onchange="window.open('<tmpl_var url>?aktion=prog_list&vdr_id=' + this.options[this.selectedIndex].value,'main')"> +<tmpl_loop chanloop> + <option value="<tmpl_var vdr_id>" <tmpl_if current>selected</tmpl_if>><tmpl_var name></option> +</tmpl_loop> + </select> + <input type="submit" name="submit" value="Go!"> + <input type="hidden" name="aktion" value="prog_list"> + </td> + <td></td> + </tr> + <tr> + <td></td> + <td></td> + </tr> + <tr> + <td></td> + <td></td> + </tr> + </table> + <p></p> + </form> +</body> </html> diff --git a/template/Deutsch/tv.html b/template/Deutsch/tv.html index 795bfd3..9c13aac 100644 --- a/template/Deutsch/tv.html +++ b/template/Deutsch/tv.html @@ -1,8 +1,9 @@ <html> - <head> - <title>Fernseher (<tmpl_var host>)</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <script language="JavaScript"> + +<head> + <title>Fernseher (<tmpl_var host>)</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <script language="JavaScript"> <!-- var aktiv; var interval = 5; @@ -19,16 +20,20 @@ NewPicUrl = "<tmpl_var url>&size=" + size + "&" + Now.getTime(); document.Bild.src = NewPicUrl; } + function go() { WebcamUpdate(); v_Start(); } + function v_Start() { aktiv = window.setInterval("WebcamUpdate()", interval * 1000); } + function v_Stop() { window.clearInterval(aktiv); } + function v_changeInterval(val) { interval = val; v_Stop(); @@ -36,118 +41,255 @@ go() }; } + function v_changeSize(val) { size = val; v_Stop(); go() } //--> - </script> - <style type="text/css" media="screen"><!-- + </script> + <style type="text/css" media="screen"> + <!-- #Ebene1 { position: absolute; z-index: 0; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block } #Ebene2 { position: absolute; z-index: 10; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block } td { color: #000; font-weight: normal; font-size: 11px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif } input, b { font-weight: normal; font-size: 9px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif} select { font-weight: normal; width: 55px; height: 20px; font-size: 9px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif} #small { font-weight: normal; width: 20px; height: 20px; font-size: 9px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif} - --></style> - </head> + --> + </style> +</head> -<body onLoad="go()" background="bilder/tv_bottom.gif" bgcolor="#FFFFFF" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> - <form name="liveform"> - <table width="200" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td> - <img name="Bild" src="<tmpl_var url>" border="1" hspace=2 vspace=2> +<body onLoad="go()" background="bilder/tv_bottom.gif" bgcolor="#000000" leftmargin="2" marginheight="2" marginwidth="2" topmargin="2"> + <form name="liveform"> + <table width="200" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td align="center" valign="middle"><img name="Bild" src="<tmpl_var url>" border="1" hspace=2 vspace=2></td> + <td><img src="bilder/spacer.gif" name="switchimage" width="2" height="1"></td> + <td valign="top"> + <!-- OLD RC + <table border=0 cellpadding=0 cellspacing=0> + <tr> + <td colspan="3" align="right"><nobr><input type="button" onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Power')" name="menu" value="Power"></td> + <tr> + <tr> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=1')" type="button" name="1" value="1"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=2')" type="button" name="2" value="2"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=3')" type="button" name="3" value="3"></td> + </tr> + <tr> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=4')" type="button" name="4" value="4"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=5')" type="button" name="5" value="5"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=6')" type="button" name="6" value="6"></td> + </tr> + <tr> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=7')" type="button" name="7" value="7"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=8')" type="button" name="8" value="8"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=9')" type="button" name="9" value="9"></td> + </tr> + <tr> + <td> </td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=0')" type="button" name="0" value="0"></td> + <td> </td> + </tr> + <tr> + <td colspan="3" align="center"> + <nobr> + <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Red')" type="button" name="red" value=" " style="background:red"> + <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Green')" type="button" name="green" value=" " style="background:green"> + <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Yellow')" type="button" name="yellow" value=" " style="background:yellow"> + <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Blue')" type="button" name="blue" value=" " style="background:blue"> + </nobr> + </td> + </tr> + <tr> + <td> </td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Up')" type="button" name="up" value="^"></td> + <td> </td> + </tr> + <tr> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Left')" type="button" name="left" value="<"></td> + <td align='center'><input onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Ok')" type="button" name="ok" value="Ok"></td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Right')" type="button" name="right" value=">"></td> + </tr> + <tr> + <td> </td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Down')" type="button" name="down" value="v"></td> + <td> </td> + </tr> + <tr> + <td colspan="3"> + <nobr> + <input type="button" onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Menu')" name="menu" value="Menu"> + <input onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Back')" type="button" name="back" value="Back"> + </nobr> + </td> + </tr> + <tr> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumeMinus')" type="button" name="leiser" value="-"></td> + <td> </td> + <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumePlus')" type="button" name="lauter" value="+"></td> + </tr> + <tr> + <td colspan="3"> </td> + </tr> + <tr valign="bottom"> + <td colspan="3" valign="bottom"> + <b>Intervall:</b><br> + <select name="Seconds" size="1" onChange="v_changeInterval(this.options[this.selectedIndex].value)"> + <option value="0">off</option> + <option value="1"> 1 sec.</option> + <option value="2"> 2 sec.</option> + <option value="3"> 3 sec</option> + <option value="5" selected> 5 sec.</option> + <option value="10">10 sec.</option> + <option value="30">30 sec.</option> + <option value="60">60 sec.</option> + </select> + <input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> + </td> + </tr> + <tr valign="bottom"> + <td colspan="3" valign="bottom"> + <b>Größe:</b><br> + <select name="Size" size="1" onChange="v_changeSize(this.options[this.selectedIndex].value)"> + <option value="full">1:1</option> + <option value="half" selected>1:2</option> + <option value="quarter">1:4</option> + </select> + <input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> + </td> + </tr> + </table> + --> + <table width="200" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td></td> + <td></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=power');"><img src="bilder/fern_03.jpg" alt="" height="27" width="68" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=1');"><img src="bilder/fern_05.jpg" alt="" height="28" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=2');"><img src="bilder/fern_06.jpg" alt="" height="28" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=3');"><img src="bilder/fern_07.jpg" alt="" height="28" width="67" border="0"></a></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=4');"><img src="bilder/fern_08.jpg" alt="" height="28" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=5');"><img src="bilder/fern_09.jpg" alt="" height="28" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=6');"><img src="bilder/fern_10.jpg" alt="" height="28" width="67" border="0"></a></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=7');"><img src="bilder/fern_11.jpg" alt="" height="28" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=8');"><img src="bilder/fern_12.jpg" alt="" height="28" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=9');"><img src="bilder/fern_13.jpg" alt="" height="28" width="67" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=0');"><img src="bilder/fern_15.jpg" alt="" height="28" width="66" border="0"></a></td> + <td></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=menu');"><img src="bilder/fern_18.jpg" alt="" height="27" width="67" border="0"></a></td> + <td></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=back');"><img src="bilder/fern_19.jpg" alt="" height="27" width="67" border="0"></a></td> + </tr> + <tr> + <td colspan="3"><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=red');"><img src="bilder/fern_22.jpg" alt="" height="28" width="50" border="0"></a><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=green');"><img src="bilder/fern_23.jpg" alt="" height="28" width="49" border="0"></a><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=yellow');"><img src="bilder/fern_24.jpg" alt="" height="28" width="51" border="0"></a><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=blue');"><img src="bilder/fern_25.jpg" alt="" height="28" width="50" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=up');"><img src="bilder/fern_28.jpg" alt="" height="27" width="66" border="0"></a></td> + <td></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=left');"><img src="bilder/fern_31.jpg" alt="" height="27" width="67" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=ok');"><img src="bilder/fern_32.jpg" alt="" height="27" width="66" border="0"></a></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=right');"><img src="bilder/fern_33.jpg" alt="" height="27" width="67" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=down');"><img src="bilder/fern_36.jpg" alt="" height="27" width="66" border="0"></a></td> + <td></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + <tr> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=volminus');"><img src="bilder/fern_39.jpg" alt="" height="27" width="67" border="0"></a></td> + <td></td> + <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=volplus');"><img src="bilder/fern_40.jpg" alt="" height="27" width="67" border="0"></a></td> + </tr> + <tr> + <td></td> + <td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0"></td> + <td></td> + </tr> + </table> </td> - <td> - <img src="bilder/spacer.gif" name="switchimage" width="2" height="1"> + </tr> + <tr> + <td colspan="3"> </td> + </tr> + <tr valign="middle"> + <td valign="middle"> + <nobr> + <b>Intervall:</b> + <select name="Seconds" size="1" onChange="v_changeInterval(this.options[this.selectedIndex].value)"> + <option value="0">off</option> + <option value="1"> 1 sec.</option> + <option value="2"> 2 sec.</option> + <option value="3"> 3 sec</option> + <option value="5" selected> 5 sec.</option> + <option value="10">10 sec.</option> + <option value="30">30 sec.</option> + <option value="60">60 sec.</option> + </select> + <input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> + <b>Größe:</b> + <select name="Size" size="1" onChange="v_changeSize(this.options[this.selectedIndex].value)"> + <option value="full">1:1</option> + <option value="half" selected>1:2</option> + <option value="quarter">1:4</option> + </select> + <input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> + </nobr> </td> - <td valign="top"> - <table border=0 cellpadding=0 cellspacing=0> - <tr> - <td colspan="3" align="right"><nobr><input type="button" onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Power')" name="menu" value="Power"></td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=1')" type="button" name="1" value="1"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=2')" type="button" name="2" value="2"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=3')" type="button" name="3" value="3"></td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=4')" type="button" name="4" value="4"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=5')" type="button" name="5" value="5"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=6')" type="button" name="6" value="6"></td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=7')" type="button" name="7" value="7"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=8')" type="button" name="8" value="8"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=9')" type="button" name="9" value="9"></td> - <tr> - <tr> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=0')" type="button" name="0" value="0"></td> - <td> </td> - <tr> - <tr> - <td colspan="3" align="center"><nobr> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Red')" type="button" name="red" value=" " style="background:red"> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Green')" type="button" name="green" value=" " style="background:green"> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Yellow')" type="button" name="yellow" value=" " style="background:yellow"> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Blue')" type="button" name="blue" value=" " style="background:blue"> - </td> - <tr> - <tr> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Up')" type="button" name="up" value="^"></td> - <td> </td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Left')" type="button" name="left" value="<"></td> - <td align='center'><input onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Ok')" type="button" name="ok" value="Ok"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Right')" type="button" name="right" value=">"></td> - <tr> - <tr> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Down')" type="button" name="down" value="v"></td> - <td> </td> - <tr> - <tr> - <td colspan="3"><nobr> - <input type="button" onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Menu')" name="menu" value="Menu"> - <input onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Back')" type="button" name="back" value="Back"> - </td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumeMinus')" type="button" name="leiser" value="-"></td> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumePlus')" type="button" name="lauter" value="+"></td> - <tr> - <tr><td colspan+"3"> </td></tr> - <tr valign="bottom"> - <td colspan="3" valign="bottom"><b>Intervall:</b><br><select name="Seconds" size="1" onChange="v_changeInterval(this.options[this.selectedIndex].value)"> - <option value="0">off</option> - <option value="1"> 1 sec.</option> - <option value="2"> 2 sec.</option> - <option value="3"> 3 sec</option> - <option value="5" selected> 5 sec.</option> - <option value="10">10 sec.</option> - <option value="30">30 sec.</option> - <option value="60">60 sec.</option> - </select><input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> - </td> - </tr> - <tr valign="bottom"> - <td colspan="3" valign="bottom"><b>Größe:</b><br><select name="Size" size="1" onChange="v_changeSize(this.options[this.selectedIndex].value)"> - <option value="full">1:1</option> - <option value="half" selected>1:2</option> - <option value="quarter">1:4</option> - </select><input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> - </td> - </tr> - </table> - </td> - </tr> - </table> - </form> - </body> + <td colspan="2"> </td> + </tr> + </table> + </form> +</body> </html> diff --git a/template/Deutsch/tv.html.bak b/template/Deutsch/tv.html.bak deleted file mode 100644 index e5609c1..0000000 --- a/template/Deutsch/tv.html.bak +++ /dev/null @@ -1,139 +0,0 @@ -<html> - <head> - <title>Fernseher (<tmpl_var host>)</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <script language="JavaScript"> - <!-- - var aktiv; - var interval = 5; - - function switch_channel(url) { - Now = new Date(); - document.switchimage.src = url + "&" + Now.getTime(); - window.setTimeout("WebcamUpdate()", 500); - } - - function WebcamUpdate() { - Now = new Date(); - NewPicUrl = "<tmpl_var url>&size=half&" + Now.getTime(); - document.Bild.src = NewPicUrl; - } - function go() { - WebcamUpdate(); - v_Start(); - } - function v_Start() { - aktiv = window.setInterval("WebcamUpdate()", interval * 1000); - } - function v_Stop() { - window.clearInterval(aktiv); - } - function v_changeInterval(val) { - interval = val; - v_Stop(); - if(interval > 0) { - go() - }; - } - //--> - </script> - <style type="text/css" media="screen"><!-- -#Ebene1 { position: absolute; z-index: 0; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block } -#Ebene2 { position: absolute; z-index: 10; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block } -td { color: #000; font-weight: normal; font-size: 11px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif } -input, b { font-weight: normal; font-size: 9px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif} -select { font-weight: normal; width: 55px; height: 20px; font-size: 9px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif} -#small { font-weight: normal; width: 20px; height: 20px; font-size: 9px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif} - --></style> - </head> - -<body onLoad="go()" background="bilder/tv_bottom.gif" bgcolor="#FFFFFF" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> - <form name="liveform"> - <table width="200" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td> - <img name="Bild" src="<tmpl_var url>&size=half" border="1" hspace=2 vspace=2> - </td> - <td> - <img src="bilder/spacer.gif" name="switchimage" width="2" height="1"> - </td> - <td valign="top"> - <table border=0 cellpadding=0 cellspacing=0> - <tr> - <td colspan="3" align="right"><nobr><input type="button" onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Power')" name="menu" value="Power"></td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=1')" type="button" name="1" value="1"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=2')" type="button" name="2" value="2"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=3')" type="button" name="3" value="3"></td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=4')" type="button" name="4" value="4"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=5')" type="button" name="5" value="5"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=6')" type="button" name="6" value="6"></td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=7')" type="button" name="7" value="7"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=8')" type="button" name="8" value="8"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=9')" type="button" name="9" value="9"></td> - <tr> - <tr> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=0')" type="button" name="0" value="0"></td> - <td> </td> - <tr> - <tr> - <td colspan="3" align="center"><nobr> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Red')" type="button" name="red" value=" " style="background:red"> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Green')" type="button" name="green" value=" " style="background:green"> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Yellow')" type="button" name="yellow" value=" " style="background:yellow"> - <input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Blue')" type="button" name="blue" value=" " style="background:blue"> - </td> - <tr> - <tr> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Up')" type="button" name="up" value="^"></td> - <td> </td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Left')" type="button" name="left" value="<"></td> - <td align='center'><input onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Ok')" type="button" name="ok" value="Ok"></td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Right')" type="button" name="right" value=">"></td> - <tr> - <tr> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Down')" type="button" name="down" value="v"></td> - <td> </td> - <tr> - <tr> - <td colspan="3"><nobr> - <input type="button" onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Menu')" name="menu" value="Menu"> - <input onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=Back')" type="button" name="back" value="Back"> - </td> - <tr> - <tr> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumeMinus')" type="button" name="leiser" value="-"></td> - <td> </td> - <td align='center'><input id='small' onclick="switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumePlus')" type="button" name="lauter" value="+"></td> - <tr> - <tr><td colspan+"3"> </td></tr> - <tr valign="bottom"> - <td colspan="3" valign="bottom"><b>Intervall:</b><br><select name="Seconds" size="1" onChange="v_changeInterval(this.options[this.selectedIndex].value)"> - <option value="0">off</option> - <option value="1"> 1 sec.</option> - <option value="2"> 2 sec.</option> - <option value="3"> 3 sec</option> - <option value="5" selected> 5 sec.</option> - <option value="10">10 sec.</option> - <option value="30">30 sec.</option> - <option value="60">60 sec.</option> - </select><input type="button" name="livebild" value='G' title="Grab the picture!" onClick="WebcamUpdate()"> - </td> - </tr> - </table> - </td> - </tr> - </table> - </form> - </body> -</html> diff --git a/template/Deutsch/tv_flash.html b/template/Deutsch/tv_flash.html index 49ed7c8..9022318 100644 --- a/template/Deutsch/tv_flash.html +++ b/template/Deutsch/tv_flash.html @@ -1,14 +1,16 @@ <html> - <head> - <title>Fernseher (<tmpl_var host>)</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - </head> -<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0" width="100%" height="100%" id="remote" align="middle"> -<param name="allowScriptAccess" value="sameDomain" /> -<param name="movie" value="bilder/remote.swf" /> -<param name="quality" value="high" /> -<param name="bgcolor" value="#ffffff" /> -<embed src="bilder/remote.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="remote" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> -</object> +<head> + <title>Fernseher (<tmpl_var host>)</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</head> + +<body> + <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0" width="100%" height="100%" id="remote" align="middle"> + <param name="allowScriptAccess" value="sameDomain" /> + <param name="movie" value="bilder/remote.swf" /> + <param name="quality" value="high" /> + <param name="bgcolor" value="#ffffff" /> + <embed src="bilder/remote.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="remote" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> + </object> </body> </html> diff --git a/template/English/at_new.html b/template/English/at_new.html index 87e3482..629296f 100644 --- a/template/English/at_new.html +++ b/template/English/at_new.html @@ -32,12 +32,16 @@ <td width="30" height="25" background="bilder/uebersicht_links.gif"></td> <td height="25" background="bilder/uebersicht_mitte.gif"> Auto Timer Active:</td> <td height="25" background="bilder/uebersicht_mitte.gif"> - <tmpl_if name="active"> - <input type="radio" name="active" value="1" checked>yes <input type="radio" name="active" value="0">no + <tmpl_if name="oneshot"> + <input type="radio" name="active" value="1">yes <input type="radio" name="active" value="0">no <input type="radio" name="active" value="2" checked>one shot + <tmpl_else> + <tmpl_if name="active"> + <input type="radio" name="active" value="1" checked>yes <input type="radio" name="active" value="0">no <input type="radio" name="active" value="2">one shot - <tmpl_else> - <input type="radio" name="active" value="1">yes <input type="radio" name="active" value="0" checked>no + <tmpl_else> + <input type="radio" name="active" value="1">yes <input type="radio" name="active" value="0" checked>no <input type="radio" name="active" value="2">one shot + </tmpl_if> </tmpl_if> </td> <td width="30" height="25" background="bilder/uebersicht_rechts.gif"></td> diff --git a/vdradmind.at b/vdradmind.at index 801f47b..8b13789 100644 --- a/vdradmind.at +++ b/vdradmind.at @@ -1 +1 @@ -0:TEST:5:1200:1300:1:1:1:0::0 + diff --git a/vdradmind.pl b/vdradmind.pl index faa157c..1f2d4ef 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -32,6 +32,8 @@ BEGIN { unshift(@INC, $BASENAME . "lib/"); } +require File::Temp; + use CGI qw(:no_debug); use IO::Socket; use HTML::Template::Expr(); @@ -39,13 +41,15 @@ use Template; use Time::Local qw(timelocal); use POSIX ":sys_wait_h", qw(strftime mktime); use MIME::Base64(); +use File::Temp(); $SIG{CHLD} = sub { wait }; use strict; #use warnings; -my $SEARCH_FILES_IN_SYSTEM = (-d '/usr/share/vdradmin/lib' ? 1 : 0); # for distribution +#my $SEARCH_FILES_IN_SYSTEM = (-d '/usr/share/vdradmin/lib' ? 1 : 0); # for distribution +my $SEARCH_FILES_IN_SYSTEM = 0; sub true () { 1 }; sub false () { 0 }; @@ -68,6 +72,7 @@ $CONFIG{GUEST_ACCOUNT} = 0; $CONFIG{LANGUAGE} = "Deutsch"; $CONFIG{LOGLEVEL} = 81; # 32799 $CONFIG{CACHE_TIMEOUT} = 60; +$CONFIG{LOCAL_NET} = "0.0.0.0/32"; $CONFIG{CACHE_LASTUPDATE} = 0; $CONFIG{AT_FUNC} = 1; $CONFIG{AT_TIMEOUT} = 120; @@ -92,7 +97,7 @@ $CONFIG{EPG_DIRECT} = 1; $CONFIG{EPG_FILENAME} = "/video/epg.data"; $CONFIG{SKIN} = 'bilder'; -my $VERSION = "0.97-am1"; +my $VERSION = "0.97-am2"; my $SERVERVERSION = "vdradmind/$VERSION"; my $VIDEODIR = "/video"; my $DONE = &DONE_Read || {}; @@ -137,7 +142,7 @@ my $Xtemplate = Template->new($Xconfig); # ---- End new template section ---- my $I18NFILE = "i18n.pl"; -my $USE_SHELL_GZIP = true; # set on false to use the gzip library +my $USE_SHELL_GZIP = false; # set on false to use the gzip library if($CONFIG{MOD_GZIP}) { # lib gzipping @@ -316,7 +321,7 @@ while(true) { } # authenticate - if($CONFIG{USERNAME} eq $username && $CONFIG{PASSWORD} eq $password) { + if(($CONFIG{USERNAME} eq $username && $CONFIG{PASSWORD} eq $password) || subnetcheck($peer,$CONFIG{LOCAL_NET}) ) { $Guest = 0; } elsif(($CONFIG{USERNAME_GUEST} eq $username && $CONFIG{PASSWORD_GUEST} eq $password) && $CONFIG{GUEST_ACCOUNT}) { $Guest = 1; @@ -509,6 +514,22 @@ sub get_vdrid_from_channelid { } } +# +# Used to store channelid (instead of channel number) into auto timer entries. +# Allows channels to be moved around without auto timer channels being messed up. +# Use at your own risk... tvr@iki.fi +# +sub get_channelid_from_vdrid { + my $vdr_id = shift; + if($vdr_id) { + my @C = grep($_->{vdr_id} == $vdr_id, @CHAN); + if(scalar(@C) == 1) { + my $ch = $C[0]; + return $ch->{source} . "-" . $ch->{nid} . "-" . ($ch->{nid}||$ch->{tid}?$ch->{tid}:$ch->{frequency}) . "-" . $ch->{service_id}; + } + } +} + sub get_name_from_vdrid { my $vdr_id = shift; if($vdr_id) { @@ -598,9 +619,12 @@ sub EPG_buildTree { my($event_id, $time, $duration) = ($1, $2, $3); my($title, $subtitle, $summary); while($_ = $SVDRP->readoneline) { - if(/^T (.*)/) { $title = $1; $title =~ s/\|/<br>/sig } - if(/^S (.*)/) { $subtitle = $1; $subtitle =~ s/\|/<br>/sig } - if(/^D (.*)/) { $summary = $1; $summary =~ s/\|/<br>/sig } +# if(/^T (.*)/) { $title = $1; $title =~ s/\|/<br>/sig } +# if(/^S (.*)/) { $subtitle = $1; $subtitle =~ s/\|/<br>/sig } +# if(/^D (.*)/) { $summary = $1; $summary =~ s/\|/<br>/sig } + if(/^T (.*)/) { $title = $1; } + if(/^S (.*)/) { $subtitle = $1; } + if(/^D (.*)/) { $summary = $1; } if(/^e/) { # push(@events, { @@ -704,7 +728,7 @@ sub headerTime { sub GZip { my $content = shift; - my $filename = "/tmp/vdradmin." . time(); + my $filename = new File::Temp("vdradmin-XXXXX", UNLINK => 1); open(PIPE, "| gzip -9 - > $filename") || die "cant open pipe to gzip ($!)"; print PIPE $$content; close(PIPE); @@ -844,6 +868,7 @@ sub AT_Read { chomp; next if($_ eq ""); my($active, $pattern, $section, $start, $stop, $episode, $prio, $lft, $channel, $directory, $done) = split(/\:/, $_); + my($usechannel) = ($channel =~ /^\d+$/) ? $channel : get_vdrid_from_channelid($channel); push(@at, { active => $active, pattern => $pattern, @@ -853,7 +878,7 @@ sub AT_Read { episode => $episode, prio => $prio, lft => $lft, - channel => $channel, + channel => $usechannel, directory => $directory, done => $done }); @@ -871,10 +896,17 @@ sub AT_Write { my $temp; for my $item (qw(active pattern section start stop episode prio lft channel directory done)) { $_->{$item} =~ s/\:/_/g; + my $tempitem = $_->{$item}; + if ($item eq 'channel') { + my $channelnumber = get_channelid_from_vdrid($tempitem); + if ($channelnumber) { + $tempitem = $channelnumber; + } + } if(length($temp) == 0) { - $temp = $_->{$item}; + $temp = $tempitem; } else { - $temp .= ":" . $_->{$item}; + $temp .= ":" . $tempitem; } } print AT_FILE $temp, "\n"; @@ -927,6 +959,8 @@ sub AutoTimer { my($search, $start, $stop) = @_; my @at = AT_Read(); + + my $oneshots = 0; $DONE = &DONE_Read unless($DONE); my %blacklist = &BlackList_Read; @@ -1169,14 +1203,24 @@ sub AutoTimer { Log(LOG_AT, sprintf("AutoTimer: Programming Timer \"%s\" (Event-ID %s, %s - %s)", $title, $event->{event_id}, strftime("%Y%m%d-%H%M", localtime($event->{start})), strftime("%Y%m%d-%H%M", localtime($event->{stop})))); - AT_ProgTimer(0x8001, $event->{event_id}, $event->{vdr_id}, $event->{start}, $event->{stop}, + AT_ProgTimer(0x0001, $event->{event_id}, $event->{vdr_id}, $event->{start}, $event->{stop}, $title, $event->{summary}, $at->{prio}, $at->{lft}); + if ($at->{active} == 2) { + Log(LOG_AT, sprintf("AutoTimer: Disabling one-shot Timer")); + $at->{active} = 0; + $oneshots = 1; + } $DONE->{$DoneStr} = $event->{stop} if($at->{done}); } } } + if ($oneshots) { + Log(LOG_AT, sprintf("AutoTimer: saving because of one-shots triggered")); + AT_Write(@at); + } + Log(LOG_AT, "Auto Timer: Done."); Log(LOG_AT, "Auto Timer: Search for old Done Entrys..."); for(keys %$DONE) { delete $DONE->{$_} if(time > $DONE->{$_}) } @@ -1435,26 +1479,25 @@ sub ParseTimer { substr($stop, 0, 2), $stop > $start ? $3 : $3 + 1, ($2 - 1), $1); } else { # regular timer - $startsse = my_mktime(substr($start, 2, 2), - substr($start, 0, 2), $dor, (my_strftime("%m") - 1), - my_strftime("%Y")); + $dor =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; + $startsse = my_mktime(substr($start, 2, 2), substr($start, 0, 2), $3, ($2 - 1), $1); $stopsse = my_mktime(substr($stop, 2, 2), - substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, - (my_strftime("%m") - 1), my_strftime("%Y")); + substr($stop, 0, 2), $stop > $start ? $3 : $3 + 1, ($2 - 1), $1); } - # move timers which have expired one month into the future - if(length($dor) != 7 && $stopsse < time) { - $startsse = my_mktime(substr($start, 2, 2), - substr($start, 0, 2), $dor, (my_strftime("%m") % 12), - (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); - - $stopsse = my_mktime(substr($stop, 2, 2), - substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, - (my_strftime("%m") % 12), - (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); - } +# vdr-1.3.23 changes day format to yyyy-mm-dd +# # move timers which have expired one month into the future +# if(length($dor) != 7 && $stopsse < time) { +# $startsse = my_mktime(substr($start, 2, 2), +# substr($start, 0, 2), $dor, (my_strftime("%m") % 12), +# (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); +# +# $stopsse = my_mktime(substr($stop, 2, 2), +# substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, +# (my_strftime("%m") % 12), +# (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0))); +# } if($CONFIG{RECORDINGS} && length($dor) == 7) { # repeating timer # generate repeating timer entries for up to 28 days @@ -2462,7 +2505,7 @@ sub timer_new_form { my $this_event; if($epg_id) { # new timer my $this = EPG_getEntry($vdr_id, $epg_id); - $this_event->{active} = 0x8001; + $this_event->{active} = 0x0001; $this_event->{event_id} = $this->{event_id}; $this_event->{start} = $this->{start} - ($CONFIG{TM_MARGIN_BEGIN} * 60); $this_event->{stop} = $this->{stop} + ($CONFIG{TM_MARGIN_END} * 60); @@ -2509,6 +2552,9 @@ sub timer_new_form { } } + my $displaysummary = $this_event->{summary}; + $displaysummary =~ s/\|/\n/g; + my $template = TemplateNew("timer_new.html"); $template->param( url => $MyURL, @@ -2522,7 +2568,7 @@ sub timer_new_form { prio => $this_event->{prio} ? $this_event->{prio} : $CONFIG{TM_PRIORITY}, lft => $this_event->{lft} ? $this_event->{lft} : $CONFIG{TM_LIFETIME}, title => $this_event->{title}, - summary => $this_event->{summary}, + summary => $displaysummary, timer_id => $timer_id ? $timer_id : 0, channels => \@channels, newtimer => $timer_id ? 0 : 1, @@ -2596,7 +2642,8 @@ sub timer_add { if(length($q->param("summary")) > 0) { $data->{summary} = $q->param("summary"); $data->{summary} =~ s/\://g; - $data->{summary} =~ s/[\r\n]//g; + $data->{summary} =~ s/\r//g; + $data->{summary} =~ s/\n/|/g; } my $dor = $data->{dor}; @@ -2674,6 +2721,7 @@ sub rec_stream { my $f; my(@tmp, $dirname, $name, $parent, @files); my( $date, $time, $day, $month, $hour, $minute); + my $c; for(SendCMD("lstr")) { ($i, $date, $time, $title) = split(/ +/, $_, 4); @@ -2688,14 +2736,16 @@ sub rec_stream { $title =~ s/~/\//g; $title =~ s/\ /\_/g; for ( $i=0 ;$ i < length($title); $i++) { - unless ( substr($title,$i,1) =~ /[öäüßÖÄÜA-Za-z0123456789_!@\$%&\(\)\+,\-;=]/) { - $newtitle.= sprintf( "#%02X", ord( substr($title,$i,1))); + $c = substr($title,$i,1); + unless ($c =~ /[öäüßÖÄÜA-Za-z0123456789_!@\$%&\(\)\+,.\-;=~]/) { + $newtitle.= sprintf( "#%02X", ord( $c )); } else { - $newtitle.= substr($title,$i,1); + $newtitle.= $c; } } $title=$newtitle; - @files= `find $VIDEODIR/$title/????-$month-$day.$hour?$minute.??.??.rec -name "???.vdr" | sort -r`; + $title =~ s/~/\//g; + @files= `find $VIDEODIR/ -regex "$VIDEODIR/$title\_*/....-$month-$day\\.$hour.$minute\\...\\...\\.rec/...\\.vdr" | sort -r`; foreach (@files) { $_ =~ s/$VIDEODIR//; $data= $CONFIG{ST_URL}."$_\n$data"; @@ -2864,6 +2914,7 @@ sub at_timer_edit { url => $MyURL, prio => $at[$id-1]->{prio} ? $at[$id-1]->{prio} : $CONFIG{AT_PRIORITY}, lft => $at[$id-1]->{lft} ? $at[$id-1]->{lft} : $CONFIG{AT_LIFETIME}, + oneshot => $at[$id-1]->{active} == 2, active => $at[$id-1]->{active}, done => $at[$id-1]->{done}, episode => $at[$id-1]->{episode}, @@ -3190,6 +3241,17 @@ sub prog_summary { next if(!$found); } + my $displaytext = $event->{summary}; + my $displaytitle = $event->{title}; + my $displaysubtitle = $event->{subtitle}; + + $displaytext =~ s/\n/<br>\n/g; + $displaytext =~ s/\|/<br>\n/g; + $displaytitle =~ s/\n/<br>\n/g; + $displaytitle =~ s/\|/<br>\n/g; + $displaysubtitle =~ s/\n/<br>\n/g; + $displaysubtitle =~ s/\|/<br>\n/g; + push(@show, { date => my_strftime("%d.%m.%y", $event->{start}), longdate => sprintf("%s., %s. %s %s", @@ -3199,10 +3261,10 @@ sub prog_summary { my_strftime("%Y", $event->{start})), start => my_strftime("%H:%M", $event->{start}), stop => my_strftime("%H:%M", $event->{stop}), - title => $event->{title}, - subtitle => length($event->{subtitle}) > 30 ? substr($event->{subtitle}, 0, 30) . "..." : $event->{subtitle}, + title => $displaytitle, + subtitle => length($displaysubtitle) > 30 ? substr($displaysubtitle, 0, 30) . "..." : $displaysubtitle, progname => $event->{channel_name}, - summary => length($event->{summary}) > 120 ? substr($event->{summary}, 0, 120) . "..." : $event->{summary}, + summary => length($displaytext) > 120 ? substr($displaytext, 0, 120) . "..." : $displaytext, vdr_id => $event->{vdr_id}, proglink => sprintf("%s?aktion=prog_list&vdr_id=%s", $MyURL, $event->{vdr_id}), switchurl=> sprintf("%s?aktion=prog_switch&channel=%s", $MyURL, $event->{vdr_id}), @@ -3471,11 +3533,14 @@ sub rec_detail { my($result) = SendCMD("lstr $id"); if($result !~ /No summary availab/i) { for(split(/\|/, $result)) { - if($_ ne (split(/\~/, $title))[1]) { + if($_ ne (split(/\~/, $title))[1] && "%" . $_ ne (split(/\~/, $title))[1] && "@" . $_ ne (split(/\~/, $title))[1]) { if($first && $title !~ /\~/ && length($title) < 20) { $title .= "~" . $_; $first = 0; } else { + if($text) { + $text .= "<br>"; + } $text .= "$_ "; } } @@ -3484,7 +3549,7 @@ sub rec_detail { # $title =~ s/\~/ - /; - + my $template = TemplateNew("prog_detail.html"); $template->param( text => $text ? $text : "", @@ -3739,7 +3804,7 @@ sub show_help { ############################################################################# sub grab_picture { my $size = $q->param("size"); - my $file = "/tmp/vdr.jpg"; + my $file = new File::Temp("vdr-XXXXX", UNLINK => 1, SUFFIX => ".jpg"); my $maxwidth = 768; my $maxheight = 576; my($width, $height); @@ -3774,6 +3839,37 @@ sub force_update { } ############################################################################# +# Authentication +############################################################################# + +sub subnetcheck { + my $ip=$_[0]; + my $net=$_[1]; + my ($ip1,$ip2,$ip3,$ip4,$net_base,$net_range,$net_base1,$net_base2, + $net_base3,$net_base4,$bin_ip,$bin_net); + + ($ip1,$ip2,$ip3,$ip4) = split(/\./,$ip); + ($net_base,$net_range) = split(/\//,$net); + ($net_base1,$net_base2,$net_base3,$net_base4) = split(/\./,$net_base); + + $bin_ip = unpack("B*", pack("C", $ip1)); + $bin_ip .= unpack("B*", pack("C", $ip2)); + $bin_ip .= unpack("B*", pack("C", $ip3)); + $bin_ip .= unpack("B*", pack("C", $ip4)); + + $bin_net = unpack("B*", pack("C", $net_base1)); + $bin_net .= unpack("B*", pack("C", $net_base2)); + $bin_net .= unpack("B*", pack("C", $net_base3)); + $bin_net .= unpack("B*", pack("C", $net_base4)); + + if (substr($bin_ip,0,$net_range) eq substr($bin_net,0,$net_range)) { + return 1; + } else { + return 0; + } +} + +############################################################################# # communikation with vdr ############################################################################# package SVDRP; |