From e4661a6aa15dfc854f1904d4ca4b7a8dd0ebf620 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Sat, 7 Sep 2024 21:15:27 +1000 Subject: [PATCH] initial commit of file from CVS for smeserver-webshare on Sat Sep 7 21:15:27 AEST 2024 --- .gitignore | 4 + Makefile | 21 + README.md | 16 +- contriborbase | 1 + createlinks | 26 + .../e-smith/events/actions/webshare-adduser | 50 ++ .../e-smith/events/actions/webshare-create | 47 ++ .../e-smith/events/actions/webshare-delete | 16 + .../e-smith/events/actions/webshare-deluser | 45 ++ .../events/actions/webshare-rebuild-htpasswd | 64 ++ .../etc/httpd/conf/httpd.conf/86WebShareAlias | 26 + root/etc/e-smith/web/functions/webshare | 602 ++++++++++++++++++ .../web/panels/manager/cgi-bin/.gitignore | 0 root/home/e-smith/db/webshare/.gitignore | 0 .../webshare-tools/phpfm/conf/config.inc.php | 187 ++++++ .../phpfm/conf/config.inc.php-full | 187 ++++++ .../phpfm/conf/config.inc.php-nodelete | 187 ++++++ .../phpfm/conf/config.inc.php-updown | 187 ++++++ .../phpfm/conf/config.inc.php-view | 187 ++++++ .../webshare-tools/phpfm/docs/changelog.txt | 67 ++ .../phpfm/docs/configurating.txt | 61 ++ root/opt/webshare-tools/phpfm/docs/faq.txt | 45 ++ .../opt/webshare-tools/phpfm/docs/install.txt | 47 ++ .../opt/webshare-tools/phpfm/docs/license.txt | 278 ++++++++ .../phpfm/docs/requirements.txt | 26 + root/opt/webshare-tools/phpfm/docs/todo.txt | 21 + .../opt/webshare-tools/phpfm/files/.gitignore | 0 root/opt/webshare-tools/phpfm/icon/back.gif | Bin 0 -> 996 bytes root/opt/webshare-tools/phpfm/icon/binary.gif | Bin 0 -> 246 bytes root/opt/webshare-tools/phpfm/icon/c.gif | Bin 0 -> 242 bytes .../webshare-tools/phpfm/icon/compressed.gif | Bin 0 -> 1038 bytes root/opt/webshare-tools/phpfm/icon/delete.gif | Bin 0 -> 929 bytes .../webshare-tools/phpfm/icon/download.gif | Bin 0 -> 939 bytes root/opt/webshare-tools/phpfm/icon/drive.gif | Bin 0 -> 246 bytes root/opt/webshare-tools/phpfm/icon/edit.gif | Bin 0 -> 941 bytes root/opt/webshare-tools/phpfm/icon/folder.gif | Bin 0 -> 225 bytes root/opt/webshare-tools/phpfm/icon/image2.gif | Bin 0 -> 309 bytes root/opt/webshare-tools/phpfm/icon/layout.gif | Bin 0 -> 276 bytes root/opt/webshare-tools/phpfm/icon/logout.gif | Bin 0 -> 989 bytes root/opt/webshare-tools/phpfm/icon/minus.gif | Bin 0 -> 837 bytes root/opt/webshare-tools/phpfm/icon/movie.gif | Bin 0 -> 243 bytes .../opt/webshare-tools/phpfm/icon/newfile.gif | Bin 0 -> 1018 bytes .../webshare-tools/phpfm/icon/newfolder.gif | Bin 0 -> 1021 bytes root/opt/webshare-tools/phpfm/icon/next.gif | Bin 0 -> 843 bytes .../webshare-tools/phpfm/icon/original.gif | Bin 0 -> 846 bytes root/opt/webshare-tools/phpfm/icon/plus.gif | Bin 0 -> 842 bytes .../webshare-tools/phpfm/icon/previous.gif | Bin 0 -> 844 bytes root/opt/webshare-tools/phpfm/icon/rename.gif | Bin 0 -> 899 bytes root/opt/webshare-tools/phpfm/icon/script.gif | Bin 0 -> 242 bytes root/opt/webshare-tools/phpfm/icon/sound2.gif | Bin 0 -> 221 bytes root/opt/webshare-tools/phpfm/icon/text.gif | Bin 0 -> 229 bytes .../opt/webshare-tools/phpfm/icon/unknown.gif | Bin 0 -> 245 bytes root/opt/webshare-tools/phpfm/icon/upload.gif | Bin 0 -> 939 bytes .../webshare-tools/phpfm/icon/valid-css.jpg | Bin 0 -> 3613 bytes .../phpfm/icon/valid-html401.jpg | Bin 0 -> 4005 bytes root/opt/webshare-tools/phpfm/icon/view.gif | Bin 0 -> 929 bytes .../webshare-tools/phpfm/incl/auth.inc.php | 15 + .../webshare-tools/phpfm/incl/create.inc.php | 73 +++ .../webshare-tools/phpfm/incl/delete.inc.php | 83 +++ .../phpfm/incl/download.inc.php | 30 + .../webshare-tools/phpfm/incl/edit.inc.php | 69 ++ .../phpfm/incl/filebrowser.inc.php | 151 +++++ .../webshare-tools/phpfm/incl/footer.inc.php | 19 + .../phpfm/incl/footer.inc.php.dist | 26 + .../phpfm/incl/functions.inc.php | 258 ++++++++ .../webshare-tools/phpfm/incl/header.inc.php | 34 + .../phpfm/incl/html.header.inc.php | 17 + .../phpfm/incl/html.header.inc.php.dist | 18 + .../opt/webshare-tools/phpfm/incl/libfile.php | 50 ++ .../webshare-tools/phpfm/incl/login.inc.php | 32 + root/opt/webshare-tools/phpfm/incl/phpfm.css | 31 + .../webshare-tools/phpfm/incl/rename.inc.php | 76 +++ .../webshare-tools/phpfm/incl/upload.inc.php | 66 ++ .../webshare-tools/phpfm/incl/view.inc.php | 85 +++ root/opt/webshare-tools/phpfm/index.php | 93 +++ .../phpfm/lang/bulgarian.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/danish.inc.php | 127 ++++ .../webshare-tools/phpfm/lang/dutch.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/english.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/finnish.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/french.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/french2.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/german.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/italian.inc.php | 128 ++++ .../phpfm/lang/portugues.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/russian.inc.php | 128 ++++ .../webshare-tools/phpfm/lang/spanish.inc.php | 128 ++++ root/opt/webshare-tools/phpfm/readme.txt | 65 ++ root/opt/webshare/.gitignore | 0 smeserver-webshare.spec | 122 ++++ 90 files changed, 5344 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 contriborbase create mode 100755 createlinks create mode 100755 root/etc/e-smith/events/actions/webshare-adduser create mode 100755 root/etc/e-smith/events/actions/webshare-create create mode 100755 root/etc/e-smith/events/actions/webshare-delete create mode 100755 root/etc/e-smith/events/actions/webshare-deluser create mode 100755 root/etc/e-smith/events/actions/webshare-rebuild-htpasswd create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86WebShareAlias create mode 100755 root/etc/e-smith/web/functions/webshare create mode 100644 root/etc/e-smith/web/panels/manager/cgi-bin/.gitignore create mode 100644 root/home/e-smith/db/webshare/.gitignore create mode 100644 root/opt/webshare-tools/phpfm/conf/config.inc.php create mode 100644 root/opt/webshare-tools/phpfm/conf/config.inc.php-full create mode 100644 root/opt/webshare-tools/phpfm/conf/config.inc.php-nodelete create mode 100644 root/opt/webshare-tools/phpfm/conf/config.inc.php-updown create mode 100644 root/opt/webshare-tools/phpfm/conf/config.inc.php-view create mode 100644 root/opt/webshare-tools/phpfm/docs/changelog.txt create mode 100644 root/opt/webshare-tools/phpfm/docs/configurating.txt create mode 100644 root/opt/webshare-tools/phpfm/docs/faq.txt create mode 100644 root/opt/webshare-tools/phpfm/docs/install.txt create mode 100644 root/opt/webshare-tools/phpfm/docs/license.txt create mode 100644 root/opt/webshare-tools/phpfm/docs/requirements.txt create mode 100644 root/opt/webshare-tools/phpfm/docs/todo.txt create mode 100644 root/opt/webshare-tools/phpfm/files/.gitignore create mode 100644 root/opt/webshare-tools/phpfm/icon/back.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/binary.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/c.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/compressed.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/delete.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/download.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/drive.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/edit.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/folder.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/image2.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/layout.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/logout.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/minus.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/movie.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/newfile.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/newfolder.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/next.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/original.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/plus.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/previous.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/rename.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/script.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/sound2.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/text.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/unknown.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/upload.gif create mode 100644 root/opt/webshare-tools/phpfm/icon/valid-css.jpg create mode 100644 root/opt/webshare-tools/phpfm/icon/valid-html401.jpg create mode 100644 root/opt/webshare-tools/phpfm/icon/view.gif create mode 100644 root/opt/webshare-tools/phpfm/incl/auth.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/create.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/delete.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/download.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/edit.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/filebrowser.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/footer.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/footer.inc.php.dist create mode 100644 root/opt/webshare-tools/phpfm/incl/functions.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/header.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/html.header.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/html.header.inc.php.dist create mode 100644 root/opt/webshare-tools/phpfm/incl/libfile.php create mode 100644 root/opt/webshare-tools/phpfm/incl/login.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/phpfm.css create mode 100644 root/opt/webshare-tools/phpfm/incl/rename.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/upload.inc.php create mode 100644 root/opt/webshare-tools/phpfm/incl/view.inc.php create mode 100644 root/opt/webshare-tools/phpfm/index.php create mode 100644 root/opt/webshare-tools/phpfm/lang/bulgarian.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/danish.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/dutch.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/english.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/finnish.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/french.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/french2.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/german.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/italian.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/portugues.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/russian.inc.php create mode 100644 root/opt/webshare-tools/phpfm/lang/spanish.inc.php create mode 100644 root/opt/webshare-tools/phpfm/readme.txt create mode 100644 root/opt/webshare/.gitignore create mode 100644 smeserver-webshare.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cbb3a13 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +*.log +*spec-20* +*.tar.gz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4c9f544 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: smeserver-webshare +# $Id: Makefile,v 1.1 2020/10/30 11:00:20 brianr Exp $ +NAME := smeserver-webshare +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 9975aeb..3de0606 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ -# smeserver-webshare +# smeserver-webshare -SMEServer Koozali developed git repo for smeserver-webshare smecontribs \ No newline at end of file +SMEServer Koozali developed git repo for smeserver-webshare smecontribs + +## Wiki +
https://wiki.koozali.org/Webshare + +## Bugzilla +Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-webshare&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..9b7fd51 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +contribs10 diff --git a/createlinks b/createlinks new file mode 100755 index 0000000..ef46100 --- /dev/null +++ b/createlinks @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w +# This script creates the symlinks needed by this RPM +# Specific support exists to create symlinks within e-smith web "panels" +# and for links from named "events" directories into the "actions" directory +use esmith::Build::CreateLinks qw(:all); + +#-------------------------------------------------- +# functions for user and manager panel +#-------------------------------------------------- +my $panel = "manager"; +panel_link("webshare", $panel); + +my $event = "smeserver-webshare-update"; +event_templates($event, qw( +/etc/httpd/conf/httpd.conf +)); + +event_services($event, qw( + php-fpm restart + httpd-e-smith restart +)); + +use esmith::Build::Backup qw(:all); +backup_includes("smeserver-webshare", qw( +/opt/webshare +)); diff --git a/root/etc/e-smith/events/actions/webshare-adduser b/root/etc/e-smith/events/actions/webshare-adduser new file mode 100755 index 0000000..7e07a6b --- /dev/null +++ b/root/etc/e-smith/events/actions/webshare-adduser @@ -0,0 +1,50 @@ +#!/usr/bin/perl -w + +use esmith::ConfigDB; +use Apache::Htpasswd; + +my $db = esmith::ConfigDB->open_ro("WebShare"); + +my $projectName = $ARGV[0]; +my $userName = $ARGV[1]; +my $password = $ARGV[2]; + +#------------------------------------------------------------ +# Create the MultiAccessWebshare account +#------------------------------------------------------------ + +my $MultiAccessWebshare = + $db->get_prop( "MultiAccess", "WebShareName" || "undefined" ); +my %MultiWebshares = + sort( split( /,/, $db->get_prop( "MultiAccess", "WebShares" ) || "" ) ); + +if ( ( "$MultiAccessWebshare" eq "$projectName" ) + && ( "%MultiWebshares" ne "" ) ) +{ + my $foo = + new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$MultiAccessWebshare"); + $foo->htDelete("$userName"); + $foo->{'USEMD5'} = "MD5"; + $foo->htpasswd( "$userName", "$password" ); + + foreach my $MultiWebshares (%MultiWebshares) { + my $foo1 = + new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$MultiWebshares"); + $foo1->htDelete("$userName");i + $foo->{'USEMD5'} = "MD5"; + $foo1->htpasswd( "$userName", "$password" ); + } +} + +else { + + #------------------------------------------------------------ + # Create the webshare account + #------------------------------------------------------------ + + my $foo = new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$projectName"); + $foo->{'USEMD5'} = "MD5"; + $foo->htpasswd( "$userName", "$password" ); +} + +exit(0) diff --git a/root/etc/e-smith/events/actions/webshare-create b/root/etc/e-smith/events/actions/webshare-create new file mode 100755 index 0000000..6022d5d --- /dev/null +++ b/root/etc/e-smith/events/actions/webshare-create @@ -0,0 +1,47 @@ +#!/usr/bin/perl -w + +my $projectName = $ARGV [0]; +my $indexer = $ARGV [1]; + +#------------------------------------------------------------ +# Create the webshare project directory +#------------------------------------------------------------ + +if ( -e "/opt/webshare/$projectName") + { + print "webshare $projectName already exists\n"; + } + else + { + system ("/bin/mkdir /opt/webshare/$projectName"); + + if ("$indexer" eq "Full") + { + system ("/bin/cp -R /opt/webshare-tools/phpfm/* /opt/webshare/$projectName/"); + system ("/bin/cp -f /opt/webshare/$projectName/conf/config.inc.php-full /opt/webshare/$projectName/conf/config.inc.php"); + } + elsif ("$indexer" eq "NoDelete") + { + system ("/bin/cp -R /opt/webshare-tools/phpfm/* /opt/webshare/$projectName/"); + system ("/bin/cp -f /opt/webshare/$projectName/conf/config.inc.php-nodelete /opt/webshare/$projectName/conf/config.inc.php"); + } + elsif ("$indexer" eq "UpDown") + { + system ("/bin/cp -R /opt/webshare-tools/phpfm/* /opt/webshare/$projectName/"); + system ("/bin/cp -f /opt/webshare/$projectName/conf/config.inc.php-updown /opt/webshare/$projectName/conf/config.inc.php"); + } + elsif ("$indexer" eq "View") + { + system ("/bin/cp -R /opt/webshare-tools/phpfm/* /opt/webshare/$projectName/"); + system ("/bin/cp -f /opt/webshare/$projectName/conf/config.inc.php-view /opt/webshare/$projectName/conf/config.inc.php"); + } + + system ("/usr/bin/find /opt/webshare/$projectName -type f -exec chmod 644 {} ';'"); + system ("/usr/bin/find /opt/webshare/$projectName -type d -exec chmod 755 {} ';'"); + system ("/bin/chown -R www:www /opt/webshare/$projectName/files"); + + system ("/bin/touch /home/e-smith/db/webshare/htpasswd.$projectName"); + system ("/sbin/e-smith/signal-event ibay-modify"); + } + +exit (0); diff --git a/root/etc/e-smith/events/actions/webshare-delete b/root/etc/e-smith/events/actions/webshare-delete new file mode 100755 index 0000000..eb6944d --- /dev/null +++ b/root/etc/e-smith/events/actions/webshare-delete @@ -0,0 +1,16 @@ +#!/usr/bin/perl -w + +my $projectName = $ARGV[0]; + +#------------------------------------------------------------ +# Delete the webshare project directory +#------------------------------------------------------------ + +if ( -e "/opt/webshare/$projectName" ) { + system("/bin/rm -Rf /opt/webshare/$projectName"); + system("/bin/rm -f /home/e-smith/db/webshare/htpasswd.$projectName"); + system("/sbin/e-smith/signal-event ibay-modify"); +} + +exit(0); + diff --git a/root/etc/e-smith/events/actions/webshare-deluser b/root/etc/e-smith/events/actions/webshare-deluser new file mode 100755 index 0000000..3b88fc9 --- /dev/null +++ b/root/etc/e-smith/events/actions/webshare-deluser @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w + +use esmith::ConfigDB; +use Apache::Htpasswd; + +my $db = esmith::ConfigDB->open_ro("WebShare"); + +my $projectName = $ARGV[0]; +my $userName = $ARGV[1]; +my $password = $ARGV[2]; + +#------------------------------------------------------------ +# Delete the MultiAccessWebshare account +#------------------------------------------------------------ + +my $MultiAccessWebshare = + $db->get_prop( "MultiAccess", "WebShareName" || "undefined" ); +my %MultiWebshares = + split( /,/, $db->get_prop( "MultiAccess", "WebShares" ) || "" ); + +if ( ( "$MultiAccessWebshare" eq "$projectName" ) + && ( "%MultiWebshares" ne "" ) ) +{ + my $foo = + new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$MultiAccessWebshare"); + $foo->htDelete("$userName"); + + foreach my $MultiWebshares ( sort %MultiWebshares ) { + my $foo1 = + new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$MultiWebshares"); + $foo1->htDelete("$userName"); + } +} + +else { + + #------------------------------------------------------------ + # Delete the webshare account + #------------------------------------------------------------ + + my $foo = new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$projectName"); + $foo->htDelete("$userName"); +} + +exit(0) diff --git a/root/etc/e-smith/events/actions/webshare-rebuild-htpasswd b/root/etc/e-smith/events/actions/webshare-rebuild-htpasswd new file mode 100755 index 0000000..e24d35e --- /dev/null +++ b/root/etc/e-smith/events/actions/webshare-rebuild-htpasswd @@ -0,0 +1,64 @@ +#!/usr/bin/perl -w + +use esmith::ConfigDB; +use Apache::Htpasswd; + +my $db = esmith::ConfigDB->open_ro("WebShare"); + +my @WebShare = $db->get_all_by_prop( type => 'WebShare' ); +my $MultiAccessWebshare = $db->get_prop( "MultiAccess", "WebShareName" ) || ""; +my %MultiWebshares = split( /,/, $db->get_prop( "MultiAccess", "WebShares" ) || "" ); + +foreach my $WebShare (@WebShare) { + my $ws = $WebShare->key; + my $rec = $db->get("$ws"); + + system( "/bin/rm -f /home/e-smith/db/webshare/htpasswd.$ws > /dev/null 2>&1" ); + system( "/bin/touch", "/home/e-smith/db/webshare/htpasswd.$ws" ); + + my %Users = split( /,/, $rec->prop("Users") || "" ); + + if ( "%Users" ne "" ) { + foreach my $Users ( sort %Users ) { + my @user = split( /:/, $Users ); + my $userName = $user[0]; + my $password = $user[1]; + + #------------------------------------------------------------ + # Create the MultiAccessWebshare account + #------------------------------------------------------------ + + if ( ( "$MultiAccessWebshare" eq "$ws" ) + && ( "%MultiWebshares" ne "" ) ) + { + my $foo = + new Apache::Htpasswd( + "/home/e-smith/db/webshare/htpasswd.$MultiAccessWebshare"); + $foo->htDelete("$userName"); + $foo->{'USEMD5'} = "MD5"; + $foo->htpasswd( "$userName", "$password" ); + + foreach my $MultiWebshares ( sort %MultiWebshares ) { + my $foo1 = + new Apache::Htpasswd( + "/home/e-smith/db/webshare/htpasswd.$MultiWebshares"); + $foo1->htDelete("$userName"); + $foo->{'USEMD5'} = "MD5"; + $foo1->htpasswd( "$userName", "$password" ); + } + } + else { + + #------------------------------------------------------------ + # Create the webshare account + #------------------------------------------------------------ + + my $foo = new Apache::Htpasswd("/home/e-smith/db/webshare/htpasswd.$ws"); + $foo->htDelete("$userName"); + $foo->{'USEMD5'} = "MD5"; + $foo->htpasswd( "$userName", "$password" ); + } + } + } +} +exit(0) diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86WebShareAlias b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86WebShareAlias new file mode 100644 index 0000000..e78ca31 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86WebShareAlias @@ -0,0 +1,26 @@ +{ + my $db = esmith::ConfigDB->open_ro("WebShare") + or return "# webshare disabled\n"; + + my @webshare = $db->get_all_by_prop( type => 'WebShare' ); + + foreach $webshare (@webshare) { + my $key = $webshare->key; + $OUT .= "# webshare\/$key\n"; + $OUT .= "Alias \/webshare\/$key \/opt\/webshare\/$key\n"; + $OUT .= "\n"; + $OUT .= " SSLRequireSSL\n"; + $OUT .= " Options +Indexes\n"; + $OUT .= " AllowOverride None\n"; + $OUT .= " AuthName \"Restricted $key access only\"\n"; + $OUT .= " AuthType Basic\n"; + $OUT .= " AuthUserFile \/home\/e-smith\/db\/webshare\/htpasswd.$key\n"; + $OUT .= " Require valid-user\n"; + $OUT .= " AddType application\/x-httpd-php \.php \.php3\n"; + $OUT .= " \n"; + $OUT .= ' SetHandler "proxy:unix:/var/run/php-fpm/php.sock|fcgi://localhost"'."\n"; + $OUT .= " \n"; + $OUT .= "<\/Directory>\n"; + $OUT .= "\n"; + } +} diff --git a/root/etc/e-smith/web/functions/webshare b/root/etc/e-smith/web/functions/webshare new file mode 100755 index 0000000..c2c355a --- /dev/null +++ b/root/etc/e-smith/web/functions/webshare @@ -0,0 +1,602 @@ +#!/usr/bin/perl -wT + +#---------------------------------------------------------------------- +# heading : Collaboration +# description : Web Shares +# navigation : 3000 3600 +# +# copyright (C) 2005 Darrell May, DMC myEZserver.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#---------------------------------------------------------------------- + +package esmith; + +use strict; +use CGI ':all'; +use CGI::Carp qw(fatalsToBrowser); + +use esmith::cgi; +use esmith::config; +use esmith::util; +use esmith::db; + + +sub showInitial ($$); +sub createproject ($); +sub performCreateShare ($); +sub deleteProject ($); +sub performDeleteProject ($); +sub createUser ($); +sub performCreateUser ($); +sub deleteUser ($); +sub performDeleteUser ($); +BEGIN +{ + # Clear PATH and related environment variables so that calls to + # external programs do not cause results to be tainted. See + # "perlsec" manual page for details. + + $ENV {'PATH'} = ''; + $ENV {'SHELL'} = '/bin/bash'; + delete $ENV {'ENV'}; +} + +esmith::util::setRealToEffective (); + +$CGI::POST_MAX=1024 * 100; # max 100K posts +$CGI::DISABLE_UPLOADS = 1; # no uploads + +my %conf; +tie %conf, 'esmith::config'; + +my %projects; +tie %projects, 'esmith::config', '/home/e-smith/db/WebShare'; + + +#------------------------------------------------------------ +# examine state parameter and display the appropriate form +#------------------------------------------------------------ + +my $q = new CGI; + +if (! grep (/^state$/, $q->param)) +{ + showInitial ($q, ''); +} + +elsif ($q->param ('state') eq "create") +{ + createproject ($q); +} + +elsif ($q->param ('state') eq "deleteProject") +{ + deleteProject ($q); +} + +elsif ($q->param ('state') eq "createShare") +{ + performCreateShare ($q); +} + +elsif ($q->param ('state') eq "addUser") +{ + createUser ($q); +} + +elsif ($q->param ('state') eq "createUser") +{ + performCreateUser ($q); +} + +elsif ($q->param ('state') eq "viewUser") +{ + deleteUser ($q); +} + +elsif ($q->param ('state') eq "delUser") +{ + performDeleteUser ($q); +} + +elsif ($q->param ('state') eq "performDelete") +{ + performDeleteProject ($q); +} + +else +{ + esmith::cgi::genStateError ($q, \%conf); +} + +exit (0); + +#------------------------------------------------------------ +# subroutine to display initial form +#------------------------------------------------------------ +sub showInitial ($$) +{ + my ($q, $msg) = @_; + +my @WebShareProjects = (); +foreach (sort keys %projects) + { + push (@WebShareProjects, $_) + if (db_get_type(\%projects, $_) eq "WebShare"); + } + + #------------------------------------------------------------ + # If there's a message, we just finished an operation so show the + # status report. If no message, this is a new list of accounts. + #------------------------------------------------------------ + + if ($msg eq '') + { + + esmith::cgi::genHeaderNonCacheable + ($q, \%conf, 'Create or modify web shares and users'); + + } + else + { + esmith::cgi::genHeaderNonCacheable + ($q, \%conf, 'Web share Operation status report'); + + print $q->div ({-class => "sme-error"}, $msg); + print $q->hr; + } + + + + print $q->startform (-method => 'POST', -action => $q->url (-absolute => 1)); + + print $q->p ($q->a ({href => $q->url (-absolute => 1) . "?state=create"}, + 'Click here'), + 'to create a new web share.'); + + print $q->p ('Web shares are Internet accessible', + 'file storage areas for securely sharing', + ' documents with external share members.'); + + + if (@WebShareProjects == 0) + { + print $q->p ($q->b ('There are no web shares currently defined.')); + } + else + { + print $q->table ({border => 1, cellspacing => 1, cellpadding => 4}); + + print $q->Tr (esmith::cgi::genSmallCell ($q, $q->b ('Name')), + esmith::cgi::genSmallCell ($q, $q->b ('Description')), + esmith::cgi::genSmallCell ($q, $q->b ('URL = https://yourdomain.com')), + $q->td (' '), + $q->td (' '), + $q->td (' ')); + + my $projectname; + foreach $projectname (sort @WebShareProjects) + { + my $description = db_get_prop(\%projects, $projectname, 'Description'); + my $url = "/webshare/" . $projectname; + + + print $q->Tr (esmith::cgi::genSmallCell ($q, $projectname), + esmith::cgi::genSmallCell ($q, $description), + esmith::cgi::genSmallCell ($q, $url), + esmith::cgi::genSmallCell ($q, + $q->a ({href => $q->url (-absolute => 1) + . "?state=addUser&project=" + . $projectname}, 'Add User..')), + esmith::cgi::genSmallCell ($q, + $q->a ({href => $q->url (-absolute => 1) + . "?state=viewUser&project=" + . $projectname}, 'View/Delete Users..')), + esmith::cgi::genSmallCell ($q, + $q->a ({href => $q->url (-absolute => 1) + . "?state=deleteProject&project=" + . $projectname}, 'Remove..'))); + } + } + + + print ''; + + + esmith::cgi::genFooter ($q); +} + +sub createproject ($) +{ + my ($q) = @_; + my $info =<startform (-method => 'POST', -action => $q->url (-absolute => 1)); + + print $q->p ($q->a ({href => $q->url (-absolute => 1)}, + 'Click here'), + 'to return.'); + + print $q->p ($info); + + print $q->table ({border => 0, cellspacing => 0, cellpadding => 4}, + + esmith::cgi::genNameValueRow ($q, + "Web share name", + "sharename", + ""), + + esmith::cgi::genNameValueRow ($q, + "Brief Description", + "description", + ""), + + esmith::cgi::genTextRow ($q, + $q->p ('Select your Web share indexer below. Your choices are either the default', + 'apache (ModIndex if installed) indexer or PHP FileManager. In addition', + 'PHP FileManager may be tailored to meet your needs by choicing the appropriate', + 'selection below:')), + + esmith::cgi::genTextRow ($q, + $q->p ('Default = default apache (ModIndex) indexer.
', + 'View = permitting view/download only.
', + 'UpDown = permitting view/upload/download.
', + 'NoDelete = permitting view/upload/download/create/rename/edit.
', + 'Full = permitting view/upload/download/create/rename/delete/edit
')), + + esmith::cgi::genWidgetRow ($q, "Indexer", + $q->popup_menu (-name => "indexer", + -values => ['Default', 'View', 'UpDown', ,'NoDelete', 'Full'], + -default => 'Full')), + + esmith::cgi::genButtonRow ($q, + $q->submit (-name => 'action', -value => 'Create'))); + + print $q->hidden (-name => 'state', -override => 1, -default => 'createShare'); + + + print $q->endform; + esmith::cgi::genFooter ($q); + +} + +sub performCreateShare ($) +{ + my ($q) = @_; + my $share = (); + my $description = (); + my $indexer = (); + + $share = $q->param ('sharename'); + if ($share =~ /^([a-zA-Z0-9][\-\_\.a-zA-Z0-9]*)$/) + { + $share = $1; + } + else + { + showInitial ($q, + "Error: unexpected characters in web share name \'$share\'."); + return; + } + + $indexer = $q->param ('indexer'); + if ($indexer =~ /^([a-zA-Z0-9][\-\_\.a-zA-Z0-9]*)$/) + { + $indexer = $1; + } + else + { + showInitial ($q, + "Error: unexpected characters in indexer \'$indexer\'."); + return; + } + + $description = $q->param ('description'); + + db_set(\%projects, $share, 'WebShare'); + db_set_prop(\%projects, "$share", "Description", "$description"); + + system("/etc/e-smith/events/actions/webshare-create", "$share", "$indexer") == "0" + or die("Error occured during webshare-create event.\n"); + + showInitial ($q, "Web share $share with $indexer indexer created."); + +} +sub createUser ($) +{ + my ($q) = @_; + my $project = $q->param ('project'); + + my $userinfo =<startform (-method => 'POST', -action => $q->url (-absolute => 1)); + + print $q->p ($q->a ({href => $q->url (-absolute => 1)}, + 'Click here'), + 'to return.'); + + print $q->p ($userinfo); + + print $q->table ({border => 0, cellspacing => 0, cellpadding => 4}, + + esmith::cgi::genNameValueRow ($q, + "Webshare", + "project", + "$project"), + + esmith::cgi::genNameValueRow ($q, + "Login", + "user", + ""), + + esmith::cgi::genNameValueRow ($q, + "Password", + "passwd", + ""), + + esmith::cgi::genButtonRow ($q, + $q->submit (-name => 'action', -value => 'Add user'))); + + print $q->hidden (-name => 'state', -override => 1, -default => 'createUser'); + + print $q->endform; + esmith::cgi::genFooter ($q); + return; +} + +sub performCreateUser ($) +{ + + my ($q) = @_; + my $user = $q->param ('user'); + + if ($user =~ /^([a-zA-Z0-9][\-\@\_\.a-zA-Z0-9]*)$/) + { + $user = $1; + } + else + { + + showInitial ($q, + "Error: unexpected characters in web share name \'$user\'."); + return; + } + + my $passwd = $q->param ('passwd'); + + if ($passwd =~ /^([a-zA-Z0-9]*)$/) + { + $passwd = $1; + } + else + { + + showInitial ($q, + "Error: unexpected characters in web share password \'$passwd\'."); + return; + } + + my $project = $q->param ('project'); + + + if ($project =~ /^([a-zA-Z0-9][\-\_\.a-zA-Z0-9]*)$/) + { + $project = $1; + } + else + { + + showInitial ($q, + "Error: unexpected characters in web share name \'$project\'."); + return; + } + my $ProjectUsers = db_get_prop(\%projects, "$project", "Users"); + + #------------------------------------------------------------ + # Update project users + #------------------------------------------------------------ + + if ("$ProjectUsers" ne "") + { + db_set_prop(\%projects, "$project", "Users", "$ProjectUsers,$user:$passwd") + or warn("Could not add user to WebShare database\n"); + } + else + { + db_set_prop(\%projects, "$project", "Users", "$user:$passwd") + or warn("Could not add user to WebShare database\n"); + } + + system("/etc/e-smith/events/actions/webshare-adduser", "$project", "$user", "$passwd") == "0" + or die("Error occured while adding user $user.\n"); + + showInitial ($q, "Web share user $user created."); + +} + +sub deleteUser ($) +{ + my ($q) = @_; + + my $project = $q->param ('project'); + + + esmith::cgi::genHeaderNonCacheable ($q, \%conf, "View/Delete Web share users: $project"); + + print $q->startform + (-method => 'POST', -action => $q->url (-absolute => 1)); + + print $q->p ($q->a ({href => $q->url (-absolute => 1)}, + 'Click here'), + 'to return.'); + + print $q->p ($q->b ('Current List of Users.')); + + print $q->table ({border => 1, cellspacing => 1, cellpadding => 4}); + + + print $q->Tr (esmith::cgi::genSmallCell ($q, $q->b ('User Name')), + esmith::cgi::genSmallCell ($q, $q->b ('Password')), + $q->td (' ')); + + + my %webshareUsers = split(/,/, db_get_prop(\%projects, "$project", "Users") || ''); + + foreach my $users (sort %webshareUsers) + + { + my $shareusers = (); + my @shareusers = split(/:/, $users); + + if ("$users" ne ""){ + + print $q->Tr (esmith::cgi::genSmallCell ($q, "$shareusers[0]"), + esmith::cgi::genSmallCell ($q, "$shareusers[1]"), + esmith::cgi::genSmallCell ($q, + $q->a ({href => $q->url (-absolute => 1). + "?state=delUser&webShareUser=$users&shareUser=$shareusers[0]&webShareProject=$project"}, 'Delete..'))); + } + } + + + print ''; + + esmith::cgi::genFooter ($q); + return; + +} + +sub performDeleteUser ($) +{ + my ($q) = @_; + my $project = $q->param ('webShareProject'); + if ($project =~ /^([a-zA-Z0-9][\-\_\.a-zA-Z0-9]*)$/) + { + $project = $1; + } + else + { + + showInitial ($q, + "Error: unexpected characters in web share name \'$project\'."); + return; + } + my @Users = (); + my @UsersOut = (); + my @USERlist = (); + my $webShareUser = $q->param ('webShareUser'); + my $ShareUser = $q->param ('shareUser'); + if ($ShareUser =~ /^([a-zA-Z0-9][\-\_\@\.a-zA-Z0-9]*)$/) + { + $ShareUser = $1; + } + else + { + + showInitial ($q, + "Error: unexpected characters in web share name \'$ShareUser\'."); + return; + } + + my %webshareUsers = split(/,/, db_get_prop(\%projects, "$project", "Users") || ''); + + +if ($webShareUser) + { + foreach my $users (sort %webshareUsers) + { + unless ($users eq $webShareUser) { push(@UsersOut, "$users") } + @USERlist = join(',', @UsersOut); + } + db_set_prop(\%projects, "$project", "Users", "@USERlist") + or warn("Error occured updating WebShare db.\n"); + + system("/etc/e-smith/events/actions/webshare-deluser", "$project", "$ShareUser") == "0" + or die("Error occured while deleting user $ShareUser.\n"); + } + showInitial ($q, "Successfully deleted Web share user $ShareUser from $project."); + return; +} + +sub deleteProject ($) + +{ + my ($q) = @_; + + esmith::cgi::genHeaderNonCacheable ($q, \%conf, 'Delete Web share project'); + + print $q->startform + (-method => 'POST', -action => $q->url (-absolute => 1)); + + print $q->p ($q->a ({href => $q->url (-absolute => 1)}, + 'Click here'), + 'to return.'); + + my $project = $q->param ('project'); + my $description = $q->param ('description'); + { + + print $q->p ("Are you sure you wish to delete the Web share $project ?"); + + print $q->submit (-name => 'action', -value => 'Delete'); + print $q->hidden (-name => 'project', -override => 1, -default => $project); + print $q->hidden (-name => 'state', + -override => 1, + -default => 'performDelete'); + } + + print $q->endform; + esmith::cgi::genFooter ($q); + return; +} +sub performDeleteProject ($) + +{ + my ($q) = @_; + + my $project = $q->param ('project'); + + if ($project =~ /^([a-zA-Z0-9][\-\_\.a-zA-Z0-9]*)$/) + { + $project = $1; + } + else + { + showInitial ($q, + 'Error: internal failure while removing web share '); + return; + } + + db_delete(\%projects, "$project"); + + system ("/etc/e-smith/events/actions/webshare-delete $project") == "0" + or die("Error occured while deleting Webshare $project.\n"); + + showInitial ($q, "Successfully deleted Web share $project."); + return; +} diff --git a/root/etc/e-smith/web/panels/manager/cgi-bin/.gitignore b/root/etc/e-smith/web/panels/manager/cgi-bin/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/home/e-smith/db/webshare/.gitignore b/root/home/e-smith/db/webshare/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/opt/webshare-tools/phpfm/conf/config.inc.php b/root/opt/webshare-tools/phpfm/conf/config.inc.php new file mode 100644 index 0000000..25c2fcc --- /dev/null +++ b/root/opt/webshare-tools/phpfm/conf/config.inc.php @@ -0,0 +1,187 @@ + "txt ini xml xsl ini inf cfg log nfo", + "layout.gif" => "html htm shtml htm pdf", + "script.gif" => "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js", + "image2.gif" => "jpeg jpe jpg gif png bmp", + "c.gif" => "c cpp", + "compressed.gif" => "zip tar gz tgz z ace rar arj cab bz2", + "sound2.gif" => "wav mp1 mp2 mp3 mid", + "movie.gif" => "mpeg mpg mov avi rm", + "binary.gif" => "exe com dll bin dat rpm deb", +); + +# Files that can be edited in PHPFM's text editor +$EditableFiles = "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js txt ini html htm css xml xsl ini inf cfg log nfo bat"; + +# Files that can be viewed in PHPFM's image viewer. +$ViewableFiles = "jpeg jpe jpg gif png bmp"; + +# Format of last modification date +$ModifiedFormat = "H:i m-d-Y"; + +# Zoom levels for PHPFM's image viewer. +$ZoomArray = array( + 5, + 7, + 10, + 15, + 20, + 30, + 50, + 70, + 100, # Base zoom level (do not change) + 150, + 200, + 300, + 500, + 700, + 1000, +); + +# Hidden files and directories +$hide_file_extension = array( + "foo", + "bar", + ); + +$hide_file_string = array( + ".htaccess", + ); + +$hide_directory_string = array( + "secret dir", + ); + +$MIMEtypes = array( + "application/andrew-inset" => "ez", + "application/mac-binhex40" => "hqx", + "application/mac-compactpro" => "cpt", + "application/msword" => "doc", + "application/octet-stream" => "bin dms lha lzh exe class so dll", + "application/oda" => "oda", + "application/pdf" => "pdf", + "application/postscript" => "ai eps ps", + "application/smil" => "smi smil", + "application/vnd.ms-excel" => "xls", + "application/vnd.ms-powerpoint" => "ppt", + "application/vnd.wap.wbxml" => "wbxml", + "application/vnd.wap.wmlc" => "wmlc", + "application/vnd.wap.wmlscriptc" => "wmlsc", + "application/x-bcpio" => "bcpio", + "application/x-cdlink" => "vcd", + "application/x-chess-pgn" => "pgn", + "application/x-cpio" => "cpio", + "application/x-csh" => "csh", + "application/x-director" => "dcr dir dxr", + "application/x-dvi" => "dvi", + "application/x-futuresplash" => "spl", + "application/x-gtar" => "gtar", + "application/x-hdf" => "hdf", + "application/x-javascript" => "js", + "application/x-koan" => "skp skd skt skm", + "application/x-latex" => "latex", + "application/x-netcdf" => "nc cdf", + "application/x-sh" => "sh", + "application/x-shar" => "shar", + "application/x-shockwave-flash" => "swf", + "application/x-stuffit" => "sit", + "application/x-sv4cpio" => "sv4cpio", + "application/x-sv4crc" => "sv4crc", + "application/x-tar" => "tar", + "application/x-tcl" => "tcl", + "application/x-tex" => "tex", + "application/x-texinfo" => "texinfo texi", + "application/x-troff" => "t tr roff", + "application/x-troff-man" => "man", + "application/x-troff-me" => "me", + "application/x-troff-ms" => "ms", + "application/x-ustar" => "ustar", + "application/x-wais-source" => "src", + "application/zip" => "zip", + "audio/basic" => "au snd", + "audio/midi" => "mid midi kar", + "audio/mpeg" => "mpga mp2 mp3", + "audio/x-aiff" => "aif aiff aifc", + "audio/x-mpegurl" => "m3u", + "audio/x-pn-realaudio" => "ram rm", + "audio/x-pn-realaudio-plugin" => "rpm", + "audio/x-realaudio" => "ra", + "audio/x-wav" => "wav", + "chemical/x-pdb" => "pdb", + "chemical/x-xyz" => "xyz", + "image/bmp" => "bmp", + "image/gif" => "gif", + "image/ief" => "ief", + "image/jpeg" => "jpeg jpg jpe", + "image/png" => "png", + "image/tiff" => "tiff tif", + "image/vnd.wap.wbmp" => "wbmp", + "image/x-cmu-raster" => "ras", + "image/x-portable-anymap" => "pnm", + "image/x-portable-bitmap" => "pbm", + "image/x-portable-graymap" => "pgm", + "image/x-portable-pixmap" => "ppm", + "image/x-rgb" => "rgb", + "image/x-xbitmap" => "xbm", + "image/x-xpixmap" => "xpm", + "image/x-xwindowdump" => "xwd", + "model/iges" => "igs iges", + "model/mesh" => "msh mesh silo", + "model/vrml" => "wrl vrml", + "text/css" => "css", + "text/html" => "html htm", + "text/plain" => "asc txt", + "text/richtext" => "rtx", + "text/rtf" => "rtf", + "text/sgml" => "sgml sgm", + "text/tab-separated-values" => "tsv", + "text/vnd.wap.wml" => "wml", + "text/vnd.wap.wmlscript" => "wmls", + "text/x-setext" => "etx", + "text/xml" => "xml xsl", + "video/mpeg" => "mpeg mpg mpe", + "video/quicktime" => "qt mov", + "video/vnd.mpegurl" => "mxu", + "video/x-msvideo" => "avi", + "video/x-sgi-movie" => "movie", + "x-conference/x-cooltalk" => "ice", +); + +?> diff --git a/root/opt/webshare-tools/phpfm/conf/config.inc.php-full b/root/opt/webshare-tools/phpfm/conf/config.inc.php-full new file mode 100644 index 0000000..25c2fcc --- /dev/null +++ b/root/opt/webshare-tools/phpfm/conf/config.inc.php-full @@ -0,0 +1,187 @@ + "txt ini xml xsl ini inf cfg log nfo", + "layout.gif" => "html htm shtml htm pdf", + "script.gif" => "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js", + "image2.gif" => "jpeg jpe jpg gif png bmp", + "c.gif" => "c cpp", + "compressed.gif" => "zip tar gz tgz z ace rar arj cab bz2", + "sound2.gif" => "wav mp1 mp2 mp3 mid", + "movie.gif" => "mpeg mpg mov avi rm", + "binary.gif" => "exe com dll bin dat rpm deb", +); + +# Files that can be edited in PHPFM's text editor +$EditableFiles = "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js txt ini html htm css xml xsl ini inf cfg log nfo bat"; + +# Files that can be viewed in PHPFM's image viewer. +$ViewableFiles = "jpeg jpe jpg gif png bmp"; + +# Format of last modification date +$ModifiedFormat = "H:i m-d-Y"; + +# Zoom levels for PHPFM's image viewer. +$ZoomArray = array( + 5, + 7, + 10, + 15, + 20, + 30, + 50, + 70, + 100, # Base zoom level (do not change) + 150, + 200, + 300, + 500, + 700, + 1000, +); + +# Hidden files and directories +$hide_file_extension = array( + "foo", + "bar", + ); + +$hide_file_string = array( + ".htaccess", + ); + +$hide_directory_string = array( + "secret dir", + ); + +$MIMEtypes = array( + "application/andrew-inset" => "ez", + "application/mac-binhex40" => "hqx", + "application/mac-compactpro" => "cpt", + "application/msword" => "doc", + "application/octet-stream" => "bin dms lha lzh exe class so dll", + "application/oda" => "oda", + "application/pdf" => "pdf", + "application/postscript" => "ai eps ps", + "application/smil" => "smi smil", + "application/vnd.ms-excel" => "xls", + "application/vnd.ms-powerpoint" => "ppt", + "application/vnd.wap.wbxml" => "wbxml", + "application/vnd.wap.wmlc" => "wmlc", + "application/vnd.wap.wmlscriptc" => "wmlsc", + "application/x-bcpio" => "bcpio", + "application/x-cdlink" => "vcd", + "application/x-chess-pgn" => "pgn", + "application/x-cpio" => "cpio", + "application/x-csh" => "csh", + "application/x-director" => "dcr dir dxr", + "application/x-dvi" => "dvi", + "application/x-futuresplash" => "spl", + "application/x-gtar" => "gtar", + "application/x-hdf" => "hdf", + "application/x-javascript" => "js", + "application/x-koan" => "skp skd skt skm", + "application/x-latex" => "latex", + "application/x-netcdf" => "nc cdf", + "application/x-sh" => "sh", + "application/x-shar" => "shar", + "application/x-shockwave-flash" => "swf", + "application/x-stuffit" => "sit", + "application/x-sv4cpio" => "sv4cpio", + "application/x-sv4crc" => "sv4crc", + "application/x-tar" => "tar", + "application/x-tcl" => "tcl", + "application/x-tex" => "tex", + "application/x-texinfo" => "texinfo texi", + "application/x-troff" => "t tr roff", + "application/x-troff-man" => "man", + "application/x-troff-me" => "me", + "application/x-troff-ms" => "ms", + "application/x-ustar" => "ustar", + "application/x-wais-source" => "src", + "application/zip" => "zip", + "audio/basic" => "au snd", + "audio/midi" => "mid midi kar", + "audio/mpeg" => "mpga mp2 mp3", + "audio/x-aiff" => "aif aiff aifc", + "audio/x-mpegurl" => "m3u", + "audio/x-pn-realaudio" => "ram rm", + "audio/x-pn-realaudio-plugin" => "rpm", + "audio/x-realaudio" => "ra", + "audio/x-wav" => "wav", + "chemical/x-pdb" => "pdb", + "chemical/x-xyz" => "xyz", + "image/bmp" => "bmp", + "image/gif" => "gif", + "image/ief" => "ief", + "image/jpeg" => "jpeg jpg jpe", + "image/png" => "png", + "image/tiff" => "tiff tif", + "image/vnd.wap.wbmp" => "wbmp", + "image/x-cmu-raster" => "ras", + "image/x-portable-anymap" => "pnm", + "image/x-portable-bitmap" => "pbm", + "image/x-portable-graymap" => "pgm", + "image/x-portable-pixmap" => "ppm", + "image/x-rgb" => "rgb", + "image/x-xbitmap" => "xbm", + "image/x-xpixmap" => "xpm", + "image/x-xwindowdump" => "xwd", + "model/iges" => "igs iges", + "model/mesh" => "msh mesh silo", + "model/vrml" => "wrl vrml", + "text/css" => "css", + "text/html" => "html htm", + "text/plain" => "asc txt", + "text/richtext" => "rtx", + "text/rtf" => "rtf", + "text/sgml" => "sgml sgm", + "text/tab-separated-values" => "tsv", + "text/vnd.wap.wml" => "wml", + "text/vnd.wap.wmlscript" => "wmls", + "text/x-setext" => "etx", + "text/xml" => "xml xsl", + "video/mpeg" => "mpeg mpg mpe", + "video/quicktime" => "qt mov", + "video/vnd.mpegurl" => "mxu", + "video/x-msvideo" => "avi", + "video/x-sgi-movie" => "movie", + "x-conference/x-cooltalk" => "ice", +); + +?> diff --git a/root/opt/webshare-tools/phpfm/conf/config.inc.php-nodelete b/root/opt/webshare-tools/phpfm/conf/config.inc.php-nodelete new file mode 100644 index 0000000..2fecf08 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/conf/config.inc.php-nodelete @@ -0,0 +1,187 @@ + "txt ini xml xsl ini inf cfg log nfo", + "layout.gif" => "html htm shtml htm pdf", + "script.gif" => "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js", + "image2.gif" => "jpeg jpe jpg gif png bmp", + "c.gif" => "c cpp", + "compressed.gif" => "zip tar gz tgz z ace rar arj cab bz2", + "sound2.gif" => "wav mp1 mp2 mp3 mid", + "movie.gif" => "mpeg mpg mov avi rm", + "binary.gif" => "exe com dll bin dat rpm deb", +); + +# Files that can be edited in PHPFM's text editor +$EditableFiles = "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js txt ini html htm css xml xsl ini inf cfg log nfo bat"; + +# Files that can be viewed in PHPFM's image viewer. +$ViewableFiles = "jpeg jpe jpg gif png bmp"; + +# Format of last modification date +$ModifiedFormat = "H:i m-d-Y"; + +# Zoom levels for PHPFM's image viewer. +$ZoomArray = array( + 5, + 7, + 10, + 15, + 20, + 30, + 50, + 70, + 100, # Base zoom level (do not change) + 150, + 200, + 300, + 500, + 700, + 1000, +); + +# Hidden files and directories +$hide_file_extension = array( + "foo", + "bar", + ); + +$hide_file_string = array( + ".htaccess", + ); + +$hide_directory_string = array( + "secret dir", + ); + +$MIMEtypes = array( + "application/andrew-inset" => "ez", + "application/mac-binhex40" => "hqx", + "application/mac-compactpro" => "cpt", + "application/msword" => "doc", + "application/octet-stream" => "bin dms lha lzh exe class so dll", + "application/oda" => "oda", + "application/pdf" => "pdf", + "application/postscript" => "ai eps ps", + "application/smil" => "smi smil", + "application/vnd.ms-excel" => "xls", + "application/vnd.ms-powerpoint" => "ppt", + "application/vnd.wap.wbxml" => "wbxml", + "application/vnd.wap.wmlc" => "wmlc", + "application/vnd.wap.wmlscriptc" => "wmlsc", + "application/x-bcpio" => "bcpio", + "application/x-cdlink" => "vcd", + "application/x-chess-pgn" => "pgn", + "application/x-cpio" => "cpio", + "application/x-csh" => "csh", + "application/x-director" => "dcr dir dxr", + "application/x-dvi" => "dvi", + "application/x-futuresplash" => "spl", + "application/x-gtar" => "gtar", + "application/x-hdf" => "hdf", + "application/x-javascript" => "js", + "application/x-koan" => "skp skd skt skm", + "application/x-latex" => "latex", + "application/x-netcdf" => "nc cdf", + "application/x-sh" => "sh", + "application/x-shar" => "shar", + "application/x-shockwave-flash" => "swf", + "application/x-stuffit" => "sit", + "application/x-sv4cpio" => "sv4cpio", + "application/x-sv4crc" => "sv4crc", + "application/x-tar" => "tar", + "application/x-tcl" => "tcl", + "application/x-tex" => "tex", + "application/x-texinfo" => "texinfo texi", + "application/x-troff" => "t tr roff", + "application/x-troff-man" => "man", + "application/x-troff-me" => "me", + "application/x-troff-ms" => "ms", + "application/x-ustar" => "ustar", + "application/x-wais-source" => "src", + "application/zip" => "zip", + "audio/basic" => "au snd", + "audio/midi" => "mid midi kar", + "audio/mpeg" => "mpga mp2 mp3", + "audio/x-aiff" => "aif aiff aifc", + "audio/x-mpegurl" => "m3u", + "audio/x-pn-realaudio" => "ram rm", + "audio/x-pn-realaudio-plugin" => "rpm", + "audio/x-realaudio" => "ra", + "audio/x-wav" => "wav", + "chemical/x-pdb" => "pdb", + "chemical/x-xyz" => "xyz", + "image/bmp" => "bmp", + "image/gif" => "gif", + "image/ief" => "ief", + "image/jpeg" => "jpeg jpg jpe", + "image/png" => "png", + "image/tiff" => "tiff tif", + "image/vnd.wap.wbmp" => "wbmp", + "image/x-cmu-raster" => "ras", + "image/x-portable-anymap" => "pnm", + "image/x-portable-bitmap" => "pbm", + "image/x-portable-graymap" => "pgm", + "image/x-portable-pixmap" => "ppm", + "image/x-rgb" => "rgb", + "image/x-xbitmap" => "xbm", + "image/x-xpixmap" => "xpm", + "image/x-xwindowdump" => "xwd", + "model/iges" => "igs iges", + "model/mesh" => "msh mesh silo", + "model/vrml" => "wrl vrml", + "text/css" => "css", + "text/html" => "html htm", + "text/plain" => "asc txt", + "text/richtext" => "rtx", + "text/rtf" => "rtf", + "text/sgml" => "sgml sgm", + "text/tab-separated-values" => "tsv", + "text/vnd.wap.wml" => "wml", + "text/vnd.wap.wmlscript" => "wmls", + "text/x-setext" => "etx", + "text/xml" => "xml xsl", + "video/mpeg" => "mpeg mpg mpe", + "video/quicktime" => "qt mov", + "video/vnd.mpegurl" => "mxu", + "video/x-msvideo" => "avi", + "video/x-sgi-movie" => "movie", + "x-conference/x-cooltalk" => "ice", +); + +?> diff --git a/root/opt/webshare-tools/phpfm/conf/config.inc.php-updown b/root/opt/webshare-tools/phpfm/conf/config.inc.php-updown new file mode 100644 index 0000000..584cc49 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/conf/config.inc.php-updown @@ -0,0 +1,187 @@ + "txt ini xml xsl ini inf cfg log nfo", + "layout.gif" => "html htm shtml htm pdf", + "script.gif" => "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js", + "image2.gif" => "jpeg jpe jpg gif png bmp", + "c.gif" => "c cpp", + "compressed.gif" => "zip tar gz tgz z ace rar arj cab bz2", + "sound2.gif" => "wav mp1 mp2 mp3 mid", + "movie.gif" => "mpeg mpg mov avi rm", + "binary.gif" => "exe com dll bin dat rpm deb", +); + +# Files that can be edited in PHPFM's text editor +$EditableFiles = "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js txt ini html htm css xml xsl ini inf cfg log nfo bat"; + +# Files that can be viewed in PHPFM's image viewer. +$ViewableFiles = "jpeg jpe jpg gif png bmp"; + +# Format of last modification date +$ModifiedFormat = "H:i m-d-Y"; + +# Zoom levels for PHPFM's image viewer. +$ZoomArray = array( + 5, + 7, + 10, + 15, + 20, + 30, + 50, + 70, + 100, # Base zoom level (do not change) + 150, + 200, + 300, + 500, + 700, + 1000, +); + +# Hidden files and directories +$hide_file_extension = array( + "foo", + "bar", + ); + +$hide_file_string = array( + ".htaccess", + ); + +$hide_directory_string = array( + "secret dir", + ); + +$MIMEtypes = array( + "application/andrew-inset" => "ez", + "application/mac-binhex40" => "hqx", + "application/mac-compactpro" => "cpt", + "application/msword" => "doc", + "application/octet-stream" => "bin dms lha lzh exe class so dll", + "application/oda" => "oda", + "application/pdf" => "pdf", + "application/postscript" => "ai eps ps", + "application/smil" => "smi smil", + "application/vnd.ms-excel" => "xls", + "application/vnd.ms-powerpoint" => "ppt", + "application/vnd.wap.wbxml" => "wbxml", + "application/vnd.wap.wmlc" => "wmlc", + "application/vnd.wap.wmlscriptc" => "wmlsc", + "application/x-bcpio" => "bcpio", + "application/x-cdlink" => "vcd", + "application/x-chess-pgn" => "pgn", + "application/x-cpio" => "cpio", + "application/x-csh" => "csh", + "application/x-director" => "dcr dir dxr", + "application/x-dvi" => "dvi", + "application/x-futuresplash" => "spl", + "application/x-gtar" => "gtar", + "application/x-hdf" => "hdf", + "application/x-javascript" => "js", + "application/x-koan" => "skp skd skt skm", + "application/x-latex" => "latex", + "application/x-netcdf" => "nc cdf", + "application/x-sh" => "sh", + "application/x-shar" => "shar", + "application/x-shockwave-flash" => "swf", + "application/x-stuffit" => "sit", + "application/x-sv4cpio" => "sv4cpio", + "application/x-sv4crc" => "sv4crc", + "application/x-tar" => "tar", + "application/x-tcl" => "tcl", + "application/x-tex" => "tex", + "application/x-texinfo" => "texinfo texi", + "application/x-troff" => "t tr roff", + "application/x-troff-man" => "man", + "application/x-troff-me" => "me", + "application/x-troff-ms" => "ms", + "application/x-ustar" => "ustar", + "application/x-wais-source" => "src", + "application/zip" => "zip", + "audio/basic" => "au snd", + "audio/midi" => "mid midi kar", + "audio/mpeg" => "mpga mp2 mp3", + "audio/x-aiff" => "aif aiff aifc", + "audio/x-mpegurl" => "m3u", + "audio/x-pn-realaudio" => "ram rm", + "audio/x-pn-realaudio-plugin" => "rpm", + "audio/x-realaudio" => "ra", + "audio/x-wav" => "wav", + "chemical/x-pdb" => "pdb", + "chemical/x-xyz" => "xyz", + "image/bmp" => "bmp", + "image/gif" => "gif", + "image/ief" => "ief", + "image/jpeg" => "jpeg jpg jpe", + "image/png" => "png", + "image/tiff" => "tiff tif", + "image/vnd.wap.wbmp" => "wbmp", + "image/x-cmu-raster" => "ras", + "image/x-portable-anymap" => "pnm", + "image/x-portable-bitmap" => "pbm", + "image/x-portable-graymap" => "pgm", + "image/x-portable-pixmap" => "ppm", + "image/x-rgb" => "rgb", + "image/x-xbitmap" => "xbm", + "image/x-xpixmap" => "xpm", + "image/x-xwindowdump" => "xwd", + "model/iges" => "igs iges", + "model/mesh" => "msh mesh silo", + "model/vrml" => "wrl vrml", + "text/css" => "css", + "text/html" => "html htm", + "text/plain" => "asc txt", + "text/richtext" => "rtx", + "text/rtf" => "rtf", + "text/sgml" => "sgml sgm", + "text/tab-separated-values" => "tsv", + "text/vnd.wap.wml" => "wml", + "text/vnd.wap.wmlscript" => "wmls", + "text/x-setext" => "etx", + "text/xml" => "xml xsl", + "video/mpeg" => "mpeg mpg mpe", + "video/quicktime" => "qt mov", + "video/vnd.mpegurl" => "mxu", + "video/x-msvideo" => "avi", + "video/x-sgi-movie" => "movie", + "x-conference/x-cooltalk" => "ice", +); + +?> diff --git a/root/opt/webshare-tools/phpfm/conf/config.inc.php-view b/root/opt/webshare-tools/phpfm/conf/config.inc.php-view new file mode 100644 index 0000000..61569e3 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/conf/config.inc.php-view @@ -0,0 +1,187 @@ + "txt ini xml xsl ini inf cfg log nfo", + "layout.gif" => "html htm shtml htm pdf", + "script.gif" => "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js", + "image2.gif" => "jpeg jpe jpg gif png bmp", + "c.gif" => "c cpp", + "compressed.gif" => "zip tar gz tgz z ace rar arj cab bz2", + "sound2.gif" => "wav mp1 mp2 mp3 mid", + "movie.gif" => "mpeg mpg mov avi rm", + "binary.gif" => "exe com dll bin dat rpm deb", +); + +# Files that can be edited in PHPFM's text editor +$EditableFiles = "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js txt ini html htm css xml xsl ini inf cfg log nfo bat"; + +# Files that can be viewed in PHPFM's image viewer. +$ViewableFiles = "jpeg jpe jpg gif png bmp"; + +# Format of last modification date +$ModifiedFormat = "H:i m-d-Y"; + +# Zoom levels for PHPFM's image viewer. +$ZoomArray = array( + 5, + 7, + 10, + 15, + 20, + 30, + 50, + 70, + 100, # Base zoom level (do not change) + 150, + 200, + 300, + 500, + 700, + 1000, +); + +# Hidden files and directories +$hide_file_extension = array( + "foo", + "bar", + ); + +$hide_file_string = array( + ".htaccess", + ); + +$hide_directory_string = array( + "secret dir", + ); + +$MIMEtypes = array( + "application/andrew-inset" => "ez", + "application/mac-binhex40" => "hqx", + "application/mac-compactpro" => "cpt", + "application/msword" => "doc", + "application/octet-stream" => "bin dms lha lzh exe class so dll", + "application/oda" => "oda", + "application/pdf" => "pdf", + "application/postscript" => "ai eps ps", + "application/smil" => "smi smil", + "application/vnd.ms-excel" => "xls", + "application/vnd.ms-powerpoint" => "ppt", + "application/vnd.wap.wbxml" => "wbxml", + "application/vnd.wap.wmlc" => "wmlc", + "application/vnd.wap.wmlscriptc" => "wmlsc", + "application/x-bcpio" => "bcpio", + "application/x-cdlink" => "vcd", + "application/x-chess-pgn" => "pgn", + "application/x-cpio" => "cpio", + "application/x-csh" => "csh", + "application/x-director" => "dcr dir dxr", + "application/x-dvi" => "dvi", + "application/x-futuresplash" => "spl", + "application/x-gtar" => "gtar", + "application/x-hdf" => "hdf", + "application/x-javascript" => "js", + "application/x-koan" => "skp skd skt skm", + "application/x-latex" => "latex", + "application/x-netcdf" => "nc cdf", + "application/x-sh" => "sh", + "application/x-shar" => "shar", + "application/x-shockwave-flash" => "swf", + "application/x-stuffit" => "sit", + "application/x-sv4cpio" => "sv4cpio", + "application/x-sv4crc" => "sv4crc", + "application/x-tar" => "tar", + "application/x-tcl" => "tcl", + "application/x-tex" => "tex", + "application/x-texinfo" => "texinfo texi", + "application/x-troff" => "t tr roff", + "application/x-troff-man" => "man", + "application/x-troff-me" => "me", + "application/x-troff-ms" => "ms", + "application/x-ustar" => "ustar", + "application/x-wais-source" => "src", + "application/zip" => "zip", + "audio/basic" => "au snd", + "audio/midi" => "mid midi kar", + "audio/mpeg" => "mpga mp2 mp3", + "audio/x-aiff" => "aif aiff aifc", + "audio/x-mpegurl" => "m3u", + "audio/x-pn-realaudio" => "ram rm", + "audio/x-pn-realaudio-plugin" => "rpm", + "audio/x-realaudio" => "ra", + "audio/x-wav" => "wav", + "chemical/x-pdb" => "pdb", + "chemical/x-xyz" => "xyz", + "image/bmp" => "bmp", + "image/gif" => "gif", + "image/ief" => "ief", + "image/jpeg" => "jpeg jpg jpe", + "image/png" => "png", + "image/tiff" => "tiff tif", + "image/vnd.wap.wbmp" => "wbmp", + "image/x-cmu-raster" => "ras", + "image/x-portable-anymap" => "pnm", + "image/x-portable-bitmap" => "pbm", + "image/x-portable-graymap" => "pgm", + "image/x-portable-pixmap" => "ppm", + "image/x-rgb" => "rgb", + "image/x-xbitmap" => "xbm", + "image/x-xpixmap" => "xpm", + "image/x-xwindowdump" => "xwd", + "model/iges" => "igs iges", + "model/mesh" => "msh mesh silo", + "model/vrml" => "wrl vrml", + "text/css" => "css", + "text/html" => "html htm", + "text/plain" => "asc txt", + "text/richtext" => "rtx", + "text/rtf" => "rtf", + "text/sgml" => "sgml sgm", + "text/tab-separated-values" => "tsv", + "text/vnd.wap.wml" => "wml", + "text/vnd.wap.wmlscript" => "wmls", + "text/x-setext" => "etx", + "text/xml" => "xml xsl", + "video/mpeg" => "mpeg mpg mpe", + "video/quicktime" => "qt mov", + "video/vnd.mpegurl" => "mxu", + "video/x-msvideo" => "avi", + "video/x-sgi-movie" => "movie", + "x-conference/x-cooltalk" => "ice", +); + +?> diff --git a/root/opt/webshare-tools/phpfm/docs/changelog.txt b/root/opt/webshare-tools/phpfm/docs/changelog.txt new file mode 100644 index 0000000..56a6f2e --- /dev/null +++ b/root/opt/webshare-tools/phpfm/docs/changelog.txt @@ -0,0 +1,67 @@ +Changelog for PHPFM: +------------------------------------------------------------------------------------- + +PHPFM version 0.2.3: + + - login problems are (hopefully) fixed now. + - problems with magic quotes fixed. + - various code clean-ups - not that it matters. + - folders will be created with 777 permissions now. + - an IE bug that caused an error when opening a file at the download prompt + has been fixed now. + - slashes are now stripped form uploaded files' names. + - each language now has it's own charset. + - and guess what - more languages! :) + + +PHPFM version 0.2.2: + + - problems using view and download now fixed! + - each folder is now a link in the "Index of" path. + - create new folder, create new file and upload files can no longer be seen + when they are disabled in the configuration file. + - changed all occurrences of //". A sample URL would look like this: + "http://localhost/phpfm.0.2.0/". + 7) If you did everything right, you should see the login screen of PHPFM now. + +Installing remotely on a Windows server: +----------------------------------------------- + 1) Make sure that the webserver has PHP 4.1.0 or higher installed. + 2) Go to PHPFM's website and download the ".zip" version of the script. The website + is located at http://phpfm.zalon.dk/ + 3) Unzip the downloaded archive to a temporary folder. Be sure to extract subdirectories + as well. + 4) Open "config.inc.php" in the directory "conf" with a text editor and set the home + directory, username and password. Save the file and close the text editor. + 5) Upload all files including all subdirectories to the server (e.g. via FTP). + 6) Start up your internet browser and input the URL to PHPFM. It should look like this: + "http:////". A sample URL would look like this: + "http://www.some-site.com/phpfm.0.2.0/". + 7) If you did everything right, you should see the login screen of PHPFM now. + +Installing remotely on a Linux or Unix server: +----------------------------------------------- + 1) Make sure that the webserver has PHP 4.1.0 or higher installed. + 2) Go to PHPFM's website and download the ".tar.gz" version of the script. The website + is located at http://phpfm.zalon.dk/ + 3) Untar the downloaded archive to a temporary folder. Be sure to extract subdirectories + as well. Use "tar zxvvf phpfm.x.x.x.tar.gz" or similar. + 4) Open "config.inc.php" in the directory "conf" with a text editor and set the home + directory, username and password. Save the file and close the text editor. + 5) Upload all files including all subdirectories to the server (e.g. via FTP). + 6) CHMOD all files and directories to 777 (not sure). + 6) Start up your internet browser and input the URL to PHPFM. It should look like this: + "http:////". A sample URL would look like this: + "http://www.some-site.com/phpfm.0.2.0/". + 7) If you did everything right, you should see the login screen of PHPFM now. \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/docs/license.txt b/root/opt/webshare-tools/phpfm/docs/license.txt new file mode 100644 index 0000000..2e3a6a5 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/docs/license.txt @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/root/opt/webshare-tools/phpfm/docs/requirements.txt b/root/opt/webshare-tools/phpfm/docs/requirements.txt new file mode 100644 index 0000000..f8d683c --- /dev/null +++ b/root/opt/webshare-tools/phpfm/docs/requirements.txt @@ -0,0 +1,26 @@ +System requirements: +------------------------------------------------------------------------------------- + +System requirements for PHPFM: + +Webserver +PHP 4.1.0 or higher + +PHPFM has been tested on the following systems: +------------------------------------------------------------------------------------- + +System 1: +Operating System Windows 98 Second Edition +Webserver Apache 1.3.23 +PHP version PHP 4.2.2 +- error_reporting E_ALL +- register_globals Off +- magic_quotes_gpc On + +System 2: +Operation System: GNU/Linux +Webserver Apache 1.3.23 +PHP version PHP 4.1.2 +- error_reporting E_ALL +- register_globals Off +- magic_quotes_gpc On \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/docs/todo.txt b/root/opt/webshare-tools/phpfm/docs/todo.txt new file mode 100644 index 0000000..a1f3e16 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/docs/todo.txt @@ -0,0 +1,21 @@ +Todo list for PHPFM: +------------------------------------------------------------------------------------- + +- find work-around for permissions on GNU/Linux & UNIX systems. +- make a login system where each user has his/hers own home directory and permissions. +- some kind of logging system. +- make an install script which makes it easier to install PHPFM. +- make hidden files unaccessible by the script (again). +- index with thumbnails of all images in the current directory (uncertain). +- make it possible to change permissions (chmod) on files and directories. +- make it so you can compress a directory and download it. +- do so you can see the full size of a directory (including sub-directories) and how + many files that are in the directory. +- templates for new (created) files. For instance PHP, HTML etc. +- unix style permissions (e.g. -rw-rw-rw-) +- too long directory- and filenames are shortened so they do not ruin the design. +- templates for PHPFM. Change the look of PHPFM easily! (not provisional) +- more languages. +- add some nifty DHTML? +- add the drive browser again? +- PDF viewer and text/PHP viewer with highlighting. \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/files/.gitignore b/root/opt/webshare-tools/phpfm/files/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/opt/webshare-tools/phpfm/icon/back.gif b/root/opt/webshare-tools/phpfm/icon/back.gif new file mode 100644 index 0000000000000000000000000000000000000000..62639b8a6ae3ec5569cd2998d077cf2e67c2bd77 GIT binary patch literal 996 zcmZ?wbhEHb6k!l!_|Cxa|Ns9p|NqaNIWsLS&DhwOVHAvpz(@)K#eaSw8JWcjiA5y} zKq@m&p(GL>)K z7L=ssCZ!fB7+PAIGARCJVPs%nWY7TxBPf?KaO5*EbI5pXSa7hJnMpvQU_&AUBe$|q ziG{(!BON00aZ@}lK04OQr&xESBjDk223CzckqCvoE#TshGZRH5N2$5wQ7Uf_4UlmObpfl=HpXI literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/binary.gif b/root/opt/webshare-tools/phpfm/icon/binary.gif new file mode 100644 index 0000000000000000000000000000000000000000..9a15cbae04ccda7ee515f0e56360afc5a0dba7a5 GIT binary patch literal 246 zcmZ?wbhEHb6k!l!IK;s4|Ns9pKy>EJ%$YNdjg1*#K=GenNJeI{LSj*g0+7ngQz*$u zRVXM;%E?StNXgGl%*@kM@J=lQN_do}XQUSEC}e|p84jtLC3?yExjG8LsRbpexk;%- z3Wk=JrVNTdSr{1@7#VaxR)B10V9xZ|wdbROfWzv!D*Gb21Y#8#gjW{Ev9DOlxiI_H z)^#HHvm9UiDQlh^nDJt>gl6-T1rM0J@~%VW#e jit!gMUf+_g-~76GhV}Y)-JD*HO`g_*&g~t+oD9|gOVnOa literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/c.gif b/root/opt/webshare-tools/phpfm/icon/c.gif new file mode 100644 index 0000000000000000000000000000000000000000..7555b6c164fc1b4fd61b082d8077fa9d91df56f2 GIT binary patch literal 242 zcmZ?wbhEHb6k!l!IK;s4|Ns9p|NqaNIn&tKm;nhW{__jT$ShV!EGkg|Qki)QB^jv- z1*J(jnaK(%`MHUid3p-osbxS3kJ9vv)M6clY!ENQAvLo^FF8L~MXnDYZz! z(9+VBLGdRGBLf2?gAT|RknIf2sTRBTd^F&3SUp#HU#9hWL3V*Bp^eh6>z=a~rmo~; z@m;PwF+98fv}{9yhQgnc16&t10u@Ug6@{;Ldlgz{Obt2`rF%DR+wn(!`wtpSjoH_A d@zm!TvfmF~E%;F4@aA{Bxj;^{Ha{nWH2?tDSDF9- literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/compressed.gif b/root/opt/webshare-tools/phpfm/icon/compressed.gif new file mode 100644 index 0000000000000000000000000000000000000000..39e732739f562920d69e21b9d5f766103225471e GIT binary patch literal 1038 zcmbu8%S)7D6vm%!Ft{kRtWAqgQ<5~hoFu0y(5j?VVxWbZa?#}6Rb z^C4&mE(8ey7I`1M2JeEG;9*JiK{cogDnVhj&IhN#x!@!?SgZIT8pH*WAfQr!56}P? zAOQ@hO=)Venboj4_SAdly?75B%ShF$^D16p6ihnx&Uq)^!Jt?x>cx2xFCZgZJ=DW_ zhzF;Vnqq_|C9#;}U}{sET5N_bWHFyp6;;@N9LvZ#b)pWoE-9E4ry?rg_Jm@s!YM?- z_2>sN*-bmRKOwjwsVPQiQnHjB987IWQw!#tr5W>yb1);hAICBhaRU0vbxFabgE-Jf zI!yz}#c~?WZD}R_ASSzM2bs7qHzYO12+dAnk%NP&O=;MPteR=YeBi}sB=_T3Mgsdd z%-8tdmW)qmHpf@7+Sq7wJ@(F8V>|2!@rI@pL)%Sa4ik>0`8n`PG>cNN~PuHj#2TU&K?b$PjISFN2mlgUm*z2muv zKiQEemq|xslYK+k{%BxyxHmh}7Dc}w4}4S#{SXahUj#9ESDbc zOOHnflF24it!!Ke)S!Xtuzwj6iq1sMV&VMamBiM~1Dk->?y_AKLvKGkd3CL_zUO(} z{{Gh4ox9inc{4lTIae9-XIHj->p*v3PgZ}I-!Gd(0R3W>2Z59 z@wZv>Co5WRejm!z{yeqNojm@2_0WZ-{JG+hhh&B-mUxe ZEb;5(orN8>^?I=Ddd=ePr!Oz#=sza7#nJ!( literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/delete.gif b/root/opt/webshare-tools/phpfm/icon/delete.gif new file mode 100644 index 0000000000000000000000000000000000000000..5fa99296ba142b812890ae877491d51c623b983b GIT binary patch literal 929 zcmZ?wbhEHb6k!l!_|5V&in@fu&PmF zGz5lW2q^w!VPs(7V$cEk4U{JsIO-TgIb=LGEI8QA#lYZjLcoEEiCKax#AD;4qfHDf z3JL`Y2OHZtSVTAk926b9HT08AE__sOoS-Z&$8zA3vd2VK!Am)n#>>vl(o1|chjYvG zfM)C5eMdBfGcPW+>-^MGRq`}sq3>F)qrX0DU0xTx--}oJ>dNbzJc4IUIZ>A2z`$S) E0B$)+!~g&Q literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/download.gif b/root/opt/webshare-tools/phpfm/icon/download.gif new file mode 100644 index 0000000000000000000000000000000000000000..bca4556b79cbf6bad81c0ad5f72a98c9a2af7692 GIT binary patch literal 939 zcmZ?wbhEHb6k!l!_|5*+j!I6POm`UQm2F1fIOpGiX3KJI{?&MKdQVH1j_$Y& vSBEao>N&NwA*?InFxQV;TeL$qC2d^fn_a4Vd!y3SQ=wTK^6oY;FjxZstQbhx literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/drive.gif b/root/opt/webshare-tools/phpfm/icon/drive.gif new file mode 100644 index 0000000000000000000000000000000000000000..7664cd03649021707e088ea934495978fb0d2656 GIT binary patch literal 246 zcmZ?wbhEHb6k!l!IK;s4|Ns9p|NqaNIWz6de`8}~1{hHM=NFQZS*(y)RH6W+GV>Hl zGEx-^N|SOjlND0(a}zW3^c1{P%YYIdrRf=|#X1VvAYO(;YG#REa(=FkLU3w9NosCV zYLSAWrKKr@;!hSv1_nk39gr0u+ZmWMC3fBUXK*TF)m~Py1H0L0ZcY^U=uj|Uqn)@& z`t+`&H+w$)xtDP7U5{X*hYXYW?DNZyDNHgr!s_U-Hfnv#g)JxEX01=i4l~r{ICH)$ lVU2;d{qukWdt+~JZ}<_zu;TaoO4H0{QT5pN7)DM8YXGT7UX1_% literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/edit.gif b/root/opt/webshare-tools/phpfm/icon/edit.gif new file mode 100644 index 0000000000000000000000000000000000000000..1f4636631d6ca872e61b815504f13b7549884b0d GIT binary patch literal 941 zcmZ?wbhEHb6k!l!_|5kv@<$->CMz{a2h z@+BxwFmQA+@N&p_Y*=uxnL}91g=4|O!|e=0Oco9s7ai?jlMVd07G#8}%O;Jp~w59X%1DB}`Ra`$b1)iOmWj@o) zms3>zY_mb8maW#;7pInr?yg%Bx!|Gen#8?ruDgrZUfh<)?KEd~;ljJS*_oLbtN}Q9 BM&1Ab literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/folder.gif b/root/opt/webshare-tools/phpfm/icon/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..48264601ae0655bbb5b5539e54ab9c4c52c0ca96 GIT binary patch literal 225 zcmZ?wbhEHb6k!l!IK;s49|+FOJoEqm%rs*lV1NO|e|{kunZ*i;MI{PADl<=^BqLR! zpfo8bGg%=eKQ}QmPfx)+wG1fXQJS8STCAgx4dP`uq-K`rCFkerCyg@&WtvAFs%+oyn@vrAN+!2FgA&7LgdM$msG{jgj*VKw;b&W_&MNEp LeCV-eWUvMRho4eP literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/image2.gif b/root/opt/webshare-tools/phpfm/icon/image2.gif new file mode 100644 index 0000000000000000000000000000000000000000..751faeea3644ec77fc2758b18522443c86e11e88 GIT binary patch literal 309 zcmZ?wbhEHb6k!l!c+9}?9|(+%&;0*?=FFLyGiRm&0Rw}vu`$EUGYm708H|BE6rlLe zFC-(gSRt{fL;*-;<|&k9q$(7YCgo%%E2QM-CT8a8DR`%r0VO<2(=$?wbriBeybOob z%o4ri{9GM{;M9VW)ZC=hA_YTBOH&5LpDc_F3``6AFlZ-6WvSM=7VP{@&>xS8Bwhc1-A7qQa*6llSbi$3t0`pjwvYB~D2%9p5teUK9 z!JHj-nw2N%{)ee19sAhWn7?J+(8*}hLs;X|rU4J$iGeWf`wdw5G*d!uZZa9_W^ ocG{GwRjPF}8>Y#Xb1hynfA)0M4)%aGYyBN0JvVI*5@fIj0DN?8ZvX%Q literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/layout.gif b/root/opt/webshare-tools/phpfm/icon/layout.gif new file mode 100644 index 0000000000000000000000000000000000000000..c96338a15228f70b4fa5753ff93db7d70f1123cc GIT binary patch literal 276 zcmZ?wbhEHb6k!l!c+9}?9|+DE|2H;1^Z)-$AV@P#I|JkyGvEM<|NKHSGK&=wi%JxL zRA!z+Nk*zdL1|J>X0k#`er{rBo}PktY8g<%qclAuwOB_X8^p_SNX;zKOU}>LQ3y^g zC`rvtN-a__w6rv3Q2fcl$iTqNpaZfI}mo*BX ubMM=^lVvk>^@~}aS-AV^f3&VBD9tXZudR+|59;m-w3jTH=pio1U=0AHb6^Gl literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/logout.gif b/root/opt/webshare-tools/phpfm/icon/logout.gif new file mode 100644 index 0000000000000000000000000000000000000000..c2645fa5f235774b814f436768e4310d87538bf4 GIT binary patch literal 989 zcmZ?wbhEHb6k!l!_|5XGxPKmyi?175+0@L8L7oO3fUlDhC^y*iC%Jku8u-*YC%bAZc=KI zf}y3QDTCrq7DfgJW(FNlNP==114jk}JBN(Nh6M+kIfS`b4s2L>sF8uiV-ClI#3P*& z+DdyQ7AQ6_Fj?hISy7mHViK!m6^mw(id(0ya9oRIu;Ss#8oKjpW)!LWcUTmk;_>{L heuTjzoA2$53C}Ms@^e-bt@@A=yf~y@jfaE58UU2FN{oiU2nqomkY7Q0fq_Gdftf?bBVa*8 pGl!s*&x``a!_9p1QY;P|l^7TWCDU>w9xOc6Cub-oBPqaO4FJMa6)gY& literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/movie.gif b/root/opt/webshare-tools/phpfm/icon/movie.gif new file mode 100644 index 0000000000000000000000000000000000000000..003518377414735b97dd78c435daa795c9136526 GIT binary patch literal 243 zcmZ?wbhEHb6k!l!IK;s4|Ns9pKy>EJ%$YOO($b8LjTyi|@tVo`|#kjl(c zD9K1wC@4+J$xK#A$0Aq je4J*Rr#@1aJXdjR@wJsoZ!aBYW^HV0ZfO+YWUvMRZ1!36 literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/newfile.gif b/root/opt/webshare-tools/phpfm/icon/newfile.gif new file mode 100644 index 0000000000000000000000000000000000000000..7acb91d6b192e91e1fd953d29cdbb83371ec61de GIT binary patch literal 1018 zcmZ?wbhEHb6k!l!_|5U167#L>GoO$Ly2!O>#iO~=k5h0-X&o3k+vsfXqs6+us zW#%cAWTYw-lqTh5CM%@m=O$+6=_z=pmH{O^O4Bn^i**#TLA(ry)XWmS#V9N0e3LZpD-(L5sYl&F=n~qIrG^YuBqiUZNV;=LGF<(lsc3U1o(~J)=F#JC=^UVMMV6jnRGz3OO2q^yZ3(3eVR!A%= zQ2NWsw3(v(5*CkrD311p0LDEvUVjDe$rfty3dW5a@j%^bp7F()P{G_(uI z>#;a2Sah_DK`3a?3ByG$jSMUWTQoK)doVEtt@5!HN%NTVgTb?gX-pZ1wp46> zesrd(JD-GBu=??Zww+-tyCyHcG~caX=!2(GdcZ=9#mAnUDA7E%Ug>bt(ny6Tr#7cE ZPtaYxZSC#tCd@ovJj@r}X<%Tm1^`LtV+8;J literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/next.gif b/root/opt/webshare-tools/phpfm/icon/next.gif new file mode 100644 index 0000000000000000000000000000000000000000..b64048553e7737d497482317cd97be6bdfcd6952 GIT binary patch literal 843 zcmZ?wbhEHbFN{oiU2nqomkY7Q0fq}z-ftf?bBVa*8 vGl!rQ3xmSLgRMN$T09C0Nk`g6bmLkw1e1?;3)@?XBowF|Yhq<)Vz34POyd_+ literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/original.gif b/root/opt/webshare-tools/phpfm/icon/original.gif new file mode 100644 index 0000000000000000000000000000000000000000..5441184deb557232f25842706346959680cd29b5 GIT binary patch literal 846 zcmZ?wbhEHbFN{oiU2nqomkY7Q0fq}!Aftf?bBS3+H ykwch^L7`xwQ#-G$l8uJKBIhnqW{o2=3?Dl72pR_EoDfWEm?X@-ibp_z!5RQhOBV6~ literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/plus.gif b/root/opt/webshare-tools/phpfm/icon/plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..916218368cc91dc4721558c012169a1d31119117 GIT binary patch literal 842 zcmZ?wbhEHbFN{oiU2nqomkY7Q0fq_Gxftf?bBVa*8 uGl!s*3x~qPL(RORY#tIH7dSFV7@O5-ELgKIS} literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/previous.gif b/root/opt/webshare-tools/phpfm/icon/previous.gif new file mode 100644 index 0000000000000000000000000000000000000000..64298e6ded4e7e4a367a3240fb014f6c089a6240 GIT binary patch literal 844 zcmZ?wbhEHbFN{oiU2nqomkY7Q0fq}!2ftf?bBVa*8 vGl!s*j|Nbjk(=MDgu}4mNT&#I(wvBoO2_&*?A>^N7N{I<(qLv`VXy`OMPC<6 literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/rename.gif b/root/opt/webshare-tools/phpfm/icon/rename.gif new file mode 100644 index 0000000000000000000000000000000000000000..2530da0719f5631bf9ac35ff587eccb79eaa0111 GIT binary patch literal 899 zcmZ?wbhEHb6k!l!_|5&bf$|2*i zVZp&>4q>erjs*)F+8D&ddNeL79PMJ!*Wx)~*l?gj)>2AD(?P|fNiJ}ejio{A>8YyT wlR|z@TIw*}+_`Ft7-cxb{jks>yatS?Jv1z1S;ON`S!{00yWlu>b%7 literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/script.gif b/root/opt/webshare-tools/phpfm/icon/script.gif new file mode 100644 index 0000000000000000000000000000000000000000..d8a853bc5828cf534c4c46a0efbf4b1d7d3c52fc GIT binary patch literal 242 zcmZ?wbhEHb6k!l!IK;s4|Ns9p|NqaNIn&tKm;nhW{__jT$ShV!EGkg|Qki)QB^jv- z1*J(jnaK(%`MHUid3p-osbxS3kJ9vv)M6clY!ENQAvLo^FF8L~MXnDYZz! z(9+VBLGdRGBLf2?gAT|RknIf2sTRBTd^F&3SUp#HU#9hW!Rw()J3?6|OcFmLXwbvQ z;yXWN*R#T&@77%j8VV0WP6%GqkhE;|xp+C~4`X#h&eoZ4tM=c%ZhDQk{(Ri#ES<}4 d7Yj^x^9CF~_};qCSmD=yXLEt#WPVNtYXEP%SK9yp literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/sound2.gif b/root/opt/webshare-tools/phpfm/icon/sound2.gif new file mode 100644 index 0000000000000000000000000000000000000000..48e6a7fb2faeb6ba254a87945246f5ca5980583b GIT binary patch literal 221 zcmZ?wbhEHb6k!l!IK;s4|Ns9pKy>EJ%$YOO($b8LjTyi|@tVo`|#kjl(c zD9K1wC@4+J$xK#A$~K Lz}Ywz1_o;YcDqp^ literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/text.gif b/root/opt/webshare-tools/phpfm/icon/text.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c623909fbfb54658f19186beec8d362f87e233b GIT binary patch literal 229 zcmZ?wbhEHb6k!l!IK;s4|Ns9p|NqaNIn&tKm;nhW{__jT$ShV!EGkg|Qki)QB^jv- z1*J(jnaK(%`MHUid3p-osbxS3kJ9vv)M6clY!ENQAvLo^FF8L~MXnDYZz! z(9+VBLGdRGBLf2?gAT|RknIf25f;1ld^F&3SUp#HU#9hW!Rw()J9@9P7P`C+IwEjh zoojbq@AhdAxLane{lx8+w_BW5Lq@1~%@UylHdfUEOTOIP6XtsB<@c_)dDA0}cD??? QSNCCuzu3fEy_^iz0A2r7i2wiq literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/unknown.gif b/root/opt/webshare-tools/phpfm/icon/unknown.gif new file mode 100644 index 0000000000000000000000000000000000000000..32b1ea23fb6f6195f1bb17adf9c3cb2cc29dfefa GIT binary patch literal 245 zcmZ?wbhEHb6k!l!IK;s4|Ns9p|NqaNIn&tKm;nhW{__jT$ShV!EGkg|Qki)QB^jv- z1*J(jnaK(%`MHUid3p-osbxS3kJ9vv)M6clY!ENQAvLo^FF8L~MXnDYZz! z(9+VBLGdRGBLf2?gAT|RknIf285X*+j!I6POm`UQm2F1fIOpGiX3KJI{?&MKdQVH1j_$Y& vSBEao>N&NwA*?InFxQV;TeL$qC2d^fn_a4Vd!y3SQ=wTK^6oY;FjxZstQbhx literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/valid-css.jpg b/root/opt/webshare-tools/phpfm/icon/valid-css.jpg new file mode 100644 index 0000000000000000000000000000000000000000..754a609ef6d4baa0047d3e420effe61a4cd0dcc8 GIT binary patch literal 3613 zcmbu6cQo697RP@Pv8y6Bttv&0)NZYsrD}wlrS>MOC{?q=D7Et>+9ItOwW&Q~RLt5X zLG0BMqqNkl=e={@JLmoVKKGA%?)l#Pz4x4ZHgPr&u-wzp(*Zyr005l_a7G5S&a3~A zf0_J$4(HQnZ2*)G;0LV0psN5C6aH`)SCim7WV#q*W2V^LNYrx4= z_0x#~j}=a$G>XQUJr&a1=SASP@)omEZr8Qqy zyg%VaC}Jt7Y_rpCU}83fgiI%vK&`~LgZ{=EZ^CLI{rIA%3>j9ss?O%IN$Lii?^GaB z4`ECO(uN$t&OWYQ>u4AS>R-9H&06Pl!t0s(*{|#t_K{d>$o@zbQEFG0)!uTourWWF z*Sxc0@`hV;zss_-PMR5NDm*ZUVwCfnJLY51Qiyg&*fBZwLX$~D-JhCa zu-AeqM4gzjf*y};_w;=Ayny`2?{cUczgsNt2qHDCsA6j#Jz;k`<>-w>E0D{4V0>Qa(8$XfN?@-wvDN+K3q64V z8`0oc$4~L`#&03}-dooQZoRlZFytsTc+u$U)w}qegC)3XPyM0)%_`0X-9zb9yw%N8 z%Mz9FgWn{c#`5$RF{SHC4Rm%0S-3SBd3~>?xw@{>3bC}BBrD00rr~jL0GT%q@E`O5 z_^z~M23uNFXcL7-yI(>ysh~6NVGYNg@KTA5 z$8ylyIMB&Fz%GilQD~*MjLpzk1D+0>cp;Hr3tbbw#%I8KUu|4W&V~f5lqU;g2(^og zT=Lep6&WS#YN4?|q0$j-ktlxh*uK+==ouiaR+pEsg~?26+r!ixcN--Z$=UK+d+v|3 zjS)lV?b@R#mBLjEY(!BHWq$knST8R&^|s+bLC=cb7fN%v{DRDKlgamsx^^$FKK0vs z`hD)ypS+M#@@jv-Bu8D(*+W*^sw1Mhqyjopd&R!G>VqHR1E7rzC|3*3_F z?5`{-cgV|&)~o|jWS_QwkPGzvtD6xX)}$-!H2j2Q$oXag{OFJ3Jdc<*Jd68A%Zjx( zlh|+@(oVNs%a#}FLfP?26kha?hH3rdyB+@I6^ryShg|Q4s|97%5(WwFm0Wd`Z+_xV zGXBmM{O8B+aP0QnsV>o0x^vLrnHCyHAxJ61Avx4#S39$A% zMFRWF(T`cC8uKpneoG$*Z(Vcb8hHD%%)0(QvqRgW0Lv9kR=ysI4o1OS^K2##NqRk3 zpGn1VJs#AP?Pl`-8jWkp>{i_WWivO+`>FPeL`)Nc)nl})ah2_%k6qM`q~zU-O)qj? zNI!wld;jpj2Ts%RKFdK0S|Q%YNa_*JyQ@5aMl$vtkKW`t)P;Xa9Z{IxD+^bg(xJBr93^5!33eAnXVBgEq* zzBe$|0~xnhI=v0WhHP_&S@u!gtNp{xZ=lE^etQRoa=r;?A(L4Y$?}2x&fA4-za8d9`Ru(&y2n>0*^i$#`y7QMC@o zMEfxRjRC%+EgN%2Wl)rc8iR>9>ow)%T&~ZHLc)j5JCuTg@22E^+wS)fHBnxYwd~fl zzdeAdBAh0=rwm+WtUw!{@0}921-QvBXd|=PZhT5Lo8^%$NvD)MK+m5wV<;Nw;!z~Va4nA?un^V9=8eGB-@)^ zOWeC$Hac836?U}68n;}@-)VlgP3cufMOIp!frX5O>=Yah)`O(0(a#8cvMH7XzY10u z9}7JLP7Cf(AgB;~yS<3_6%~%k8k=-`(0*ClJ!gJ3{A*;gQ|{{=f*^^jMN=D#+&Tl4 zZmamR%ddNrY4$a66WY#j*gE-n{bLDzn+w@tdQ!I*&=2oDwciRV{YG!wH~0D|2`{Bf>5v5x=SSG9xeg4xs28x))5wH53M zLJztS-jQVT^UHde&SUuJz|2Ilv3flk5-s=nndZ?Pg|CkctmJ!bYtlzGDfvVXyxS&_X*~!Y-J=W)NQV4yq(oqq< zNSvB0ukO>6Q!LdK(W@Tzp0sZAtgi(nv<%qV7K5oxRe3U(u~i9Fi3v%3d}~Rf%-&Ai zR&Mf+p}y%i_%VH7*Ifsi$f`zzB?L6jFTA6pL*5rO%d+D0%iJJ$wxuDCXU=Fv=ba^N zOmIL_@Dc`GRcN8clBGr_*$(McZ;(|B+haS+b{b9iZ}J;jOm#{iM@Lr%d}&zwf5cx? zA#u9!yLA;L$WJiG#@vK$c4dZwF)zf`dKy*xs}(ICObri?Wy{xFC_Ld;WD1hE79-ST z7DLdF$oISVoJuuh?+p*#zBoP`>$h=Dw+O>^`wZX_!X{Oq(=_dMzHt^6Q;35hiw(JW zcA}dHc|;lvRX;zcFuhEmBY$C`KyScUp5!QTJVdhn2LTfeQqH(#~_R- zKVGULq54XQac!(p0gtctzbAet?in9*PH8i(Rl@Oltm4eNh~hFIF2xIG9y8~17u7s| hM~12$C(k$h^rww#;3g}`^pKSxZt!rRq62a^`A>c-oM!+4 literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/icon/valid-html401.jpg b/root/opt/webshare-tools/phpfm/icon/valid-html401.jpg new file mode 100644 index 0000000000000000000000000000000000000000..869c8cffd94d690b39edeafc862891ab7e1517da GIT binary patch literal 4005 zcmbu7S5%V=vxdLWK~Q4oMFb&KLvPZ1+enEB1f_QfY^t&`utks}Ri*bXC3He3N^hYH zp$iGUNf9h)emxiG;#{4z{&%is&CK)8nl&Um=@Y<~@W%)W{!;_U z{)qg4%*ZKzgQ>s}>YGf=051*S9Z5~nB0&GA2}}+K)PN-wMKq%j$Ln-QUvq{A@wZ^X zsvv_BcxK0=sECMIkr`=Ps$htcgCmb%y!O?PB(t5WALaHt-p?(XgzYD-XL^I{$1 zpJDp~!)w%`5zjf&#ifn16sTM@V=%gU7>(uyX}%#xeRUT+eUUnb?X_*6I6SuUaG*GhuUfXde8E2n*EFcF8K8}C6l}K+afMKnn)2}QFEr` zR~FwuXb(G>sx~G*hn(@zXmj($Jh~U(qo5m!40C;W16H^ycBgK$#8e3^()Y4hoqSx87=CU*5A4>h?T=Vj--TE;aq zt0-oE-u{`mH?OioQ*qCu_8^mgRXQIh$r|P;DqF4FPMi>2dcTF?t_qR)Ub;UKn4VbK zwA|&1>wena;Z!@EdrbwT*w_^LV3xnn0Y)hR5oZZpq8b<;WE<__0>w+2M#=0DWtPxr zw${&jvQ;uN>xbN_NJ&mLtMWb5E{w$e!5grtx7t@fY@+;yKJZWe48O@BqFjhGJe9_^ zRvRI^gJ$j#5?UeL7UQR;S{Jr6tmq#dSgUF3WnvH&W=a0?s2M3WFp(53Ws6n|y6)3L z?HJfbwOrLFf0wUM?Cfkm(c^OLY4KLr<}U2z(h7s=J;UPieFSxm@-qXkDs)^72~ghK z)6FjNVQGOSye=IDakKxUj0yY+yb&*AhgM^4@mpt{>*E}LWeS_Z@NaGksAQc0*u~Z-2C7<~{ zvKKQ&9{sXeCOd$|HFY$$pyKlD3i@2f()faOt`B$w?v-Sl7-&9AlYN+0UMG`so%Qqr zBy1L*Ouue2f-*mjabKv%?vknJ|oJjo)(M&9LdO&G9(kr9TXSd|1! z=(%0_s|XSOkhv31dok4>qc~NO;a<=EcN`C-nVYg4G@IPn`Gb**!8a)lfYpsi6v2 z0je}Btv3rQ#H8qqO;;uBm2Eo{nN<7!zfjTNT{p^CnzmeaxaJ{-#%}V*z|UK zCw`Wp?2}m~y+QDWmw~ zXJy7lJM{uqdl8T9dAm#`rhB;icV&+YQQ^}ZYVHT2R3$}AgE@E$lpFd9#UV-pQb6Pm zY9aWE*Bsbo>i5Mmnu|$}7+59Jp9(lJHbLzfSqL7F_g`jxBLNAuSH>jZ?AO{45>UP_ zKl^kWBO?zVKki}|9!bMrn-@P#S9#lkM1>0>}U{kUsCmnJ`V!rWC=C7de7hGc|%i$VnwR6Q0C_uqctdgg6P8lH5%4| z@Ekg5%Rc;Rfw7Hb*lb5jajj^L4}xqHDHmjWe41<~dq!RSf`c%^t*B_NZ5M1xR@~Z5}F_BSf3~kSY8n#PJG*p`{-frnGd(&ro`C~Ec^2}HMM@ZA+ zT>|V``U%!$AW**MQh60A?}_S6nR_9=CYd&&Zajc~C7gvdp)km}CfYYg#}N|q%cHh9 z8HMyC}r$TYk=fAc;-kn|K7aUo@(9@PiSidQv;2TNwKdL+(sBIuPaCJ3T~qJz+s)%nSY z-8p{g`Rg+O9eyUI1m*1%Ta;7aaiK%7Bn!ES^c`8XFMCWRAYA`5%_8yiNqjI5 z6TW-|s#9wR_Kd(qt*^e3R5O46Z~vhC3E}u@{$6;*ljNgUd%Fx4bG9;rCo3(mMox1k zW4(bTY18@Pj-9Goh1m%&XNIN#ViK$gi2NXbRq=oCkEsUhx;|ULp?i z*%m|p3V==!ZCmyX+FjE=o~tN^5xGU>TRoSc=DD?AftMB8bnZ?%zVMY7P5rM$1bmPn zi~Le7*f-(LkM+Z#_W8E|*9qKfRrBsa4iAGD6wWU%NPxvcz{&Y9!rE7plxsMlkA+ z_q8MLy63AOGgeIr2$}vXktJh~)BL4@&|-<;+&5os&WhCJdMLQyZ>N;*=>1exer_qC zvMTk^uYpg5XBjzfQkeEQkL)@0?!AYjE)_i^!h`yaDsX04PxTbjrwdwzZCw1|lIktV zEEP^7EZq0veoAKDv0{!HTd(!5xWcN+QIJsUyCu};FO4$yok7wM@unj$ugVO{v%>is(`=Ck4oLJ{ zl=HnPx9bD~+kjydws*(WV?F}89~{f-?}lKf_RUV5 z-`CJ--mVjs>>v}{9-%`Fc(ZSyTl$_Ha7e~yxT(m_sopMo*Sp_XneHl@lD-d{j1H5d zb{tsPPaicCPj{<-=<^(JgRzWF542Q0x5`W@wpBkURIgx&kGz=txx3NOR$8vO#ewxm zm}QZG-Z}WlTfy@CBTeOH(=8Mp5%*lw%#93(g#>;c3^(2wNlwB0LQ&8`U$W}v!B+|6 z+th^X*^e?gLgc(Iu(uo*Yhv#go4`#1t8;NInUk~IJn-Ba@+UBJ5)jGiq}%t{GjU^c z=xot@t!C(cP4zMrd^abSB3)AF!8n^cWrS?%6etkuEL5DH=EH`#UDmaGgYR+e8rN~H z!kWh(eoAX*a3AO7*L6tU<2W+#VIe?PeI&Wi`|Fm~jq_ahE&XS8dSHjjiQ5K(I`^+T zbAoh1xtW_uftNphZ39^Ed4*bVcO`R)`3#~p-nP989_h%;*Az zCkn23$GIe~94{Qp$;(jlK??1G|u!YeQ zM|n=Sl(LOSn7+u?7*H#LtDU$u#Y}fbkJzzooPArv*wEHgW!u)j{$yM7!n#O1#O<#Z zv9U~e_=LHnrjBy|R1q=mWkUIP-)B$vx*!!7tQsqxDQDc~sW04_U2JXa3KeIrGea5CDsf5~Cq7B0@m%CkrD30}F!=$hV+8 z!N5_+z{w%wv0=f%W)5L36OIK754ST2F=;q#Ty(U9T|Mef$Ha%n`eiw@bQm@!ooJMj z=8CvE;gM&faOk=eNn_=cQ$^C9N;p0*YhW^FeUo!T*dbsp^CYdK5}#k3VhC95q?=`u lae6vSP?+efOUq8TtL?4hd0nV;v&p$!FXnVuq5}hiH2@pMLD2vJ literal 0 HcmV?d00001 diff --git a/root/opt/webshare-tools/phpfm/incl/auth.inc.php b/root/opt/webshare-tools/phpfm/incl/auth.inc.php new file mode 100644 index 0000000..5c325a1 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/auth.inc.php @@ -0,0 +1,15 @@ +Access Denied!"); + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/create.inc.php b/root/opt/webshare-tools/phpfm/incl/create.inc.php new file mode 100644 index 0000000..20713d6 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/create.inc.php @@ -0,0 +1,73 @@ +$StrFolderInvalidName"; + else if (file_exists($home_directory.$path.stripslashes($_POST['directory_name']."/"))) + print "$StrAlreadyExists"; + else if (@mkdir($home_directory.$path.stripslashes($_POST['directory_name']), 0777)) + print "$StrCreateFolderSuccess"; + else + { + print "$StrCreateFolderFail

