summaryrefslogtreecommitdiffstats
path: root/sd/res/webview
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /sd/res/webview
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sd/res/webview')
-rw-r--r--sd/res/webview/common.inc128
-rw-r--r--sd/res/webview/common.pl66
-rw-r--r--sd/res/webview/edit.asp26
-rw-r--r--sd/res/webview/edit.pl18
-rw-r--r--sd/res/webview/editpic.asp75
-rw-r--r--sd/res/webview/editpic.pl57
-rw-r--r--sd/res/webview/index.pl17
-rw-r--r--sd/res/webview/poll.asp53
-rw-r--r--sd/res/webview/poll.pl49
-rw-r--r--sd/res/webview/savepic.asp56
-rw-r--r--sd/res/webview/savepic.pl58
-rw-r--r--sd/res/webview/show.asp59
-rw-r--r--sd/res/webview/show.pl56
-rw-r--r--sd/res/webview/webcast.asp45
-rw-r--r--sd/res/webview/webcast.pl38
15 files changed, 801 insertions, 0 deletions
diff --git a/sd/res/webview/common.inc b/sd/res/webview/common.inc
new file mode 100644
index 000000000..8a26d7f7a
--- /dev/null
+++ b/sd/res/webview/common.inc
@@ -0,0 +1,128 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+<%
+
+public const cnRefreshTime = 5 ' refresh time in seconds
+
+' filename for file with all pictures and file containing the name of the current picture
+public const csFilePicture= "picture.txt"
+public const csFileCurrent= "currpic.txt"
+
+' constants for file-access
+const ForReading = 1
+const ForWriting = 2
+
+' new-line delimiter
+Dim FILE_LINE_DELIMITER
+FILE_LINE_DELIMITER = vbCRLF
+
+'/**
+' * Get data from file using a given separator.
+' */
+function File_getDataVirtual( sFilename, sServerPath, sSeparator )
+ call Err.Clear()
+
+ Dim aFSObject, sServerFileName
+
+ Set aFSObject = CreateObject("Scripting.FileSystemObject")
+ sServerFileName = aFSObject.BuildPath( Server.MapPath( sServerPath ), sFileName )
+
+ File_getDataVirtual = ""
+ if Err.Number = 0 then
+ File_getDataVirtual = File_read( sServerFileName )
+ If Not IsNull(File_getDataVirtual) Then
+ File_getDataVirtual = Replace( File_getDataVirtual, FILE_LINE_DELIMITER, sSeparator)
+ File_getDataVirtual = Split( File_getDataVirtual, sSeparator)
+ End If
+ end if
+end function
+
+'/**
+' * Get data from a file
+' */
+function File_read( sFilename )
+ call Err.Clear()
+
+ Dim aFSObject, aStream
+
+ Set aFSObject = CreateObject( "Scripting.FileSystemObject" )
+ Set aStream = aFSObject.OpenTextFile( sFilename, ForReading )
+
+ while not aStream.AtEndOfStream
+ File_read = File_read + aStream.ReadLine + FILE_LINE_DELIMITER
+ wend
+
+ aStream.Close
+end function
+
+'/**
+' * Get data from a file given by filename and virtual pathname
+' */
+Function File_readVirtual(sFileName, sServerPath)
+ call Err.Clear()
+
+ Dim aFSObject, sServerFileName
+
+ Set aFSObject = CreateObject("Scripting.FileSystemObject")
+ sServerFileName = aFSObject.BuildPath( Server.MapPath( sServerPath ), sFileName )
+
+ File_readVirtual = ""
+ if Err.Number = 0 then
+ File_readVirtual = File_read( sServerFileName )
+ end if
+End Function
+
+'/**
+' * Write data to a file
+' */
+function File_write( sFileName, sText )
+ call Err.Clear()
+
+ Dim aFSObject, aFile
+
+ Set aFSObject = CreateObject( "Scripting.FileSystemObject" )
+ if Err.Number = 0 then
+ Set aFile = aFSObject.CreateTextFile( sFileName, TRUE )
+ if Err.Number = 0 then
+ aFile.Write( sText )
+ aFile.Close
+ end if
+ end if
+
+ File_write = ( Err.Number = 0 )
+end function
+
+'/**
+' * Write data to a file given by filename and virtual pathname
+' */
+function File_writeVirtual( sFileName, sServerPath, sText )
+ call Err.Clear()
+
+ Dim aFSObject, aServerFile
+
+ Set aFSObject = CreateObject( "Scripting.FileSystemObject" )
+ aServerFile = aFSObject.BuildPath( Server.MapPath( sServerPath ), sFileName )
+
+ If Err.Number = 0 Then
+ File_writeVirtual = File_write( aServerFile, sText )
+ else
+ File_writeVirtual = false
+ End If
+end function
+%> \ No newline at end of file
diff --git a/sd/res/webview/common.pl b/sd/res/webview/common.pl
new file mode 100644
index 000000000..69c9c1d71
--- /dev/null
+++ b/sd/res/webview/common.pl
@@ -0,0 +1,66 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+package common;
+
+$REFRESH_TIME = 5;
+
+sub File_read
+{
+ $sFilename = @_[ 0 ];
+
+ @aFileContentList = "";
+ open( F_CURRPIC, "<" . $sFilename ) || "Could not open file " . $sFilename . " !<BR>\n";
+ while( <F_CURRPIC> )
+ {
+ push( @aFileContentList, $_ );
+ }
+ close( F_CURRPIC );
+
+ return @aFileContentList;
+} ##File_read
+
+
+sub HTTP_getRequest
+{
+ # post- or get- method ?
+ if( $ENV{ 'REQUEST_METHOD' } eq 'GET' )
+ {
+ # get parameters from querystring (get)
+ $sRequest = $ENV{ 'QUERY_STRING' }
+ }
+ else
+ {
+ # get parameters from stdin (post)
+ read( STDIN, $sRequest, $ENV{ 'CONTENT_LENGTH' } );
+ }
+ # process parameters
+ @aRequestList = split( /&/, $sRequest );
+ foreach $Feld ( @aRequestList )
+ {
+ ( $name, $sValue ) = split( /=/, $Feld );
+ $sValue =~ tr/+/ /;
+ $sValue =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
+ $sValue =~ s/<!--(.|\n)*-->//g;
+ $aRequestMap{ $name } = $sValue;
+ }
+
+ return %aRequestMap;
+} ##HTTP_getRequest
+
+1;
diff --git a/sd/res/webview/edit.asp b/sd/res/webview/edit.asp
new file mode 100644
index 000000000..6d5f7291a
--- /dev/null
+++ b/sd/res/webview/edit.asp
@@ -0,0 +1,26 @@
+<HTML>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<HEAD>
+ <TITLE>$$1</TITLE>
+</HEAD>
+<FRAMESET ROWS="90%,10%" FRAMEBORDER=yes>
+ <FRAME name="view" src="webcast.asp">
+ <FRAME name="edit" src="editpic.asp">
+</FRAMESET>
+</HTML> \ No newline at end of file
diff --git a/sd/res/webview/edit.pl b/sd/res/webview/edit.pl
new file mode 100644
index 000000000..bdde80c2c
--- /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>
diff --git a/sd/res/webview/editpic.asp b/sd/res/webview/editpic.asp
new file mode 100644
index 000000000..78599e0fd
--- /dev/null
+++ b/sd/res/webview/editpic.asp
@@ -0,0 +1,75 @@
+<%
+ Option Explicit
+ Response.Expires = 0
+ Response.Buffer = True
+%>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+
+<!-- #include file = "common.inc" -->
+
+
+<%
+ Dim aPictureArray, nPic, nUpper
+
+ aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
+ nPic = File_readVirtual( "currpic.txt", "." )
+ nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
+%>
+
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+ <FORM action="savepic.asp" method=get>
+ <%
+ if isNumeric(nPic) then
+ if (CInt( nPic ) >= CInt( (UBound(aPictureArray ) - 1 ) / 2 )) then
+ nPic = nUpper
+ end if
+ else
+ nPic = nUpper
+ end if
+
+
+ if CInt( nPic ) > 1 then
+ %>
+ <INPUT type=submit name="Auswahl" value="-"></INPUT>
+ <%
+ else
+ %>
+ <INPUT type=button value=" "></INPUT>
+ <%
+ end if
+ %>
+ <INPUT type=text name="CurrPic" value="<% = nPic %>" SIZE=3></INPUT>
+ <%
+ if CInt( nPic ) < CInt( nUpper ) then
+ %>
+ <INPUT type=submit name="Auswahl" value="+"></INPUT>
+ <%
+ else
+ %>
+ <INPUT type=button value=" "></INPUT>
+ <%
+ end if
+ %>
+ <INPUT type=submit name="Auswahl" value="$$2"></INPUT>
+ </FORM>
+</BODY>
+</HTML>
diff --git a/sd/res/webview/editpic.pl b/sd/res/webview/editpic.pl
new file mode 100644
index 000000000..c14df32e2
--- /dev/null
+++ b/sd/res/webview/editpic.pl
@@ -0,0 +1,57 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+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 000000000..e0198e6d3
--- /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>
diff --git a/sd/res/webview/poll.asp b/sd/res/webview/poll.asp
new file mode 100644
index 000000000..0bbce4338
--- /dev/null
+++ b/sd/res/webview/poll.asp
@@ -0,0 +1,53 @@
+<%
+ Option Explicit
+ Response.Expires = 0
+%>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+
+<!-- #include file = "common.inc" -->
+
+<HTML>
+
+<HEAD>
+ <META http-equiv="refresh" CONTENT="<% = cnRefreshTime %>">
+</HEAD>
+
+<%
+ ' get current picture id
+ Dim nGIFID
+
+ nGifID = File_getDataVirtual( csFileCurrent, ".", ";" )( 0 )
+
+ ' a new picture was chosen ?
+ if nGIFID <> Session( "GIFID" ) then
+ ' then store the id of the new picture and show it
+ Session( "GIFID" ) = nGIFID
+ %>
+ <BODY bgcolor="red" onLoad="parent.frame1.location.href='./show.asp?<%= nGIFID %>'">
+ <%
+ else
+ %>
+ <BODY bgcolor="green">
+ <%
+ end if
+%>
+
+</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 000000000..6dded715d
--- /dev/null
+++ b/sd/res/webview/poll.pl
@@ -0,0 +1,49 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+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>";
diff --git a/sd/res/webview/savepic.asp b/sd/res/webview/savepic.asp
new file mode 100644
index 000000000..9a9f32cd1
--- /dev/null
+++ b/sd/res/webview/savepic.asp
@@ -0,0 +1,56 @@
+<%
+ Option Explicit
+ Response.Expires = 0
+ Response.Buffer = True
+%>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+
+<!-- #include file = "common.inc" -->
+
+<%
+ ' get new picture
+ Dim sCurrPic,aPictureArray, nUpper, nCurrPic
+
+ aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
+ nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
+
+ sCurrPic = Request( "CurrPic" )
+
+ ' check if + or - was pressed
+ select case Request( "Auswahl" )
+ case "+"
+ if isNumeric( sCurrPic ) then
+ sCurrPic = CStr( CLng( sCurrPic ) + 1 )
+ end if
+ case "-"
+ if isNumeric( sCurrPic ) then
+ sCurrPic = CStr( CLng( sCurrPic ) - 1 )
+ end if
+ end select
+
+ ' save picture name
+ if isNumeric( sCurrPic ) then
+ if (CInt( sCurrPic ) > 0) and ( CInt( sCurrPic ) <= nUpper ) then
+ call File_writeVirtual( "currpic.txt", ".", sCurrPic )
+ end if
+ end if
+
+ ' return to edit page
+ Response.Redirect( "./editpic.asp" )
+%>
diff --git a/sd/res/webview/savepic.pl b/sd/res/webview/savepic.pl
new file mode 100644
index 000000000..3502312e5
--- /dev/null
+++ b/sd/res/webview/savepic.pl
@@ -0,0 +1,58 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+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.asp b/sd/res/webview/show.asp
new file mode 100644
index 000000000..c59516706
--- /dev/null
+++ b/sd/res/webview/show.asp
@@ -0,0 +1,59 @@
+<%
+ Option Explicit
+ Response.Expires = 0
+%>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+
+<!-- #include file = "common.inc" -->
+
+<%
+ Dim sGifName1, sGifName2, nGifID, aPictureArray
+
+ nGifID = Session( "GIFID" )
+
+ ' get current and next picture
+ aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
+
+ ' not last picture or wrong input ?
+ If CInt( nGifID ) < UBound( aPictureArray ) / 2 Then
+ sGifName1 = aPictureArray( ( nGifID - 1 ) * 2 + 1 )
+ sGifName2 = aPictureArray( ( nGifID ) * 2 + 1 )
+ Else
+ nGifID = CInt( UBound( aPictureArray ) / 2 )
+ sGifName1 = aPictureArray( ( nGifID - 1 ) * 2 + 1 )
+ sGifName2 = sGifName1
+ End If
+%>
+
+<HTML>
+
+<HEAD>
+ <TITLE>$$1</TITLE>
+</HEAD>
+
+<BODY bgcolor="white">
+ <table width=100% height=99%>
+ <tr valign=center><td align=center>
+ <IMG src="<% = sGifName1 %>" width=$$4 height=$$5 border=0>
+ <br><IMG src="<% = sGifName2 %>" width=1 height=1 border=0>
+ </td></tr>
+ </table>
+</BODY>
+
+</HTML> \ No newline at end of file
diff --git a/sd/res/webview/show.pl b/sd/res/webview/show.pl
new file mode 100644
index 000000000..3252eaeb8
--- /dev/null
+++ b/sd/res/webview/show.pl
@@ -0,0 +1,56 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+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>";
diff --git a/sd/res/webview/webcast.asp b/sd/res/webview/webcast.asp
new file mode 100644
index 000000000..f084fc2df
--- /dev/null
+++ b/sd/res/webview/webcast.asp
@@ -0,0 +1,45 @@
+<%
+ Option Explicit
+ Response.Expires = 0
+%>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+
+<!-- #include file = "common.inc" -->
+
+<%
+ Session( "GIFID" ) = File_getDataVirtual( csFileCurrent, ".", ";" )( 0 )
+%>
+
+<HTML>
+
+<HEAD>
+</HEAD>
+
+<FRAMESET ROWS="*,2" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
+ <FRAME SRC="./show.asp" NAME="frame1" SCROLLING=yes RESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0>
+ <FRAME SRC="./poll.asp" NAME="frame2" SCROLLING=no NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0>
+</FRAMESET>
+
+<NOFRAMES>
+
+<BODY BGCOLOR="white">
+ <META HTTP-EQUIV="-REFRESH" CONTENT="1;URL=./show.asp">
+</BODY>
+
+</HTML> \ No newline at end of file
diff --git a/sd/res/webview/webcast.pl b/sd/res/webview/webcast.pl
new file mode 100644
index 000000000..37c80e5a1
--- /dev/null
+++ b/sd/res/webview/webcast.pl
@@ -0,0 +1,38 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+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>";