Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas

This commit is contained in:
Isaac Connor 2017-06-19 13:40:40 -04:00
commit f8cc5b00c1
26 changed files with 434 additions and 1006 deletions

View File

@ -1,607 +0,0 @@
zoneminder (1.29.0+dfsg-1) unstable; urgency=low
* New upstream release [February 2016] (Closes: #788317, #770851).
[ Dmitry Smirnov <onlyjob@debian.org> ]
* copyright/Files-Excluded += "onvif/*" due to licensing uncertainty.
* Fixed FTBFS when built with dpkg-buildpackage -A (Closes: #806126).
* FFmpeg 2.9 support. Thanks, Andreas Cadhalpun. (Closes: #803850).
* Use "ffmpeg" instead of "avconv":
+ "libav_path.patch" replaced with "default_ffmpeg_path.patch".
* zoneminder/Depends:
- perl-modules (package-relation-with-perl-modules)
- libav-tools
* zoneminder/Recommends:
+ ffmpeg | libav-tools
* Updated Vcs URLs.
* Build/install new man pages.
* Removed obsolete lintian-overrides.
* README: grant "index" right to DB user.
* systemd: start after MySQL but do not require the latter.
* Added new patch with spelling corrections.
* Removed obsolete patches:
- 783.patch
- 980-fix-image-size.patch
- cmake-fix-confpath.patch
- cmake.patch
- cmake-gnutls.patch
- fix-html-export.patch
- format-hardening.patch
- libv4l1-videodev.h.patch
- pod_man_fixes.patch
- pod_name_fixes.patch
- pod_zmupdate-to-pod2usage.patch
- respect-privacy.patch
- zmtrigger-plus.patch
[ Vagrant Cascadian <vagrant@debian.org> ]
* Remove myself from Uploaders.
-- Dmitry Smirnov <onlyjob@debian.org> Tue, 09 Feb 2016 15:40:32 +1100
zoneminder (1.28.1-8) unstable; urgency=medium
* Patchworks:
+ New upstream "980-fix-image-size.patch".
+ New "default_cgi-path.patch" to correct default ZM_PATH_ZMS.
* postinst: set "root" as group owner for "/var/log/zm" to silence
logrotate warnings.
* Minor correction to README.Debian.
-- Dmitry Smirnov <onlyjob@debian.org> Sun, 16 Aug 2015 19:19:50 +1000
zoneminder (1.28.1-7) unstable; urgency=medium
* Build-Depends += "cakephp (<< 3.0.0~)";
Zoneminder is not compatible with latest CakePHP.
* Handle conffile removal from maintscript.
* rules: build man pages reproducibly.
* gbp.conf: renamed old style config section [git-dch] to [dch].
* README
+ added instructions to update owner of the "/etc/zm/zm.conf"
(Closes: #789327).
+ zmupdate.pl needs CREATE rights.
+ added note about required number of "fcgiwrap" workers.
* New upstream patch: "zmtrigger-plus.patch".
-- Dmitry Smirnov <onlyjob@debian.org> Mon, 20 Jul 2015 16:30:15 +1000
zoneminder (1.28.1-6) unstable; urgency=low
* New "zoneminder-doc" and "zoneminder-dbg" packages.
-- Dmitry Smirnov <onlyjob@debian.org> Sun, 19 Apr 2015 14:50:41 +1000
zoneminder (1.28.1-5) unstable; urgency=low
* Move handling of "/var/run/zm" and "/tmp/zm" from .service into .tmpfile.
Let dh_installinit do the job. Thanks, Andrew Bauer.
* Use dh_apache2 to install Apache conf file; remove old conf and symlink.
* Promote "libapache2-mod-php5 | php5-fpm" to Recommends.
* Build-Depends:
+ dh-linktree
+ cakephp (>= 2.6.3)
+ libjs-jquery
+ libjs-mootools
* Depends:
- libjs-jquery
- libjs-mootools
* Build-time replace bundled CakePHP with system one using "dh-linktree".
* Use "dh-linktree" to handle mootools and jquery symlinks.
-- Dmitry Smirnov <onlyjob@debian.org> Sun, 19 Apr 2015 11:45:01 +1000
zoneminder (1.28.1-4) unstable; urgency=low
* New patch to fix HTML export with USE_DEEP_STORAGE (closes: #723706).
* New "783.patch" to describe potential data loss in ZM_USE_DEEP_STORAGE.
* New patch to change default date format to region-neutral ISO notation
with time zone.
* Build sphinx documentation:
+ Install "zoneminder.1" man page.
+ Build-Depends += "python-sphinx | python3-sphinx"
+ Added commented "zoneminder-doc" package.
+ Added "docs.patch" to unlink distro-specific installation docs.
* rules:
+ set ZM_CONTENTDIR, ZM_SOCKDIR and ZM_TMPDIR.
+ remove mistakengly installed Perl module templates.
* Updated startup scripts to create ZM_TMPDIR.
* Hurd improvements:
+ New patch to add PATH_MAX definitions.
+ Build without MMAP support on Hurd.
+ libsys-mmap-perl [!hurd-any].
-- Dmitry Smirnov <onlyjob@debian.org> Mon, 06 Apr 2015 18:18:55 +1000
zoneminder (1.28.1-3) unstable; urgency=low
* Updated Apache2 and nginx configuration templates to support CGI.
* Updated README.Debian to document cgi-bin setup.
* Removed "/usr/share/zoneminder/www/cgi-bin" symlink.
* Added "apache2.patch" to correct Apache2 site configuration example.
* control: Suggests += "fcgiwrap".
* rules: added dh_systemd overrides to prevent automatic service
activation and start.
* Added note about manual service activation to README.Debian
(Closes: #781733).
-- Dmitry Smirnov <onlyjob@debian.org> Thu, 02 Apr 2015 23:20:20 +1100
zoneminder (1.28.1-2) unstable; urgency=low
* Removed word "Linux" from short package description.
* Build-Depends: do not require "libv4l-dev" on Hurd i.e. [!hurd-any].
* Added run-time Perl Depends:
+ libdbd-mysql-perl
+ libimage-info-perl
+ libmodule-load-conditional-perl
+ libnet-sftp-foreign-perl
+ liburi-encode-perl
* Prepare for package split: added commented "libzoneminder-perl"
and "zoneminder-dbg" packages to "debian/control".
* rules: do not install worthless ".packlist" file.
* Updated "libv4l1-videodev.h.patch" to fix v4lv1 detection in CMake.
-- Dmitry Smirnov <onlyjob@debian.org> Thu, 02 Apr 2015 13:25:19 +1100
zoneminder (1.28.1-1) unstable; urgency=low
[ Dmitry Smirnov <onlyjob@debian.org> ]
* New upstream release [February 2015].
* Upload to unstable.
* Disabled automatic database upgrades: post(inst|rm) scripts no longer
touch database or do unexpected stuff (Closes: #779254).
See README.Debian for details.
* Updated installation paths:
+ /usr/share/zoneminder --> /usr/share/zoneminder/www
+ /usr/lib/cgi-bin --> /usr/lib/zoneminder/cgi-bin
* Added logrotate config (Closes: #544826).
Thanks, Alberto Reyes.
* Native systemd service; "--with systemd" added to dh.
* Build with CMake instead of autoconf; rules clean-up.
* Build with all hardening.
* Build and install "zmupdate.pl.1" man page.
* Added nginx/php5-fpm configuration example.
* Install upstream "apache.conf" example.
* Described setup of Zoneminer web site and database in README.Debian.
* Install "/etc/zm/zm.conf" with tighter permissions.
* Added TODO.Debian.
* Added "debian/clean"; "debian/gbp.conf"; bug-presubj.
* Remove bundled Cake tests to take ~5 MB off big-usr-share.
* Standards-Version: 3.9.6; compat/debhelper to version 9.
* Vcs links to new git repository at collab-maint.
* Build-Depends:
+ dh-systemd
+ libgcrypt11-dev --> libgcrypt-dev
+ libcurl4-gnutls-dev
+ libvlc-dev
+ policykit-1 (required by "zmsystemctl.pl")
- dh-autoreconf, autoconf, automake
* Depends:
- apache2
- libapache2-mod-php5 (moved to Suggests)
- libpcre3 (invalid)
- libmodule-load-perl (obsolete; replaced with perl-modules)
- libarchive-tar-perl (obsolete; replaced with perl-modules)
- mysql-server (moved to Recommends, Closes: #759504).
- php5
+ libav-tools
+ libjs-jquery (replaces bundled component)
+ libjs-mootool (replaces bundled component)
+ libjson-any-perl (Closes: #690803).
+ perl-modules (Closes: #745819).
* Recommends:
+ apache2 | httpd
+ mysql-server | virtual-mysql-server (Closes: #732874).
* Suggests:
+ libapache2-mod-php5 | php5-fpm
+ logrotate
* Refreshed, renamed and re-ordered patches; added DEP-3 headers.
* Removed "vendor_perl" patch (applied-upstream).
* New patches:
+ cmake-fix-confpath.patch
+ cmake-gnutls.patch
+ cmake-nossl.patch
+ cmake.patch
+ format-hardening.patch
+ pod_man_fixes.patch
+ pod_name_fixes.patch
+ pod_zmupdate-to-pod2usage.patch
* Lintianisation (incomplete):
- extra-license-file
- init.d-script-missing-lsb-description
- init.d-script-does-not-source-init-functions
- privacy-breach-generic
- package-contains-empty-directory
- manpage-has-errors-from-pod2man
- manpage-has-bad-whatis-entry
- quilt-patch-missing-description
- no-dep5-copyright
* Lintian-overrides:
+ unusual-interpreter usr/bin/zmsystemctl.pl #!/usr/bin/pkexec
+ script-not-executable usr/share/zoneminder/www/api/*
+ script-with-language-extension usr/bin/*.pl
+ source-is-missing web/tools/mootools/mootools-*-yc.js
+ source-is-missing web/skins/*/js/jquery-1.4.2.min.js
+ source-contains-prebuilt-javascript-object
* Renamed files in "debian".
* watch: dfsg repacksuffix and dversionmangle.
* "debian/copyright" to Copyright-Format-1.0.
* Set myself as new Maintainer (Closes: #760314).
[ Vagrant Cascadian <vagrant@debian.org> ]
* Removed obsolete DM-Upload-Allowed flag.
* Update debian/watch to use tarballs from github.
* Add Build-Depends on libgcrypt11-dev (Closes: #745819).
* Use canonical alioth Vcs-Hg URL.
* debian/control: Add Build-Depends: libpolkit-gobject-1-dev.
* Removed configure flag "--enable-crashtrace=no", which is no longer
present upstream.
-- Dmitry Smirnov <onlyjob@debian.org> Tue, 31 Mar 2015 15:11:13 +1100
zoneminder (1.26.5-3.1) experimental; urgency=low
* Non-maintainer upload.
* Add libav10.patch and compile against libav10 (Closes: #739461)
-- Reinhard Tartler <siretart@tauware.de> Wed, 19 Mar 2014 00:31:22 +0000
zoneminder (1.26.5-3) unstable; urgency=low
* Previous release still didn't build on PPC - this has been corrected.
(Closes: #736516)
-- Peter Howard <pjh@northern-ridge.com.au> Tue, 4 Feb 2014 02:02:10 +1000
zoneminder (1.26.5-2) unstable; urgency=low
* Remove dependency on ffmpeg
(Closes: #721161)
* Builds again on non-x86 target architectures.
-- Peter Howard <pjh@northern-ridge.com.au> Thu, 23 Jan 2014 01:02:10 +1000
zoneminder (1.26.5-1) unstable; urgency=low
* New upstream version
(Closes: #694131)
* Change Build-Depends on libgnutls-dev to libgnutls-openssl-dev
(Closes: #731560)
-- Peter Howard <pjh@northern-ridge.com.au> Tue, 17 Dec 2013 01:02:10 +1000
zoneminder (1.25.0-4) unstable; urgency=high
* Add CVE-2013-0232 patch
[SECURITY] CVE-2013-0232: Shell escape commands with untrusted content.
Thanks to James McCoy <jamessan@debian.org> (Closes: #698910)
Thanks also to Salvatore Bonaccorso <carnil@debian.org>
-- Peter Howard <pjh@northern-ridge.com.au> Tue, 12 Jun 2013 12:02:10 +1000
zoneminder (1.25.0-3) unstable; urgency=low
* debian/rules: Export CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS, to ensure
hardening build flags are enabled.
-- Vagrant Cascadian <vagrant@debian.org> Tue, 28 Aug 2012 12:10:03 -0700
zoneminder (1.25.0-2) unstable; urgency=low
[ Vagrant Cascadian ]
* Add a patch to disable checking for updated versions by default, as
upgrades should happen through package management.
* Use dpkg-buildflags in debian/rules to set default compiler flags.
* Ensure zoneminder is stopped before starting (Closes: #657407).
[ Peter Howard ]
* Fix postinst to add permission for table creation during upgrade
(Closes: #657407).
-- Vagrant Cascadian <vagrant@debian.org> Thu, 23 Aug 2012 12:40:34 -0700
zoneminder (1.25.0-1.1) unstable; urgency=low
* Non-maintainer upload.
* Fix "ftbfs with GCC-4.7": add patch Fix-FTBFS-with-gcc-4.7 from Cyril
Brulebois: fix missing <unistd.h> includes.
(Closes: #667428)
-- gregor herrmann <gregoa@debian.org> Sun, 13 May 2012 17:02:21 +0200
zoneminder (1.25.0-1) unstable; urgency=low
* Fix typo in libv4l1-videodev.h patch that caused v4l1 support to be
dropped.
* Fail to build if version in postinst doesn't match upstream version.
* Add Build-Depends: libavdevice-dev to fix MPEG streaming (Closes: #515558).
* debian/rules: Convert to using debhelper overrides.
* Set debian/compat to 7.
* Simplify debian/watch file.
* Refresh debian/patches/use_libjs-mootools.
* Refresh debian/patches/libv4l1-videodev.h.
* Remove dependencies on php4 and related packages.
* Remove build-dependencies on libmysqlclient14-dev and
libmysqlclient15-dev.
* Update Build-Depends to use libjpeg-dev instead of libjpeg62-dev
(Closes: #647114).
* Add patch to fix build by testing for C headers rather than C++ headers.
Thanks to Ryan Niebur. (Closes: #654230)
* Add a patch to fix build problems caused by API changes in libav 0.8.
Thanks again to Ryan Niebur. (Closes: #654230)
-- Vagrant Cascadian <vagrant@debian.org> Mon, 16 Jan 2012 11:58:05 -0800
zoneminder (1.24.4-1) unstable; urgency=low
[ Peter Howard ]
* Initial release of 1.24.4 (Closes: #634985).
- Fix 32/64-bit type declarations (Closes: #614404).
* Update patches.
[ Vagrant Cascadian ]
* Add patch to fix FTBFS by using libv4l1-videodev.h from libv4l-dev.
Thanks to Andreas Metzler for reporting the issue.
(Closes: #619813).
* Document adding the www-data user to the video group in README.Debian.
(Closes: #611324)
* Depend on libsys-mmap-perl to enable mapped memory support.
(Closes: #607331)
* Update libjs-mootools patch to use -nc variants (Closes: #635075).
* Depend on javascript-common, to ensure that /javascript is available in
the web server.
* Set the upstream version in postinst at build time.
* Use dh-autoreconf to properly clean up autogenerated files during build.
* Add Vcs-HG to debian/control.
* Add Build-Depends: libv4l-dev, libbz2-dev, dh-autoreconf, libsys-mmap-perl.
-- Vagrant Cascadian <vagrant@debian.org> Sun, 24 Jul 2011 16:44:30 +0200
zoneminder (1.24.2-9) unstable; urgency=low
* Apply patch from Ubuntu to fix FTBFS with ffmpeg 0.6:
- Add -D__STDC_CONSTANT_MACROS to CPPFLAGS (closes: 614080).
* Update Standards-Version to 3.9.1, no changes necessary.
-- Vagrant Cascadian <vagrant@debian.org> Sun, 20 Feb 2011 23:43:02 -0800
zoneminder (1.24.2-8) unstable; urgency=medium
[ Vagrant Cascadian ]
* Apply patch to fix V4L2 cameras without crop support (closes: #608790).
Thanks to piratebab.
* Add preinst script which aborts if dangerous symlinks exist.
(closes: #608793)
[ Peter Howard ]
* Added to README.Debian with info about images and events directories.
(closes: #608793)
-- Vagrant Cascadian <vagrant@debian.org> Sat, 15 Jan 2011 19:39:26 -0800
zoneminder (1.24.2-7) unstable; urgency=medium
* Do not set ownership of /var/cache/zoneminder when upgrading, which fixes a
regression causing upgrades to take inordinately long with large
installations (closes: #597040).
-- Vagrant Cascadian <vagrant@debian.org> Fri, 17 Sep 2010 11:24:41 -0700
zoneminder (1.24.2-6) unstable; urgency=low
* Only remove database on purge. This requires only creating the database if
it doesn't already exist, and upgrading the database only if the database
is an older version (closes: #497107).
* Do not prompt the user on database upgrades by using the --nointeractive
flag when calling zmupdate.pl from postinst (closes: #595902).
-- Vagrant Cascadian <vagrant@debian.org> Fri, 10 Sep 2010 10:06:06 -0700
zoneminder (1.24.2-5) unstable; urgency=low
[ Peter Howard ]
* Add zip dependency
(closes: #494261)
* Add debian/watch file
(closes: #545552)
* Use packaged libjs-mootools
(closes: #585590)
* Miscellaneous cleanups
[ Vagrant Cascadian ]
* Add vagrant@debian.org as uploader
* Update Standards-Version to 3.9.0, no changes necessary.
-- Vagrant Cascadian <vagrant@debian.org> Fri, 23 Jul 2010 18:12:50 -0500
zoneminder (1.24.2-4.1) unstable; urgency=low
* Non-maintainer upload.
* Fix "package removed, processes still running": apply patch to
debian/postinst by Vagrant Cascadian: use invoke-rc.d and run
mysql-related actions only when mysql is running (closes: #583648).
-- gregor herrmann <gregoa@debian.org> Thu, 01 Jul 2010 19:47:10 +0200
zoneminder (1.24.2-4) unstable; urgency=high
* Update init.d to list mysql dependency
(closes: #583505)
* Change dependency from libmime-perl to libmime-tools-perl
(closes: #585589)
* Problems in changelog format fixed
(closes: #585592)
* Fix debian-rules-ignores-make-clean-error
(closes: #585593)
-- Peter Howard <pjh@northern-ridge.com.au> Mon, 14 jun 2010 15:02:10 +1000
zoneminder (1.24.2-3) unstable; urgency=high
* Changes symbols to build with libjpeg8
(closes: #565326, #568327)
* Note: location of all perl files should have been fixed in previous release
(closes: #553096)
-- Peter Howard <pjh@northern-ridge.com.au> Mon, 26 apr 2010 15:02:10 +1000
zoneminder (1.24.2-2) unstable; urgency=high
* Remove custom perl parth from zmpkg.pl, fix location of manpages.
(closes: #551746, #553092)
* Fix GCC4.4 bug
(closes: #531717)
* Fix potential bug in postinst script
-- Peter Howard <pjh@northern-ridge.com.au> Sat, 14 Nov 2009 15:02:10 +1000
zoneminder (1.24.2-1) unstable; urgency=high
* Initial release of zoneminder 1.24.2
-- Peter Howard <pjh@northern-ridge.com.au> Fri, 11 Sep 2009 07:02:50 +1000
zoneminder (1.24.1-1) unstable; urgency=high
* Initial release of zoneminder 1.24.1, closing CVE-2008-3882,
CVE-2008-3881, CVE-2008-3880
(closes: #497640)
* Change syslog dependency to rsyslog.
(closes: #526918)
* Add missing perl dependency.
* Restore patch to disable "check for updates" by default.
* Removed spurious '$' in init script.
(closes: #486064)
* Change permission of zm.conf from 0600 to 0400 for CVE-2008-6755
(closes: #528252)
-- Peter Howard <pjh@northern-ridge.com.au> Sat, 16 May 2009 07:02:50 +1000
zoneminder (1.23.3-4) unstable; urgency=high
* update to get it building with latest unstable. Thanks to waldi@debian.org
(closes: #517569)
-- Peter Howard <pjh@northern-ridge.com.au> Thu, 16 Apr 2009 01:02:50 +1000
zoneminder (1.23.3-3) unstable; urgency=high
* ffmpeg confirmed working
(closes: #475145)
* Fix upgrade problem intrudouced in 1.23.3-1
(closes: #481637)
* Include libmime-lite-perl in dependencies
(closes: #486312)
-- Peter Howard <pjh@northern-ridge.com.au> Thu, 18 Sep 2008 01:02:50 +1000
zoneminder (1.23.3-2) unstable; urgency=high
* ffmpeg finally working?
-- Peter Howard <pjh@northern-ridge.com.au> Wed, 13 Aug 2008 01:02:50 +1000
zoneminder (1.23.3-1) unstable; urgency=high
* Initial version for 1.23.3 - security fix.
(closes: #479034)
-- Peter Howard <pjh@northern-ridge.com.au> Wed, 19 Mar 2008 01:02:50 +1000
zoneminder (1.23.2-2) unstable; urgency=low
* Update to init.d
(closes: #468856)
* Add dependency on logging daemon
(closes: #471277)
-- Peter Howard <pjh@northern-ridge.com.au> Wed, 19 Mar 2008 01:02:50 +1000
zoneminder (1.23.2-1) unstable; urgency=low
* Initial version for 1.23.2
(closes: #464152)
* Zoneminder 1.23.2 upstream includes fix for GCC 4.3
(closes: #454980)
* Includes ffmpeg patch by Alexander Kushnirenko <kushnir@uni-protvino.ru>
-- Peter Howard <pjh@northern-ridge.com.au> Sat, 01 Mar 2008 16:02:50 +1000
zoneminder (1.22.3-10) unstable; urgency=low
* Fix bug introduced in -9 where perl is put under /usr/local
(closes: #457507)
-- Peter Howard <pjh@northern-ridge.com.au> Mon, 24 Dec 2007 16:02:50 +1000
zoneminder (1.22.3-9) unstable; urgency=low
* Starting zoneminder via init script now invokes "zmfix -a"
(closes: #481637)
* Change apache2-mpm-prefork dependency to apache2
* Temp dir for export under /var/cache/zoneminder (but linked back to
/usr/share/zoneminder for now)
* Redo use of gnutls rather than openssl for md5 hashes
-- Peter Howard <pjh@northern-ridge.com.au> Mon, 10 Dec 2007 16:02:50 +1000
zoneminder (1.22.3-8) unstable; urgency=low
* Build now includes libpcre3
(closes: #437533)
* "Monitor Presets" patch now applied to package during build.
-- Peter Howard <pjh@northern-ridge.com.au> Sat, 18 Aug 2007 14:35:23 +1000
zoneminder (1.22.3-7) unstable; urgency=low
* Turn off debug trace and crash dump on build
(closes:#414857,#414891)
* Additional perl libraries added in dependencies
(closes:#416291)
* Change preferred PHP version from 4 to 5
-- Peter Howard <pjh@northern-ridge.com.au> Sun, 29 Jul 2007 15:11:13 +1000
zoneminder (1.22.3-6) unstable; urgency=low
* Removed a similar bash only statement from zmpkg.pl
(closes:414882)
-- Peter Howard <pjh@northern-ridge.com.au> Sat, 14 Apr 2007 11:46:56 +1000
zoneminder (1.22.3-5) unstable; urgency=low
* Installs with "phone home" feature turned off by default, and permissions
on /etc/zm/zm.conf fixed (now the 0600 it s hould be)
(closes:415349)
* Removed "stupid bash-ism" on mysqld check in postinst file.
-- Peter Howard <pjh@northern-ridge.com.au> Fri, 6 Apr 2007 15:50:00 +1000
zoneminder (1.22.3-4) unstable; urgency=low
* Put libmysqlclient-15-dev in front of -14-dev so sbuild works
(closes: #414410)
-- Peter Howard <pjh@northern-ridge.com.au> Mon, 12 Mar 2007 11:38:56 +1100
zoneminder (1.22.3-3) unstable; urgency=low
* Clean up of postinstall, postrm ; user "zm" definitely was a mistake
* Also in postinstall: check and start MySQL if it's not running.
* init.d script now checks if zoneminder isn't running and still returns 0
(which helps uninstalling)
* Addition of php5 dependency options as well as php4.
-- Peter Howard <pjh@northern-ridge.com.au> Mon, 26 Feb 2007 10:40:52 +1100
zoneminder (1.22.3-2) unstable; urgency=low
* Added zmuser in the mysql creation; this should fix the install problem
for people, but needs to be cleaned up (in -3)
-- Peter Howard <pjh@northern-ridge.com.au> Fri, 16 Feb 2007 14:16:03 +1100
zoneminder (1.22.3-1) unstable; urgency=low
* Initial Version. (closes: #248393)
* Patched out use of openssl; uses gnutls instead for MD5 hashes.
* Removed MakeMaker-inserted Perl licensing (with authors permission) in
various scripts; replaced with GPL.
-- Peter Howard <pjh@northern-ridge.com.au> Wed, 7 Feb 2007 14:09:01 +1100

View File

@ -4,3 +4,5 @@ var/cache/zoneminder/events
var/cache/zoneminder/images
var/cache/zoneminder/temp
usr/share/zoneminder/db
etc/zm/
etc/zm/conf.d

View File

@ -413,7 +413,7 @@ static void zm_log_fps(double d, const char *postfix) {
Debug(1, "%1.0fk %s", d / 1000, postfix);
}
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
void zm_dump_codecpar ( const AVCodecParameters *par ) {
Debug(1, "Dumping codecpar codec_type(%d) codec_id(%d) codec_tag(%d) width(%d) height(%d)",
par->codec_type,

View File

@ -324,7 +324,7 @@ static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, in
void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output);
void zm_dump_codec ( const AVCodecContext *codec );
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
void zm_dump_codecpar ( const AVCodecParameters *par );
#endif

View File

@ -167,7 +167,7 @@ int FfmpegCamera::Capture( Image &image ) {
Debug( 5, "Got packet from stream %d dts (%d) pts(%d)", packet.stream_index, packet.pts, packet.dts );
// What about audio stream? Maybe someday we could do sound detection...
if ( packet.stream_index == mVideoStreamId ) {
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
ret = avcodec_send_packet( mVideoCodecContext, &packet );
if ( ret < 0 ) {
av_strerror( ret, errbuf, AV_ERROR_MAX_STRING_SIZE );
@ -327,7 +327,7 @@ int FfmpegCamera::OpenFfmpeg() {
mVideoStreamId = -1;
mAudioStreamId = -1;
for (unsigned int i=0; i < mFormatContext->nb_streams; i++ ) {
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
if ( mFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ) {
#else
#if (LIBAVCODEC_VERSION_CHECK(52, 64, 0, 64, 0) || LIBAVUTIL_VERSION_CHECK(50, 14, 0, 14, 0))
@ -344,7 +344,7 @@ int FfmpegCamera::OpenFfmpeg() {
Debug(2, "Have another video stream." );
}
}
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
if ( mFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ) {
#else
#if (LIBAVCODEC_VERSION_CHECK(52, 64, 0, 64, 0) || LIBAVUTIL_VERSION_CHECK(50, 14, 0, 14, 0))
@ -368,7 +368,7 @@ int FfmpegCamera::OpenFfmpeg() {
Debug ( 3, "Found video stream at index %d", mVideoStreamId );
Debug ( 3, "Found audio stream at index %d", mAudioStreamId );
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
mVideoCodecContext = avcodec_alloc_context3( NULL );
avcodec_parameters_to_context( mVideoCodecContext, mFormatContext->streams[mVideoStreamId]->codecpar );
#else
@ -397,7 +397,7 @@ int FfmpegCamera::OpenFfmpeg() {
}
if ( mAudioStreamId >= 0 ) {
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
mAudioCodecContext = avcodec_alloc_context3( NULL );
avcodec_parameters_to_context( mAudioCodecContext, mFormatContext->streams[mAudioStreamId]->codecpar );
#else
@ -755,7 +755,7 @@ else if ( packet.pts && video_last_pts > packet.pts ) {
}
Debug(4, "about to decode video" );
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
ret = avcodec_send_packet( mVideoCodecContext, &packet );
if ( ret < 0 ) {
av_strerror( ret, errbuf, AV_ERROR_MAX_STRING_SIZE );

View File

@ -41,7 +41,7 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
video_input_stream = p_video_input_stream;
audio_input_stream = p_audio_input_stream;
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
video_input_context = avcodec_alloc_context3( NULL );
avcodec_parameters_to_context( video_input_context, video_input_stream->codecpar );
zm_dump_codecpar( video_input_stream->codecpar );
@ -85,7 +85,7 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
oc->metadata = pmetadata;
output_format = oc->oformat;
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
// Since we are not re-encoding, all we have to do is copy the parameters
video_output_context = avcodec_alloc_context3( NULL );
@ -195,7 +195,7 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
if ( audio_input_stream ) {
Debug(3, "Have audio stream" );
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
audio_input_context = avcodec_alloc_context3( NULL );
ret = avcodec_parameters_to_context( audio_input_context, audio_input_stream->codecpar );
@ -222,7 +222,7 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
} else {
Debug(2, "setting parameters");
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
audio_output_context = avcodec_alloc_context3( audio_output_codec );
// Copy params from inputstream to context
ret = avcodec_parameters_to_context( audio_output_context, audio_input_stream->codecpar );
@ -325,7 +325,7 @@ VideoStore::~VideoStore(){
int64_t size;
while(1) {
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
ret = avcodec_receive_packet( audio_output_context, &pkt );
#else
ret = avcodec_encode_audio2( audio_output_context, &pkt, NULL, &got_packet );
@ -397,7 +397,7 @@ bool VideoStore::setup_resampler() {
#ifdef HAVE_LIBAVRESAMPLE
static char error_buffer[256];
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
// Newer ffmpeg wants to keep everything separate... so have to lookup our own decoder, can't reuse the one from the camera.
AVCodec *audio_input_codec = avcodec_find_decoder(audio_input_stream->codecpar->codec_id);
#else
@ -473,7 +473,7 @@ bool VideoStore::setup_resampler() {
// Now copy them to the output stream
audio_output_stream = avformat_new_stream( oc, audio_output_codec );
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
ret = avcodec_parameters_from_context( audio_output_stream->codecpar, audio_output_context );
if ( ret < 0 ) {
Error( "Could not initialize stream parameteres");
@ -738,7 +738,7 @@ int VideoStore::writeAudioFramePacket( AVPacket *ipkt ) {
if ( audio_output_codec ) {
#ifdef HAVE_LIBAVRESAMPLE
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
ret = avcodec_send_packet( audio_input_context, ipkt );
if ( ret < 0 ) {
Error("avcodec_send_packet fail %s", av_make_error_string(ret).c_str());
@ -818,7 +818,7 @@ int VideoStore::writeAudioFramePacket( AVPacket *ipkt ) {
* Encode the audio frame and store it in the temporary packet.
* The output audio stream encoder is used to do this.
*/
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
if (( ret = avcodec_send_frame( audio_output_context, output_frame ) ) < 0 ) {
Error( "Could not send frame (error '%s')",
av_make_error_string(ret).c_str());

View File

@ -140,7 +140,7 @@ installtrusty () {
pkgname="build/zoneminder_${VERSION}-${RELEASE}_amd64.deb"
if [ -e $pkgname ]; then
sudo gdebi --non-interactive $pkgname
sudo gdebi --quiet --non-interactive $pkgname
mysql -uzmuser -pzmpass zm < db/test.monitor.sql
sudo /usr/bin/zmpkg.pl start
sudo /usr/bin/zmfilter.pl -f purgewhenfull
@ -259,7 +259,7 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
mypid=$!
packpack/packpack -f utils/packpack/redhat_package.mk redhat_package > buildlog.txt 2>&1
kill $mypid
tail -n 1000 buildlog.txt
tail -n 3000 buildlog.txt | grep -v ONVIF
# Steps common to Debian based distros
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then
@ -283,7 +283,7 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
mypid=$!
packpack/packpack > buildlog.txt 2>&1
kill $mypid
tail -n 1000 buildlog.txt
tail -n 3000 buildlog.txt | grep -v ONVIF
if [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ] && [ "${ARCH}" == "x86_64" ] && [ "${TRAVIS}" == "true" ]; then
installtrusty
@ -307,7 +307,7 @@ elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ] && [ "${ARCH}" == "x86
mypid=$!
packpack/packpack > buildlog.txt 2>&1
kill $mypid
tail -n 1000 buildlog.txt
tail -n 3000 buildlog.txt | grep -v ONVIF
# If we are running inside Travis then attempt to install the deb we just built
if [ "${TRAVIS}" == "true" ]; then

View File

@ -1,7 +1,25 @@
<?php
class Filter {
public function __construct( $IdOrRow ) {
public $defaults = array(
'Name' => '',
'AutoExecute' => 0,
'AutoExecuteCmd' => 0,
'AutoEmail' => 0,
'AutoDetail' => 0,
'AutoArchive' => 0,
'AutoVideo' => 0,
'AutoMessage' => 0,
'Background' => 0,
'Concurrent' => 0,
'limit' => 100,
'terms' => array(),
'sort_field' => ZM_WEB_EVENT_SORT_FIELD,
'sort_asc' => (ZM_WEB_EVENT_SORT_ORDER == 'asc'),
);
public function __construct( $IdOrRow=NULL ) {
$row = NULL;
if ( $IdOrRow ) {
if ( is_integer( $IdOrRow ) or is_numeric( $IdOrRow ) ) {
@ -25,17 +43,44 @@ class Filter {
foreach ($row as $k => $v) {
$this->{$k} = $v;
}
} else {
Error('No row for Filter ' . $IdOrRow );
}
} // end function __construct
public function __call( $fn, array $args ) {
if ( count( $args ) ) {
$this->{$fn} = $args[0];
}
if ( array_key_exists( $fn, $this ) ) {
return $this->{$fn};
#array_unshift($args, $this);
#call_user_func_array( $this->{$fn}, $args);
} else if ( array_key_exists( $fn, $this->defaults ) ) {
return $this->defaults{$fn};
} else {
$backTrace = debug_backtrace();
$file = $backTrace[1]['file'];
$line = $backTrace[1]['line'];
Warning( "Unknown function call Filter->$fn from $file:$line" );
}
}
public function terms( ) {
if ( func_num_args( ) ) {
$this->{'terms'} = func_get_arg(0);
Warning("terms set " . $this->{'terms'} );
}
if ( ! isset( $this->{'terms'} ) ) {
Warning("terms not set " . array_key_exists( 'Query', $this ) );
if ( array_key_exists( 'Query', $this ) and $this->{'Query'} ) {
Warning("Decoding terms not set");
$this->{'terms'} = jsonDecode( $this->{'Query'} );
} else {
Warning("Defaulting terms not set");
$this->{'terms'} = array();
}
}
return $this->{'terms'};
}
public static function find_all() {
@ -52,6 +97,24 @@ class Filter {
dbQuery( 'DELETE FROM Filters WHERE Id = ?', array($this->{'Id'}) );
} # end function delete()
public function set( $data ) {
foreach ($data as $k => $v) {
if ( is_array( $v ) ) {
$this->{$k} = $v;
} else if ( is_string( $v ) ) {
$this->{$k} = trim( $v );
} else if ( is_integer( $v ) ) {
$this->{$k} = $v;
} else if ( is_bool( $v ) ) {
$this->{$k} = $v;
} else {
Error( "Unknown type $k => $v of var " . gettype( $v ) );
$this->{$k} = $v;
}
}
}
} # end class
?>

View File

@ -117,57 +117,52 @@ if ( !empty($action) ) {
// Event scope actions, view permissions only required
if ( canView( 'Events' ) ) {
if ( $action == 'filter' ) {
if ( !empty($_REQUEST['subaction']) ) {
if ( $_REQUEST['subaction'] == 'addterm' )
if ( isset( $_REQUEST['object'] ) and ( $_REQUEST['object'] == 'filter' ) ) {
if ( $action == 'addterm' ) {
$_REQUEST['filter'] = addFilterTerm( $_REQUEST['filter'], $_REQUEST['line'] );
elseif ( $_REQUEST['subaction'] == 'delterm' )
} elseif ( $action == 'delterm' ) {
$_REQUEST['filter'] = delFilterTerm( $_REQUEST['filter'], $_REQUEST['line'] );
} else if ( canEdit( 'Events' ) ) {
if ( $action == 'delete' ) {
if ( ! empty($_REQUEST['Id']) ) {
dbQuery( 'DELETE FROM Filters WHERE Id=?', array( $_REQUEST['Id'] ) );
//$refreshParent = true;
}
} else if ( ( $action == 'save' ) or ( $action == 'execute' ) or ( $action == 'submit' ) ) {
$sql = '';
$endSql = '';
$filterName = '';
if ( !empty($_REQUEST['execute']) ) {
// TempFilterName is used in event listing later on
$tempFilterName = $filterName = '_TempFilter'.time();
} elseif ( !empty($_REQUEST['newFilterName']) ) {
$filterName = $_REQUEST['newFilterName'];
}
if ( $filterName ) {
if ( $action == 'execute' or $action == 'submit' ) {
# Replace will teplace any filter with the same Id
# Since we aren't specifying the Id , this is effectively an insert
$sql = 'REPLACE INTO Filters SET Name = '.dbEscape($filterName).',';
} else {
$sql = 'REPLACE INTO Filters SET Name = \'_TempFilter'.time().'\',';
} else if ( $_REQUEST['Id'] ) {
$sql = 'UPDATE Filters SET';
$endSql = ' WHERE Id = '.$_REQUEST['Id'];
} else {
$sql = 'INSERT INTO Filters SET';
}
# endSql is only set if ! filterName... so... woulnd't this always be true
if ( !empty($filterName) || $endSql ) {
$_REQUEST['filter']['sort_field'] = validStr($_REQUEST['sort_field']);
$_REQUEST['filter']['sort_asc'] = validStr($_REQUEST['sort_asc']);
$_REQUEST['filter']['limit'] = validInt($_REQUEST['limit']);
$sql .= ' Query = '.dbEscape(jsonEncode($_REQUEST['filter']));
if ( !empty($_REQUEST['AutoArchive']) )
$sql .= ', AutoArchive = '.dbEscape($_REQUEST['AutoArchive']);
if ( !empty($_REQUEST['AutoVideo']) )
$sql .= ', AutoVideo = '.dbEscape($_REQUEST['AutoVideo']);
if ( !empty($_REQUEST['AutoUpload']) )
$sql .= ', AutoUpload = '.dbEscape($_REQUEST['AutoUpload']);
if ( !empty($_REQUEST['AutoEmail']) )
$sql .= ', AutoEmail = '.dbEscape($_REQUEST['AutoEmail']);
if ( !empty($_REQUEST['AutoMessage']) )
$sql .= ', AutoMessage = '.dbEscape($_REQUEST['AutoMessage']);
if ( !empty($_REQUEST['AutoExecute']) && !empty($_REQUEST['AutoExecuteCmd']) )
$sql .= ', AutoExecute = '.dbEscape($_REQUEST['AutoExecute']).", AutoExecuteCmd = ".dbEscape($_REQUEST['AutoExecuteCmd']);
if ( !empty($_REQUEST['AutoDelete']) )
$sql .= ', AutoDelete = '.dbEscape($_REQUEST['AutoDelete']);
if ( !empty($_REQUEST['background']) )
$sql .= ', Background = '.dbEscape($_REQUEST['background']);
if ( !empty($_REQUEST['concurrent']) )
$sql .= ', Concurrent = '.dbEscape($_REQUEST['concurrent']);
$sql .= $endSql;
dbQuery( $sql );
$_REQUEST['filter']['sort_field'] = validStr($_REQUEST['filter']['sort_field']);
$_REQUEST['filter']['sort_asc'] = validStr($_REQUEST['filter']['sort_asc']);
$_REQUEST['filter']['limit'] = validInt($_REQUEST['filter']['limit']);
$sql .= ' Name = '.dbEscape($_REQUEST['filter']['Name']);
$sql .= ', Query = '.dbEscape(jsonEncode($_REQUEST['filter']['terms']));
$sql .= ', AutoArchive = '.(!empty($_REQUEST['filter']['AutoArchive']) ? 1 : 0);
$sql .= ', AutoVideo = '. ( !empty($_REQUEST['filter']['AutoVideo']) ? 1 : 0);
$sql .= ', AutoUpload = '. ( !empty($_REQUEST['filter']['AutoUpload']) ? 1 : 0);
$sql .= ', AutoEmail = '. ( !empty($_REQUEST['filter']['AutoEmail']) ? 1 : 0);
$sql .= ', AutoMessage = '. ( !empty($_REQUEST['filter']['AutoMessage']) ? 1 : 0);
$sql .= ', AutoExecute = '. ( !empty($_REQUEST['filter']['AutoExecute']) ? 1 : 0);
$sql .= ', AutoExecuteCmd = '.dbEscape($_REQUEST['filter']['AutoExecuteCmd']);
$sql .= ', AutoDelete = '. ( !empty($_REQUEST['filter']['AutoDelete']) ? 1 : 0);
$sql .= ', Background = '. ( !empty($_REQUEST['filter']['Background']) ? 1 : 0);
$sql .= ', Concurrent = '. ( !empty($_REQUEST['filter']['Concurrent']) ? 1 : 0);
dbQuery( $sql. $endSql );
if ( $filterName ) {
$filter = dbFetchOne( 'SELECT * FROM Filters WHERE Name=?', NULL, array($filterName) );
if ( $filter ) {
@ -177,11 +172,12 @@ if ( !empty($action) ) {
Error("No new Id despite new name");
}
}
$refreshParent = '/index.php?view=filter&Id='.$_REQUEST['Id'];
}
} // end if canedit events
} // end if action == filter
} // end if canview events
} // end if filterName or endsql
} // end if save or execute
} // end if canEdit(Events)
return;
} // end if object == filter
else {
// Event scope actions, edit permissions required
if ( canEdit( 'Events' ) ) {
@ -212,14 +208,10 @@ if ( !empty($action) ) {
deleteEvent( $markEid );
$refreshParent = true;
}
if ( isset( $_REQUEST['object'] ) and ( $_REQUEST['object'] == 'filter' ) ) {
if ( !empty($_REQUEST['Id']) ) {
dbQuery( 'DELETE FROM Filters WHERE Id=?', array( $_REQUEST['Id'] ) );
//$refreshParent = true;
}
}
}
}
} // end if canEdit(Events)
} // end if filter or something else
} // end canView(Events)
// Monitor control actions, require a monitor id and control view permissions for that monitor
if ( !empty($_REQUEST['mid']) && canView( 'Control', $_REQUEST['mid'] ) ) {

View File

@ -1305,6 +1305,10 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&amp;' ) {
function addFilterTerm( $filter, $position, $term=false ) {
if ( $position < 0 )
$position = 0;
if ( ! isset( $filter['terms'] ) )
$filter['terms'] = array();
elseif( $position > count($filter['terms']) )
$position = count($filter['terms']);
if ( $term && $position == 0 )

View File

@ -10,8 +10,9 @@ table.filterTable {
}
#fieldsTable input[type=button] {
width: 1.6em;
width: 1.8em;
margin-left: 2px;
padding: 5px;
text-align: center;
}
@ -23,3 +24,10 @@ table.filterTable {
margin-left: 4px;
}
#actionsTable p {
text-align: left;
}
#actionsTable label {
width: 300px;
text-align: right;
}

View File

@ -10,8 +10,9 @@ table.filterTable {
}
#fieldsTable input[type=button] {
width: 1.6em;
width: 1.8em;
margin-left: 2px;
padding: 5px;
text-align: center;
}
@ -23,3 +24,10 @@ table.filterTable {
margin-left: 4px;
}
#actionsTable p {
text-align: left;
}
#actionsTable label {
width: 300px;
text-align: right;
}

View File

@ -24,3 +24,10 @@ table.filterTable {
margin-left: 4px;
}
#actionsTable p {
text-align: left;
}
#actionsTable label {
width: 300px;
text-align: right;
}

View File

@ -86,9 +86,12 @@ var $j = jQuery.noConflict();
//]]>
</script>
<script type="text/javascript" src="skins/<?php echo $skin; ?>/views/js/state.js"></script>
<?php if ( $title == 'Login' && (defined('ZM_OPT_USE_GOOG_RECAPTCHA') && ZM_OPT_USE_GOOG_RECAPTCHA) ) { ?>
<?php
if ( $title == 'Login' && (defined('ZM_OPT_USE_GOOG_RECAPTCHA') && ZM_OPT_USE_GOOG_RECAPTCHA) ) {
?>
<script src='https://www.google.com/recaptcha/api.js'></script>
<?php } else if ( $title == 'Event' ) {
<?php
} else if ( $title == 'Event' ) {
?>
<link href="skins/<?php echo $skin ?>/js/video-js.css" rel="stylesheet">
<script src="skins/<?php echo $skin ?>/js/video.js"></script>
@ -137,7 +140,7 @@ var $j = jQuery.noConflict();
?>
</head>
<?php
}
} // end function xhtmlHeaders( $file, $title )
function getNavBarHTML() {
@ -174,7 +177,6 @@ function getNavBarHTML() {
$cycleWidth = $maxWidth;
$cycleHeight = $maxHeight;
$versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':'';
ob_start();
@ -220,10 +222,14 @@ if ( canView( 'Stream' ) && $cycleCount > 1 ) {
?>
<li><?php echo makePopupLink( '?view=cycle&amp;group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), translate('Cycle'), $running ) ?></li>
<li><?php echo makePopupLink( '?view=montage&amp;group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', translate('Montage'), $running ) ?></li>
<?php } ?>
<?php if ( canView('Events') ) { ?>
<?php
}
if ( canView('Events') ) {
?>
<li><?php echo makePopupLink( '?view=montagereview&amp;group='.$cycleGroup, 'zmMontageReview'.$cycleGroup, 'montagereview', translate('MontageReview') ) ?></li>
<?php } ?>
<?php
}
?>
</ul>
<div class="navbar-right">
@ -278,5 +284,5 @@ if ( canView( 'Stream' ) && $cycleCount > 1 ) {
</div> <!-- End .navbar .navbar-default -->
<?php
return( ob_get_clean() );
}
} // end function getNavBarHTML()
?>

View File

@ -37,8 +37,7 @@ var popupSizes = {
'eventdetail': { 'width': 600, 'height': 420 },
'events': { 'width': 960, 'height': 780 },
'export': { 'width': 400, 'height': 340 },
'filter': { 'width': 820, 'height': 360 },
'filtersave': { 'width': 610, 'height': 120 },
'filter': { 'width': 820, 'height': 700 },
'frame': { 'addWidth': 32, 'minWidth': 384, 'addHeight': 100 },
'frames': { 'width': 600, 'height': 600 },
'function': { 'width': 300, 'height': 92 },

View File

@ -37,8 +37,7 @@ var popupSizes = {
'eventdetail': { 'width': 600, 'height': 420 },
'events': { 'width': 960, 'height': 780 },
'export': { 'width': 400, 'height': 340 },
'filter': { 'width': 900, 'height': 600 },
'filtersave': { 'width': 610, 'height': 260 },
'filter': { 'width': 900, 'height': 700 },
'frame': { 'addWidth': 32, 'minWidth': 384, 'addHeight': 100 },
'frames': { 'width': 600, 'height': 600 },
'function': { 'width': 300, 'height': 160 },

View File

@ -37,8 +37,7 @@ var popupSizes = {
'eventdetail': { 'width': 600, 'height': 420 },
'events': { 'width': 1220, 'height': 780 },
'export': { 'width': 400, 'height': 340 },
'filter': { 'width': 900, 'height': 600 },
'filtersave': { 'width': 610, 'height': 260 },
'filter': { 'width': 900, 'height': 700 },
'frame': { 'addWidth': 32, 'minWidth': 384, 'addHeight': 100 },
'frames': { 'width': 600, 'height': 600 },
'function': { 'width': 300, 'height': 160 },

View File

@ -22,7 +22,7 @@
// Use skin.js.php for JavaScript that need pre-processing
//
var popupOptions = "resizable,scrollbars,status=no";
var popupOptions = "resizable,scrollbars,status=no,toolbar=yes";
function checkSize() {
if (window.outerHeight) {

View File

@ -39,14 +39,15 @@ var refreshParent = <?php
if ( ! empty($refreshParent) ) {
if ( $refreshParent == true ) {
echo 'true';
return;
} else if ( $refreshParent ) {
# This is to tell the parent to refresh to a specific URL
echo "'$refreshParent'";
return;
}
}
} else {
echo 'false';
}
} else {
echo 'false';
}
?>;
var focusWindow = <?php echo !empty($focusWindow)?'true':'false' ?>;

View File

@ -22,9 +22,10 @@ if ( !canView( 'Events' ) ) {
$view = 'error';
return;
}
$selectName = 'Id';
require_once 'includes/Filter.php';
$filterNames = array( ''=>translate('ChooseFilter') );
$dbFilter = NULL;
$filter = NULL;
foreach ( dbFetchAll( 'SELECT * FROM Filters ORDER BY Name' ) as $row ) {
$filterNames[$row['Id']] = $row['Name'];
@ -32,37 +33,18 @@ foreach ( dbFetchAll( 'SELECT * FROM Filters ORDER BY Name' ) as $row ) {
$filterNames[$row['Id']] .= '*';
if ( $row['Concurrent'] )
$filterNames[$row['Id']] .= '&';
if ( isset($_REQUEST['Id']) && $_REQUEST['Id'] == $row['Id'] ) {
$dbFilter = $row;
$filter = new Filter( $row );
}
}
if ( ! $filter ) {
$filter = new Filter();
}
$backgroundStr = '';
if ( $dbFilter ) {
if ( $dbFilter['Background'] )
$backgroundStr = '['.strtolower(translate('Background')).']';
if ( $dbFilter['Concurrent'] )
$backgroundStr .= '['.strtolower(translate('Concurrent')).']';
$_REQUEST['filter'] = jsonDecode( $dbFilter['Query'] );
$_REQUEST['sort_field'] = isset($_REQUEST['filter']['sort_field'])?$_REQUEST['filter']['sort_field']:'DateTime';
$_REQUEST['sort_asc'] = isset($_REQUEST['filter']['sort_asc'])?$_REQUEST['filter']['sort_asc']:'1';
$_REQUEST['limit'] = isset($_REQUEST['filter']['limit'])?$_REQUEST['filter']['limit']:'';
unset( $_REQUEST['filter']['sort_field'] );
unset( $_REQUEST['filter']['sort_asc'] );
unset( $_REQUEST['filter']['limit'] );
}
# reload is set when the dropdown is changed.
if ( isset( $_REQUEST['reload'] ) and ! $_REQUEST['reload'] ) {
$dbFilter['AutoArchive'] = isset( $_REQUEST['AutoArchive'] );
$dbFilter['AutoExecute'] = isset( $_REQUEST['AutoExecute'] );
$dbFilter['AutoExecuteCmd'] = $_REQUEST['AutoExecuteCmd'];
$dbFilter['AutoEmail'] = isset( $_REQUEST['AutoEmail'] );
$dbFilter['AutoMessage'] = isset( $_REQUEST['AutoMessage'] );
$dbFilter['AutoUpload'] = isset( $_REQUEST['AutoUpload'] );
$dbFilter['AutoVideo'] = isset( $_REQUEST['AutoVideo'] );
$dbFilter['AutoDelete'] = isset( $_REQUEST['AutoDelete'] );
$dbFilter['Name'] = $_REQUEST['Id'];
if ( isset($_REQUEST['filter']) ) {
$filter->set( $_REQUEST['filter'] );
# Update our filter object with whatever changes we have made before saving
}
$conjunctionTypes = array(
@ -71,8 +53,10 @@ $conjunctionTypes = array(
);
$obracketTypes = array();
$cbracketTypes = array();
if ( isset($_REQUEST['filter']['terms']) ) {
for ( $i = 0; $i <= count($_REQUEST['filter']['terms'])-2; $i++ ) {
$terms = $filter->terms();
if ( count($terms) ) {
for ( $i = 0; $i <= count($terms)-2; $i++ ) {
$obracketTypes[$i] = str_repeat( '(', $i );
$cbracketTypes[$i] = str_repeat( ')', $i );
}
@ -122,10 +106,6 @@ $archiveTypes = array(
'1' => translate('ArchArchived')
);
$weekdays = array();
for ( $i = 0; $i < 7; $i++ ) {
$weekdays[$i] = strftime( '%A', mktime( 12, 0, 0, 1, $i+1, 2001 ) );
}
$sort_fields = array(
'Id' => translate('AttrId'),
@ -147,11 +127,6 @@ $sort_dirns = array(
'0' => translate('SortDesc')
);
if ( empty($_REQUEST['sort_field']) ) {
$_REQUEST['sort_field'] = ZM_WEB_EVENT_SORT_FIELD;
$_REQUEST['sort_asc'] = (ZM_WEB_EVENT_SORT_ORDER == 'asc');
}
$hasCal = file_exists( 'tools/jscalendar/calendar.js' );
$focusWindow = true;
@ -167,22 +142,51 @@ xhtmlHeaders(__FILE__, translate('EventFilter') );
<h2><?php echo translate('EventFilter') ?></h2>
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<form name="selectForm" id="selectForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="filter"/>
<input type="hidden" name="page" value="<?php echo requestVar( 'page' ) ?>"/>
<input type="hidden" name="reload" value="0"/>
<input type="hidden" name="execute" value="0"/>
<hr/>
<div id="filterSelector"><label for="<?php echo 'Id' ?>"><?php echo translate('UseFilter') ?></label>
<?php
if ( count($filterNames) > 1 ) {
echo htmlSelect( 'Id', $filterNames, $filter->Id(), 'this.form.submit();' );
} else {
?><select disabled="disabled"><option><?php echo translate('NoSavedFilters') ?></option></select>
<?php
}
if ( (null !== $filter->Background()) and $filter->Background() )
echo '['.strtolower(translate('Background')).']';
if ( (null !== $filter->Concurrent()) and $filter->Concurrent() )
echo '['.strtolower(translate('Concurrent')).']';
?>
</div>
</form>
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="Id" value="<?php echo $filter->Id() ?>"/>
<input type="hidden" name="action" value=""/>
<input type="hidden" name="subaction" value=""/>
<input type="hidden" name="line" value=""/>
<input type="hidden" name="object" value="filter"/>
<hr/>
<div id="filterSelector"><label for="<?php echo $selectName ?>"><?php echo translate('UseFilter') ?></label><?php if ( count($filterNames) > 1 ) { echo buildSelect( $selectName, $filterNames, "submitToFilter( this, 1 );" ); } else { ?><select disabled="disabled"><option><?php echo translate('NoSavedFilters') ?></option></select><?php } ?><?php echo $backgroundStr ?></div>
<hr/>
<p>
<label for="filter[Name]"><?php echo translate('Name') ?></label><input type="text" id="filter[Name]" name="filter[Name]" value="<?php echo $filter->Name() ?>"/>
</p>
<table id="fieldsTable" class="filterTable" cellspacing="0">
<tbody>
<?php
for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['terms']); $i++ ) {
for ( $i = 0; $i < count($terms); $i++ ) {
$term = $terms[$i];
if ( ! isset( $term['op'] ) )
$term['op'] = '=';
if ( ! isset( $term['attr'] ) )
$term['attr'] = '';
if ( ! isset( $term['val'] ) )
$term['val'] = '';
if ( ! isset( $term['cnj'] ) )
$term['cnj'] = 'and';
if ( ! isset( $term['cbr'] ) )
$term['cbr'] = '';
if ( ! isset( $term['obr'] ) )
$term['obr'] = '';
?>
<tr>
<?php
@ -192,165 +196,200 @@ for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['term
<?php
} else {
?>
<td><?php echo buildSelect( "filter[terms][$i][cnj]", $conjunctionTypes ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][cnj]", $conjunctionTypes, $term['cnj'] ); ?></td>
<?php
}
?>
<td><?php if ( count($_REQUEST['filter']['terms']) > 2 ) { echo buildSelect( "filter[terms][$i][obr]", $obracketTypes ); } else { ?>&nbsp;<?php } ?></td>
<td><?php echo buildSelect( "filter[terms][$i][attr]", $attrTypes, "clearValue( this, $i ); submitToFilter( this, 0 );" ); ?></td>
<td><?php if ( count($terms) > 2 ) { echo htmlSelect( "filter[terms][$i][obr]", $obracketTypes, $term['obr'] ); } else { ?>&nbsp;<?php } ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][attr]", $attrTypes, $term['attr'], "clearValue( this, $i ); submitToFilter( this, 0 );" ); ?></td>
<?php
if ( isset($_REQUEST['filter']['terms'][$i]['attr']) ) {
if ( $_REQUEST['filter']['terms'][$i]['attr'] == 'Archived' ) {
if ( isset($term['attr']) ) {
if ( $term['attr'] == 'Archived' ) {
?>
<td><?php echo translate('OpEq') ?><input type="hidden" name="filter[terms][<?php echo $i ?>][op]" value="="/></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $archiveTypes ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][val]", $archiveTypes, $term['val'] ); ?></td>
<?php
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == 'DateTime' ) {
} elseif ( $term['attr'] == 'DateTime' ) {
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td>
<input name="filter[terms][<?php echo $i ?>][val]" id="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($_REQUEST['filter']['terms'][$i]['val'])?validHtmlStr($_REQUEST['filter']['terms'][$i]['val']):'' ?>"/>
<input name="filter[terms][<?php echo $i ?>][val]" id="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($term['val'])?validHtmlStr($term['val']):'' ?>"/>
<?php if ( $hasCal ) { ?>
<script type="text/javascript">Calendar.setup( { inputField: "filter[terms][<?php echo $i ?>][val]", ifFormat: "%Y-%m-%d %H:%M", showsTime: true, timeFormat: "24", showOthers: true, weekNumbers: false });</script>
<?php } ?>
</td>
<?php
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == 'Date' ) {
} elseif ( $term['attr'] == 'Date' ) {
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td>
<input name="filter[terms][<?php echo $i ?>][val]" id="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($_REQUEST['filter']['terms'][$i]['val'])?validHtmlStr($_REQUEST['filter']['terms'][$i]['val']):'' ?>"/>
<input name="filter[terms][<?php echo $i ?>][val]" id="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($term['val'])?validHtmlStr($term['val']):'' ?>"/>
<?php if ( $hasCal ) { ?>
<script type="text/javascript">Calendar.setup( { inputField: "filter[terms][<?php echo $i ?>][val]", ifFormat: "%Y-%m-%d", showOthers: true, weekNumbers: false });</script>
<?php } ?>
</td>
<?php
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == 'StateId' ) {
} elseif ( $term['attr'] == 'StateId' ) {
$states = array();
foreach ( dbFetchAll( 'SELECT Id,Name FROM States ORDER BY lower(Name) ASC' ) as $state_row ) {
$states[$state_row['Id']] = $state_row['Name'];
}
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $states ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][val]", $states, $term['val'] ); ?></td>
<?php
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == 'Weekday' ) {
} elseif ( $term['attr'] == 'Weekday' ) {
$weekdays = array();
for ( $i = 0; $i < 7; $i++ ) {
$weekdays[$i] = strftime( '%A', mktime( 12, 0, 0, 1, $i+1, 2001 ) );
}
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $weekdays ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][val]", $weekdays, $term['val'] ); ?></td>
<?php
} elseif ( false && $_REQUEST['filter']['terms'][$i]['attr'] == 'MonitorName' ) {
} elseif ( false && $term['attr'] == 'MonitorName' ) {
$monitors = array();
foreach ( dbFetchAll( "select Id,Name from Monitors order by Sequence asc" ) as $monitor ) {
foreach ( dbFetchAll( 'select Id,Name from Monitors order by Sequence asc' ) as $monitor ) {
if ( visibleMonitor( $monitor['Id'] ) ) {
$monitors[$monitor['Name']] = $monitor['Name'];
}
}
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $monitors ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][val]", $monitors, $term['val'] ); ?></td>
<?php
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == 'ServerId' ) {
} elseif ( $term['attr'] == 'ServerId' ) {
$servers = array();
$servers['ZM_SERVER_ID'] = 'Current Server';
foreach ( dbFetchAll( "SELECT Id,Name FROM Servers ORDER BY lower(Name) ASC" ) as $server ) {
$servers[$server['Id']] = $server['Name'];
}
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $servers ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][val]", $servers, $term['val'] ); ?></td>
<?php
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == 'StorageId' ) {
} elseif ( $term['attr'] == 'StorageId' ) {
$storageareas = array();
$storageareas[0] = 'Default ' . ZM_DIR_EVENTS;
foreach ( dbFetchAll( "SELECT Id,Name FROM Storage ORDER BY lower(Name) ASC" ) as $storage ) {
$storageareas[$storage['Id']] = $storage['Name'];
}
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $storageareas ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><?php echo htmlSelect( "filter[terms][$i][val]", $storageareas, $term['val'] ); ?></td>
<?php
} else {
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><input name="filter[terms][<?php echo $i ?>][val]" value="<?php echo $_REQUEST['filter']['terms'][$i]['val'] ?>"/></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><input name="filter[terms][<?php echo $i ?>][val]" value="<?php echo $term['val'] ?>"/></td>
<?php
}
} else {
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><input name="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($_REQUEST['filter']['terms'][$i]['val'])?$_REQUEST['filter']['terms'][$i]['val']:'' ?>"/></td>
<td><?php echo htmlSelect( "filter[terms][$i][op]", $opTypes, $term['op'] ); ?></td>
<td><input name="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($term['val'])?$term['val']:'' ?>"/></td>
<?php
}
?>
<td><?php if ( count($_REQUEST['filter']['terms']) > 2 ) { echo buildSelect( "filter[terms][$i][cbr]", $cbracketTypes ); } else { ?>&nbsp;<?php } ?></td>
<td><input type="button" onclick="addTerm( this, <?php echo $i+1 ?> )" value="+"/><?php if ( $_REQUEST['filter']['terms'] > 1 ) { ?><input type="button" onclick="delTerm( this, <?php echo $i ?> )" value="-"/><?php } ?></td>
<td><?php if ( count($terms) > 2 ) { echo htmlSelect( "filter[terms][$i][cbr]", $cbracketTypes, $term['cbr'] ); } else { ?>&nbsp;<?php } ?></td>
<td>
<input type="button" onclick="addTerm( this, <?php echo $i+1 ?> )" value="+"/>
<?php
if ( count($terms) > 1 ) {
?>
<input type="button" onclick="delTerm( this, <?php echo $i ?> )" value="-"/>
<?php
}
?> </td>
</tr>
<?php
} # end foreach filter
?>
</tbody>
</table>
<?php
if ( count($terms) == 0 ) {
?>
<input type="button" onclick="addTerm( this, 1 )" value="+"/>
<?php
}
?>
<hr/>
<table id="sortTable" class="filterTable" cellspacing="0">
<tbody>
<tr>
<td><label for="sort_field"><?php echo translate('SortBy') ?></label><?php echo buildSelect( 'sort_field', $sort_fields ); ?><?php echo buildSelect( 'sort_asc', $sort_dirns ); ?></td>
<td><label for="limit"><?php echo translate('LimitResultsPre') ?></label><input type="text" size="6" id="limit" name="limit" value="<?php echo isset($_REQUEST['limit'])?validInt($_REQUEST['limit']):"" ?>"/><?php echo translate('LimitResultsPost') ?></td>
<td>
<label for="filter[sort_field]"><?php echo translate('SortBy') ?></label>
<?php echo htmlSelect( 'filter[sort_field]', $sort_fields, $filter->sort_field() ); ?>
<?php echo htmlSelect( 'filter[sort_asc]', $sort_dirns, $filter->sort_asc() ); ?>
</td>
<td>
<label for="filter[limit]"><?php echo translate('LimitResultsPre') ?></label>
<input type="text" id="filter[limit]" name="filter[limit]" value="<?php echo (null !== $filter->limit())?validInt($filter->limit()):'' ?>"/><?php echo translate('LimitResultsPost') ?>
</td>
</tr>
</tbody>
</table>
<hr/>
<table id="actionsTable" class="filterTable" cellspacing="0">
<tbody>
<tr>
<td><?php echo translate('FilterArchiveEvents') ?></td>
<td><input type="checkbox" name="AutoArchive" value="1"<?php if ( !empty($dbFilter['AutoArchive']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr>
<div id="actionsTable" class="filterTable">
<p>
<label><?php echo translate('FilterArchiveEvents') ?></label>
<input type="checkbox" name="filter[AutoArchive]" value="1"<?php if ( !empty($filter->AutoArchive()) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/>
</p>
<?php
if ( ZM_OPT_FFMPEG ) {
?>
<tr>
<td><?php echo translate('FilterVideoEvents') ?></td>
<td><input type="checkbox" name="AutoVideo" value="1"<?php if ( !empty($dbFilter['AutoVideo']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr>
<p>
<label><?php echo translate('FilterVideoEvents') ?></label>
<input type="checkbox" name="filter[AutoVideo]" value="1"<?php if ( !empty($filter->AutoVideo()) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/>
</p>
<?php
}
if ( ZM_OPT_UPLOAD ) {
?>
<tr>
<td><?php echo translate('FilterUploadEvents') ?></td>
<td><input type="checkbox" name="AutoUpload" value="1"<?php if ( !empty($dbFilter['AutoUpload']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr>
<p>
<label><?php echo translate('FilterUploadEvents') ?></label>
<input type="checkbox" name="filter[AutoUpload]" value="1"<?php if ( !empty($filter->AutoUpload()) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/>
</p>
<?php
}
if ( ZM_OPT_EMAIL ) {
?>
<tr>
<td><?php echo translate('FilterEmailEvents') ?></td>
<td><input type="checkbox" name="AutoEmail" value="1"<?php if ( !empty($dbFilter['AutoEmail']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr>
<p>
<label><?php echo translate('FilterEmailEvents') ?></label>
<input type="checkbox" name="filter[AutoEmail]" value="1"<?php if ( !empty($filter->AutoEmail()) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/>
</p>
<?php
}
if ( ZM_OPT_MESSAGE ) {
?>
<tr>
<td><?php echo translate('FilterMessageEvents') ?></td>
<td><input type="checkbox" name="AutoMessage" value="1"<?php if ( !empty($dbFilter['AutoMessage']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr>
<p>
<label><?php echo translate('FilterMessageEvents') ?></label>
<input type="checkbox" name="filter[AutoMessage]" value="1"<?php if ( !empty($filter->AutoMessage()) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/>
</p>
<?php
}
?>
<tr>
<td><?php echo translate('FilterExecuteEvents') ?></td>
<td><input type="checkbox" name="AutoExecute" value="1"<?php if ( !empty($dbFilter['AutoExecute']) ) { ?> checked="checked"<?php } ?>/><input type="text" name="AutoExecuteCmd" value="<?php echo isset($dbFilter['AutoExecuteCmd'])?$dbFilter['AutoExecuteCmd']:"" ?>" size="32" maxlength="255" onchange="updateButtons( this )"/></td>
</tr>
<tr>
<td><?php echo translate('FilterDeleteEvents') ?></td>
<td colspan="2"><input type="checkbox" name="AutoDelete" value="1"<?php if ( !empty($dbFilter['AutoDelete']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr>
</tbody>
</table>
<p>
<label><?php echo translate('FilterExecuteEvents') ?></label>
<input type="checkbox" name="filter[AutoExecute]" value="1"<?php if ( !empty($filter->AutoExecute()) ) { ?> checked="checked"<?php } ?>/>
<input type="text" name="filter[AutoExecuteCmd]" value="<?php echo (null !==$filter->AutoExecuteCmd())?$filter->AutoExecuteCmd():'' ?>" maxlength="255" onchange="updateButtons( this )"/>
</p>
<p>
<label><?php echo translate('FilterDeleteEvents') ?></label>
<input type="checkbox" name="filter[AutoDelete]" value="1"<?php if ( !empty($filter->AutoDelete()) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/>
</p>
<p>
<label for="background"><?php echo translate('BackgroundFilter') ?></label>
<input type="checkbox" id="filter[Background]" name="filter[Background]" value="1"<?php if ( !empty($filter->Background()) ) { ?> checked="checked"<?php } ?>/>
</p>
<p>
<label for="Concurrent"><?php echo translate('ConcurrentFilter') ?></label>
<input type="checkbox" id="filter[Concurrent]" name="filter[Concurrent]" value="1"<?php if ( !empty($filter->Concurrent()) ) { ?> checked="checked"<?php } ?>/>
</p>
</div>
<hr/>
<div id="contentButtons">
<input type="submit" value="<?php echo translate('Submit') ?>" onclick="submitToEvents( this );"/>
@ -360,9 +399,9 @@ if ( canEdit( 'Events' ) ) {
?>
<input type="button" value="<?php echo translate('Save') ?>" onclick="saveFilter( this );"/>
<?php
if ( isset($dbFilter) && $dbFilter['Name'] ) {
if ( $filter->Id() ) {
?>
<input type="button" value="<?php echo translate('Delete') ?>" onclick="deleteFilter( this, '<?php echo $dbFilter['Name'] ?>' );"/>
<input type="button" value="<?php echo translate('Delete') ?>" onclick="deleteFilter( this, '<?php echo $filter->Name() ?>' );"/>
<?php
}
}

View File

@ -1,87 +0,0 @@
<?php
//
// ZoneMinder web filter save view file, $Date$, $Revision$
// Copyright (C) 2001-2008 Philip Coombes
//
// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
if ( !canEdit( 'Events' ) ) {
$view = 'error';
return;
}
$selectName = 'Id';
$newSelectName = 'newFilterName';
foreach ( dbFetchAll( 'SELECT * FROM Filters ORDER BY Name' ) as $row ) {
$filterNames[$row['Id']] = $row['Name'];
if ( $_REQUEST['Id'] == $row['Id'] ) {
$filterData = $row;
}
}
$focusWindow = true;
$filter = $_REQUEST['filter'];
parseFilter( $filter );
xhtmlHeaders(__FILE__, translate('SaveFilter') );
?>
<body>
<div id="page">
<div id="header">
<h2><?php echo translate('SaveFilter') ?></h2>
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="action" value="filter"/>
<?php echo $filter['fields'] ?>
<input type="hidden" name="sort_field" value="<?php echo requestVar( 'sort_field' ) ?>"/>
<input type="hidden" name="sort_asc" value="<?php echo requestVar( 'sort_asc' ) ?>"/>
<input type="hidden" name="limit" value="<?php echo requestVar( 'limit' ) ?>"/>
<input type="hidden" name="AutoArchive" value="<?php echo requestVar( 'AutoArchive' ) ?>"/>
<input type="hidden" name="AutoVideo" value="<?php echo requestVar( 'AutoVideo' ) ?>"/>
<input type="hidden" name="AutoUpload" value="<?php echo requestVar( 'AutoUpload' ) ?>"/>
<input type="hidden" name="AutoEmail" value="<?php echo requestVar( 'AutoEmail' ) ?>"/>
<input type="hidden" name="AutoMessage" value="<?php echo requestVar( 'AutoMessage' ) ?>"/>
<input type="hidden" name="AutoExecute" value="<?php echo requestVar( 'AutoExecute' ) ?>"/>
<input type="hidden" name="AutoExecuteCmd" value="<?php echo requestVar( 'AutoExecuteCmd' ) ?>"/>
<input type="hidden" name="AutoDelete" value="<?php echo requestVar( 'AutoDelete' ) ?>"/>
<input type="hidden" name="Id" value="<?php echo $filterData['Id'] ?>"/>
<?php if ( count($filterNames) ) { ?>
<p>
<label for="<?php echo $selectName ?>"><?php echo translate('SaveAs') ?></label><?php echo buildSelect( $selectName, $filterNames ); ?><label for="<?php echo $newSelectName ?>"><?php echo translate('OrEnterNewName') ?></label><input type="text" size="32" id="<?php echo $newSelectName ?>" name="<?php echo $newSelectName ?>" value="<?php echo requestVar('filterName') ?>"/>
</p>
<?php } else { ?>
<p>
<label for="<?php echo $newSelectName ?>"><?php echo translate('EnterNewFilterName') ?></label><input type="text" id="<?php echo $newSelectName ?>" name="<?php echo $newSelectName ?>" />
</p>
<?php } ?>
<p>
<label for="background"><?php echo translate('BackgroundFilter') ?></label><input type="checkbox" id="background" name="background" value="1"<?php if ( !empty($filterData['Background']) ) { ?> checked="checked"<?php } ?>/>
</p>
<p>
<label for="concurrent"><?php echo translate('ConcurrentFilter') ?></label><input type="checkbox" id="concurrent" name="concurrent" value="1"<?php if ( !empty($filterData['Concurrent']) ) { ?> checked="checked"<?php } ?>/>
</p>
<div id="contentButtons">
<input type="submit" value="<?php echo translate('Save') ?>"<?php if ( !canEdit( 'Events' ) ) { ?> disabled="disabled"<?php } ?>/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
</div>
</form>
</div>
</div>
</body>
</html>

View File

@ -5,19 +5,19 @@ function updateButtons( element ) {
form.elements['executeButton'].disabled = false;
} else {
var canExecute = false;
if ( form.elements['AutoArchive'].checked )
if ( form.elements['filter[AutoArchive]'] && form.elements['filter[AutoArchive]'].checked )
canExecute = true;
else if ( form.elements['AutoVideo'] && form.elements['AutoVideo'].checked )
else if ( form.elements['filter[AutoVideo]'] && form.elements['filter[AutoVideo]'].checked )
canExecute = true;
else if ( form.elements['AutoUpload'] && form.elements['AutoUpload'].checked )
else if ( form.elements['filter[AutoUpload]'] && form.elements['filter[AutoUpload]'].checked )
canExecute = true;
else if ( form.elements['AutoEmail'] && form.elements['AutoEmail'].checked )
else if ( form.elements['filter[AutoEmail]'] && form.elements['filter[AutoEmail]'].checked )
canExecute = true;
else if ( form.elements['AutoMessage'] && form.elements['AutoMessage'].checked )
else if ( form.elements['filter[AutoMessage]'] && form.elements['filter[AutoMessage]'].checked )
canExecute = true;
else if ( form.elements['AutoExecute'].checked && form.elements['AutoExecuteCmd'].value != '' )
else if ( form.elements['filter[AutoExecute]'].checked && form.elements['filter[AutoExecuteCmd]'].value != '' )
canExecute = true;
else if ( form.elements['AutoDelete'].checked )
else if ( form.elements['filter[AutoDelete]'].checked )
canExecute = true;
form.elements['executeButton'].disabled = !canExecute;
}
@ -29,11 +29,11 @@ function clearValue( element, line ) {
val.value = '';
}
function submitToFilter( element, reload ) {
function submitToFilter( element ) {
var form = element.form;
form.target = window.name;
form.view.value = 'filter';
form.reload.value = reload;
form.action = thisUrl + '?view=filter';
form.elements['action'].value = 'submit';
form.submit();
}
@ -41,9 +41,7 @@ function submitToEvents( element ) {
var form = element.form;
if ( validateForm( form ) ) {
form.target = 'zmEvents';
form.view.value = 'events';
form.action.value = '';
form.execute.value = 0;
form.action = thisUrl + '?view=events';
form.submit();
}
}
@ -52,9 +50,8 @@ function executeFilter( element ) {
var form = element.form;
if ( validateForm( form ) ) {
form.target = 'zmEvents';
form.view.value = 'events';
form.action.value = 'filter';
form.execute.value = 1;
form.action = thisUrl + '?view=events';
form.elements['action'].value = 'execute';
form.submit();
}
}
@ -62,19 +59,16 @@ function executeFilter( element ) {
function saveFilter( element ) {
var form = element.form;
var popupName = 'zmEventsFilterSave';
createPopup( thisUrl, popupName, 'filtersave' );
form.target = popupName;
form.view.value = 'filtersave';
form.target = 'zmFilter';
form.elements['action'].value = 'save';
form.action = thisUrl + '?view=filter';
form.submit();
}
function deleteFilter( element, name ) {
if ( confirm( deleteSavedFilterString+" '"+name+"'" ) ) {
var form = element.form;
form.action.value = 'delete';
form.fid.value = name;
form.elements['action'].value = 'delete';
submitToFilter( element, 1 );
}
}
@ -82,20 +76,20 @@ function deleteFilter( element, name ) {
function addTerm( element, line ) {
var form = element.form;
form.target = window.name;
form.view.value = currentView;
form.action.value = 'filter';
form.subaction.value = 'addterm';
form.line.value = line;
form.action = thisUrl + '?view='+currentView;
form.elements['object'].value = 'filter';
form.elements['action'].value = 'addterm';
form.elements['line'].value = line;
form.submit();
}
function delTerm( element, line ) {
var form = element.form;
form.target = window.name;
form.view.value = currentView;
form.action.value = 'filter';
form.subaction.value = 'delterm';
form.line.value = line;
form.action = thisUrl + '?view='+currentView;
form.elements['object'].value = 'filter';
form.elements['action'].value = 'delterm';
form.elements['line'].value = line;
form.submit();
}

View File

@ -1,7 +1,8 @@
var deleteSavedFilterString = "<?php echo translate('DeleteSavedFilter') ?>";
function validateForm( form ) {
<?php
if ( isset ($_REQUEST['filter']) && count($_REQUEST['filter']['terms']) > 2 ) {
if ( isset ($_REQUEST['filter']) && isset($_REQUEST['filter']['terms']) ) {
if ( count($_REQUEST['filter']['terms']) > 2 ) {
?>
var bracket_count = 0;
<?php
@ -22,7 +23,7 @@ for ( $i = 0; $i < count($_REQUEST['filter']['terms']); $i++ ) {
}
?>
<?php
for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['terms']); $i++ ) {
for ( $i = 0; $i < count($_REQUEST['filter']['terms']); $i++ ) {
?>
var val = form.elements['filter[terms][<?php echo $i ?>][val]'];
if ( val.value == '' ) {
@ -31,6 +32,7 @@ for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['term
}
<?php
}
} // end if isset ($_REQUEST['filter']) && isset($_REQUEST['filter']['terms'])
?>
return( true );
}

View File

@ -1,5 +1,5 @@
var logParms = "view=request&request=log&task=query";
var logReq = new Request.JSON( { url: thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: logResponse } );
var logReq = new Request.JSON( { url: thisUrl, method: 'get', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: logResponse } );
var logTimer = undefined;
var logTable = undefined;
@ -75,7 +75,7 @@ function logResponse( respObj ) {
var color = document.defaultView.getComputedStyle(row.tr, null).getPropertyValue('color');
var colorParts = color.match(/^rgb.*\((\d+),\s*(\d+),\s*(\d+)/);
rowOrigColor = '#' + parseInt(colorParts[1]).toString(16) + parseInt(colorParts[2]).toString(16) + parseInt(colorParts[3]).toString(16);
new Fx.Tween( row.tr, { duration: 10000, transition: Fx.Transitions.Sine } ).start( 'color', '#6495ED', rowOrigColor );
//new Fx.Tween( row.tr, { duration: 10000, transition: Fx.Transitions.Sine } ).start( 'color', '#6495ED', rowOrigColor );
}
}
);

View File

@ -35,8 +35,7 @@ xhtmlHeaders(__FILE__, translate('Logout') );
<p>
<input type="submit" value="<?php echo translate('Logout') ?>"/>
<?php
if ( ZM_USER_SELF_EDIT )
{
if ( ZM_USER_SELF_EDIT ) {
?>
<input type="button" value="<?php echo translate('Config') ?>" onclick="createPopup( '?view=user&amp;uid=<?php echo $user['Id'] ?>', 'zmUser', 'user' );"/>
<?php

View File

@ -708,7 +708,7 @@ switch ( $tab ) {
<td>
<select name="monitorIds" size="4" multiple="multiple" onchange="updateLinkedMonitors( this )">
<?php
$monitors = dbFetchAll( "select Id,Name from Monitors order by Sequence asc" );
$monitors = dbFetchAll( 'select Id,Name from Monitors order by Sequence asc' );
if ( !empty($monitor->LinkedMonitors()) )
$monitorIds = array_flip( explode( ',', $monitor->LinkedMonitors()) );
else