"; + print $StrCreateFolderFailHelp; + } + umask($umask); +} + +else if ($AllowCreateFile && isset($_GET['create']) && isset($_POST['filename'])) +{ + if (!is_valid_name(stripslashes($_POST['filename']))) + print "$StrFileInvalidName"; + else if (file_exists($home_directory.$path.stripslashes($_POST['filename']))) + print "$StrAlreadyExists"; + else if (@fopen($home_directory.$path.stripslashes($_POST['filename']), "w+")) + print "$StrCreateFileSuccess"; + else + { + print "$StrCreateFileFail

"; + print $StrCreateFileFailHelp; + } +} + +else if ($AllowCreateFolder || $AllowCreateFile) +{ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + if ($_GET['type'] == "directory") print " $StrCreateFolder"; + else if ($_GET['type'] == "file") print " $StrCreateFile"; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + if ($_GET['type'] == "directory") print "$StrCreateFolderQuestion

"; + else if ($_GET['type'] == "file") print "$StrCreateFileQuestion

"; + print "
"; + if ($_GET['type'] == "directory") print " "; + else if ($_GET['type'] == "file") print " "; + print ""; + print ""; + print "
"; + + print "

"; + + print "
"; +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/delete.inc.php b/root/opt/webshare-tools/phpfm/incl/delete.inc.php new file mode 100644 index 0000000..6bacb78 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/delete.inc.php @@ -0,0 +1,83 @@ +$StrFolderInvalidName"; + else if (!file_exists($home_directory.$path.$directory_name)) + print "$StrDeleteFolderNotFound"; + else if (remove_directory($home_directory.$path.$directory_name) && @rmdir($home_directory.$path.$directory_name)) + print "$StrDeleteFolderSuccess"; + else + { + print "$StrDeleteFolderFail

"; + print $StrDeleteFolderFailHelp; + } + } + + else if (isset($_GET['delete']) && isset($_GET['filename'])) + { + if ($_GET['filename'] == ".." || ($_GET['filename'] == ".")) + print "$StrFileInvalidName"; + else if (!file_exists($home_directory.$path.$filename)) + print "$StrDeleteFileNotFound"; + else if (@unlink($home_directory.$path.$filename)) + print "$StrDeleteFileSuccess"; + else + { + print "$StrDeleteFileFail

"; + print $StrDeleteFileFailHelp; + } + } + + else + { + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + if (isset($_GET['directory_name'])) print " $StrDeleteFolder \"".htmlentities(basename($directory_name))."\"?"; + else if (isset($_GET['filename'])) print " $StrDeleteFile \"".htmlentities($filename)."\"?"; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + if (isset($_GET['directory_name'])) + { + print "$StrDeleteFolderQuestion

"; + print "/".htmlentities($path.$directory_name); + } + else if (isset($_GET['filename'])) + { + print "$StrDeleteFileQuestion

"; + print "/".htmlentities($path.$filename); + } + + print "

"; + + if (isset($_GET['directory_name'])) print "$StrYes"; + else if (isset($_GET['filename'])) print "$StrYes"; + print " $StrOr "; + print "$StrCancel"; + + print "

"; + + print "
"; + } +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/download.inc.php b/root/opt/webshare-tools/phpfm/incl/download.inc.php new file mode 100644 index 0000000..fa22dc6 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/download.inc.php @@ -0,0 +1,30 @@ +"; + print ""; + print ""; + print " $StrDownload \"".htmlentities($filename)."\""; + print ""; + print ""; + print "$StrBack"; + print ""; + print ""; + print ""; + print ""; + print "

"; + print "$StrDownloadClickLink

"; + print "$StrDownloadClickHere \"".htmlentities($filename)."\""; + print "

"; + print ""; + print ""; + print ""; +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/edit.inc.php b/root/opt/webshare-tools/phpfm/incl/edit.inc.php new file mode 100644 index 0000000..e22d24d --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/edit.inc.php @@ -0,0 +1,69 @@ +$StrFileInvalidName"; + else if ($fp = @fopen ($home_directory.$path.stripslashes($_POST['filename']), "wb")) + { + fwrite($fp, $text); + fclose($fp); + print "$StrSaveFileSuccess"; + } + else + print "$StrSaveFileFail"; + +} + +else if ($AllowEdit && isset($_GET['filename'])) +{ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + print " $StrEditing \"".htmlentities($filename)."\""; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + if ($fp = @fopen($home_directory.$path.$filename, "rb")) + { + print "
"; + + print ""; + + print "

"; + print "$StrFilename "; + + print "

"; + print " "; + + print ""; + print "
"; + } + else + print "$StrErrorOpeningFile"; + + print "

"; + + print "
"; +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/filebrowser.inc.php b/root/opt/webshare-tools/phpfm/incl/filebrowser.inc.php new file mode 100644 index 0000000..369ecfb --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/filebrowser.inc.php @@ -0,0 +1,151 @@ +"; + print ""; + if ($AllowCreateFolder) print "$StrMenuCreateFolder $StrMenuCreateFolder"; + if ($AllowCreateFile) print "$StrMenuCreateFile $StrMenuCreateFile"; + if ($AllowUpload) print "$StrMenuUploadFiles $StrMenuUploadFiles"; + if ($phpfm_auth) print "$StrMenuLogOut $StrMenuLogOut"; + print ""; +print "
"; + +print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; +print "
"; + print "$StrIndexOf ".get_linked_path($path,$base_url).""; + print "
 "; + + + + if ($open = @opendir($home_directory.$path)) + { + for($i=0;($directory = readdir($open)) != FALSE;$i++) + if (is_dir($home_directory.$path.$directory) && $directory != "." && $directory != ".." && !is_hidden_directory($home_directory.$path.$directory)) + $directories[$i] = array($directory,$directory); + closedir($open); + + if (isset($directories)) + { + sort($directories); + reset($directories); + } + } + + print ""; + print ""; + print ""; + print ""; + if ($AllowRename) print ""; + if ($AllowDelete) print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + if (isset($directories)) foreach($directories as $directory) + { + print ""; + print ""; + print ""; + if ($AllowRename) print ""; + if ($AllowDelete) print ""; + print ""; + } + print ""; + print "
  $StrFolderNameShort$StrRenameShort$StrDeleteShort
$StrOpenFolder .  
$StrOpenFolder ..  
$StrOpenFolder ".htmlentities($directory[0])."$StrRenameFolder$StrDeleteFolder
 
"; + + print "
 "; + + + + if ($open = @opendir($home_directory.$path)) + { + for($i=0;($file = readdir($open)) != FALSE;$i++) + if (is_file($home_directory.$path.$file) && !is_hidden_file($home_directory.$path.$file)) + { + $icon = get_icon($file); + $filesize = filesize($home_directory.$path.$file); + $permissions = decoct(fileperms($home_directory.$path.$file)%01000); + $modified = filemtime($home_directory.$path.$file); + $extension = ""; + $files[$i] = array( + "icon" => $icon, + "filename" => $file, + "filesize" => $filesize, + "permissions" => $permissions, + "modified" => $modified, + "extension" => $extension, + ); + } + closedir($open); + + if (isset($files)) + { + usort($files, "compare_filedata"); + reset($files); + } + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + if ($AllowView) print ""; + if ($AllowEdit) print ""; + if ($AllowRename) print ""; + if ($AllowDownload) print ""; + if ($AllowDelete) print ""; + print ""; + if (isset($files)) foreach($files as $file) + { + $file['filesize'] = get_better_filesize($file['filesize']); + $file['modified'] = date($ModifiedFormat, $file['modified']); + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + if ($AllowView && is_viewable_file($file['filename'])) print ""; + else if ($AllowView) print ""; + if ($AllowEdit && is_editable_file($file['filename'])) print ""; + else if ($AllowEdit) print ""; + if ($AllowRename) print ""; + if ($AllowDownload) print ""; + if ($AllowEdit) print ""; + print ""; + + } + print ""; + print "
  $StrFileNameShort$StrFileSizeShort$StrPermissionsShort$StrLastModifiedShort$StrViewShort$StrEditShort$StrRenameShort$StrDownloadShort$StrDeleteShort
$StrFile ".htmlentities($file['filename'])."".$file['filesize']."".$file['permissions']."".$file['modified']."$StrViewFile $StrEditFile $StrRenameFile$StrDownloadFile$StrDeleteFile
 
"; + + + print "
"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/footer.inc.php b/root/opt/webshare-tools/phpfm/incl/footer.inc.php new file mode 100644 index 0000000..645a38e --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/footer.inc.php @@ -0,0 +1,19 @@ +
"; +print ""; +print ""; +print ""; +print "
 
This page was produced in $total_time seconds.
"; + +print "

"; + +print ""; +print ""; +print ""; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/footer.inc.php.dist b/root/opt/webshare-tools/phpfm/incl/footer.inc.php.dist new file mode 100644 index 0000000..8f36acf --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/footer.inc.php.dist @@ -0,0 +1,26 @@ +
"; +print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; +print "
Powered by PHPFM ".VERSION."
Copyright © 2002 Morten Bojsen-Hansen
 
"; + print "Valid HTML 4.01!"; + print "Valid CSS!"; + print "
 
This page was produced in $total_time seconds.
"; + +print "

"; + +print ""; +print ""; +print ""; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/functions.inc.php b/root/opt/webshare-tools/phpfm/incl/functions.inc.php new file mode 100644 index 0000000..bdd4ec0 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/functions.inc.php @@ -0,0 +1,258 @@ + $b[$_GET['sortby']]) return 1; + else return -1; + } + else if ($_GET['order'] == "desc") + { + if ($a[$_GET['sortby']] < $b[$_GET['sortby']]) return 1; + else return -1; + } + } + + else if (is_string($a[$_GET['sortby']]) && is_string($b[$_GET['sortby']]) && $_GET['order'] == "asc") + return strcmp($a[$_GET['sortby']], $b[$_GET['sortby']]); + else if (is_string($a[$_GET['sortby']]) && is_string($b[$_GET['sortby']]) && $_GET['order'] == "desc") + return -strcmp($a[$_GET['sortby']], $b[$_GET['sortby']]); +} + +function get_opposite_order($input, $order) ## Get opposite order +{ + if ($_GET['sortby'] == $input) + { + if ($order == "asc") + return "desc"; + else if ($order == "desc") + return "asc"; + } + else + return "asc"; +} + +function is_editable_file($filename) ## Checks whether a file is editable +{ + global $EditableFiles; + + $extension = strtolower(substr(strrchr($filename, "."),1)); + + foreach(explode(" ", $EditableFiles) as $type) + if ($extension == $type) + return TRUE; + + return FALSE; +} + +function is_viewable_file($filename) ## Checks whether a file is viewable +{ + global $ViewableFiles; + + $extension = strtolower(substr(strrchr($filename, "."),1)); + + foreach(explode(" ", $ViewableFiles) as $type) + if ($extension == $type) + return TRUE; + + return FALSE; +} + +function is_valid_name($input) ## Checks whether the directory- or filename is valid +{ + if (strstr($input, "\\")) + return FALSE; + else if (strstr($input, "/")) + return FALSE; + else if (strstr($input, ":")) + return FALSE; + else if (strstr($input, "?")) + return FALSE; + else if (strstr($input, "*")) + return FALSE; + else if (strstr($input, "\"")) + return FALSE; + else if (strstr($input, "<")) + return FALSE; + else if (strstr($input, ">")) + return FALSE; + else if (strstr($input, "|")) + return FALSE; + else + return TRUE; +} + +function get_better_filesize($filesize) ## Converts filesize to KB/MB/GB/TB +{ + $kilobyte = 1024; + $megabyte = 1048576; + $gigabyte = 1073741824; + $terabyte = 1099511627776; + + if ($filesize >= $terabyte) + return number_format($filesize/$terabyte, 2, ',', '.')." TB"; + else if ($filesize >= $gigabyte) + return number_format($filesize/$gigabyte, 2, ',', '.')." GB"; + else if ($filesize >= $megabyte) + return number_format($filesize/$megabyte, 2, ',', '.')." MB"; + else if ($filesize >= $kilobyte) + return number_format($filesize/$kilobyte, 2, ',', '.')." KB"; + else + return number_format($filesize, 0, ',', '.')." B"; +} + +function get_current_zoom_level($current_zoom_level, $zoom) ## Get current zoom level +{ + global $ZoomArray; + + reset($ZoomArray); + + while(list($number, $zoom_level) = each($ZoomArray)) + if ($zoom_level == $current_zoom_level) + if (($number+$zoom) < 0) return $number; + else if (($number+$zoom) >= count($ZoomArray)) return $number; + else return $number+$zoom; +} + +function validate_path($path) ## Validate path +{ + global $StrAccessDenied; + + if (stristr($path, "../") || stristr($path, "..\\")) + return TRUE; + else + return stripslashes($path); +} + +function authenticate_user() ## Authenticate user using cookies +{ + global $username, $password; + + if (isset($_COOKIE['cookie_username']) && $_COOKIE['cookie_username'] == $username && isset($_COOKIE['cookie_password']) && $_COOKIE['cookie_password'] == md5($password)) + return TRUE; + else + return FALSE; +} + +function is_hidden_file($path) ## Checks whether the file is hidden. +{ + global $hide_file_extension, $hide_file_string, $hide_directory_string; + + $extension = strtolower(substr(strrchr($path, "."),1)); + + foreach ($hide_file_extension as $hidden_extension) + if ($hidden_extension == $extension) + return TRUE; + + foreach ($hide_file_string as $hidden_string) + if (stristr(basename($path), $hidden_string)) + return TRUE; + + foreach ($hide_directory_string as $hidden_string) + if (stristr(dirname($path), $hidden_string)) + return TRUE; + + return FALSE; +} + +function is_hidden_directory($path) ## Checks whether the directory is hidden. +{ + global $hide_directory_string; + + foreach ($hide_directory_string as $hidden_string) + if (stristr($path, $hidden_string)) + return TRUE; + + return FALSE; +} + +function get_mimetype($filename) ## Get MIME-type for file +{ + global $MIMEtypes; + + reset($MIMEtypes); + + $extension = strtolower(substr(strrchr($filename, "."),1)); + + if ($extension == "") + return "Unknown/Unknown"; + + while (list($mimetype, $file_extensions) = each($MIMEtypes)) + foreach (explode(" ", $file_extensions) as $file_extension) + if ($extension == $file_extension) + return $mimetype; + + return "Unknown/Unknown"; +} + +function get_linked_path($path,$base_url) ## Get path with links to each folder +{ + $string = ". / "; + $array = explode("/",htmlentities($path)); + unset($array[count($array)-1]); + foreach ($array as $entry) + { + @$temppath .= $entry."/"; + $string .= "$entry / "; + } + + return $string; +} + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/header.inc.php b/root/opt/webshare-tools/phpfm/incl/header.inc.php new file mode 100644 index 0000000..731c924 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/header.inc.php @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/html.header.inc.php b/root/opt/webshare-tools/phpfm/incl/html.header.inc.php new file mode 100644 index 0000000..559890e --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/html.header.inc.php @@ -0,0 +1,17 @@ +"; + +print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + print ""; + print ""; + print ""; + print ""; + print "

