#!/bin/sh #------------------------------------------------------------------------------ # /usr/local/htdocs/sitecopy/sitecopy.cgi - smart copy of local site to remote # site via ftp # # Copyright (c) 2003-2010 Andreas Pohl, apohl(at)ibp-consult(dot)com # Copyright (c) 2011-2018 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2003-12-30 ap # Last Update: $Id$ # # 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.. #------------------------------------------------------------------------------ myname=`basename $0` # HTML-Header echo "Content-Type: text/html; charset=iso-8859-1" echo "Cache-control: no-store" # HTTP/1.1 (or no-cache?) echo "Pragma: no-cache" # HTTP/1.0 echo echo "" echo "SiteCopy" echo "" echo "" echo "" echo "

SiteCopy - smart ftp uploader

" echo "
" . /etc/config.d/mini_httpd_sitecopy idx=1 if [ "${START_SITECOPY}" = "yes" ] then if [ ${SITECOPY_N} -ge ${idx} ] then echo '' echo '' echo ' ' echo " ' echo '' idx=1 while [ ${idx} -le ${SITECOPY_N} ] do eval active='$SITECOPY_'${idx}'_ACTIVE' if [ "${active}" = "yes" ] then eval pfad='$SITECOPY_'${idx}'_NAME' echo "" echo " " echo '' fi idx=`expr ${idx} + 1` done echo '
All Sites" echo " " echo '
${pfad}" echo " " echo " " echo " " echo " " echo "
' else echo "No directories assigned. Please check config." fi else echo "Cnofiguration has been disabled, please check the configuration." fi echo '

' echo "" idx=1 while [ ${idx} -le ${SITECOPY_LINK_N} ] do eval l_active='$SITECOPY_LINK_'${idx}'_ACTIVE' if [ "${l_active}" = "yes" ] then eval l_name='$SITECOPY_LINK_'${idx}'_NAME' eval l_href='$SITECOPY_LINK_'${idx}'_HREF' eval l_target='$SITECOPY_LINK_'${idx}'_TARGET' echo " | ${l_name}" fi idx=`expr ${idx} + 1` done echo "


" case "${QUERY_STRING}" in (path=*) echo "

Start: " date +"%a, %d.%m.%Y %H:%M:%S" echo "

" echo "
"
        eval `echo "${QUERY_STRING}" |tr '&' '\n'`
        ./upload.sh "${path}" "${param}"
        echo "
" echo "

Ende: " date +"%a, %d.%m.%Y %H:%M:%S" echo "

" echo "
" esac echo "" exit 0