diff options
author | Christian Lippka <cl@openoffice.org> | 2002-12-12 12:57:06 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2002-12-12 12:57:06 +0000 |
commit | eea1fa36cc87a906d4946e62ab90443f41183d82 (patch) | |
tree | 954cce3229cea2000a6587980178c8cac8d2f067 /sd/res | |
parent | #105940# converting dos line ends to unix line ends to work with newer perl (diff) | |
download | core-eea1fa36cc87a906d4946e62ab90443f41183d82.tar.gz core-eea1fa36cc87a906d4946e62ab90443f41183d82.zip |
#105940# converting dos line ends to unix line ends to work with newer perl
Diffstat (limited to 'sd/res')
-rw-r--r-- | sd/res/webview/edit.pl | 18 | ||||
-rw-r--r-- | sd/res/webview/editpic.pl | 40 | ||||
-rw-r--r-- | sd/res/webview/index.pl | 17 | ||||
-rw-r--r-- | sd/res/webview/poll.pl | 32 | ||||
-rw-r--r-- | sd/res/webview/savepic.pl | 41 | ||||
-rw-r--r-- | sd/res/webview/show.pl | 39 | ||||
-rw-r--r-- | sd/res/webview/webview.pl | 21 |
7 files changed, 208 insertions, 0 deletions
diff --git a/sd/res/webview/edit.pl b/sd/res/webview/edit.pl new file mode 100644 index 000000000000..e1888f7fef3e --- /dev/null +++ b/sd/res/webview/edit.pl @@ -0,0 +1,18 @@ +<HTML> + +<HEAD> + <TITLE>$$1</TITLE> +</HEAD> + +<FRAMESET ROWS="*,42,2" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0> + <FRAME SRC="$$3show.pl" NAME="frame1" SCROLLING=yes RESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0> + <FRAME SRC="$$3editpic.pl" NAME="frame3" SCROLLING=yes RESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0> + <FRAME SRC="$$3poll.pl" NAME="frame2" SCROLLING=no NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0> +</FRAMESET> + +<NOFRAMES> + +<BODY BGCOLOR="white"> + <META HTTP-EQUIV="-REFRESH" CONTENT="1;URL=$$3show.pl"> +</BODY> +</HTML>
\ No newline at end of file diff --git a/sd/res/webview/editpic.pl b/sd/res/webview/editpic.pl new file mode 100644 index 000000000000..834421601b77 --- /dev/null +++ b/sd/res/webview/editpic.pl @@ -0,0 +1,40 @@ +#!/usr/bin/perl + +require "common.pl"; + +print "Content-type: text/html\n\n"; +print "<HTML>\n"; + +print "<HEAD>\n"; +print "<title>editpic.pl</title>"; +print "</HEAD>\n"; + +print "<BODY>\n"; + $sCurrPic = join( "", common::File_read( "currpic.txt" ) ); + @aPictureArray = common::File_read( "picture.txt" ); + $nPictureArrayLen = @aPictureArray; + print "<FORM action=\"savepic.pl\" method=get>\n"; + if( abs( $sCurrPic ) > 1 ) + { + print "<INPUT type=submit name=\"Auswahl\" value=\"-\"></INPUT>\n"; + } + else + { + print "<INPUT type=button value=\" \"></INPUT>\n"; + } + print "<INPUT type=text name=\"CurrPic\" value=\""; + print $sCurrPic; + print "\" SIZE=3></INPUT>\n"; + if( abs( $sCurrPic ) < ( $nPictureArrayLen - 1 ) ) + { + print "<INPUT type=submit name=\"Auswahl\" value=\"+\"></INPUT>\n"; + } + else + { + print "<INPUT type=button value=\" \"></INPUT>\n"; + } + print "<INPUT type=submit name=\"Auswahl\" value=\"$$2\"></INPUT>\n"; + print "</FORM>\n"; +print "</BODY>\n"; + +print "</HTML>\n"; diff --git a/sd/res/webview/index.pl b/sd/res/webview/index.pl new file mode 100644 index 000000000000..1fb265f54092 --- /dev/null +++ b/sd/res/webview/index.pl @@ -0,0 +1,17 @@ +<HTML> + +<HEAD> + <TITLE>$$1</TITLE> +</HEAD> + +<FRAMESET ROWS="*" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0> + <FRAME SRC="$$3webcast.pl" NAME="frame1" SCROLLING=yes RESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0> +</FRAMESET> + +<NOFRAMES> + +<BODY BGCOLOR="white"> + <META HTTP-EQUIV="-REFRESH" CONTENT="1;URL=$$3webcast.pl"> +</BODY>; + +</HTML>
\ No newline at end of file diff --git a/sd/res/webview/poll.pl b/sd/res/webview/poll.pl new file mode 100644 index 000000000000..08a31c3e22b4 --- /dev/null +++ b/sd/res/webview/poll.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +require "common.pl"; + +print "Content-type: text/html\n\n"; +print "<HTML>"; + +# get current and last shown picture id +$sCurrPic = join( "", common::File_read( "currpic.txt" ) ); + +%aRequestMap = common::HTTP_getRequest(); +$sLastPic = $aRequestMap{ "LastPic" }; + +print "<HEAD>"; + print "<META http-equiv=\"refresh\" CONTENT=\"" . $common::REFRESH_TIME . "; URL=poll.pl?LastPic=" . $sCurrPic . "\">"; +print "</HEAD>"; + +#' a new picture was chosen ? +if( $sLastPic ne $sCurrPic ) +{ + # then show the new picture + print "<BODY bgcolor=\"red\" onLoad=\"parent.frame1.location.href='./show.pl?" . $sCurrPic . "'\">"; +} +else +{ + # otherwise do nothing + print "<BODY bgcolor=\"green\">"; +} + +print "</BODY>"; + +print "</HTML>";
\ No newline at end of file diff --git a/sd/res/webview/savepic.pl b/sd/res/webview/savepic.pl new file mode 100644 index 000000000000..8d545aa108b0 --- /dev/null +++ b/sd/res/webview/savepic.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +require "common.pl"; + +%aRequestMap = common::HTTP_getRequest(); + +# get new picture +$sCurrPic = $aRequestMap{ "CurrPic" }; + +@aPictureArray = common::File_read( "picture.txt" ); +$nPictureArrayLen = @aPictureArray; + +# check if + or - was pressed +if( $aRequestMap{ "Auswahl" } eq "+" ) +{ + $sCurrPic = abs( $sCurrPic ) + 1; +} + +if( $aRequestMap{ "Auswahl" } eq "-" ) +{ + $sCurrPic = abs( $sCurrPic ) - 1; +} + +# save picture name +if( (abs( $sCurrPic ) > 0) && ( abs( $sCurrPic ) < ( $nPictureArrayLen ) ) ) +{ + open( F_CURRPIC, ">currpic.txt"); + print F_CURRPIC abs( $sCurrPic ); + close( F_CURRPIC ); +} + +# return to edit page +print "Content-type: text/html\n\n"; +print "<HTML>\n<HEAD>\n"; +print "<META http-equiv=\"refresh\" CONTENT=\"0 ;URL=editpic.pl\">"; +print "<title>savepic.pl</title>"; +print "</HEAD>\n"; +print "<BODY>\n"; +print "</BODY>\n"; +print "</HTML>\n"; +%> diff --git a/sd/res/webview/show.pl b/sd/res/webview/show.pl new file mode 100644 index 000000000000..9687bd995538 --- /dev/null +++ b/sd/res/webview/show.pl @@ -0,0 +1,39 @@ +#!/usr/bin/perl + +require "common.pl"; + +print "Content-type: text/html\n\n"; + +# get current and next picture +$sCurrPic = join( "", common::File_read( "currpic.txt" ) ); +@aPictureArray = common::File_read( "picture.txt" ); + +# not last picture or wrong input ? +if( abs( $sCurrPic ) > 0 ) +{ + $nCurrPic = abs( $sCurrPic ); + $nPictureArrayLen = @aPictureArray; + if( $nCurrPic < $nPictureArrayLen ) + { + $sPictureName1 = ( split( ";", @aPictureArray[ $nCurrPic ] ) )[ 1 ]; + $sPictureName2 = ( split( ";", @aPictureArray[ $nCurrPic + 1 ] ) )[ 1 ]; + } + else + { + $sPictureName1 = ( split( ";", @aPictureArray[ $nCurrPic ] ) )[ 1 ]; + $sPictureName2 = $sPictureName1; + } +} + +print "<HTML>"; + +print "<HEAD>"; + print "<TITLE>$$1</TITLE>"; +print "</HEAD>"; + +print "<BODY bgcolor=\"white\">"; + print "<P ALIGN=CENTER><IMG src=\"" . $sPictureName1 . "\" width=$$4 height=$$5 border=0>"; + print "<P><IMG src=\"" . $sPictureName2 . "\" width=1 height=1 border=0>"; +print "</BODY>"; + +print "</HTML>";
\ No newline at end of file diff --git a/sd/res/webview/webview.pl b/sd/res/webview/webview.pl new file mode 100644 index 000000000000..299c9480e330 --- /dev/null +++ b/sd/res/webview/webview.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +print "Content-type: text/html\n\n"; + +print "<HTML>"; + +print "<HEAD>"; +print "</HEAD>"; + +print "<FRAMESET ROWS=\"*,2\" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>"; + print "<FRAME SRC=\"./show.pl\" NAME=\"frame1\" SCROLLING=yes RESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0>"; + print "<FRAME SRC=\"./poll.pl\" NAME=\"frame2\" SCROLLING=no NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0>"; +print "</FRAMESET>"; + +print "<NOFRAMES>"; + +print "<BODY BGCOLOR=\"white\">"; + print "<META HTTP-EQUIV=\"-REFRESH\" CONTENT=\"1;URL=./show.pl\">"; +print "</BODY>"; + +print "</HTML>";
\ No newline at end of file |