iptotal-0.3.3/ 0000777 0001752 0001752 00000000000 10007453745 006747 5 iptotal-0.3.3/etc/ 0000777 0001752 0001752 00000000000 10007453745 007522 5 iptotal-0.3.3/etc/iptotal.cfg.in 0000644 0001752 0001752 00000002154 10005457620 012174 #############################################################
#
# iptotal 0.3 configuration file
#
#############################################################
#
# location of iptotal root dir
# ----------------------------
# See note at next item.
#
ROOT_DIR=@prefix@
#
# location of RRD database
# ------------------------
# NOTE: if this one is changed, then the matching CGI script
# (default in /www/iptotal/iptotal.cgi) to display the graphs
# needs to be modified accordingly.
#
ETH_DBASE=@datadir@/iptotal.rrd
#
# ethernet device
# ---------------
# Choose the ethernet device that is connected to the internet
# Selecting the wrong interface may yield incorrect results
#
ETHDEV=eth0
#
# measurement interval
# --------------------
# NOTE: if this one is changed, the database create command needs
# to be modified for some of the data set properties. I suggest
# you'll keep the default ;)
#
INTERVAL=60
#
# GNU compatible date command
#
DATECMD=@DATE@
#
# location of archive for daily graphs, should be accessible via
# web page. If this is changed, then also change the archive.cgi script
#
ARCHIVE=@datadir@/archive
iptotal-0.3.3/etc/Makefile.am 0000644 0001752 0001752 00000000033 07766315600 011473 sysconf_DATA = iptotal.cfg
iptotal-0.3.3/etc/Makefile.in 0000644 0001752 0001752 00000016664 10007446340 011511 # Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
RANLIB = @RANLIB@
RRDCGI = @RRDCGI@
RRDTOOL = @RRDTOOL@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
perl = @perl@
prefix = @prefix@
program_transform_name = @program_transform_name@
rrdcgi = @rrdcgi@
rrdtool = @rrdtool@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
sysconf_DATA = iptotal.cfg
subdir = etc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = iptotal.cfg
DIST_SOURCES =
DATA = $(sysconf_DATA)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am iptotal.cfg.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu etc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
iptotal.cfg: $(top_builddir)/config.status iptotal.cfg.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
uninstall-info-am:
sysconfDATA_INSTALL = $(INSTALL_DATA)
install-sysconfDATA: $(sysconf_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
@list='$(sysconf_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f"; \
$(sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f; \
done
uninstall-sysconfDATA:
@$(NORMAL_UNINSTALL)
@list='$(sysconf_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(sysconfdir)/$$f"; \
rm -f $(DESTDIR)$(sysconfdir)/$$f; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am: install-sysconfDATA
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-sysconfDATA
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip install-sysconfDATA installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
uninstall-am uninstall-info-am uninstall-sysconfDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
iptotal-0.3.3/etc/iptotal.cfg 0000644 0001752 0001752 00000002175 10007453301 011564 #############################################################
#
# iptotal 0.3 configuration file
#
#############################################################
#
# location of iptotal root dir
# ----------------------------
# See note at next item.
#
ROOT_DIR=/usr/local
#
# location of RRD database
# ------------------------
# NOTE: if this one is changed, then the matching CGI script
# (default in /www/iptotal/iptotal.cgi) to display the graphs
# needs to be modified accordingly.
#
ETH_DBASE=${prefix}/share/iptotal.rrd
#
# ethernet device
# ---------------
# Choose the ethernet device that is connected to the internet
# Selecting the wrong interface may yield incorrect results
#
ETHDEV=eth0
#
# measurement interval
# --------------------
# NOTE: if this one is changed, the database create command needs
# to be modified for some of the data set properties. I suggest
# you'll keep the default ;)
#
INTERVAL=60
#
# GNU compatible date command
#
DATECMD=/bin/date
#
# location of archive for daily graphs, should be accessible via
# web page. If this is changed, then also change the archive.cgi script
#
ARCHIVE=${prefix}/share/archive
iptotal-0.3.3/src/ 0000777 0001752 0001752 00000000000 10007453744 007535 5 iptotal-0.3.3/src/iptotald.in 0000755 0001752 0001752 00000007574 10005532411 011624 #!/bin/sh
######################################################################
# _ _ _ _
# (_) | | | | | |
# _ _ __ | |_ ___ | |_ __ _| |
# | | '_ \| __/ _ \| __/ _` | |
# | | |_) | || (_) | || (_| | |
# |_| .__/ \__\___/ \__\__,_|_|
# | |
# |_| V0.3 Dec. 13, 2001
# By Antoine Megens
# webmaster@dingetje.homeip.net
#
# RRD daemon script to measure total IP bandwidth usage
# without the need for an SNMP daemon
#
# part of iptotal package for FREESCO
#
######################################################################
. @sysconfdir@/iptotal.cfg
ARCHIVE_DONE=0
do_archive() {
DAYNAME=`${DATECMD} +%d%b%Y`
DOARCHIVE=0
TIMESTAMP=`${DATECMD} +%H%M`
if [ ${TIMESTAMP} -gt 2358 ]; then # Just before Midnight?
if [ ${ARCHIVE_DONE} = 0 ]; then # and not archived yet?
ARCHIVEFILE=${ARCHIVE}/${DAYNAME}.png
DOARCHIVE=1
fi
fi
if [ ${TIMESTAMP} -lt 0005 ]; then # Just after Midnight?
ARCHIVE_DONE=0 # clear flag
fi
if [ ${DOARCHIVE} = 1 ]; then
#
# create a daily graph from the current rrd data in archive
#
@RRDTOOL@ graph ${ARCHIVEFILE} \
--title "Total data throughput (${DAYNAME})" \
--imgformat PNG \
--width 600 \
--height 150 \
--end 'now-60s' \
--start 'end-24h' \
DEF:in=@datadir@/iptotal.rrd:input:AVERAGE \
DEF:out=@datadir@/iptotal.rrd:output:AVERAGE \
DEF:maxin=@datadir@/iptotal.rrd:input:MAX \
DEF:maxout=@datadir@/iptotal.rrd:output:MAX \
AREA:in#009828:"In kByte/s" \
LINE2:out#ff0000:"Out kByte/s" \
LINE2:maxin#0030ff:"Max In" \
LINE2:maxout#ff8040:"Max Out"
#
# now remove files older than 30 days from archive
#
${ROOT_DIR}/bin/find ${ARCHIVE}/*.png +30 -type f exec rm -rf {} \;
ARCHIVE_DONE=1
fi
}
######################################################################
#
# go to work....
#
if [ ! -f $ETH_DBASE ]; then
echo Creating new RRD database...
@RRDTOOL@ create $ETH_DBASE \
--step ${INTERVAL} \
DS:total:GAUGE:120:0:10000 \
DS:input:GAUGE:120:0:10000 \
DS:output:GAUGE:120:0:10000 \
RRA:AVERAGE:0.5:1:1440 \
RRA:AVERAGE:0.5:60:1200 \
RRA:MIN:0.5:60:1200 \
RRA:MAX:0.5:60:1200 \
RRA:AVERAGE:0.5:1440:365 \
RRA:MIN:0.5:1440:365 \
RRA:MAX:0.5:1440:365
# make it readable for user nobody (HTTP user)
chown nobody $ETH_DBASE
fi
#
# collect data, but only if..
#
if [ -f $ETH_DBASE ]; then
#
# the database exists, and..
#
if [ -f ${ROOT_DIR}/sbin/iptotal ]; then
#
# iptotal is installed...
#--------------------------------------------------
# save PID of this endless loop, so we can stop it
#--------------------------------------------------
echo $$ > /var/run/iptotal.pid
while true
do
#-------------------------------------------------
# run iptotal and get output in TOTAL
#-------------------------------------------------
RESULT=`${ROOT_DIR}/sbin/iptotal -r ${INTERVAL} ${ETHDEV}`
total=0;
input=0;
output=0;
set $RESULT
#
# $1 $2 $3 $4 $5 $6 $7 $8
#Total: 0 kBytes/s In: 0 Kbytes/s Out: 0 Kbytes/s
#--------------------------------------------------
# we need 2nd, 5th and 8th element of the output
#--------------------------------------------------
if [ ! -z "$2" ]; then
total=$2
fi
if [ ! -z "$5" ]; then
input=$5
fi
if [ ! -z "$8" ]; then
output=$8
fi
#
# show result in text file for web page to include
#
echo $RESULT > @datadir@/result.txt
#---------------------------
# update the database
#---------------------------
@RRDTOOL@ update $ETH_DBASE \
--template total:input:output \
N:$total:$input:$output
#
# check if daily graph should be created in archive
#
do_archive
done
fi
fi
iptotal-0.3.3/www/ 0000777 0001752 0001752 00000000000 10007453745 007573 5 iptotal-0.3.3/www/iptotal_y.cgi.in 0000755 0001752 0001752 00000004531 10005567670 012613 #!@RRDCGI@
Network usage
Network usage
Database last updated: |
|
Server Time: |
|
'
DEF:in=@datadir@/iptotal.rrd:input:AVERAGE
DEF:out=@datadir@/iptotal.rrd:output:AVERAGE
AREA:in#009828:"In kByte/s"
LINE2:out#ff0000:"Out kByte/s"
>
iptotal-0.3.3/www/iptotal.cgi.in 0000755 0001752 0001752 00000006005 10005570121 012242 #!@RRDCGI@
Network usage
Network usage
Database last updated: |
|
Server Time: |
|
'
DEF:in=@datadir@/iptotal.rrd:input:AVERAGE
DEF:out=@datadir@/iptotal.rrd:output:AVERAGE
AREA:in#009828:"In kByte/s"
LINE2:out#ff0000:"Out kByte/s"
>
'
DEF:in=@datadir@/iptotal.rrd:input:AVERAGE
DEF:out=@datadir@/iptotal.rrd:output:AVERAGE
DEF:maxin=@datadir@/iptotal.rrd:input:MAX
DEF:maxout=@datadir@/iptotal.rrd:output:MAX
AREA:in#009828:"In kByte/s"
LINE2:out#ff0000:"Out kByte/s"
LINE2:maxin#0030ff:"Max In"
LINE2:maxout#ff8040:"Max Out"
>
iptotal-0.3.3/www/Makefile.am 0000644 0001752 0001752 00000000210 10005562536 011531 nobase_data_DATA = template.html images/*gif images/*png archive/*png archive.cgi iptotal.cgi iptotal_w.cgi iptotal_m.cgi iptotal_y.cgi
iptotal-0.3.3/www/Makefile.in 0000644 0001752 0001752 00000020174 10007446341 011552 # Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE = @DATE@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
RANLIB = @RANLIB@
RRDCGI = @RRDCGI@
RRDTOOL = @RRDTOOL@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
perl = @perl@
prefix = @prefix@
program_transform_name = @program_transform_name@
rrdcgi = @rrdcgi@
rrdtool = @rrdtool@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
nobase_data_DATA = template.html images/*gif images/*png archive/*png archive.cgi iptotal.cgi iptotal_w.cgi iptotal_m.cgi iptotal_y.cgi
subdir = www
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = iptotal.cgi iptotal_w.cgi iptotal_m.cgi \
iptotal_y.cgi archive.cgi
DIST_SOURCES =
DATA = $(nobase_data_DATA)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am archive.cgi.in \
iptotal.cgi.in iptotal_m.cgi.in iptotal_w.cgi.in \
iptotal_y.cgi.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu www/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
iptotal.cgi: $(top_builddir)/config.status iptotal.cgi.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
iptotal_w.cgi: $(top_builddir)/config.status iptotal_w.cgi.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
iptotal_m.cgi: $(top_builddir)/config.status iptotal_m.cgi.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
iptotal_y.cgi: $(top_builddir)/config.status iptotal_y.cgi.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
archive.cgi: $(top_builddir)/config.status archive.cgi.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
uninstall-info-am:
nobase_dataDATA_INSTALL = $(install_sh_DATA)
install-nobase_dataDATA: $(nobase_data_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(datadir)
@list='$(nobase_data_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="$$p"; \
echo " $(nobase_dataDATA_INSTALL) $$d$$p $(DESTDIR)$(datadir)/$$f"; \
$(nobase_dataDATA_INSTALL) $$d$$p $(DESTDIR)$(datadir)/$$f; \
done
uninstall-nobase_dataDATA:
@$(NORMAL_UNINSTALL)
@list='$(nobase_data_DATA)'; for p in $$list; do \
f="$$p"; \
echo " rm -f $(DESTDIR)$(datadir)/$$f"; \
rm -f $(DESTDIR)$(datadir)/$$f; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(datadir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-nobase_dataDATA
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-nobase_dataDATA install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
uninstall-nobase_dataDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
iptotal-0.3.3/www/archive.cgi.in 0000755 0001752 0001752 00000013032 10005570565 012221 #!@PERL@
#
#
# Auto-Image Lister V1.4
# Streamlined and improved.
#########################
# AUTHOR: David Powell
# http://www.matrixvault.com/cgi/
# Copyright 1999,2000 David Powell and "The Matrix Vault"
# A Matrix Vault Production.
# Tested and run on a UNIX system with PERL 5
# This script is an original script by David Powell. You may use it free of charge, if you keep this header intact,
# along with any other copyright notices found in the resulting HTML output or text files generated by this script.
#
#########################
# This program will assemble 'on the fly' a web page full of images
# from a directory in your archive on your server. It is customizeable in that you
# use a pre-made HTML template for the output screen. You can make the template
#using all the colors and design of the rest of your site, making it fit right in.
#
# To install:
# 1. Edit the variables below.
# 2. Make a template web page. Use <--TITLE--> and <--IMAGES--> where you want
# the title and image to be inserted. It's OK to use a WYSIWYG editor. This script will
# weed out the < code.
# 3. Upload everything to it's place:
# The script: To your CGI BIN. Chmod 755
# The Template: To $TEMPLATE's path
# 4. Call the script with your browser: http://www.yoursite.com/cgi-bin/AI.cgi
# 5. Note: if you do not have a template file, you will get an error.
########################################################
#
# NEW FEATURE:
# You can run this program stand alone, which will read the designated directory,
# Or you can run it to read different directories of images with a command line.
# http://www.yourdomain.com/cgi-bin/AI.cgi?/image_dir/
# Where /image_dir/ is the dir you wish to display in relation to your public_html root.
# You must use the forward slashes around your image dir, or it will not work.
#
#########################################################
# E D I T V A R I A B L E S
#########################################################
$URL_ROOT = "";
# The HTTP root of your site.
$PAGE_TITLE = "iptotal image archive";
# The title of the results page. Set to "" for none.
$TEMPLATE= "@datadir@/template.html";
# the complete UNIX path and filename of your template
# Thumbnail size
$width ="150";
$height = "70";
# number of thumbnails per line
$num_per_line="5";
#########################################################
#
# Edit These two if you wish to process one and only one dir.
#
$UNIX_PATH = "@datadir@/archive";
# The unix path to the dir you wish to process.
$URL_PATH = "/iptotal/archive";
# The HTTP equivelent of $UNIX_PATH- but with no trailing slash.
# E N D E D I T V A R I A B L E S
#########################################################
print "Content-type: text/html\n\n";
#########################################
# Read and store the images in the dir
#########################################
$HTML_ROOT = "$ENV{'DOCUMENT_ROOT'}";
$remote_path= "$ENV{'QUERY_STRING'}";
if ($remote_path ne "") {$UNIX_PATH = "$HTML_ROOT"."$remote_path";}
opendir(DIR,"$UNIX_PATH") || &error ("Cannot open $UNIX_PATH");
foreach (sort readdir(DIR))
{
$file = $_;
$lcfile = lc($file);
if ($lcfile =~ /.png/)
{
push (@dir_list, "$file");
}
}
$count=@dir_list;
closedir(DIR);
##############################
# Read and store the template:
##############################
open(TEMPLATE_file,"$TEMPLATE") || &error ("Can't open $TEMPLATE\n");
@html=;
close(TEMPLATE_file);
#############################
# Start html insert routine
#############################
if ($remote_path ne "") {$URL_PATH = "$URL_ROOT"."$remote_path";}
$output = "\n";
$piccount=0;
foreach $file(@dir_list)
{
$piccount++;
$output .= "\n | \n";
push(@linelist,"$file");
if ($piccount eq $num_per_line)
{
$output .= "
";
foreach $label(@linelist)
{
$output .= "$label | ";
}
$output .= "
";
$piccount=0;
undef @linelist;
}
}
if (defined @linelist)
{
$output .= "
";
foreach $label(@linelist)
{
$output .= "$label | ";
}
$output .= "
";
$piccount=0;
undef @linelist;
}
$output .= "
";
#########################
# Now search and replace
#########################
foreach $line(@html)
{
$REP_TEXT="";
$REP_TEXT = "<--TITLE-->";
$line =~ s/$REP_TEXT/$PAGE_TITLE/gi;
$REP_TEXT="<--TITLE-->";
$line =~ s/$REP_TEXT/$PAGE_TITLE/gi;
$REP_TEXT = "<--IMAGES-->";
$line=~ s/$REP_TEXT/$output/gi;
$REP_TEXT="<--IMAGES-->";
$line =~ s/$REP_TEXT/$output/gi;
if (($line =~/<\/body>/) || ($line =~/<\/html>/)) {$line="";}
print "$line";
}
print <<__HTML;
This Page powered by:
"Auto Image Lister"
A Matrix Vault Production
Modified for iptotal by
dingetje