"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/html.header.inc.php.dist b/root/opt/webshare-tools/phpfm/incl/html.header.inc.php.dist new file mode 100644 index 0000000..618bde4 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/html.header.inc.php.dist @@ -0,0 +1,18 @@ +"; + +print ""; + print ""; + print "PHPFM ".VERSION." - a file manager written in PHP"; + print ""; + print ""; + print ""; + print "
"; + print ""; + print ""; + print ""; + print ""; + print "
PHPFM ".VERSION."

"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/libfile.php b/root/opt/webshare-tools/phpfm/incl/libfile.php new file mode 100644 index 0000000..0b11e2b --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/libfile.php @@ -0,0 +1,50 @@ +$StrAccessDenied"; + exit(); + } + + header("Pragma:"); + header("Content-Type: ".get_mimetype($filename)); + header("Content-Length: ".filesize($fullpath)); + if ($_GET['action'] == "download"); + header("Content-Disposition: attachment; filename=\"$filename\""); + + readfile($fullpath); + } + else + print "$StrDownloadFail"; +} + +?> diff --git a/root/opt/webshare-tools/phpfm/incl/login.inc.php b/root/opt/webshare-tools/phpfm/incl/login.inc.php new file mode 100644 index 0000000..23cd97e --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/login.inc.php @@ -0,0 +1,32 @@ +"; + print ""; + print ""; + print "$StrLoginSystem"; + print ""; + print ""; + print ""; + print ""; + + print "

"; + + print "$StrLoginInfo
"; + print "
"; + + print ""; + print ""; + print ""; + print ""; + print "
$StrUsername
$StrPassword
 
"; + + print ""; + print "
"; + + print "

"; + + print ""; + print ""; +print ""; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/phpfm.css b/root/opt/webshare-tools/phpfm/incl/phpfm.css new file mode 100644 index 0000000..9b390de --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/phpfm.css @@ -0,0 +1,31 @@ +body { margin : 0px; font-family : Tahoma, serif; font-size : 8pt; color : #000000; background-color: transparent; } + +font.headline { font-family : Tahoma, serif; font-size : 25pt; color : #000000; font-weight : bold; background-color: transparent; } +font.iheadline { font-family : Tahoma, serif; font-size : 10pt; color : #FFFFFF; font-weight : bold; background-color: transparent; } + +table.top { width: 100%; border-bottom : 1px solid #000000; background-color: transparent; } +table.bottom { width: 100%; border-top : 1px solid #000000; font-family : Tahoma, serif; font-size : 8pt; background-color: transparent; } +table.index { background-color : #EEEEEE; color : #000000; border : 1px solid #000000; font-family : Tahoma, serif; font-size : 8pt; } +table.directories { font-family : Tahoma, serif; font-size : 10pt; background-color: transparent; } +table.files { font-family : Tahoma, serif; font-size : 10pt; background-color: transparent; } +table.menu { font-family : Tahoma, serif; font-size : 10pt; background-color: transparent; } +table.upload { font-family : Tahoma, serif; font-size : 8pt; background-color: transparent; } +table.output { font-family : Tahoma, serif; font-size : 8pt; background-color : #EEEEEE; color : #000000; } + +td.iheadline { background-color : #5485C9; color : #000000; border-bottom : 1px solid #000000; } +td.fbborder { border-right : 1px solid #000000; background-color: transparent; } + +a:link { text-decoration : none; color : #000000; background-color: transparent; } +a:visited { text-decoration : none; color : #000000; background-color: transparent; } +a:hover { text-decoration : underline; color : #000000; background-color: transparent; } + +a.bottom:link { text-decoration : none; color : #000088; background-color: transparent; } +a.bottom:visited { text-decoration : none; color : #000088; background-color: transparent; } +a.bottom:hover { text-decoration : underline; color : #000088; background-color: transparent; } + +input { background-color : #DDDDDD; border : 1px solid #000000; font-family : Tahoma, serif; font-size : 8pt; color : #000000; } +input.button { width : 50px; } +input.bigbutton { width : 100px; } +textarea { background-color : #FFFFFF; color : #000000; border : 1px solid #000000; font-family : Tahoma, serif; font-size : 10pt; } + +.bold { font-weight : bold; background-color: transparent; } \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/rename.inc.php b/root/opt/webshare-tools/phpfm/incl/rename.inc.php new file mode 100644 index 0000000..825c440 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/rename.inc.php @@ -0,0 +1,76 @@ +$StrFolderInvalidName"; + else if (@file_exists($home_directory.$path.$new_directory_name)) + print "$StrAlreadyExists"; + else if (@rename($home_directory.$path.$directory_name, $home_directory.$path.$new_directory_name)) + print "$StrRenameFolderSuccess"; + else + { + print "$StrRenameFolderFail

"; + print $StrRenameFolderFailHelp; + } + } + + else if (isset($_GET['rename']) && isset($_POST['filename'])) + { + if (!is_valid_name($new_filename)) + print "$StrFileInvalidName"; + else if (@file_exists($home_directory.$path.$new_filename)) + print "$StrAlreadyExists"; + else if (@rename($home_directory.$path.$filename, $home_directory.$path.$new_filename)) + print "$StrRenameFileSuccess"; + else + { + print "$StrRenameFileFail

"; + print $StrRenameFileFailHelp; + } + } + + else + { + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + if (isset($_GET['directory_name'])) print " $StrRenameFolder \"".htmlentities(basename($directory_name))."\""; + else if (isset($_GET['filename'])) print " $StrRenameFile \"".htmlentities($filename)."\""; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + if (isset($_GET['directory_name'])) print "$StrRenameFolderQuestion

"; + else if (isset($_GET['filename'])) print "$StrRenameFileQuestion

"; + print "
"; + if (isset($_GET['directory_name'])) print " "; + else if (isset($_GET['filename'])) print " "; + print ""; + if (isset($_GET['directory_name'])) print ""; + else if (isset($_GET['filename'])) print ""; + print ""; + print "
"; + + print "

"; + + print "
"; + } +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/upload.inc.php b/root/opt/webshare-tools/phpfm/incl/upload.inc.php new file mode 100644 index 0000000..2ef734a --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/upload.inc.php @@ -0,0 +1,66 @@ +"; + + if (!isset($_FILES['userfile'])) + // maximum post size reached + print $StrUploadFailPost; + else + { + for($i=0;$i<=3;$i++) + { + $_FILES['userfile']['name'][$i] = stripslashes($_FILES['userfile']['name'][$i]); + if (@move_uploaded_file($_FILES['userfile']['tmp_name'][$i], realpath($home_directory.$path)."/".$_FILES['userfile']['name'][$i])) + print "$StrUploading ".$_FILES['userfile']['name'][$i]."[$StrUploadSuccess]"; + else if ($_FILES['userfile']['name'][$i]) + print "$StrUploading ".$_FILES['userfile']['name'][$i]."[$StrUploadFail]"; + } + } + print ""; +} + +else if ($AllowUpload) +{ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + print " $StrUploadFilesTo \"/".htmlentities($path)."\""; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + print "$StrUploadQuestion
"; + print "
"; + + print ""; + print ""; + print ""; + print ""; + print ""; + print "
$StrFirstFile
$StrSecondFile
$StrThirdFile
$StrFourthFile
"; + + print ""; + print ""; + print "
"; + + print "

"; + + print "
"; +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/incl/view.inc.php b/root/opt/webshare-tools/phpfm/incl/view.inc.php new file mode 100644 index 0000000..5e34252 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/incl/view.inc.php @@ -0,0 +1,85 @@ +"; + print ""; + print ""; + print " $StrViewing \"".htmlentities($filename)."\" $StrAt ".$_GET['size']."%"; + print ""; + print ""; + print "$StrBack"; + print ""; + print ""; + print ""; + print ""; + + print "

"; + + if (is_file($home_directory.$path.$filename) && is_viewable_file($filename)) + { + $image_info = GetImageSize($home_directory.$path.$filename); + $size = $_GET['size']; + $zoom_in = $ZoomArray[get_current_zoom_level($size, 1)]; + $zoom_out = $ZoomArray[get_current_zoom_level($size, -1)]; + $width = $image_info[0] * $size / 100; + $height = $image_info[1] * $size / 100; + + $files = array(); + if ($open = opendir($home_directory.$path)) + { + while ($file = readdir($open)) + if (is_file($home_directory.$path.$file) && is_viewable_file($file)) + $files[] = $file; + closedir($open); + sort($files); + + if (count($files)>1) + { + for($i=0;$files[$i]!=$filename;$i++); + if ($i==0) $prev = $files[$i+count($files)-1]; + else $prev = $files[$i-1]; + if ($i==(count($files)-1)) $next = $files[$i-count($files)+1]; + else $next = $files[$i+1]; + } + else + { + $prev = $filename; + $next = $filename; + } + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + print "$StrImage"; + } + else + { + print "$StrViewFail

"; + print "$StrViewFailHelp"; + } + + print "

"; + + print ""; + print ""; + print ""; + + print ""; +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/index.php b/root/opt/webshare-tools/phpfm/index.php new file mode 100644 index 0000000..a5ca8e5 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/index.php @@ -0,0 +1,93 @@ +"; + print ""; + + if (!(@opendir($home_directory))) + print "$StrInvalidHomeFolder"; + else if (!(@opendir($home_directory.$path))) + print "$StrInvalidPath"; + if (substr($home_directory, -1) != "/") + print " $StrMissingTrailingSlash"; + + print ""; + print "
"; + } + + if (isset($_GET['action']) && is_file("incl/".$_GET['action'].".inc.php") && is_valid_name($_GET['action'])) + include("./incl/".basename($_GET['action']).".inc.php"); + else if (isset($_GET['output']) && is_file("incl/".$_GET['output'].".inc.php") && is_valid_name($_GET['output'])) + { + print ""; + print ""; + print "
"; + include("./incl/".basename($_GET['output']).".inc.php"); + print "

"; + + include("./incl/filebrowser.inc.php"); + } + else + { + include("./incl/filebrowser.inc.php"); + } +} +else +{ + include("./incl/login.inc.php"); +} + +include("./incl/footer.inc.php"); + +?> \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/bulgarian.inc.php b/root/opt/webshare-tools/phpfm/lang/bulgarian.inc.php new file mode 100644 index 0000000..671dbc5 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/bulgarian.inc.php @@ -0,0 +1,128 @@ + diff --git a/root/opt/webshare-tools/phpfm/lang/danish.inc.php b/root/opt/webshare-tools/phpfm/lang/danish.inc.php new file mode 100644 index 0000000..dcc9555 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/danish.inc.php @@ -0,0 +1,127 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/dutch.inc.php b/root/opt/webshare-tools/phpfm/lang/dutch.inc.php new file mode 100644 index 0000000..dcad667 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/dutch.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/english.inc.php b/root/opt/webshare-tools/phpfm/lang/english.inc.php new file mode 100644 index 0000000..e9a329c --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/english.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/finnish.inc.php b/root/opt/webshare-tools/phpfm/lang/finnish.inc.php new file mode 100644 index 0000000..ae740d7 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/finnish.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/french.inc.php b/root/opt/webshare-tools/phpfm/lang/french.inc.php new file mode 100644 index 0000000..791051e --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/french.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/french2.inc.php b/root/opt/webshare-tools/phpfm/lang/french2.inc.php new file mode 100644 index 0000000..1a6978a --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/french2.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/german.inc.php b/root/opt/webshare-tools/phpfm/lang/german.inc.php new file mode 100644 index 0000000..46c1e32 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/german.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/italian.inc.php b/root/opt/webshare-tools/phpfm/lang/italian.inc.php new file mode 100644 index 0000000..61ff3c2 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/italian.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/portugues.inc.php b/root/opt/webshare-tools/phpfm/lang/portugues.inc.php new file mode 100644 index 0000000..89f699c --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/portugues.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/russian.inc.php b/root/opt/webshare-tools/phpfm/lang/russian.inc.php new file mode 100644 index 0000000..bb62776 --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/russian.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/lang/spanish.inc.php b/root/opt/webshare-tools/phpfm/lang/spanish.inc.php new file mode 100644 index 0000000..e05901a --- /dev/null +++ b/root/opt/webshare-tools/phpfm/lang/spanish.inc.php @@ -0,0 +1,128 @@ + \ No newline at end of file diff --git a/root/opt/webshare-tools/phpfm/readme.txt b/root/opt/webshare-tools/phpfm/readme.txt new file mode 100644 index 0000000..f13913a --- /dev/null +++ b/root/opt/webshare-tools/phpfm/readme.txt @@ -0,0 +1,65 @@ +Readme for PHPFM: +------------------------------------------------------------------------------------- + + PHPFM - a file manager written in PHP + + ---------------------- + http://phpfm.zalon.dk/ + + Copyright (C) 2002 Morten Bojsen-Hansen + Email: raz0@worldonline.dk + + PHPFM is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHPFM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHPFM; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Summary: + PHPFM is meant to handle administration of a webserver or web hotel via HTTP. + It can currently: + - create, rename and delete folders. + - create, upload, rename, download and delete files. + - edit text files. + - view image files. + - sort files by name, size, permissions and last modification date both + ascending and descending. + - communicate in more languages. + + License: + Check docs/license.txt for more information. + + Download: + The newest version of PHPFM is always availible from http://phpfm.zalon.dk/ + + Requirements: + Check docs/requirements.txt for more information. + + Installing: + Check docs/install.txt for more information. + + Configurating: + Check docs/configurating.txt for more information. + + Changelog: + Check docs/changelog.txt for more information. + + Todo: + Check docs/todo.txt for more information. + + Frequently Asked Questions (FAQ): + Check docs/faq.txt for more information. + + + Hope you will enjoy using PHPFM as + much as I enjoyed creating it! + + Morten Bojsen-Hansen \ No newline at end of file diff --git a/root/opt/webshare/.gitignore b/root/opt/webshare/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/smeserver-webshare.spec b/smeserver-webshare.spec new file mode 100644 index 0000000..3639312 --- /dev/null +++ b/smeserver-webshare.spec @@ -0,0 +1,122 @@ +# $Id: smeserver-webshare.spec,v 1.3 2022/08/02 03:48:34 jpp Exp $ +# Authority: darrellmay +# Name: Darrell May + +Summary: Webshare addon for SME Server +%define name smeserver-webshare +Name: %{name} +%define version 1.0.0 +%define release 14 +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: SME Server/addon +Source: %{name}-%{version}.tar.xz +BuildRoot: /var/tmp/%{name}-%{version} +BuildArchitectures: noarch +Requires: e-smith-base, perl-Apache-Htpasswd, perl-Crypt-PasswdMD5 +BuildRequires: e-smith-devtools >= 1.13.1-03 +AutoReqProv: no +Obsoletes: devinfo-mitel-webshare dmc-mitel-webshare + + +%changelog +* Sat Sep 07 2024 cvs2git.sh aka Brian Read 1.0.0-14.sme +- Roll up patches and move to git repo [SME: 12338] + +* Sat Sep 07 2024 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Mon Aug 01 2022 Jean-Philippe Pialasse 1.0.0-13.sme +- update to httpd 2.4 access syntax [SME: 12066] + thanks to Vasarhelyi Zsolt +- add to core backup [SME: 12030] +- add update event, use php-fpm [SME: 11078] + might need its dedicated pool + +* Thu Mar 02 2017 Jean-Philipe Pialasse 1.0.0-12.sme +- imported to SME9 [SME: 10129] + +* Sat May 25 2013 JP Pialasse - 1.0.0-11.sme +- fix spacename problem with firefox [SME: 6256] +- fix password limited to 7 digits [SME: 7097] +- fix biggest error message for incorrect password [SME: 3601] + +* Wed Oct 12 2011 Greg Swallow - 1.0.0-10.sme +- Patch for added SME8 compatibility +- should fix [SME 3600], [SME 6256], [SME 6454] + +* Mon Apr 21 2008 Shad L. Lords +- Prep for import into buildsys +- Clean up spec + +* Fri Dec 1 2006 Darrell May +- move htpasswd files to /home/e-smith/db/webshare +- ugraders must run: /etc/e-smith/events/actions/webshare-rebuild-htpasswd; signal-event ibay-modify +- [1.0.0-8] +* Thu Oct 12 2006 Darrell May +- updated httpd.conf fragment for SME 7 compliance +- Note: rewrite for full SME 7 support is still needed +- [1.0.0-7] +* Mon Jan 30 2006 Darrell May +- bugfix to support IE/https file downloads +- added to /incl/libfile.php 'header("Pragma:");' +- [1.0.0-6] +* Tue May 17 2005 Darrell May +- added support for numeric project names +- [1.0.0-5] +* Tue May 17 2005 Darrell May +- update to phpfm-0.2.3 +- added NoDelete webshare create/config option +- [1.0.0-4] +* Thu May 12 2005 Darrell May +- bugfix webshare panel for SME 7.x +- [1.0.0-3] +* Fri Apr 22 2005 Darrell May +- added support for SME 7.x +- [1.0.0-2] +* Sun Feb 08 2004 Darrell May +- repackaged for SME Server 6.x +- [1.0.0-1] +* Sun Jan 12 2003 Darrell May +- added Requires: perl-Apache-Htpasswd +- [0.0.1-5] +* Sat Jan 11 2003 Darrell May +- name change obsolete devinfo-mitel-webshare +- updated webshare panel +- updated webshare-tools to use phpfm +- [0.0.1-4] +* Fri May 10 2002 Darrell May +- updated webshare panel +- updated webshare-tools scripts +- original public release +- [0.0.1-3] +* Thu May 09 2002 Darrell May +- added httpd.conf template and updated action scripts +- incorporated index.php from ruffdogs,com +- incorporate webshare panel and action scripts from Jon Blakely +- [0.0.1-2] +* Sun May 05 2002 Darrell May +- initial release +- [0.0.1-1] + +%description +%name is an addon for SME Server that provides secure web accessible file and directory storage. + +%prep +%setup + +%build +perl createlinks + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist + +%clean +/bin/rm -rf $RPM_BUILD_ROOT + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root)