Merge branch 'modern' into develop
|
@ -0,0 +1,13 @@
|
||||||
|
; This file is for unifying the coding style for different editors and IDEs.
|
||||||
|
; More information at http://editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.bat]
|
||||||
|
end_of_line = crlf
|
|
@ -0,0 +1,21 @@
|
||||||
|
# User specific & automatically generated files #
|
||||||
|
#################################################
|
||||||
|
/app/Config/database.php
|
||||||
|
/app/tmp
|
||||||
|
/lib/Cake/Console/Templates/skel/tmp/
|
||||||
|
/plugins
|
||||||
|
/vendors
|
||||||
|
/build
|
||||||
|
/dist
|
||||||
|
/tags
|
||||||
|
|
||||||
|
# OS generated files #
|
||||||
|
######################
|
||||||
|
.DS_Store
|
||||||
|
.DS_Store?
|
||||||
|
._*
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
Icon?
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
|
@ -0,0 +1,5 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteRule ^$ app/webroot/ [L]
|
||||||
|
RewriteRule (.*) app/webroot/$1 [L]
|
||||||
|
</IfModule>
|
|
@ -0,0 +1,116 @@
|
||||||
|
language: php
|
||||||
|
|
||||||
|
php:
|
||||||
|
- 5.2
|
||||||
|
- 5.3
|
||||||
|
- 5.4
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DB=mysql
|
||||||
|
- DB=pgsql
|
||||||
|
- DB=sqlite
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- php: 5.4
|
||||||
|
env:
|
||||||
|
- PHPCS=1
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
|
||||||
|
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test2;'; fi"
|
||||||
|
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test3;'; fi"
|
||||||
|
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
|
||||||
|
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi"
|
||||||
|
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi"
|
||||||
|
- chmod -R 777 ./app/tmp
|
||||||
|
- sudo apt-get install lighttpd
|
||||||
|
- pear channel-discover pear.cakephp.org
|
||||||
|
- pear install --alldeps cakephp/CakePHP_CodeSniffer
|
||||||
|
- phpenv rehash
|
||||||
|
- set +H
|
||||||
|
- echo "<?php
|
||||||
|
class DATABASE_CONFIG {
|
||||||
|
private \$identities = array(
|
||||||
|
'mysql' => array(
|
||||||
|
'datasource' => 'Database/Mysql',
|
||||||
|
'host' => '0.0.0.0',
|
||||||
|
'login' => 'travis'
|
||||||
|
),
|
||||||
|
'pgsql' => array(
|
||||||
|
'datasource' => 'Database/Postgres',
|
||||||
|
'host' => '127.0.0.1',
|
||||||
|
'login' => 'postgres',
|
||||||
|
'database' => 'cakephp_test',
|
||||||
|
'schema' => array(
|
||||||
|
'default' => 'public',
|
||||||
|
'test' => 'public',
|
||||||
|
'test2' => 'test2',
|
||||||
|
'test_database_three' => 'test3'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'sqlite' => array(
|
||||||
|
'datasource' => 'Database/Sqlite',
|
||||||
|
'database' => array(
|
||||||
|
'default' => ':memory:',
|
||||||
|
'test' => ':memory:',
|
||||||
|
'test2' => '/tmp/cakephp_test2.db',
|
||||||
|
'test_database_three' => '/tmp/cakephp_test3.db'
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
public \$default = array(
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => '',
|
||||||
|
'login' => '',
|
||||||
|
'password' => '',
|
||||||
|
'database' => 'cakephp_test',
|
||||||
|
'prefix' => ''
|
||||||
|
);
|
||||||
|
public \$test = array(
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => '',
|
||||||
|
'login' => '',
|
||||||
|
'password' => '',
|
||||||
|
'database' => 'cakephp_test',
|
||||||
|
'prefix' => ''
|
||||||
|
);
|
||||||
|
public \$test2 = array(
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => '',
|
||||||
|
'login' => '',
|
||||||
|
'password' => '',
|
||||||
|
'database' => 'cakephp_test2',
|
||||||
|
'prefix' => ''
|
||||||
|
);
|
||||||
|
public \$test_database_three = array(
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => '',
|
||||||
|
'login' => '',
|
||||||
|
'password' => '',
|
||||||
|
'database' => 'cakephp_test3',
|
||||||
|
'prefix' => ''
|
||||||
|
);
|
||||||
|
public function __construct() {
|
||||||
|
\$db = 'mysql';
|
||||||
|
if (!empty(\$_SERVER['DB'])) {
|
||||||
|
\$db = \$_SERVER['DB'];
|
||||||
|
}
|
||||||
|
foreach (array('default', 'test', 'test2', 'test_database_three') as \$source) {
|
||||||
|
\$config = array_merge(\$this->{\$source}, \$this->identities[\$db]);
|
||||||
|
if (is_array(\$config['database'])) {
|
||||||
|
\$config['database'] = \$config['database'][\$source];
|
||||||
|
}
|
||||||
|
if (!empty(\$config['schema']) && is_array(\$config['schema'])) {
|
||||||
|
\$config['schema'] = \$config['schema'][\$source];
|
||||||
|
}
|
||||||
|
\$this->{\$source} = \$config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}" > app/Config/database.php
|
||||||
|
|
||||||
|
script:
|
||||||
|
- sh -c "if [ '$PHPCS' != '1' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; else phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; fi"
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
|
@ -1,35 +0,0 @@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
|
|
||||||
# This should be set to your web directory
|
|
||||||
webdir = @WEB_PREFIX@
|
|
||||||
# And these to the user and group of your webserver
|
|
||||||
webuser = @WEB_USER@
|
|
||||||
webgroup = @WEB_GROUP@
|
|
||||||
|
|
||||||
SUBDIRS = \
|
|
||||||
ajax \
|
|
||||||
css \
|
|
||||||
graphics \
|
|
||||||
includes \
|
|
||||||
js \
|
|
||||||
lang \
|
|
||||||
skins \
|
|
||||||
tools \
|
|
||||||
views
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
index.php
|
|
||||||
|
|
||||||
# Yes, you are correct. This is a HACK!
|
|
||||||
install-data-hook:
|
|
||||||
( cd $(DESTDIR)$(webdir); chown $(webuser):$(webgroup) $(dist_web_DATA) )
|
|
||||||
( cd $(DESTDIR)$(webdir); chown -R $(webuser):$(webgroup) $(SUBDIRS) )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e events; then mkdir events; fi; chown $(webuser):$(webgroup) events; chmod u+w events )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e images; then mkdir images; fi; chown $(webuser):$(webgroup) images; chmod u+w images )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e sounds; then mkdir sounds; fi; chown $(webuser):$(webgroup) sounds; chmod u+w sounds )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e tools; then mkdir tools; fi; chown $(webuser):$(webgroup) tools; chmod u+w tools )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e temp; then mkdir temp; fi; chown $(webuser):$(webgroup) temp; chmod u+w temp )
|
|
||||||
|
|
||||||
uninstall-hook:
|
|
||||||
@-( cd $(DESTDIR)$(webdir); rm -rf $(SUBDIRS) )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); rm -rf events images sounds tools temp )
|
|
654
web/Makefile.in
|
@ -1,654 +0,0 @@
|
||||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
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 = :
|
|
||||||
subdir = web
|
|
||||||
DIST_COMMON = $(dist_web_DATA) $(srcdir)/Makefile.am \
|
|
||||||
$(srcdir)/Makefile.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
|
||||||
html-recursive info-recursive install-data-recursive \
|
|
||||||
install-dvi-recursive install-exec-recursive \
|
|
||||||
install-html-recursive install-info-recursive \
|
|
||||||
install-pdf-recursive install-ps-recursive install-recursive \
|
|
||||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
|
||||||
ps-recursive uninstall-recursive
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__installdirs = "$(DESTDIR)$(webdir)"
|
|
||||||
DATA = $(dist_web_DATA)
|
|
||||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
|
||||||
distclean-recursive maintainer-clean-recursive
|
|
||||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
|
||||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
|
||||||
distdir
|
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
am__relativize = \
|
|
||||||
dir0=`pwd`; \
|
|
||||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
|
||||||
sed_rest='s,^[^/]*/*,,'; \
|
|
||||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
|
||||||
sed_butlast='s,/*[^/]*$$,,'; \
|
|
||||||
while test -n "$$dir1"; do \
|
|
||||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
|
||||||
if test "$$first" != "."; then \
|
|
||||||
if test "$$first" = ".."; then \
|
|
||||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
|
||||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
|
||||||
else \
|
|
||||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
|
||||||
if test "$$first2" = "$$first"; then \
|
|
||||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
|
||||||
else \
|
|
||||||
dir2="../$$dir2"; \
|
|
||||||
fi; \
|
|
||||||
dir0="$$dir0"/"$$first"; \
|
|
||||||
fi; \
|
|
||||||
fi; \
|
|
||||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
|
||||||
done; \
|
|
||||||
reldir="$$dir2"
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
BINDIR = @BINDIR@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CGI_PREFIX = @CGI_PREFIX@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CXX = @CXX@
|
|
||||||
CXXCPP = @CXXCPP@
|
|
||||||
CXXDEPMODE = @CXXDEPMODE@
|
|
||||||
CXXFLAGS = @CXXFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
ENABLE_MMAP = @ENABLE_MMAP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
EXTRA_LIBS = @EXTRA_LIBS@
|
|
||||||
EXTRA_PERL_LIB = @EXTRA_PERL_LIB@
|
|
||||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
|
||||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
|
||||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
|
||||||
GREP = @GREP@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBDIR = @LIBDIR@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIB_ARCH = @LIB_ARCH@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
|
||||||
MYSQL_LIBS = @MYSQL_LIBS@
|
|
||||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
OPT_FFMPEG = @OPT_FFMPEG@
|
|
||||||
OPT_NETPBM = @OPT_NETPBM@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_BUILD = @PATH_BUILD@
|
|
||||||
PATH_FFMPEG = @PATH_FFMPEG@
|
|
||||||
PATH_NETPBM = @PATH_NETPBM@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
PERL = @PERL@
|
|
||||||
PERL_MM_PARMS = @PERL_MM_PARMS@
|
|
||||||
POW_LIB = @POW_LIB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
SYSCONFDIR = @SYSCONFDIR@
|
|
||||||
TIME_BUILD = @TIME_BUILD@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
WEB_GROUP = @WEB_GROUP@
|
|
||||||
WEB_HOST = @WEB_HOST@
|
|
||||||
WEB_PREFIX = @WEB_PREFIX@
|
|
||||||
WEB_USER = @WEB_USER@
|
|
||||||
ZM_CONFIG = @ZM_CONFIG@
|
|
||||||
ZM_DB_HOST = @ZM_DB_HOST@
|
|
||||||
ZM_DB_NAME = @ZM_DB_NAME@
|
|
||||||
ZM_DB_PASS = @ZM_DB_PASS@
|
|
||||||
ZM_DB_USER = @ZM_DB_USER@
|
|
||||||
ZM_HAS_GNUTLS = @ZM_HAS_GNUTLS@
|
|
||||||
ZM_HAS_GNUTLS_OPENSSL = @ZM_HAS_GNUTLS_OPENSSL@
|
|
||||||
ZM_HAS_V4L = @ZM_HAS_V4L@
|
|
||||||
ZM_HAS_V4L1 = @ZM_HAS_V4L1@
|
|
||||||
ZM_HAS_V4L2 = @ZM_HAS_V4L2@
|
|
||||||
ZM_LOGDIR = @ZM_LOGDIR@
|
|
||||||
ZM_MYSQL_ENGINE = @ZM_MYSQL_ENGINE@
|
|
||||||
ZM_PCRE = @ZM_PCRE@
|
|
||||||
ZM_PID = @ZM_PID@
|
|
||||||
ZM_RUNDIR = @ZM_RUNDIR@
|
|
||||||
ZM_SSL_LIB = @ZM_SSL_LIB@
|
|
||||||
ZM_TMPDIR = @ZM_TMPDIR@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
bindir = @bindir@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
|
|
||||||
# This should be set to your web directory
|
|
||||||
webdir = @WEB_PREFIX@
|
|
||||||
# And these to the user and group of your webserver
|
|
||||||
webuser = @WEB_USER@
|
|
||||||
webgroup = @WEB_GROUP@
|
|
||||||
SUBDIRS = \
|
|
||||||
ajax \
|
|
||||||
css \
|
|
||||||
graphics \
|
|
||||||
includes \
|
|
||||||
js \
|
|
||||||
lang \
|
|
||||||
skins \
|
|
||||||
tools \
|
|
||||||
views
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
index.php
|
|
||||||
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
||||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu web/Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu web/Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: $(am__configure_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
install-dist_webDATA: $(dist_web_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
test -z "$(webdir)" || $(MKDIR_P) "$(DESTDIR)$(webdir)"
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webdir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(webdir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-dist_webDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
test -n "$$files" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(webdir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(webdir)" && rm -f $$files
|
|
||||||
|
|
||||||
# This directory's subdirectories are mostly independent; you can cd
|
|
||||||
# into them and run `make' without going through this Makefile.
|
|
||||||
# To change the values of `make' variables: instead of editing Makefiles,
|
|
||||||
# (1) if the variable is set in `config.status', edit `config.status'
|
|
||||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
|
||||||
# (2) otherwise, pass the desired values on the `make' command line.
|
|
||||||
$(RECURSIVE_TARGETS):
|
|
||||||
@fail= failcom='exit 1'; \
|
|
||||||
for f in x $$MAKEFLAGS; do \
|
|
||||||
case $$f in \
|
|
||||||
*=* | --[!k]*);; \
|
|
||||||
*k*) failcom='fail=yes';; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
dot_seen=no; \
|
|
||||||
target=`echo $@ | sed s/-recursive//`; \
|
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
echo "Making $$target in $$subdir"; \
|
|
||||||
if test "$$subdir" = "."; then \
|
|
||||||
dot_seen=yes; \
|
|
||||||
local_target="$$target-am"; \
|
|
||||||
else \
|
|
||||||
local_target="$$target"; \
|
|
||||||
fi; \
|
|
||||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
|
||||||
|| eval $$failcom; \
|
|
||||||
done; \
|
|
||||||
if test "$$dot_seen" = "no"; then \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
|
||||||
fi; test -z "$$fail"
|
|
||||||
|
|
||||||
$(RECURSIVE_CLEAN_TARGETS):
|
|
||||||
@fail= failcom='exit 1'; \
|
|
||||||
for f in x $$MAKEFLAGS; do \
|
|
||||||
case $$f in \
|
|
||||||
*=* | --[!k]*);; \
|
|
||||||
*k*) failcom='fail=yes';; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
dot_seen=no; \
|
|
||||||
case "$@" in \
|
|
||||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
|
||||||
*) list='$(SUBDIRS)' ;; \
|
|
||||||
esac; \
|
|
||||||
rev=''; for subdir in $$list; do \
|
|
||||||
if test "$$subdir" = "."; then :; else \
|
|
||||||
rev="$$subdir $$rev"; \
|
|
||||||
fi; \
|
|
||||||
done; \
|
|
||||||
rev="$$rev ."; \
|
|
||||||
target=`echo $@ | sed s/-recursive//`; \
|
|
||||||
for subdir in $$rev; do \
|
|
||||||
echo "Making $$target in $$subdir"; \
|
|
||||||
if test "$$subdir" = "."; then \
|
|
||||||
local_target="$$target-am"; \
|
|
||||||
else \
|
|
||||||
local_target="$$target"; \
|
|
||||||
fi; \
|
|
||||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
|
||||||
|| eval $$failcom; \
|
|
||||||
done && test -z "$$fail"
|
|
||||||
tags-recursive:
|
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
|
||||||
done
|
|
||||||
ctags-recursive:
|
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
|
||||||
done
|
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|
||||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
|
||||||
unique=`for i in $$list; do \
|
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
|
||||||
done | \
|
|
||||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
|
||||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
|
||||||
mkid -fID $$unique
|
|
||||||
tags: TAGS
|
|
||||||
|
|
||||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|
||||||
$(TAGS_FILES) $(LISP)
|
|
||||||
set x; \
|
|
||||||
here=`pwd`; \
|
|
||||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
|
||||||
include_option=--etags-include; \
|
|
||||||
empty_fix=.; \
|
|
||||||
else \
|
|
||||||
include_option=--include; \
|
|
||||||
empty_fix=; \
|
|
||||||
fi; \
|
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
if test "$$subdir" = .; then :; else \
|
|
||||||
test ! -f $$subdir/TAGS || \
|
|
||||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
|
||||||
fi; \
|
|
||||||
done; \
|
|
||||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
|
||||||
unique=`for i in $$list; do \
|
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
|
||||||
done | \
|
|
||||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
|
||||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
|
||||||
shift; \
|
|
||||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
|
||||||
test -n "$$unique" || unique=$$empty_fix; \
|
|
||||||
if test $$# -gt 0; then \
|
|
||||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
|
||||||
"$$@" $$unique; \
|
|
||||||
else \
|
|
||||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
|
||||||
$$unique; \
|
|
||||||
fi; \
|
|
||||||
fi
|
|
||||||
ctags: CTAGS
|
|
||||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|
||||||
$(TAGS_FILES) $(LISP)
|
|
||||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
|
||||||
unique=`for i in $$list; do \
|
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
|
||||||
done | \
|
|
||||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
|
||||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
|
||||||
test -z "$(CTAGS_ARGS)$$unique" \
|
|
||||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
|
||||||
$$unique
|
|
||||||
|
|
||||||
GTAGS:
|
|
||||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
|
||||||
&& $(am__cd) $(top_srcdir) \
|
|
||||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
|
||||||
|
|
||||||
distclean-tags:
|
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
else \
|
|
||||||
test -f "$(distdir)/$$file" \
|
|
||||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
|
||||||
|| exit 1; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
if test "$$subdir" = .; then :; else \
|
|
||||||
test -d "$(distdir)/$$subdir" \
|
|
||||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
|
||||||
|| exit 1; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
if test "$$subdir" = .; then :; else \
|
|
||||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
|
||||||
$(am__relativize); \
|
|
||||||
new_distdir=$$reldir; \
|
|
||||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
|
||||||
$(am__relativize); \
|
|
||||||
new_top_distdir=$$reldir; \
|
|
||||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
|
||||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
|
||||||
($(am__cd) $$subdir && \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) \
|
|
||||||
top_distdir="$$new_top_distdir" \
|
|
||||||
distdir="$$new_distdir" \
|
|
||||||
am__remove_distdir=: \
|
|
||||||
am__skip_length_check=: \
|
|
||||||
am__skip_mode_fix=: \
|
|
||||||
distdir) \
|
|
||||||
|| exit 1; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
check-am: all-am
|
|
||||||
check: check-recursive
|
|
||||||
all-am: Makefile $(DATA)
|
|
||||||
installdirs: installdirs-recursive
|
|
||||||
installdirs-am:
|
|
||||||
for dir in "$(DESTDIR)$(webdir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
install: install-recursive
|
|
||||||
install-exec: install-exec-recursive
|
|
||||||
install-data: install-data-recursive
|
|
||||||
uninstall: uninstall-recursive
|
|
||||||
|
|
||||||
install-am: all-am
|
|
||||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
|
||||||
|
|
||||||
installcheck: installcheck-recursive
|
|
||||||
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:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive
|
|
||||||
|
|
||||||
clean-am: clean-generic mostlyclean-am
|
|
||||||
|
|
||||||
distclean: distclean-recursive
|
|
||||||
-rm -f Makefile
|
|
||||||
distclean-am: clean-am distclean-generic distclean-tags
|
|
||||||
|
|
||||||
dvi: dvi-recursive
|
|
||||||
|
|
||||||
dvi-am:
|
|
||||||
|
|
||||||
html: html-recursive
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-recursive
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-dist_webDATA
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
|
||||||
install-dvi: install-dvi-recursive
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-html: install-html-recursive
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-recursive
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-recursive
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-recursive
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
installcheck-am:
|
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-recursive
|
|
||||||
-rm -f Makefile
|
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
|
||||||
|
|
||||||
mostlyclean: mostlyclean-recursive
|
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-generic
|
|
||||||
|
|
||||||
pdf: pdf-recursive
|
|
||||||
|
|
||||||
pdf-am:
|
|
||||||
|
|
||||||
ps: ps-recursive
|
|
||||||
|
|
||||||
ps-am:
|
|
||||||
|
|
||||||
uninstall-am: uninstall-dist_webDATA
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
|
|
||||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
|
||||||
install-am install-data-am install-strip tags-recursive \
|
|
||||||
uninstall-am
|
|
||||||
|
|
||||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
|
||||||
all all-am check check-am clean clean-generic ctags \
|
|
||||||
ctags-recursive distclean distclean-generic distclean-tags \
|
|
||||||
distdir dvi dvi-am html html-am info info-am install \
|
|
||||||
install-am install-data install-data-am install-data-hook \
|
|
||||||
install-dist_webDATA install-dvi install-dvi-am install-exec \
|
|
||||||
install-exec-am install-html install-html-am install-info \
|
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
|
||||||
install-ps install-ps-am install-strip installcheck \
|
|
||||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
|
||||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
|
||||||
uninstall-dist_webDATA uninstall-hook
|
|
||||||
|
|
||||||
|
|
||||||
# Yes, you are correct. This is a HACK!
|
|
||||||
install-data-hook:
|
|
||||||
( cd $(DESTDIR)$(webdir); chown $(webuser):$(webgroup) $(dist_web_DATA) )
|
|
||||||
( cd $(DESTDIR)$(webdir); chown -R $(webuser):$(webgroup) $(SUBDIRS) )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e events; then mkdir events; fi; chown $(webuser):$(webgroup) events; chmod u+w events )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e images; then mkdir images; fi; chown $(webuser):$(webgroup) images; chmod u+w images )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e sounds; then mkdir sounds; fi; chown $(webuser):$(webgroup) sounds; chmod u+w sounds )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e tools; then mkdir tools; fi; chown $(webuser):$(webgroup) tools; chmod u+w tools )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); if ! test -e temp; then mkdir temp; fi; chown $(webuser):$(webgroup) temp; chmod u+w temp )
|
|
||||||
|
|
||||||
uninstall-hook:
|
|
||||||
@-( cd $(DESTDIR)$(webdir); rm -rf $(SUBDIRS) )
|
|
||||||
@-( cd $(DESTDIR)$(webdir); rm -rf events images sounds tools temp )
|
|
||||||
|
|
||||||
# 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:
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Modern ZoneMinder Skin
|
||||||
|
=======
|
|
@ -1,12 +0,0 @@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
|
|
||||||
webdir = @WEB_PREFIX@/ajax
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
alarm.php \
|
|
||||||
control.php \
|
|
||||||
event.php \
|
|
||||||
log.php \
|
|
||||||
status.php \
|
|
||||||
stream.php \
|
|
||||||
zone.php
|
|
|
@ -1,425 +0,0 @@
|
||||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
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 = :
|
|
||||||
subdir = web/ajax
|
|
||||||
DIST_COMMON = $(dist_web_DATA) $(srcdir)/Makefile.am \
|
|
||||||
$(srcdir)/Makefile.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__installdirs = "$(DESTDIR)$(webdir)"
|
|
||||||
DATA = $(dist_web_DATA)
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
BINDIR = @BINDIR@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CGI_PREFIX = @CGI_PREFIX@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CXX = @CXX@
|
|
||||||
CXXCPP = @CXXCPP@
|
|
||||||
CXXDEPMODE = @CXXDEPMODE@
|
|
||||||
CXXFLAGS = @CXXFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
ENABLE_MMAP = @ENABLE_MMAP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
EXTRA_LIBS = @EXTRA_LIBS@
|
|
||||||
EXTRA_PERL_LIB = @EXTRA_PERL_LIB@
|
|
||||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
|
||||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
|
||||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
|
||||||
GREP = @GREP@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBDIR = @LIBDIR@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIB_ARCH = @LIB_ARCH@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
|
||||||
MYSQL_LIBS = @MYSQL_LIBS@
|
|
||||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
OPT_FFMPEG = @OPT_FFMPEG@
|
|
||||||
OPT_NETPBM = @OPT_NETPBM@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_BUILD = @PATH_BUILD@
|
|
||||||
PATH_FFMPEG = @PATH_FFMPEG@
|
|
||||||
PATH_NETPBM = @PATH_NETPBM@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
PERL = @PERL@
|
|
||||||
PERL_MM_PARMS = @PERL_MM_PARMS@
|
|
||||||
POW_LIB = @POW_LIB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
SYSCONFDIR = @SYSCONFDIR@
|
|
||||||
TIME_BUILD = @TIME_BUILD@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
WEB_GROUP = @WEB_GROUP@
|
|
||||||
WEB_HOST = @WEB_HOST@
|
|
||||||
WEB_PREFIX = @WEB_PREFIX@
|
|
||||||
WEB_USER = @WEB_USER@
|
|
||||||
ZM_CONFIG = @ZM_CONFIG@
|
|
||||||
ZM_DB_HOST = @ZM_DB_HOST@
|
|
||||||
ZM_DB_NAME = @ZM_DB_NAME@
|
|
||||||
ZM_DB_PASS = @ZM_DB_PASS@
|
|
||||||
ZM_DB_USER = @ZM_DB_USER@
|
|
||||||
ZM_HAS_GNUTLS = @ZM_HAS_GNUTLS@
|
|
||||||
ZM_HAS_GNUTLS_OPENSSL = @ZM_HAS_GNUTLS_OPENSSL@
|
|
||||||
ZM_HAS_V4L = @ZM_HAS_V4L@
|
|
||||||
ZM_HAS_V4L1 = @ZM_HAS_V4L1@
|
|
||||||
ZM_HAS_V4L2 = @ZM_HAS_V4L2@
|
|
||||||
ZM_LOGDIR = @ZM_LOGDIR@
|
|
||||||
ZM_MYSQL_ENGINE = @ZM_MYSQL_ENGINE@
|
|
||||||
ZM_PCRE = @ZM_PCRE@
|
|
||||||
ZM_PID = @ZM_PID@
|
|
||||||
ZM_RUNDIR = @ZM_RUNDIR@
|
|
||||||
ZM_SSL_LIB = @ZM_SSL_LIB@
|
|
||||||
ZM_TMPDIR = @ZM_TMPDIR@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
bindir = @bindir@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
webdir = @WEB_PREFIX@/ajax
|
|
||||||
dist_web_DATA = \
|
|
||||||
alarm.php \
|
|
||||||
control.php \
|
|
||||||
event.php \
|
|
||||||
log.php \
|
|
||||||
status.php \
|
|
||||||
stream.php \
|
|
||||||
zone.php
|
|
||||||
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
||||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu web/ajax/Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu web/ajax/Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: $(am__configure_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
install-dist_webDATA: $(dist_web_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
test -z "$(webdir)" || $(MKDIR_P) "$(DESTDIR)$(webdir)"
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webdir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(webdir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-dist_webDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
test -n "$$files" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(webdir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(webdir)" && rm -f $$files
|
|
||||||
tags: TAGS
|
|
||||||
TAGS:
|
|
||||||
|
|
||||||
ctags: CTAGS
|
|
||||||
CTAGS:
|
|
||||||
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$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:
|
|
||||||
for dir in "$(DESTDIR)$(webdir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
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:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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:
|
|
||||||
|
|
||||||
html: html-am
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-dist_webDATA
|
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-html: install-html-am
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-am
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
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-dist_webDATA
|
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
|
||||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
|
||||||
install install-am install-data install-data-am \
|
|
||||||
install-dist_webDATA install-dvi install-dvi-am install-exec \
|
|
||||||
install-exec-am install-html install-html-am install-info \
|
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
|
||||||
install-ps install-ps-am install-strip installcheck \
|
|
||||||
installcheck-am installdirs maintainer-clean \
|
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
|
||||||
pdf-am ps ps-am uninstall uninstall-am uninstall-dist_webDATA
|
|
||||||
|
|
||||||
|
|
||||||
# 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:
|
|
|
@ -1,42 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
define( "MSG_TIMEOUT", 2.0 );
|
|
||||||
define( "MSG_DATA_SIZE", 4+256 );
|
|
||||||
|
|
||||||
if ( canEdit( 'Monitors' ) )
|
|
||||||
{
|
|
||||||
$zmuCommand = getZmuCommand( " -m ".validInt($_REQUEST['id']) );
|
|
||||||
|
|
||||||
switch ( validJsStr($_REQUEST['command']) )
|
|
||||||
{
|
|
||||||
case "disableAlarms" :
|
|
||||||
{
|
|
||||||
$zmuCommand .= " -n";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "enableAlarms" :
|
|
||||||
{
|
|
||||||
$zmuCommand .= " -c";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "forceAlarm" :
|
|
||||||
{
|
|
||||||
$zmuCommand .= " -a";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "cancelForcedAlarm" :
|
|
||||||
{
|
|
||||||
$zmuCommand .= " -c";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
{
|
|
||||||
ajaxError( "Unexpected command '".validJsStr($_REQUEST['command'])."'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ajaxResponse( exec( escapeshellcmd( $zmuCommand ) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?php
|
|
||||||
require_once( 'includes/control_functions.php' );
|
|
||||||
|
|
||||||
// Monitor control actions, require a monitor id and control view permissions for that monitor
|
|
||||||
if ( empty($_REQUEST['id']) )
|
|
||||||
ajaxError( "No monitor id supplied" );
|
|
||||||
|
|
||||||
if ( canView( 'Control', $_REQUEST['id'] ) )
|
|
||||||
{
|
|
||||||
$monitor = dbFetchOne( "select C.*,M.* from Monitors as M inner join Controls as C on (M.ControlId = C.Id ) where M.Id = '".dbEscape($_REQUEST['id'])."'" );
|
|
||||||
|
|
||||||
$ctrlCommand = buildControlCommand( $monitor );
|
|
||||||
|
|
||||||
if ( $ctrlCommand )
|
|
||||||
{
|
|
||||||
$socket = socket_create( AF_UNIX, SOCK_STREAM, 0 );
|
|
||||||
if ( !$socket )
|
|
||||||
ajaxError( "socket_create() failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
|
|
||||||
$sock_file = ZM_PATH_SOCKS.'/zmcontrol-'.$monitor['Id'].'.sock';
|
|
||||||
if ( @socket_connect( $socket, $sock_file ) )
|
|
||||||
{
|
|
||||||
$options = array();
|
|
||||||
foreach ( explode( " ", $ctrlCommand ) as $option )
|
|
||||||
{
|
|
||||||
if ( preg_match( '/--([^=]+)(?:=(.+))?/', $option, $matches ) )
|
|
||||||
{
|
|
||||||
$options[$matches[1]] = !empty($matches[2])?$matches[2]:1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$option_string = jsonEncode( $options );
|
|
||||||
if ( !socket_write( $socket, $option_string ) )
|
|
||||||
ajaxError( "socket_write() failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
ajaxResponse( 'Used socket' );
|
|
||||||
//socket_close( $socket );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --id=".$monitor['Id'];
|
|
||||||
|
|
||||||
// Can't connect so use script
|
|
||||||
$ctrlStatus = '';
|
|
||||||
$ctrlOutput = array();
|
|
||||||
exec( escapeshellcmd( $ctrlCommand ), $ctrlOutput, $ctrlStatus );
|
|
||||||
if ( $ctrlStatus )
|
|
||||||
ajaxError( $ctrlCommand.'=>'.join( ' // ', $ctrlOutput ) );
|
|
||||||
ajaxResponse( 'Used script' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ajaxError( "No command received" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
function ajaxCleanup()
|
|
||||||
{
|
|
||||||
global $socket;
|
|
||||||
if ( !empty( $socket ) )
|
|
||||||
@socket_close( $socket );
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -1,124 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if ( empty($_REQUEST['id']) && empty($_REQUEST['eids']) )
|
|
||||||
{
|
|
||||||
ajaxError( "No event id(s) supplied" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( canView( 'Events' ) )
|
|
||||||
{
|
|
||||||
switch ( $_REQUEST['action'] )
|
|
||||||
{
|
|
||||||
case "video" :
|
|
||||||
{
|
|
||||||
if ( empty($_REQUEST['videoFormat']) )
|
|
||||||
{
|
|
||||||
ajaxError( "Video Generation Failure, no format given" );
|
|
||||||
}
|
|
||||||
elseif ( empty($_REQUEST['rate']) )
|
|
||||||
{
|
|
||||||
ajaxError( "Video Generation Failure, no rate given" );
|
|
||||||
}
|
|
||||||
elseif ( empty($_REQUEST['scale']) )
|
|
||||||
{
|
|
||||||
ajaxError( "Video Generation Failure, no scale given" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sql = "select E.*,M.Name as MonitorName,M.DefaultRate,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = ".dbEscape($_REQUEST['id']).monitorLimitSql();
|
|
||||||
if ( !($event = dbFetchOne( $sql )) )
|
|
||||||
ajaxError( "Video Generation Failure, can't load event" );
|
|
||||||
else
|
|
||||||
if ( $videoFile = createVideo( $event, $_REQUEST['videoFormat'], $_REQUEST['rate'], $_REQUEST['scale'], !empty($_REQUEST['overwrite']) ) )
|
|
||||||
ajaxResponse( array( 'response'=>$videoFile ) );
|
|
||||||
else
|
|
||||||
ajaxError( "Video Generation Failed" );
|
|
||||||
}
|
|
||||||
$ok = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'deleteVideo' :
|
|
||||||
{
|
|
||||||
unlink( $videoFiles[$_REQUEST['id']] );
|
|
||||||
unset( $videoFiles[$_REQUEST['id']] );
|
|
||||||
ajaxResponse();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "export" :
|
|
||||||
{
|
|
||||||
require_once( ZM_SKIN_PATH.'/includes/export_functions.php' );
|
|
||||||
|
|
||||||
if ( !empty($_REQUEST['exportDetail']) )
|
|
||||||
$exportDetail = $_SESSION['export']['detail'] = $_REQUEST['exportDetail'];
|
|
||||||
else
|
|
||||||
$exportDetail = false;
|
|
||||||
if ( !empty($_REQUEST['exportFrames']) )
|
|
||||||
$exportFrames = $_SESSION['export']['frames'] = $_REQUEST['exportFrames'];
|
|
||||||
else
|
|
||||||
$exportFrames = false;
|
|
||||||
if ( !empty($_REQUEST['exportImages']) )
|
|
||||||
$exportImages = $_SESSION['export']['images'] = $_REQUEST['exportImages'];
|
|
||||||
else
|
|
||||||
$exportImages = false;
|
|
||||||
if ( !empty($_REQUEST['exportVideo']) )
|
|
||||||
$exportVideo = $_SESSION['export']['video'] = $_REQUEST['exportVideo'];
|
|
||||||
else
|
|
||||||
$exportVideo = false;
|
|
||||||
if ( !empty($_REQUEST['exportMisc']) )
|
|
||||||
$exportMisc = $_SESSION['export']['misc'] = $_REQUEST['exportMisc'];
|
|
||||||
else
|
|
||||||
$exportMisc = false;
|
|
||||||
if ( !empty($_REQUEST['exportFormat']) )
|
|
||||||
$exportFormat = $_SESSION['export']['format'] = $_REQUEST['exportFormat'];
|
|
||||||
else
|
|
||||||
$exportFormat = '';
|
|
||||||
|
|
||||||
$exportIds = !empty($_REQUEST['eids'])?$_REQUEST['eids']:$_REQUEST['id'];
|
|
||||||
if ( $exportFile = exportEvents( $exportIds, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) )
|
|
||||||
ajaxResponse( array( 'exportFile'=>$exportFile ) );
|
|
||||||
else
|
|
||||||
ajaxError( "Export Failed" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( canEdit( 'Events' ) )
|
|
||||||
{
|
|
||||||
switch ( $_REQUEST['action'] )
|
|
||||||
{
|
|
||||||
case "rename" :
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['eventName']) )
|
|
||||||
dbQuery( "update Events set Name = '".dbEscape($_REQUEST['eventName'])."' where Id = '".dbEscape($_REQUEST['id'])."'" );
|
|
||||||
else
|
|
||||||
ajaxError( "No new event name supplied" );
|
|
||||||
ajaxResponse( array( 'refreshEvent'=>true, 'refreshParent'=>true ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "eventdetail" :
|
|
||||||
{
|
|
||||||
dbQuery( "update Events set Cause = '".dbEscape($_REQUEST['newEvent']['Cause'])."', Notes = '".dbEscape($_REQUEST['newEvent']['Notes'])."' where Id = '".dbEscape($_REQUEST['id'])."'" );
|
|
||||||
ajaxResponse( array( 'refreshEvent'=>true, 'refreshParent'=>true ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "archive" :
|
|
||||||
case "unarchive" :
|
|
||||||
{
|
|
||||||
$archiveVal = ($_REQUEST['action'] == "archive")?1:0;
|
|
||||||
dbQuery( "update Events set Archived = ".$archiveVal." where Id = '".dbEscape($_REQUEST['id'])."'" );
|
|
||||||
ajaxResponse( array( 'refreshEvent'=>true, 'refreshParent'=>false ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "delete" :
|
|
||||||
{
|
|
||||||
deleteEvent( dbEscape($_REQUEST['id']) );
|
|
||||||
ajaxResponse( array( 'refreshEvent'=>false, 'refreshParent'=>true ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
?>
|
|
363
web/ajax/log.php
|
@ -1,363 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
switch ( $_REQUEST['task'] )
|
|
||||||
{
|
|
||||||
case 'create' :
|
|
||||||
{
|
|
||||||
// Silently ignore bogus requests
|
|
||||||
if ( !empty($_POST['level']) && !empty($_POST['message']) )
|
|
||||||
{
|
|
||||||
logInit( array( 'id' => "web_js" ) );
|
|
||||||
|
|
||||||
$string = $_POST['message'];
|
|
||||||
$file = preg_replace( '/\w+:\/\/\w+\//', '', $_POST['file'] );
|
|
||||||
if ( !empty( $_POST['line'] ) )
|
|
||||||
$line = $_POST['line'];
|
|
||||||
else
|
|
||||||
$line = NULL;
|
|
||||||
|
|
||||||
$levels = array_flip(Logger::$codes);
|
|
||||||
if ( !isset($levels[$_POST['level']]) )
|
|
||||||
Panic( "Unexpected logger level '".$_POST['level']."'" );
|
|
||||||
$level = $levels[$_POST['level']];
|
|
||||||
Logger::fetch()->logPrint( $level, $string, $file, $line );
|
|
||||||
}
|
|
||||||
ajaxResponse();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'query' :
|
|
||||||
{
|
|
||||||
if ( !canView( 'System' ) )
|
|
||||||
ajaxError( 'Insufficient permissions to view log entries' );
|
|
||||||
|
|
||||||
$minTime = isset($_POST['minTime'])?$_POST['minTime']:NULL;
|
|
||||||
$maxTime = isset($_POST['maxTime'])?$_POST['maxTime']:NULL;
|
|
||||||
$limit = isset($_POST['limit'])?$_POST['limit']:1000;
|
|
||||||
$filter = isset($_POST['filter'])?$_POST['filter']:array();
|
|
||||||
$sortField = isset($_POST['sortField'])?$_POST['sortField']:'TimeKey';
|
|
||||||
$sortOrder = isset($_POST['sortOrder'])?$_POST['sortOrder']:'desc';
|
|
||||||
|
|
||||||
$filterFields = array( 'Component', 'Pid', 'Level', 'File', 'Line' );
|
|
||||||
|
|
||||||
//$filterSql = $filter?' where
|
|
||||||
$countSql = "select count(*) as Total from Logs";
|
|
||||||
$total = dbFetchOne( $countSql, 'Total' );
|
|
||||||
$sql = "select * from Logs";
|
|
||||||
$where = array();
|
|
||||||
if ( $minTime )
|
|
||||||
$where[] = "TimeKey > ".dbEscape($minTime);
|
|
||||||
elseif ( $maxTime )
|
|
||||||
$where[] = "TimeKey < ".dbEscape($maxTime);
|
|
||||||
foreach ( $filter as $field=>$value )
|
|
||||||
if ( $field == 'Level' )
|
|
||||||
$where[] = dbEscape($field)." <= ".dbEscape($value);
|
|
||||||
else
|
|
||||||
$where[] = dbEscape($field)." = '".dbEscape($value)."'";
|
|
||||||
if ( count($where) )
|
|
||||||
$sql.= " where ".join( " and ", $where );
|
|
||||||
$sql .= " order by ".dbEscape($sortField)." ".dbEscape($sortOrder)." limit ".dbEscape($limit);
|
|
||||||
$logs = array();
|
|
||||||
foreach ( dbFetchAll( $sql ) as $log )
|
|
||||||
{
|
|
||||||
$log['DateTime'] = preg_replace( '/^\d+/', strftime( "%Y-%m-%d %H:%M:%S", intval($log['TimeKey']) ), $log['TimeKey'] );
|
|
||||||
$logs[] = $log;
|
|
||||||
}
|
|
||||||
$options = array();
|
|
||||||
$where = array();
|
|
||||||
foreach( $filter as $field=>$value )
|
|
||||||
if ( $field == 'Level' )
|
|
||||||
$where[$field] = dbEscape($field)." <= ".dbEscape($value);
|
|
||||||
else
|
|
||||||
$where[$field] = dbEscape($field)." = '".dbEscape($value)."'";
|
|
||||||
foreach( $filterFields as $field )
|
|
||||||
{
|
|
||||||
$sql = "select distinct $field from Logs where not isnull($field)";
|
|
||||||
$fieldWhere = array_diff_key( $where, array( $field=>true ) );
|
|
||||||
if ( count($fieldWhere) )
|
|
||||||
$sql.= " and ".join( " and ", $fieldWhere );
|
|
||||||
$sql.= " order by $field asc";
|
|
||||||
if ( $field == 'Level' )
|
|
||||||
{
|
|
||||||
foreach( dbFetchAll( $sql, $field ) as $value )
|
|
||||||
if ( $value <= Logger::INFO )
|
|
||||||
$options[$field][$value] = Logger::$codes[$value];
|
|
||||||
else
|
|
||||||
$options[$field][$value] = "DB".$value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach( dbFetchAll( $sql, $field ) as $value )
|
|
||||||
if ( $value != '' )
|
|
||||||
$options[$field][] = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( count($filter) )
|
|
||||||
{
|
|
||||||
$sql = "select count(*) as Available from Logs where ".join( " and ", $where );
|
|
||||||
$available = dbFetchOne( $sql, 'Available' );
|
|
||||||
}
|
|
||||||
ajaxResponse( array(
|
|
||||||
'updated' => preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG ),
|
|
||||||
'total' => $total,
|
|
||||||
'available' => isset($available)?$available:$total,
|
|
||||||
'logs' => $logs,
|
|
||||||
'state' => logState(),
|
|
||||||
'options' => $options
|
|
||||||
) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'export' :
|
|
||||||
{
|
|
||||||
if ( !canView( 'System' ) )
|
|
||||||
ajaxError( 'Insufficient permissions to export logs' );
|
|
||||||
|
|
||||||
$minTime = isset($_POST['minTime'])?$_POST['minTime']:NULL;
|
|
||||||
$maxTime = isset($_POST['maxTime'])?$_POST['maxTime']:NULL;
|
|
||||||
if ( !is_null($minTime) && !is_null($maxTime) && $minTime > $maxTime )
|
|
||||||
{
|
|
||||||
$tempTime = $minTime;
|
|
||||||
$minTime = $maxTime;
|
|
||||||
$maxTime = $tempTime;
|
|
||||||
}
|
|
||||||
//$limit = isset($_POST['limit'])?$_POST['limit']:1000;
|
|
||||||
$filter = isset($_POST['filter'])?$_POST['filter']:array();
|
|
||||||
$sortField = isset($_POST['sortField'])?$_POST['sortField']:'TimeKey';
|
|
||||||
$sortOrder = isset($_POST['sortOrder'])?$_POST['sortOrder']:'asc';
|
|
||||||
|
|
||||||
$sql = "select * from Logs";
|
|
||||||
$where = array();
|
|
||||||
if ( $minTime )
|
|
||||||
{
|
|
||||||
preg_match( '/(.+)(\.\d+)/', $minTime, $matches );
|
|
||||||
$minTime = strtotime($matches[1]).$matches[2];
|
|
||||||
$where[] = "TimeKey >= ".$minTime;
|
|
||||||
}
|
|
||||||
if ( $maxTime )
|
|
||||||
{
|
|
||||||
preg_match( '/(.+)(\.\d+)/', $maxTime, $matches );
|
|
||||||
$maxTime = strtotime($matches[1]).$matches[2];
|
|
||||||
$where[] = "TimeKey <= ".$maxTime;
|
|
||||||
}
|
|
||||||
foreach ( $filter as $field=>$value )
|
|
||||||
if ( $value != '' )
|
|
||||||
if ( $field == 'Level' )
|
|
||||||
$where[] = dbEscape($field)." <= ".dbEscape($value);
|
|
||||||
else
|
|
||||||
$where[] = dbEscape($field)." = '".dbEscape($value)."'";
|
|
||||||
if ( count($where) )
|
|
||||||
$sql.= " where ".join( " and ", $where );
|
|
||||||
$sql .= " order by ".dbEscape($sortField)." ".dbEscape($sortOrder);
|
|
||||||
//$sql .= " limit ".dbEscape($limit);
|
|
||||||
$format = isset($_POST['format'])?$_POST['format']:'text';
|
|
||||||
switch( $format )
|
|
||||||
{
|
|
||||||
case 'text' :
|
|
||||||
$exportExt = "txt";
|
|
||||||
break;
|
|
||||||
case 'tsv' :
|
|
||||||
$exportExt = "tsv";
|
|
||||||
break;
|
|
||||||
case 'html' :
|
|
||||||
$exportExt = "html";
|
|
||||||
break;
|
|
||||||
case 'xml' :
|
|
||||||
$exportExt = "xml";
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
Fatal( "Unrecognised log export format '$format'" );
|
|
||||||
}
|
|
||||||
$exportKey = substr(md5(rand()),0,8);
|
|
||||||
$exportFile = "zm-log.$exportExt";
|
|
||||||
$exportPath = "temp/zm-log-$exportKey.$exportExt";
|
|
||||||
if ( !($exportFP = fopen( $exportPath, "w" )) )
|
|
||||||
Fatal( "Unable to open log export file $exportFile" );
|
|
||||||
$logs = array();
|
|
||||||
foreach ( dbFetchAll( $sql ) as $log )
|
|
||||||
{
|
|
||||||
$log['DateTime'] = preg_replace( '/^\d+/', strftime( "%Y-%m-%d %H:%M:%S", intval($log['TimeKey']) ), $log['TimeKey'] );
|
|
||||||
$logs[] = $log;
|
|
||||||
}
|
|
||||||
switch( $format )
|
|
||||||
{
|
|
||||||
case 'text' :
|
|
||||||
{
|
|
||||||
foreach ( $logs as $log )
|
|
||||||
{
|
|
||||||
if ( $log['Line'] )
|
|
||||||
fprintf( $exportFP, "%s %s[%d].%s-%s/%d [%s]\n", $log['DateTime'], $log['Component'], $log['Pid'], $log['Code'], $log['File'], $log['Line'], $log['Message'] );
|
|
||||||
else
|
|
||||||
fprintf( $exportFP, "%s %s[%d].%s-%s [%s]\n", $log['DateTime'], $log['Component'], $log['Pid'], $log['Code'], $log['File'], $log['Message'] );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'tsv' :
|
|
||||||
{
|
|
||||||
fprintf( $exportFP, $SLANG['DateTime']."\t".$SLANG['Component']."\t".$SLANG['Pid']."\t".$SLANG['Level']."\t".$SLANG['Message']."\t".$SLANG['File']."\t".$SLANG['Line']."\n" );
|
|
||||||
foreach ( $logs as $log )
|
|
||||||
{
|
|
||||||
fprintf( $exportFP, "%s\t%s\t%d\t%s\t%s\t%s\t%s\n", $log['DateTime'], $log['Component'], $log['Pid'], $log['Code'], $log['Message'], $log['File'], $log['Line'] );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'html' :
|
|
||||||
{
|
|
||||||
fwrite( $exportFP,
|
|
||||||
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>'.$SLANG['ZoneMinderLog'].'</title>
|
|
||||||
<style type="text/css">
|
|
||||||
body, h3, p, table, td {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
th, td {
|
|
||||||
border: 1px solid #888888;
|
|
||||||
padding: 1px 2px;
|
|
||||||
}
|
|
||||||
tr.log-fat td {
|
|
||||||
background-color:#ffcccc;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
tr.log-err td {
|
|
||||||
background-color:#ffcccc;
|
|
||||||
}
|
|
||||||
tr.log-war td {
|
|
||||||
background-color: #ffe4b5;
|
|
||||||
}
|
|
||||||
tr.log-dbg td {
|
|
||||||
color: #666666;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h3>'.$SLANG['ZoneMinderLog'].'</h3>
|
|
||||||
<p>'.htmlspecialchars(preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG )).'</p>
|
|
||||||
<p>'.count($logs).' '.$SLANG['Logs'].'</p>
|
|
||||||
<table>
|
|
||||||
<tbody>
|
|
||||||
<tr><th>'.$SLANG['DateTime'].'</th><th>'.$SLANG['Component'].'</th><th>'.$SLANG['Pid'].'</th><th>'.$SLANG['Level'].'</th><th>'.$SLANG['Message'].'</th><th>'.$SLANG['File'].'</th><th>'.$SLANG['Line'].'</th></tr>
|
|
||||||
' );
|
|
||||||
foreach ( $logs as $log )
|
|
||||||
{
|
|
||||||
$classLevel = $log['Level'];
|
|
||||||
if ( $classLevel < Logger::FATAL )
|
|
||||||
$classLevel = Logger::FATAL;
|
|
||||||
elseif ( $classLevel > Logger::DEBUG )
|
|
||||||
$classLevel = Logger::DEBUG;
|
|
||||||
$logClass = 'log-'.strtolower(Logger::$codes[$classLevel]);
|
|
||||||
fprintf( $exportFP, " <tr class=\"%s\"><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $logClass, $log['DateTime'], $log['Component'], $log['Pid'], $log['Code'], $log['Message'], $log['File'], $log['Line'] );
|
|
||||||
}
|
|
||||||
fwrite( $exportFP,
|
|
||||||
' </tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>' );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'xml' :
|
|
||||||
{
|
|
||||||
fwrite( $exportFP,
|
|
||||||
'<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<logexport title="'.$SLANG['ZoneMinderLog'].'" date="'.htmlspecialchars(preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG )).'">
|
|
||||||
<selector>'.$_POST['selector'].'</selector>' );
|
|
||||||
foreach ( $filter as $field=>$value )
|
|
||||||
if ( $value != '' )
|
|
||||||
fwrite( $exportFP,
|
|
||||||
' <filter>
|
|
||||||
<'.strtolower($field).'>'.htmlspecialchars($value).'</'.strtolower($field).'>
|
|
||||||
</filter>' );
|
|
||||||
fwrite( $exportFP,
|
|
||||||
' <columns>
|
|
||||||
<column field="datetime">'.$SLANG['DateTime'].'</column><column field="component">'.$SLANG['Component'].'</column><column field="pid">'.$SLANG['Pid'].'</column><column field="level">'.$SLANG['Level'].'</column><column field="message">'.$SLANG['Message'].'</column><column field="file">'.$SLANG['File'].'</column><column field="line">'.$SLANG['Line'].'</column>
|
|
||||||
</columns>
|
|
||||||
<logs count="'.count($logs).'">
|
|
||||||
' );
|
|
||||||
foreach ( $logs as $log )
|
|
||||||
{
|
|
||||||
fprintf( $exportFP,
|
|
||||||
" <log>
|
|
||||||
<datetime>%s</datetime>
|
|
||||||
<component>%s</component>
|
|
||||||
<pid>%d</pid>
|
|
||||||
<level>%s</level>
|
|
||||||
<message><![CDATA[%s]]></message>
|
|
||||||
<file>%s</file>
|
|
||||||
<line>%d</line>
|
|
||||||
</log>\n", $log['DateTime'], $log['Component'], $log['Pid'], $log['Code'], utf8_decode( $log['Message'] ), $log['File'], $log['Line'] );
|
|
||||||
}
|
|
||||||
fwrite( $exportFP,
|
|
||||||
' </logs>
|
|
||||||
</logexport>' );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$exportExt = "xml";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
fclose( $exportFP );
|
|
||||||
ajaxResponse( array(
|
|
||||||
'key' => $exportKey,
|
|
||||||
'format' => $format,
|
|
||||||
) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'download' :
|
|
||||||
{
|
|
||||||
if ( !canView( 'System' ) )
|
|
||||||
ajaxError( 'Insufficient permissions to download logs' );
|
|
||||||
|
|
||||||
if ( empty($_REQUEST['key']) )
|
|
||||||
Fatal( "No log export key given" );
|
|
||||||
$exportKey = $_REQUEST['key'];
|
|
||||||
if ( empty($_REQUEST['format']) )
|
|
||||||
Fatal( "No log export format given" );
|
|
||||||
$format = $_REQUEST['format'];
|
|
||||||
|
|
||||||
switch( $format )
|
|
||||||
{
|
|
||||||
case 'text' :
|
|
||||||
$exportExt = "txt";
|
|
||||||
break;
|
|
||||||
case 'tsv' :
|
|
||||||
$exportExt = "tsv";
|
|
||||||
break;
|
|
||||||
case 'html' :
|
|
||||||
$exportExt = "html";
|
|
||||||
break;
|
|
||||||
case 'xml' :
|
|
||||||
$exportExt = "xml";
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
Fatal( "Unrecognised log export format '$format'" );
|
|
||||||
}
|
|
||||||
|
|
||||||
$exportFile = "zm-log.$exportExt";
|
|
||||||
$exportPath = "temp/zm-log-$exportKey.$exportExt";
|
|
||||||
|
|
||||||
header( "Pragma: public" );
|
|
||||||
header( "Expires: 0" );
|
|
||||||
header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
|
|
||||||
header( "Cache-Control: private", false ); // required by certain browsers
|
|
||||||
header( "Content-Description: File Transfer" );
|
|
||||||
header( 'Content-Disposition: attachment; filename="'.$exportFile.'"' );
|
|
||||||
header( "Content-Transfer-Encoding: binary" );
|
|
||||||
header( "Content-Type: application/force-download" );
|
|
||||||
header( "Content-Length: ".filesize($exportPath) );
|
|
||||||
readfile( $exportPath );
|
|
||||||
exit( 0 );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,413 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$statusData = array(
|
|
||||||
"system" => array(
|
|
||||||
"permission" => "System",
|
|
||||||
"table" => "Monitors",
|
|
||||||
"limit" => 1,
|
|
||||||
"elements" => array(
|
|
||||||
"MonitorCount" => array( "sql" => "count(*)" ),
|
|
||||||
"ActiveMonitorCount" => array( "sql" => "count(if(Function != 'None',1,NULL))" ),
|
|
||||||
"State" => array( "func" => "daemonCheck()?".$SLANG['Running'].":".$SLANG['Stopped'] ),
|
|
||||||
"Load" => array( "func" => "getLoad()" ),
|
|
||||||
"Disk" => array( "func" => "getDiskPercent()" ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"monitor" => array(
|
|
||||||
"permission" => "Monitors",
|
|
||||||
"table" => "Monitors",
|
|
||||||
"limit" => 1,
|
|
||||||
"selector" => "Monitors.Id",
|
|
||||||
"elements" => array(
|
|
||||||
"Id" => array( "sql" => "Monitors.Id" ),
|
|
||||||
"Name" => array( "sql" => "Monitors.Name" ),
|
|
||||||
"Type" => true,
|
|
||||||
"Function" => true,
|
|
||||||
"Enabled" => true,
|
|
||||||
"LinkedMonitors" => true,
|
|
||||||
"Triggers" => true,
|
|
||||||
"Device" => true,
|
|
||||||
"Channel" => true,
|
|
||||||
"Format" => true,
|
|
||||||
"Host" => true,
|
|
||||||
"Port" => true,
|
|
||||||
"Path" => true,
|
|
||||||
"Width" => array( "sql" => "Monitors.Width" ),
|
|
||||||
"Height" => array( "sql" => "Monitors.Height" ),
|
|
||||||
"Palette" => true,
|
|
||||||
"Orientation" => true,
|
|
||||||
"Brightness" => true,
|
|
||||||
"Contrast" => true,
|
|
||||||
"Hue" => true,
|
|
||||||
"Colour" => true,
|
|
||||||
"EventPrefix" => true,
|
|
||||||
"LabelFormat" => true,
|
|
||||||
"LabelX" => true,
|
|
||||||
"LabelY" => true,
|
|
||||||
"ImageBufferCount" => true,
|
|
||||||
"WarmupCount" => true,
|
|
||||||
"PreEventCount" => true,
|
|
||||||
"PostEventCount" => true,
|
|
||||||
"AlarmFrameCount" => true,
|
|
||||||
"SectionLength" => true,
|
|
||||||
"FrameSkip" => true,
|
|
||||||
"MaxFPS" => true,
|
|
||||||
"AlarmMaxFPS" => true,
|
|
||||||
"FPSReportInterval" => true,
|
|
||||||
"RefBlendPerc" => true,
|
|
||||||
"Controllable" => true,
|
|
||||||
"ControlId" => true,
|
|
||||||
"ControlDevice" => true,
|
|
||||||
"ControlAddress" => true,
|
|
||||||
"AutoStopTimeout" => true,
|
|
||||||
"TrackMotion" => true,
|
|
||||||
"TrackDelay" => true,
|
|
||||||
"ReturnLocation" => true,
|
|
||||||
"ReturnDelay" => true,
|
|
||||||
"DefaultView" => true,
|
|
||||||
"DefaultRate" => true,
|
|
||||||
"DefaultScale" => true,
|
|
||||||
"WebColour" => true,
|
|
||||||
"Sequence" => true,
|
|
||||||
"MinEventId" => array( "sql" => "min(Events.Id)", "table" => "Events", "join" => "Events.MonitorId = Monitors.Id", "group" => "Events.MonitorId" ),
|
|
||||||
"MaxEventId" => array( "sql" => "max(Events.Id)", "table" => "Events", "join" => "Events.MonitorId = Monitors.Id", "group" => "Events.MonitorId" ),
|
|
||||||
"TotalEvents" => array( "sql" => "count(Events.Id)", "table" => "Events", "join" => "Events.MonitorId = Monitors.Id", "group" => "Events.MonitorId" ),
|
|
||||||
"Status" => array( "zmu" => "-m ".escapeshellarg($_REQUEST['id'][0])." -s" ),
|
|
||||||
"FrameRate" => array( "zmu" => "-m ".escapeshellarg($_REQUEST['id'][0])." -f" ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"events" => array(
|
|
||||||
"permission" => "Events",
|
|
||||||
"table" => "Events",
|
|
||||||
"selector" => "Events.MonitorId",
|
|
||||||
"elements" => array(
|
|
||||||
"Id" => true,
|
|
||||||
"Name" => true,
|
|
||||||
"Cause" => true,
|
|
||||||
"Notes" => true,
|
|
||||||
"StartTime" => true,
|
|
||||||
"StartTimeShort" => array( "sql" => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
|
|
||||||
"EndTime" => true,
|
|
||||||
"Width" => true,
|
|
||||||
"Height" => true,
|
|
||||||
"Length" => true,
|
|
||||||
"Frames" => true,
|
|
||||||
"AlarmFrames" => true,
|
|
||||||
"TotScore" => true,
|
|
||||||
"AvgScore" => true,
|
|
||||||
"MaxScore" => true,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"event" => array(
|
|
||||||
"permission" => "Events",
|
|
||||||
"table" => "Events",
|
|
||||||
"limit" => 1,
|
|
||||||
"selector" => "Events.Id",
|
|
||||||
"elements" => array(
|
|
||||||
"Id" => array( "sql" => "Events.Id" ),
|
|
||||||
"MonitorId" => true,
|
|
||||||
"Name" => true,
|
|
||||||
"Cause" => true,
|
|
||||||
"StartTime" => true,
|
|
||||||
"StartTimeShort" => array( "sql" => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
|
|
||||||
"EndTime" => true,
|
|
||||||
"Width" => true,
|
|
||||||
"Height" => true,
|
|
||||||
"Length" => true,
|
|
||||||
"Frames" => true,
|
|
||||||
"AlarmFrames" => true,
|
|
||||||
"TotScore" => true,
|
|
||||||
"AvgScore" => true,
|
|
||||||
"MaxScore" => true,
|
|
||||||
"Archived" => true,
|
|
||||||
"Videoed" => true,
|
|
||||||
"Uploaded" => true,
|
|
||||||
"Emailed" => true,
|
|
||||||
"Messaged" => true,
|
|
||||||
"Executed" => true,
|
|
||||||
"Notes" => true,
|
|
||||||
"MinFrameId" => array( "sql" => "min(Frames.FrameId)", "table" => "Frames", "join" => "Events.Id = Frames.EventId", "group" => "Frames.EventId" ),
|
|
||||||
"MaxFrameId" => array( "sql" => "max(Frames.FrameId)", "table" => "Frames", "join" => "Events.Id = Frames.EventId", "group" => "Frames.EventId" ),
|
|
||||||
"MinFrameDelta" => array( "sql" => "min(Frames.Delta)", "table" => "Frames", "join" => "Events.Id = Frames.EventId", "group" => "Frames.EventId" ),
|
|
||||||
"MaxFrameDelta" => array( "sql" => "max(Frames.Delta)", "table" => "Frames", "join" => "Events.Id = Frames.EventId", "group" => "Frames.EventId" ),
|
|
||||||
//"Path" => array( "postFunc" => "getEventPath" ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"frame" => array(
|
|
||||||
"permission" => "Events",
|
|
||||||
"table" => "Frames",
|
|
||||||
"limit" => 1,
|
|
||||||
"selector" => array( array( "table" => "Events", "join" => "Events.Id = Frames.EventId", "selector"=>"Events.Id" ), "Frames.FrameId" ),
|
|
||||||
"elements" => array(
|
|
||||||
//"Id" => array( "sql" => "Frames.FrameId" ),
|
|
||||||
"FrameId" => true,
|
|
||||||
"EventId" => true,
|
|
||||||
"Type" => true,
|
|
||||||
"TimeStamp" => true,
|
|
||||||
"TimeStampShort" => array( "sql" => "date_format( StartTime, '".MYSQL_FMT_DATETIME_SHORT."' )" ),
|
|
||||||
"Delta" => true,
|
|
||||||
"Score" => true,
|
|
||||||
//"Image" => array( "postFunc" => "getFrameImage" ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"frameimage" => array(
|
|
||||||
"permission" => "Events",
|
|
||||||
"func" => "getFrameImage()"
|
|
||||||
),
|
|
||||||
"nearframe" => array(
|
|
||||||
"permission" => "Events",
|
|
||||||
"func" => "getNearFrame()"
|
|
||||||
),
|
|
||||||
"nearevents" => array(
|
|
||||||
"permission" => "Events",
|
|
||||||
"func" => "getNearEvents()"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
function collectData()
|
|
||||||
{
|
|
||||||
global $statusData;
|
|
||||||
|
|
||||||
$entitySpec = &$statusData[strtolower(validJsStr($_REQUEST['entity']))];
|
|
||||||
#print_r( $entitySpec );
|
|
||||||
if ( !canView( $entitySpec['permission'] ) )
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
if ( !empty($entitySpec['func']) )
|
|
||||||
{
|
|
||||||
$data = eval( "return( ".$entitySpec['func']." );" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data = array();
|
|
||||||
$postFuncs = array();
|
|
||||||
|
|
||||||
$fieldSql = array();
|
|
||||||
$joinSql = array();
|
|
||||||
$groupSql = array();
|
|
||||||
|
|
||||||
$elements = &$entitySpec['elements'];
|
|
||||||
$lc_elements = array_change_key_case( $elements );
|
|
||||||
|
|
||||||
$id = false;
|
|
||||||
if ( isset($_REQUEST['id']) )
|
|
||||||
if ( !is_array($_REQUEST['id']) )
|
|
||||||
$id = array( validJsStr($_REQUEST['id']) );
|
|
||||||
else
|
|
||||||
$id = array_values( $_REQUEST['id'] );
|
|
||||||
|
|
||||||
if ( !isset($_REQUEST['element']) )
|
|
||||||
$_REQUEST['element'] = array_keys( $elements );
|
|
||||||
else if ( !is_array($_REQUEST['element']) )
|
|
||||||
$_REQUEST['element'] = array( validJsStr($_REQUEST['element']) );
|
|
||||||
|
|
||||||
if ( isset($entitySpec['selector']) )
|
|
||||||
{
|
|
||||||
if ( !is_array($entitySpec['selector']) )
|
|
||||||
$entitySpec['selector'] = array( $entitySpec['selector'] );
|
|
||||||
foreach( $entitySpec['selector'] as $selector )
|
|
||||||
if ( is_array( $selector ) && isset($selector['table']) && isset($selector['join']) )
|
|
||||||
$joinSql[] = "left join ".$selector['table']." on ".$selector['join'];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ( $_REQUEST['element'] as $element )
|
|
||||||
{
|
|
||||||
if ( !($elementData = $lc_elements[strtolower($element)]) )
|
|
||||||
ajaxError( "Bad ".validJsStr($_REQUEST['entity'])." element ".$element );
|
|
||||||
if ( isset($elementData['func']) )
|
|
||||||
$data[$element] = eval( "return( ".$elementData['func']." );" );
|
|
||||||
else if ( isset($elementData['postFunc']) )
|
|
||||||
$postFuncs[$element] = $elementData['postFunc'];
|
|
||||||
else if ( isset($elementData['zmu']) )
|
|
||||||
$data[$element] = exec( escapeshellcmd( getZmuCommand( " ".$elementData['zmu'] ) ) );
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( isset($elementData['sql']) )
|
|
||||||
$fieldSql[] = $elementData['sql']." as ".$element;
|
|
||||||
else
|
|
||||||
$fieldSql[] = $element;
|
|
||||||
if ( isset($elementData['table']) && isset($elementData['join']) )
|
|
||||||
{
|
|
||||||
$joinSql[] = "left join ".$elementData['table']." on ".$elementData['join'];
|
|
||||||
}
|
|
||||||
if ( isset($elementData['group']) )
|
|
||||||
{
|
|
||||||
$groupSql[] = $elementData['group'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( count($fieldSql) )
|
|
||||||
{
|
|
||||||
$sql = "select ".join( ", ", $fieldSql )." from ".$entitySpec['table'];
|
|
||||||
if ( $joinSql )
|
|
||||||
$sql .= " ".join( " ", array_unique( $joinSql ) );
|
|
||||||
if ( $id && !empty($entitySpec['selector']) )
|
|
||||||
{
|
|
||||||
$index = 0;
|
|
||||||
$where = array();
|
|
||||||
foreach( $entitySpec['selector'] as $selector )
|
|
||||||
{
|
|
||||||
if ( is_array( $selector ) )
|
|
||||||
$where[] = $selector['selector']." = ".dbEscape($id[$index]);
|
|
||||||
else
|
|
||||||
$where[] = $selector." = ".dbEscape($id[$index]);
|
|
||||||
$index++;
|
|
||||||
}
|
|
||||||
$sql .= " where ".join( " and ", $where );
|
|
||||||
}
|
|
||||||
if ( $groupSql )
|
|
||||||
$sql .= " group by ".join( ",", array_unique( $groupSql ) );
|
|
||||||
if ( !empty($_REQUEST['sort']) )
|
|
||||||
$sql .= " order by ".dbEscape($_REQUEST['sort']);
|
|
||||||
if ( !empty($entitySpec['limit']) )
|
|
||||||
$limit = $entitySpec['limit'];
|
|
||||||
elseif ( !empty($_REQUEST['count']) )
|
|
||||||
$limit = dbEscape($_REQUEST['count']);
|
|
||||||
if ( !empty( $limit ) )
|
|
||||||
$sql .= " limit ".$limit;
|
|
||||||
if ( isset($limit) && $limit == 1 )
|
|
||||||
{
|
|
||||||
if ( $sqlData = dbFetchOne( $sql ) )
|
|
||||||
{
|
|
||||||
foreach ( $postFuncs as $element=>$func )
|
|
||||||
$sqlData[$element] = eval( 'return( '.$func.'( $sqlData ) );' );
|
|
||||||
$data = array_merge( $data, $sqlData );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$count = 0;
|
|
||||||
foreach( dbFetchAll( $sql ) as $sqlData )
|
|
||||||
{
|
|
||||||
foreach ( $postFuncs as $element=>$func )
|
|
||||||
$sqlData[$element] = eval( 'return( '.$func.'( $sqlData ) );' );
|
|
||||||
$data[] = $sqlData;
|
|
||||||
if ( isset($limi) && ++$count >= $limit )
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#print_r( $data );
|
|
||||||
return( $data );
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = collectData();
|
|
||||||
|
|
||||||
if ( !isset($_REQUEST['layout']) )
|
|
||||||
{
|
|
||||||
$_REQUEST['layout'] = "json";
|
|
||||||
}
|
|
||||||
switch( $_REQUEST['layout'] )
|
|
||||||
{
|
|
||||||
case 'xml NOT CURRENTLY SUPPORTED' :
|
|
||||||
{
|
|
||||||
header("Content-type: application/xml" );
|
|
||||||
echo( '<?xml version="1.0" encoding="iso-8859-1"?>'."\n" );
|
|
||||||
echo "<".strtolower($_REQUEST['entity']).">\n";
|
|
||||||
foreach ( $data as $key=>$value )
|
|
||||||
{
|
|
||||||
$key = strtolower( $key );
|
|
||||||
echo "<$key>".htmlentities($value)."</$key>\n";
|
|
||||||
}
|
|
||||||
echo "</".strtolower($_REQUEST['entity']).">\n";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'json' :
|
|
||||||
{
|
|
||||||
$response = array( strtolower(validJsStr($_REQUEST['entity'])) => $data );
|
|
||||||
if ( isset($_REQUEST['loopback']) )
|
|
||||||
$response['loopback'] = validJsStr($_REQUEST['loopback']);
|
|
||||||
ajaxResponse( $response );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'text' :
|
|
||||||
{
|
|
||||||
header("Content-type: text/plain" );
|
|
||||||
echo join( " ", array_values( $data ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getFrameImage()
|
|
||||||
{
|
|
||||||
$eventId = dbEscape($_REQUEST['id'][0]);
|
|
||||||
$frameId = dbEscape($_REQUEST['id'][1]);
|
|
||||||
|
|
||||||
$sql = "select * from Frames where EventId = '".$eventId."' and FrameId = '".$frameId."'";
|
|
||||||
if ( !($frame = dbFetchOne( $sql )) )
|
|
||||||
{
|
|
||||||
$frame = array();
|
|
||||||
$frame['EventId'] = $eventId;
|
|
||||||
$frame['FrameId'] = $frameId;
|
|
||||||
$frame['Type'] = "Virtual";
|
|
||||||
}
|
|
||||||
$event = dbFetchOne( "select * from Events where Id = '".$frame['EventId']."'" );
|
|
||||||
$frame['Image'] = getImageSrc( $event, $frame, SCALE_BASE );
|
|
||||||
return( $frame );
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNearFrame()
|
|
||||||
{
|
|
||||||
$eventId = dbEscape($_REQUEST['id'][0]);
|
|
||||||
$frameId = dbEscape($_REQUEST['id'][1]);
|
|
||||||
|
|
||||||
$sql = "select FrameId from Frames where EventId = '".$eventId."' and FrameId <= '".$frameId."' order by FrameId desc limit 1";
|
|
||||||
if ( !$nearFrameId = dbFetchOne( $sql, 'FrameId' ) )
|
|
||||||
{
|
|
||||||
$sql = "select * from Frames where EventId = '".$eventId."' and FrameId > '".$frameId."' order by FrameId asc limit 1";
|
|
||||||
if ( !$nearFrameId = dbFetchOne( $sql, 'FrameId' ) )
|
|
||||||
{
|
|
||||||
return( array() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$_REQUEST['entity'] = "frame";
|
|
||||||
$_REQUEST['id'][1] = $nearFrameId;
|
|
||||||
return( collectData() );
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNearEvents()
|
|
||||||
{
|
|
||||||
global $user, $sortColumn, $sortOrder;
|
|
||||||
|
|
||||||
$eventId = dbEscape($_REQUEST['id']);
|
|
||||||
$event = dbFetchOne( "select * from Events where Id = '".$eventId."'" );
|
|
||||||
|
|
||||||
parseFilter( $_REQUEST['filter'] );
|
|
||||||
parseSort();
|
|
||||||
|
|
||||||
if ( $user['MonitorIds'] )
|
|
||||||
$midSql = " and MonitorId in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', $user['MonitorIds'] ) ).")";
|
|
||||||
else
|
|
||||||
$midSql = '';
|
|
||||||
|
|
||||||
$sql = "select E.Id as Id from Events as E inner join Monitors as M on E.MonitorId = M.Id where ".dbEscape($sortColumn)." ".($sortOrder=='asc'?'<=':'>=')." '".$event[$_REQUEST['sort_field']]."'".$_REQUEST['filter']['sql'].$midSql." order by $sortColumn ".($sortOrder=='asc'?'desc':'asc');
|
|
||||||
$result = dbQuery( $sql );
|
|
||||||
while ( $id = dbFetchNext( $result, 'Id' ) )
|
|
||||||
{
|
|
||||||
if ( $id == $eventId )
|
|
||||||
{
|
|
||||||
$prevId = dbFetchNext( $result, 'Id' );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "select E.Id as Id from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sortColumn ".($sortOrder=='asc'?'>=':'<=')." '".$event[$_REQUEST['sort_field']]."'".$_REQUEST['filter']['sql'].$midSql." order by $sortColumn $sortOrder";
|
|
||||||
$result = dbQuery( $sql );
|
|
||||||
while ( $id = dbFetchNext( $result, 'Id' ) )
|
|
||||||
{
|
|
||||||
if ( $id == $eventId )
|
|
||||||
{
|
|
||||||
$nextId = dbFetchNext( $result, 'Id' );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = array( 'EventId'=>$eventId );
|
|
||||||
$result['PrevEventId'] = empty($prevId)?0:$prevId;
|
|
||||||
$result['NextEventId'] = empty($nextId)?0:$nextId;
|
|
||||||
return( $result );
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,135 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
define( "MSG_TIMEOUT", ZM_WEB_AJAX_TIMEOUT );
|
|
||||||
define( "MSG_DATA_SIZE", 4+256 );
|
|
||||||
|
|
||||||
if ( !($_REQUEST['connkey'] && $_REQUEST['command']) )
|
|
||||||
{
|
|
||||||
ajaxError( "Unexpected received message type '$type'" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !($socket = @socket_create( AF_UNIX, SOCK_DGRAM, 0 )) )
|
|
||||||
{
|
|
||||||
ajaxError( "socket_create() failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
}
|
|
||||||
$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'w.sock';
|
|
||||||
if ( !@socket_bind( $socket, $locSockFile ) )
|
|
||||||
{
|
|
||||||
ajaxError( "socket_bind( $locSockFile ) failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ( $_REQUEST['command'] )
|
|
||||||
{
|
|
||||||
case CMD_VARPLAY :
|
|
||||||
Debug( "Varplaying to ".$_REQUEST['rate'] );
|
|
||||||
$msg = pack( "lcn", MSG_CMD, $_REQUEST['command'], $_REQUEST['rate']+32768 );
|
|
||||||
break;
|
|
||||||
case CMD_ZOOMIN :
|
|
||||||
Debug( "Zooming to ".$_REQUEST['x'].",".$_REQUEST['y'] );
|
|
||||||
$msg = pack( "lcnn", MSG_CMD, $_REQUEST['command'], $_REQUEST['x'], $_REQUEST['y'] );
|
|
||||||
break;
|
|
||||||
case CMD_PAN :
|
|
||||||
Debug( "Panning to ".$_REQUEST['x'].",".$_REQUEST['y'] );
|
|
||||||
$msg = pack( "lcnn", MSG_CMD, $_REQUEST['command'], $_REQUEST['x'], $_REQUEST['y'] );
|
|
||||||
break;
|
|
||||||
case CMD_SCALE :
|
|
||||||
Debug( "Scaling to ".$_REQUEST['scale'] );
|
|
||||||
$msg = pack( "lcn", MSG_CMD, $_REQUEST['command'], $_REQUEST['scale'] );
|
|
||||||
break;
|
|
||||||
case CMD_SEEK :
|
|
||||||
Debug( "Seeking to ".$_REQUEST['offset'] );
|
|
||||||
$msg = pack( "lcN", MSG_CMD, $_REQUEST['command'], $_REQUEST['offset'] );
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
$msg = pack( "lc", MSG_CMD, $_REQUEST['command'] );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$remSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';
|
|
||||||
$max_socket_tries = 3;
|
|
||||||
while ( !file_exists($remSockFile) && $max_socket_tries-- ) //sometimes we are too fast for our own good, if it hasn't been setup yet give it a second.
|
|
||||||
sleep(1);
|
|
||||||
|
|
||||||
if ( !@socket_sendto( $socket, $msg, strlen($msg), 0, $remSockFile ) )
|
|
||||||
{
|
|
||||||
ajaxError( "socket_sendto( $remSockFile ) failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
}
|
|
||||||
|
|
||||||
$rSockets = array( $socket );
|
|
||||||
$wSockets = NULL;
|
|
||||||
$eSockets = NULL;
|
|
||||||
$numSockets = @socket_select( $rSockets, $wSockets, $eSockets, intval(MSG_TIMEOUT/1000), (MSG_TIMEOUT%1000)*1000 );
|
|
||||||
|
|
||||||
if ( $numSockets === false )
|
|
||||||
{
|
|
||||||
ajaxError( "socket_select failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
}
|
|
||||||
else if ( $numSockets == 0 )
|
|
||||||
{
|
|
||||||
ajaxError( "Timed out waiting for msg" );
|
|
||||||
}
|
|
||||||
else if ( $numSockets > 0 )
|
|
||||||
{
|
|
||||||
if ( count($rSockets) != 1 )
|
|
||||||
ajaxError( "Bogus return from select, ".count($rSockets)." sockets available" );
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( $nbytes = @socket_recvfrom( $socket, $msg, MSG_DATA_SIZE, 0, $remSockFile ) )
|
|
||||||
{
|
|
||||||
case -1 :
|
|
||||||
{
|
|
||||||
ajaxError( "socket_recvfrom( $remSockFile ) failed: ".socket_strerror(socket_last_error()) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 0 :
|
|
||||||
{
|
|
||||||
ajaxError( "No data to read from socket" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
{
|
|
||||||
if ( $nbytes != MSG_DATA_SIZE )
|
|
||||||
ajaxError( "Got unexpected message size, got $nbytes, expected ".MSG_DATA_SIZE );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = unpack( "ltype", $msg );
|
|
||||||
switch ( $data['type'] )
|
|
||||||
{
|
|
||||||
case MSG_DATA_WATCH :
|
|
||||||
{
|
|
||||||
$data = unpack( "ltype/imonitor/istate/dfps/ilevel/irate/ddelay/izoom/Cdelayed/Cpaused/Cenabled/Cforced", $msg );
|
|
||||||
$data['fps'] = sprintf( "%.2f", $data['fps'] );
|
|
||||||
$data['rate'] /= RATE_BASE;
|
|
||||||
$data['delay'] = sprintf( "%.2f", $data['delay'] );
|
|
||||||
$data['zoom'] = sprintf( "%.1f", $data['zoom']/SCALE_BASE );
|
|
||||||
ajaxResponse( array( 'status'=>$data ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case MSG_DATA_EVENT :
|
|
||||||
{
|
|
||||||
$data = unpack( "ltype/ievent/iprogress/irate/izoom/Cpaused", $msg );
|
|
||||||
//$data['progress'] = sprintf( "%.2f", $data['progress'] );
|
|
||||||
$data['rate'] /= RATE_BASE;
|
|
||||||
$data['zoom'] = sprintf( "%.1f", $data['zoom']/SCALE_BASE );
|
|
||||||
ajaxResponse( array( 'status'=>$data ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
{
|
|
||||||
ajaxError( "Unexpected received message type '$type'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
function ajaxCleanup()
|
|
||||||
{
|
|
||||||
global $socket, $locSockFile;
|
|
||||||
if ( !empty( $socket ) )
|
|
||||||
@socket_close( $socket );
|
|
||||||
if ( !empty( $locSockFile ) )
|
|
||||||
@unlink( $locSockFile );
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if ( empty($_REQUEST['mid']) )
|
|
||||||
{
|
|
||||||
ajaxError( 'No monitor id supplied' );
|
|
||||||
}
|
|
||||||
elseif ( !isset($_REQUEST['zid']) )
|
|
||||||
{
|
|
||||||
ajaxError( 'No zone id(s) supplied' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( canView( 'Monitors' ) )
|
|
||||||
{
|
|
||||||
switch ( $_REQUEST['action'] )
|
|
||||||
{
|
|
||||||
case "zoneImage" :
|
|
||||||
{
|
|
||||||
$wd = getcwd();
|
|
||||||
chdir( ZM_DIR_IMAGES );
|
|
||||||
$hiColor = "0x00ff00";
|
|
||||||
|
|
||||||
$command = getZmuCommand( " -m ".$_REQUEST['mid']." -z" );
|
|
||||||
if ( !isset($_REQUEST['zid']) )
|
|
||||||
$_REQUEST['zid'] = 0;
|
|
||||||
$command .= "'".$_REQUEST['zid'].' '.$hiColor.' '.$_REQUEST['coords']."'";
|
|
||||||
$status = exec( escapeshellcmd($command) );
|
|
||||||
chdir( $wd );
|
|
||||||
|
|
||||||
$monitor = dbFetchOne( "select * from Monitors where Id = '".dbEscape($_REQUEST['mid'])."'" );
|
|
||||||
$points = coordsToPoints( $_REQUEST['coords'] );
|
|
||||||
|
|
||||||
ajaxResponse( array(
|
|
||||||
'zoneImage' => ZM_DIR_IMAGES.'/Zones'.$monitor['Id'].'.jpg?'.time(),
|
|
||||||
'selfIntersecting' => isSelfIntersecting( $points ),
|
|
||||||
'area' => getPolyArea( $points )
|
|
||||||
) );
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
|
||||||
|
|
||||||
?>
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteRule ^$ webroot/ [L]
|
||||||
|
RewriteRule (.*) webroot/$1 [L]
|
||||||
|
</IfModule>
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is Acl Schema file
|
||||||
|
*
|
||||||
|
* Use it to configure database for ACL
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config.Schema
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Using the Schema command line utility
|
||||||
|
* cake schema run create DbAcl
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class DbAclSchema extends CakeSchema {
|
||||||
|
|
||||||
|
public $name = 'DbAcl';
|
||||||
|
|
||||||
|
public function before($event = array()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function after($event = array()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public $acos = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'model' => array('type' => 'string', 'null' => true),
|
||||||
|
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'alias' => array('type' => 'string', 'null' => true),
|
||||||
|
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||||
|
);
|
||||||
|
|
||||||
|
public $aros = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'model' => array('type' => 'string', 'null' => true),
|
||||||
|
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'alias' => array('type' => 'string', 'null' => true),
|
||||||
|
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||||
|
);
|
||||||
|
|
||||||
|
public $aros_acos = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
||||||
|
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
|
||||||
|
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||||
|
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||||
|
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||||
|
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
#
|
||||||
|
# Licensed under The MIT License
|
||||||
|
# For full copyright and license information, please see the LICENSE.txt
|
||||||
|
# Redistributions of files must retain the above copyright notice.
|
||||||
|
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
|
||||||
|
CREATE TABLE acos (
|
||||||
|
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
parent_id INTEGER(10) DEFAULT NULL,
|
||||||
|
model VARCHAR(255) DEFAULT '',
|
||||||
|
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
|
||||||
|
alias VARCHAR(255) DEFAULT '',
|
||||||
|
lft INTEGER(10) DEFAULT NULL,
|
||||||
|
rght INTEGER(10) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE aros_acos (
|
||||||
|
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
aro_id INTEGER(10) UNSIGNED NOT NULL,
|
||||||
|
aco_id INTEGER(10) UNSIGNED NOT NULL,
|
||||||
|
_create CHAR(2) NOT NULL DEFAULT 0,
|
||||||
|
_read CHAR(2) NOT NULL DEFAULT 0,
|
||||||
|
_update CHAR(2) NOT NULL DEFAULT 0,
|
||||||
|
_delete CHAR(2) NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE aros (
|
||||||
|
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
parent_id INTEGER(10) DEFAULT NULL,
|
||||||
|
model VARCHAR(255) DEFAULT '',
|
||||||
|
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
|
||||||
|
alias VARCHAR(255) DEFAULT '',
|
||||||
|
lft INTEGER(10) DEFAULT NULL,
|
||||||
|
rght INTEGER(10) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
);
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is i18n Schema file
|
||||||
|
*
|
||||||
|
* Use it to configure database for i18n
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config.Schema
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Using the Schema command line utility
|
||||||
|
*
|
||||||
|
* Use it to configure database for i18n
|
||||||
|
*
|
||||||
|
* cake schema run create i18n
|
||||||
|
*/
|
||||||
|
class I18nSchema extends CakeSchema {
|
||||||
|
|
||||||
|
public $name = 'i18n';
|
||||||
|
|
||||||
|
public function before($event = array()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function after($event = array()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public $i18n = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
|
||||||
|
'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
|
||||||
|
'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
||||||
|
'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
|
||||||
|
'content' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
#
|
||||||
|
# Licensed under The MIT License
|
||||||
|
# For full copyright and license information, please see the LICENSE.txt
|
||||||
|
# Redistributions of files must retain the above copyright notice.
|
||||||
|
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
|
||||||
|
CREATE TABLE i18n (
|
||||||
|
id int(10) NOT NULL auto_increment,
|
||||||
|
locale varchar(6) NOT NULL,
|
||||||
|
model varchar(255) NOT NULL,
|
||||||
|
foreign_key int(10) NOT NULL,
|
||||||
|
field varchar(255) NOT NULL,
|
||||||
|
content mediumtext,
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
|
||||||
|
# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
|
||||||
|
# INDEX I18N_LOCALE_MODEL(locale, model),
|
||||||
|
# INDEX I18N_FIELD(model, foreign_key, field),
|
||||||
|
# INDEX I18N_ROW(model, foreign_key),
|
||||||
|
INDEX locale (locale),
|
||||||
|
INDEX model (model),
|
||||||
|
INDEX row_id (foreign_key),
|
||||||
|
INDEX field (field)
|
||||||
|
);
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is Sessions Schema file
|
||||||
|
*
|
||||||
|
* Use it to configure database for Sessions
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config.Schema
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Using the Schema command line utility
|
||||||
|
* cake schema run create Sessions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class SessionsSchema extends CakeSchema {
|
||||||
|
|
||||||
|
public $name = 'Sessions';
|
||||||
|
|
||||||
|
public function before($event = array()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function after($event = array()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public $cake_sessions = array(
|
||||||
|
'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'),
|
||||||
|
'data' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||||
|
'expires' => array('type' => 'integer', 'null' => true, 'default' => null),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
# 1785 E. Sahara Avenue, Suite 490-204
|
||||||
|
# Las Vegas, Nevada 89104
|
||||||
|
#
|
||||||
|
# Licensed under The MIT License
|
||||||
|
# For full copyright and license information, please see the LICENSE.txt
|
||||||
|
# Redistributions of files must retain the above copyright notice.
|
||||||
|
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
|
||||||
|
CREATE TABLE cake_sessions (
|
||||||
|
id varchar(255) NOT NULL default '',
|
||||||
|
data text,
|
||||||
|
expires int(11) default NULL,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
);
|
|
@ -0,0 +1,68 @@
|
||||||
|
;<?php exit() ?>
|
||||||
|
;/**
|
||||||
|
; * ACL Configuration
|
||||||
|
; *
|
||||||
|
; *
|
||||||
|
; * PHP 5
|
||||||
|
; *
|
||||||
|
; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
; * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
; *
|
||||||
|
; * Licensed under The MIT License
|
||||||
|
; * Redistributions of files must retain the above copyright notice.
|
||||||
|
; *
|
||||||
|
; * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
; * @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
; * @package app.Config
|
||||||
|
; * @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
; */
|
||||||
|
|
||||||
|
; acl.ini.php - Cake ACL Configuration
|
||||||
|
; ---------------------------------------------------------------------
|
||||||
|
; Use this file to specify user permissions.
|
||||||
|
; aco = access control object (something in your application)
|
||||||
|
; aro = access request object (something requesting access)
|
||||||
|
;
|
||||||
|
; User records are added as follows:
|
||||||
|
;
|
||||||
|
; [uid]
|
||||||
|
; groups = group1, group2, group3
|
||||||
|
; allow = aco1, aco2, aco3
|
||||||
|
; deny = aco4, aco5, aco6
|
||||||
|
;
|
||||||
|
; Group records are added in a similar manner:
|
||||||
|
;
|
||||||
|
; [gid]
|
||||||
|
; allow = aco1, aco2, aco3
|
||||||
|
; deny = aco4, aco5, aco6
|
||||||
|
;
|
||||||
|
; The allow, deny, and groups sections are all optional.
|
||||||
|
; NOTE: groups names *cannot* ever be the same as usernames!
|
||||||
|
;
|
||||||
|
; ACL permissions are checked in the following order:
|
||||||
|
; 1. Check for user denies (and DENY if specified)
|
||||||
|
; 2. Check for user allows (and ALLOW if specified)
|
||||||
|
; 3. Gather user's groups
|
||||||
|
; 4. Check group denies (and DENY if specified)
|
||||||
|
; 5. Check group allows (and ALLOW if specified)
|
||||||
|
; 6. If no aro, aco, or group information is found, DENY
|
||||||
|
;
|
||||||
|
; ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
;-------------------------------------
|
||||||
|
;Users
|
||||||
|
;-------------------------------------
|
||||||
|
|
||||||
|
[username-goes-here]
|
||||||
|
groups = group1, group2
|
||||||
|
deny = aco1, aco2
|
||||||
|
allow = aco3, aco4
|
||||||
|
|
||||||
|
;-------------------------------------
|
||||||
|
;Groups
|
||||||
|
;-------------------------------------
|
||||||
|
|
||||||
|
[groupname-goes-here]
|
||||||
|
deny = aco5, aco6
|
||||||
|
allow = aco7, aco8
|
|
@ -0,0 +1,135 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is the PHP base ACL configuration file.
|
||||||
|
*
|
||||||
|
* Use it to configure access control of your Cake application.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config
|
||||||
|
* @since CakePHP(tm) v 2.1
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example
|
||||||
|
* -------
|
||||||
|
*
|
||||||
|
* Assumptions:
|
||||||
|
*
|
||||||
|
* 1. In your application you created a User model with the following properties:
|
||||||
|
* username, group_id, password, email, firstname, lastname and so on.
|
||||||
|
* 2. You configured AuthComponent to authorize actions via
|
||||||
|
* $this->Auth->authorize = array('Actions' => array('actionPath' => 'controllers/'),...)
|
||||||
|
*
|
||||||
|
* Now, when a user (i.e. jeff) authenticates successfully and requests a controller action (i.e. /invoices/delete)
|
||||||
|
* that is not allowed by default (e.g. via $this->Auth->allow('edit') in the Invoices controller) then AuthComponent
|
||||||
|
* will ask the configured ACL interface if access is granted. Under the assumptions 1. and 2. this will be
|
||||||
|
* done via a call to Acl->check() with
|
||||||
|
*
|
||||||
|
* array('User' => array('username' => 'jeff', 'group_id' => 4, ...))
|
||||||
|
*
|
||||||
|
* as ARO and
|
||||||
|
*
|
||||||
|
* '/controllers/invoices/delete'
|
||||||
|
*
|
||||||
|
* as ACO.
|
||||||
|
*
|
||||||
|
* If the configured map looks like
|
||||||
|
*
|
||||||
|
* $config['map'] = array(
|
||||||
|
* 'User' => 'User/username',
|
||||||
|
* 'Role' => 'User/group_id',
|
||||||
|
* );
|
||||||
|
*
|
||||||
|
* then PhpAcl will lookup if we defined a role like User/jeff. If that role is not found, PhpAcl will try to
|
||||||
|
* find a definition for Role/4. If the definition isn't found then a default role (Role/default) will be used to
|
||||||
|
* check rules for the given ACO. The search can be expanded by defining aliases in the alias configuration.
|
||||||
|
* E.g. if you want to use a more readable name than Role/4 in your definitions you can define an alias like
|
||||||
|
*
|
||||||
|
* $config['alias'] = array(
|
||||||
|
* 'Role/4' => 'Role/editor',
|
||||||
|
* );
|
||||||
|
*
|
||||||
|
* In the roles configuration you can define roles on the lhs and inherited roles on the rhs:
|
||||||
|
*
|
||||||
|
* $config['roles'] = array(
|
||||||
|
* 'Role/admin' => null,
|
||||||
|
* 'Role/accountant' => null,
|
||||||
|
* 'Role/editor' => null,
|
||||||
|
* 'Role/manager' => 'Role/editor, Role/accountant',
|
||||||
|
* 'User/jeff' => 'Role/manager',
|
||||||
|
* );
|
||||||
|
*
|
||||||
|
* In this example manager inherits all rules from editor and accountant. Role/admin doesn't inherit from any role.
|
||||||
|
* Lets define some rules:
|
||||||
|
*
|
||||||
|
* $config['rules'] = array(
|
||||||
|
* 'allow' => array(
|
||||||
|
* '*' => 'Role/admin',
|
||||||
|
* 'controllers/users/(dashboard|profile)' => 'Role/default',
|
||||||
|
* 'controllers/invoices/*' => 'Role/accountant',
|
||||||
|
* 'controllers/articles/*' => 'Role/editor',
|
||||||
|
* 'controllers/users/*' => 'Role/manager',
|
||||||
|
* 'controllers/invoices/delete' => 'Role/manager',
|
||||||
|
* ),
|
||||||
|
* 'deny' => array(
|
||||||
|
* 'controllers/invoices/delete' => 'Role/accountant, User/jeff',
|
||||||
|
* 'controllers/articles/(delete|publish)' => 'Role/editor',
|
||||||
|
* ),
|
||||||
|
* );
|
||||||
|
*
|
||||||
|
* Ok, so as jeff inherits from Role/manager he's matched every rule that references User/jeff, Role/manager,
|
||||||
|
* Role/editor, Role/accountant and Role/default. However, for jeff, rules for User/jeff are more specific than
|
||||||
|
* rules for Role/manager, rules for Role/manager are more specific than rules for Role/editor and so on.
|
||||||
|
* This is important when allow and deny rules match for a role. E.g. Role/accountant is allowed
|
||||||
|
* controllers/invoices/* but at the same time controllers/invoices/delete is denied. But there is a more
|
||||||
|
* specific rule defined for Role/manager which is allowed controllers/invoices/delete. However, the most specific
|
||||||
|
* rule denies access to the delete action explicitly for User/jeff, so he'll be denied access to the resource.
|
||||||
|
*
|
||||||
|
* If we would remove the role definition for User/jeff, then jeff would be granted access as he would be resolved
|
||||||
|
* to Role/manager and Role/manager has an allow rule.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The role map defines how to resolve the user record from your application
|
||||||
|
* to the roles you defined in the roles configuration.
|
||||||
|
*/
|
||||||
|
$config['map'] = array(
|
||||||
|
'User' => 'User/username',
|
||||||
|
'Role' => 'User/group_id',
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* define aliases to map your model information to
|
||||||
|
* the roles defined in your role configuration.
|
||||||
|
*/
|
||||||
|
$config['alias'] = array(
|
||||||
|
'Role/4' => 'Role/editor',
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role configuration
|
||||||
|
*/
|
||||||
|
$config['roles'] = array(
|
||||||
|
'Role/admin' => null,
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rule configuration
|
||||||
|
*/
|
||||||
|
$config['rules'] = array(
|
||||||
|
'allow' => array(
|
||||||
|
'*' => 'Role/admin',
|
||||||
|
),
|
||||||
|
'deny' => array(),
|
||||||
|
);
|
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is loaded automatically by the app/webroot/index.php file after core.php
|
||||||
|
*
|
||||||
|
* This file should load/create any application wide configuration settings, such as
|
||||||
|
* Caching, Logging, loading additional configuration files.
|
||||||
|
*
|
||||||
|
* You should also use this file to include any files that provide global functions/constants
|
||||||
|
* that your application uses.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config
|
||||||
|
* @since CakePHP(tm) v 0.10.8.2117
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Setup a 'default' cache configuration for use in the application.
|
||||||
|
Cache::config('default', array('engine' => 'File'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The settings below can be used to set additional paths to models, views and controllers.
|
||||||
|
*
|
||||||
|
* App::build(array(
|
||||||
|
* 'Model' => array('/path/to/models', '/next/path/to/models'),
|
||||||
|
* 'Model/Behavior' => array('/path/to/behaviors', '/next/path/to/behaviors'),
|
||||||
|
* 'Model/Datasource' => array('/path/to/datasources', '/next/path/to/datasources'),
|
||||||
|
* 'Model/Datasource/Database' => array('/path/to/databases', '/next/path/to/database'),
|
||||||
|
* 'Model/Datasource/Session' => array('/path/to/sessions', '/next/path/to/sessions'),
|
||||||
|
* 'Controller' => array('/path/to/controllers', '/next/path/to/controllers'),
|
||||||
|
* 'Controller/Component' => array('/path/to/components', '/next/path/to/components'),
|
||||||
|
* 'Controller/Component/Auth' => array('/path/to/auths', '/next/path/to/auths'),
|
||||||
|
* 'Controller/Component/Acl' => array('/path/to/acls', '/next/path/to/acls'),
|
||||||
|
* 'View' => array('/path/to/views', '/next/path/to/views'),
|
||||||
|
* 'View/Helper' => array('/path/to/helpers', '/next/path/to/helpers'),
|
||||||
|
* 'Console' => array('/path/to/consoles', '/next/path/to/consoles'),
|
||||||
|
* 'Console/Command' => array('/path/to/commands', '/next/path/to/commands'),
|
||||||
|
* 'Console/Command/Task' => array('/path/to/tasks', '/next/path/to/tasks'),
|
||||||
|
* 'Lib' => array('/path/to/libs', '/next/path/to/libs'),
|
||||||
|
* 'Locale' => array('/path/to/locales', '/next/path/to/locales'),
|
||||||
|
* 'Vendor' => array('/path/to/vendors', '/next/path/to/vendors'),
|
||||||
|
* 'Plugin' => array('/path/to/plugins', '/next/path/to/plugins'),
|
||||||
|
* ));
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other
|
||||||
|
* string is passed to the inflection functions
|
||||||
|
*
|
||||||
|
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||||
|
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
|
||||||
|
* Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more
|
||||||
|
* advanced ways of loading plugins
|
||||||
|
*
|
||||||
|
* CakePlugin::loadAll(); // Loads all plugins at once
|
||||||
|
* CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You can attach event listeners to the request lifecycle as Dispatcher Filter . By Default CakePHP bundles two filters:
|
||||||
|
*
|
||||||
|
* - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
|
||||||
|
* - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
|
||||||
|
*
|
||||||
|
* Feel free to remove or add filters as you see fit for your application. A few examples:
|
||||||
|
*
|
||||||
|
* Configure::write('Dispatcher.filters', array(
|
||||||
|
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
|
||||||
|
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
|
||||||
|
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
|
||||||
|
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
|
||||||
|
*
|
||||||
|
* ));
|
||||||
|
*/
|
||||||
|
Configure::write('Dispatcher.filters', array(
|
||||||
|
'AssetDispatcher',
|
||||||
|
'CacheDispatcher'
|
||||||
|
));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures default file logging options
|
||||||
|
*/
|
||||||
|
App::uses('CakeLog', 'Log');
|
||||||
|
CakeLog::config('debug', array(
|
||||||
|
'engine' => 'FileLog',
|
||||||
|
'types' => array('notice', 'info', 'debug'),
|
||||||
|
'file' => 'debug',
|
||||||
|
));
|
||||||
|
CakeLog::config('error', array(
|
||||||
|
'engine' => 'FileLog',
|
||||||
|
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
|
||||||
|
'file' => 'error',
|
||||||
|
));
|
|
@ -0,0 +1,348 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is core configuration file.
|
||||||
|
*
|
||||||
|
* Use it to configure core behavior of Cake.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CakePHP Debug Level:
|
||||||
|
*
|
||||||
|
* Production Mode:
|
||||||
|
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
|
||||||
|
*
|
||||||
|
* Development Mode:
|
||||||
|
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
|
||||||
|
* 2: As in 1, but also with full debug messages and SQL output.
|
||||||
|
*
|
||||||
|
* In production mode, flash messages redirect after a time interval.
|
||||||
|
* In development mode, you need to click the flash message to continue.
|
||||||
|
*/
|
||||||
|
Configure::write('debug', 2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the Error handler used to handle errors for your application. By default
|
||||||
|
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
|
||||||
|
* and log errors with CakeLog when debug = 0.
|
||||||
|
*
|
||||||
|
* Options:
|
||||||
|
*
|
||||||
|
* - `handler` - callback - The callback to handle errors. You can set this to any callable type,
|
||||||
|
* including anonymous functions.
|
||||||
|
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
||||||
|
* - `level` - int - The level of errors you are interested in capturing.
|
||||||
|
* - `trace` - boolean - Include stack traces for errors in log files.
|
||||||
|
*
|
||||||
|
* @see ErrorHandler for more information on error handling and configuration.
|
||||||
|
*/
|
||||||
|
Configure::write('Error', array(
|
||||||
|
'handler' => 'ErrorHandler::handleError',
|
||||||
|
'level' => E_ALL & ~E_DEPRECATED,
|
||||||
|
'trace' => true
|
||||||
|
));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the Exception handler used for uncaught exceptions. By default,
|
||||||
|
* ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
|
||||||
|
* while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
|
||||||
|
* framework errors will be coerced into generic HTTP errors.
|
||||||
|
*
|
||||||
|
* Options:
|
||||||
|
*
|
||||||
|
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
|
||||||
|
* including anonymous functions.
|
||||||
|
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
||||||
|
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
|
||||||
|
* should place the file for that class in app/Lib/Error. This class needs to implement a render method.
|
||||||
|
* - `log` - boolean - Should Exceptions be logged?
|
||||||
|
*
|
||||||
|
* @see ErrorHandler for more information on exception handling and configuration.
|
||||||
|
*/
|
||||||
|
Configure::write('Exception', array(
|
||||||
|
'handler' => 'ErrorHandler::handleException',
|
||||||
|
'renderer' => 'ExceptionRenderer',
|
||||||
|
'log' => true
|
||||||
|
));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application wide charset encoding
|
||||||
|
*/
|
||||||
|
Configure::write('App.encoding', 'UTF-8');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To configure CakePHP *not* to use mod_rewrite and to
|
||||||
|
* use CakePHP pretty URLs, remove these .htaccess
|
||||||
|
* files:
|
||||||
|
*
|
||||||
|
* /.htaccess
|
||||||
|
* /app/.htaccess
|
||||||
|
* /app/webroot/.htaccess
|
||||||
|
*
|
||||||
|
* And uncomment the App.baseUrl below. But keep in mind
|
||||||
|
* that plugin assets such as images, CSS and Javascript files
|
||||||
|
* will not work without url rewriting!
|
||||||
|
* To work around this issue you should either symlink or copy
|
||||||
|
* the plugin assets into you app's webroot directory. This is
|
||||||
|
* recommended even when you are using mod_rewrite. Handling static
|
||||||
|
* assets through the Dispatcher is incredibly inefficient and
|
||||||
|
* included primarily as a development convenience - and
|
||||||
|
* thus not recommended for production applications.
|
||||||
|
*/
|
||||||
|
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uncomment the define below to use CakePHP prefix routes.
|
||||||
|
*
|
||||||
|
* The value of the define determines the names of the routes
|
||||||
|
* and their associated controller actions:
|
||||||
|
*
|
||||||
|
* Set to an array of prefixes you want to use in your application. Use for
|
||||||
|
* admin or other prefixed routes.
|
||||||
|
*
|
||||||
|
* Routing.prefixes = array('admin', 'manager');
|
||||||
|
*
|
||||||
|
* Enables:
|
||||||
|
* `admin_index()` and `/admin/controller/index`
|
||||||
|
* `manager_index()` and `/manager/controller/index`
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Configure::write('Routing.prefixes', array('admin'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turn off all caching application-wide.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Configure::write('Cache.disable', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable cache checking.
|
||||||
|
*
|
||||||
|
* If set to true, for view caching you must still use the controller
|
||||||
|
* public $cacheAction inside your controllers to define caching settings.
|
||||||
|
* You can either set it controller-wide by setting public $cacheAction = true,
|
||||||
|
* or in each action using $this->cacheAction = true.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Configure::write('Cache.check', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable cache view prefixes.
|
||||||
|
*
|
||||||
|
* If set it will be prepended to the cache name for view file caching. This is
|
||||||
|
* helpful if you deploy the same application via multiple subdomains and languages,
|
||||||
|
* for instance. Each version can then have its own view cache namespace.
|
||||||
|
* Note: The final cache file name will then be `prefix_cachefilename`.
|
||||||
|
*/
|
||||||
|
//Configure::write('Cache.viewPrefix', 'prefix');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Session configuration.
|
||||||
|
*
|
||||||
|
* Contains an array of settings to use for session configuration. The defaults key is
|
||||||
|
* used to define a default preset to use for sessions, any settings declared here will override
|
||||||
|
* the settings of the default config.
|
||||||
|
*
|
||||||
|
* ## Options
|
||||||
|
*
|
||||||
|
* - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
|
||||||
|
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
|
||||||
|
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
|
||||||
|
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
|
||||||
|
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
|
||||||
|
* - `Session.defaults` - The default configuration set to use as a basis for your session.
|
||||||
|
* There are four builtins: php, cake, cache, database.
|
||||||
|
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables,
|
||||||
|
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
|
||||||
|
* to the ini array.
|
||||||
|
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
|
||||||
|
* sessionids that change frequently. See CakeSession::$requestCountdown.
|
||||||
|
* - `Session.ini` - An associative array of additional ini values to set.
|
||||||
|
*
|
||||||
|
* The built in defaults are:
|
||||||
|
*
|
||||||
|
* - 'php' - Uses settings defined in your php.ini.
|
||||||
|
* - 'cake' - Saves session files in CakePHP's /tmp directory.
|
||||||
|
* - 'database' - Uses CakePHP's database sessions.
|
||||||
|
* - 'cache' - Use the Cache class to save sessions.
|
||||||
|
*
|
||||||
|
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
|
||||||
|
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
|
||||||
|
*
|
||||||
|
* To use database sessions, run the app/Config/Schema/sessions.php schema using
|
||||||
|
* the cake shell command: cake schema create Sessions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Configure::write('Session', array(
|
||||||
|
'defaults' => 'php'
|
||||||
|
));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A random string used in security hashing methods.
|
||||||
|
*/
|
||||||
|
Configure::write('Security.salt', 'asdklflLKAD89349034klljkaLKADFasdf4348934klxci');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
||||||
|
*/
|
||||||
|
Configure::write('Security.cipherSeed', '902349817681234590765905768091236');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply timestamps with the last modified time to static assets (js, css, images).
|
||||||
|
* Will append a query string parameter containing the time the file was modified. This is
|
||||||
|
* useful for invalidating browser caches.
|
||||||
|
*
|
||||||
|
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
|
||||||
|
* timestamping regardless of debug value.
|
||||||
|
*/
|
||||||
|
//Configure::write('Asset.timestamp', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
|
||||||
|
* This requires a/var/cache directory to be writable by the web server for caching.
|
||||||
|
* and /vendors/csspp/csspp.php
|
||||||
|
*
|
||||||
|
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
|
||||||
|
*/
|
||||||
|
//Configure::write('Asset.filter.css', 'css.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
|
||||||
|
* output, and setting the config below to the name of the script.
|
||||||
|
*
|
||||||
|
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
|
||||||
|
*/
|
||||||
|
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class name and database used in CakePHP's
|
||||||
|
* access control lists.
|
||||||
|
*/
|
||||||
|
Configure::write('Acl.classname', 'DbAcl');
|
||||||
|
Configure::write('Acl.database', 'default');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uncomment this line and correct your server timezone to fix
|
||||||
|
* any date & time related errors.
|
||||||
|
*/
|
||||||
|
//date_default_timezone_set('UTC');
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Cache Engine Configuration
|
||||||
|
* Default settings provided below
|
||||||
|
*
|
||||||
|
* File storage engine.
|
||||||
|
*
|
||||||
|
* Cache::config('default', array(
|
||||||
|
* 'engine' => 'File', //[required]
|
||||||
|
* 'duration' => 3600, //[optional]
|
||||||
|
* 'probability' => 100, //[optional]
|
||||||
|
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
||||||
|
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
||||||
|
* 'lock' => false, //[optional] use file locking
|
||||||
|
* 'serialize' => true, [optional]
|
||||||
|
* ));
|
||||||
|
*
|
||||||
|
* APC (http://pecl.php.net/package/APC)
|
||||||
|
*
|
||||||
|
* Cache::config('default', array(
|
||||||
|
* 'engine' => 'Apc', //[required]
|
||||||
|
* 'duration' => 3600, //[optional]
|
||||||
|
* 'probability' => 100, //[optional]
|
||||||
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||||
|
* ));
|
||||||
|
*
|
||||||
|
* Xcache (http://xcache.lighttpd.net/)
|
||||||
|
*
|
||||||
|
* Cache::config('default', array(
|
||||||
|
* 'engine' => 'Xcache', //[required]
|
||||||
|
* 'duration' => 3600, //[optional]
|
||||||
|
* 'probability' => 100, //[optional]
|
||||||
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||||
|
* 'user' => 'user', //user from xcache.admin.user settings
|
||||||
|
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
||||||
|
* ));
|
||||||
|
*
|
||||||
|
* Memcache (http://www.danga.com/memcached/)
|
||||||
|
*
|
||||||
|
* Cache::config('default', array(
|
||||||
|
* 'engine' => 'Memcache', //[required]
|
||||||
|
* 'duration' => 3600, //[optional]
|
||||||
|
* 'probability' => 100, //[optional]
|
||||||
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||||
|
* 'servers' => array(
|
||||||
|
* '127.0.0.1:11211' // localhost, default port 11211
|
||||||
|
* ), //[optional]
|
||||||
|
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
||||||
|
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
||||||
|
* ));
|
||||||
|
*
|
||||||
|
* Wincache (http://php.net/wincache)
|
||||||
|
*
|
||||||
|
* Cache::config('default', array(
|
||||||
|
* 'engine' => 'Wincache', //[required]
|
||||||
|
* 'duration' => 3600, //[optional]
|
||||||
|
* 'probability' => 100, //[optional]
|
||||||
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||||
|
* ));
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the cache handlers that CakePHP will use for internal
|
||||||
|
* metadata like class maps, and model schema.
|
||||||
|
*
|
||||||
|
* By default File is used, but for improved performance you should use APC.
|
||||||
|
*
|
||||||
|
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
|
||||||
|
* Please check the comments in bootstrap.php for more info on the cache engines available
|
||||||
|
* and their settings.
|
||||||
|
*/
|
||||||
|
$engine = 'File';
|
||||||
|
|
||||||
|
// In development mode, caches should expire quickly.
|
||||||
|
$duration = '+999 days';
|
||||||
|
if (Configure::read('debug') > 0) {
|
||||||
|
$duration = '+10 seconds';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
|
||||||
|
$prefix = 'myapp_';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the cache used for general framework caching. Path information,
|
||||||
|
* object listings, and translation cache files are stored with this configuration.
|
||||||
|
*/
|
||||||
|
Cache::config('_cake_core_', array(
|
||||||
|
'engine' => $engine,
|
||||||
|
'prefix' => $prefix . 'cake_core_',
|
||||||
|
'path' => CACHE . 'persistent' . DS,
|
||||||
|
'serialize' => ($engine === 'File'),
|
||||||
|
'duration' => $duration
|
||||||
|
));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the cache for model and datasource caches. This cache configuration
|
||||||
|
* is used to store schema descriptions, and table listings in connections.
|
||||||
|
*/
|
||||||
|
Cache::config('_cake_model_', array(
|
||||||
|
'engine' => $engine,
|
||||||
|
'prefix' => $prefix . 'cake_model_',
|
||||||
|
'path' => CACHE . 'models' . DS,
|
||||||
|
'serialize' => ($engine === 'File'),
|
||||||
|
'duration' => $duration
|
||||||
|
));
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is core configuration file.
|
||||||
|
*
|
||||||
|
* Use it to configure core behaviour of Cake.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*
|
||||||
|
* Database configuration class.
|
||||||
|
* You can specify multiple configurations for production, development and testing.
|
||||||
|
*
|
||||||
|
* datasource => The name of a supported datasource; valid options are as follows:
|
||||||
|
* Database/Mysql - MySQL 4 & 5,
|
||||||
|
* Database/Sqlite - SQLite (PHP5 only),
|
||||||
|
* Database/Postgres - PostgreSQL 7 and higher,
|
||||||
|
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
|
||||||
|
*
|
||||||
|
* You can add custom database datasources (or override existing datasources) by adding the
|
||||||
|
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* persistent => true / false
|
||||||
|
* Determines whether or not the database should use a persistent connection
|
||||||
|
*
|
||||||
|
* host =>
|
||||||
|
* the host you connect to the database. To add a socket or port number, use 'port' => #
|
||||||
|
*
|
||||||
|
* prefix =>
|
||||||
|
* Uses the given prefix for all the tables in this database. This setting can be overridden
|
||||||
|
* on a per-table basis with the Model::$tablePrefix property.
|
||||||
|
*
|
||||||
|
* schema =>
|
||||||
|
* For Postgres/Sqlserver specifies which schema you would like to use the tables in. Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
|
||||||
|
* the connected user's default schema (typically 'dbo').
|
||||||
|
*
|
||||||
|
* encoding =>
|
||||||
|
* For MySQL, Postgres specifies the character encoding to use when connecting to the
|
||||||
|
* database. Uses database default not specified.
|
||||||
|
*
|
||||||
|
* unix_socket =>
|
||||||
|
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
|
||||||
|
*/
|
||||||
|
class DATABASE_CONFIG {
|
||||||
|
|
||||||
|
public $default = array(
|
||||||
|
'datasource' => 'Database/Mysql',
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => 'localhost',
|
||||||
|
'login' => 'zm',
|
||||||
|
'password' => 'zm',
|
||||||
|
'database' => 'zm',
|
||||||
|
'prefix' => '',
|
||||||
|
//'encoding' => 'utf8',
|
||||||
|
);
|
||||||
|
|
||||||
|
public $test = array(
|
||||||
|
'datasource' => 'Database/Mysql',
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => 'localhost',
|
||||||
|
'login' => 'user',
|
||||||
|
'password' => 'password',
|
||||||
|
'database' => 'test_database_name',
|
||||||
|
'prefix' => '',
|
||||||
|
//'encoding' => 'utf8',
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is email configuration file.
|
||||||
|
*
|
||||||
|
* Use it to configure email transports of Cake.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config
|
||||||
|
* @since CakePHP(tm) v 2.0.0
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*
|
||||||
|
* Email configuration class.
|
||||||
|
* You can specify multiple configurations for production, development and testing.
|
||||||
|
*
|
||||||
|
* transport => The name of a supported transport; valid options are as follows:
|
||||||
|
* Mail - Send using PHP mail function
|
||||||
|
* Smtp - Send using SMTP
|
||||||
|
* Debug - Do not send the email, just return the result
|
||||||
|
*
|
||||||
|
* You can add custom transports (or override existing transports) by adding the
|
||||||
|
* appropriate file to app/Network/Email. Transports should be named 'YourTransport.php',
|
||||||
|
* where 'Your' is the name of the transport.
|
||||||
|
*
|
||||||
|
* from =>
|
||||||
|
* The origin email. See CakeEmail::from() about the valid values
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class EmailConfig {
|
||||||
|
|
||||||
|
public $default = array(
|
||||||
|
'transport' => 'Mail',
|
||||||
|
'from' => 'you@localhost',
|
||||||
|
//'charset' => 'utf-8',
|
||||||
|
//'headerCharset' => 'utf-8',
|
||||||
|
);
|
||||||
|
|
||||||
|
public $smtp = array(
|
||||||
|
'transport' => 'Smtp',
|
||||||
|
'from' => array('site@localhost' => 'My Site'),
|
||||||
|
'host' => 'localhost',
|
||||||
|
'port' => 25,
|
||||||
|
'timeout' => 30,
|
||||||
|
'username' => 'user',
|
||||||
|
'password' => 'secret',
|
||||||
|
'client' => null,
|
||||||
|
'log' => false,
|
||||||
|
//'charset' => 'utf-8',
|
||||||
|
//'headerCharset' => 'utf-8',
|
||||||
|
);
|
||||||
|
|
||||||
|
public $fast = array(
|
||||||
|
'from' => 'you@localhost',
|
||||||
|
'sender' => null,
|
||||||
|
'to' => null,
|
||||||
|
'cc' => null,
|
||||||
|
'bcc' => null,
|
||||||
|
'replyTo' => null,
|
||||||
|
'readReceipt' => null,
|
||||||
|
'returnPath' => null,
|
||||||
|
'messageId' => true,
|
||||||
|
'subject' => null,
|
||||||
|
'message' => null,
|
||||||
|
'headers' => null,
|
||||||
|
'viewRender' => null,
|
||||||
|
'template' => false,
|
||||||
|
'layout' => false,
|
||||||
|
'viewVars' => null,
|
||||||
|
'attachments' => null,
|
||||||
|
'emailFormat' => null,
|
||||||
|
'transport' => 'Smtp',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'port' => 25,
|
||||||
|
'timeout' => 30,
|
||||||
|
'username' => 'user',
|
||||||
|
'password' => 'secret',
|
||||||
|
'client' => null,
|
||||||
|
'log' => true,
|
||||||
|
//'charset' => 'utf-8',
|
||||||
|
//'headerCharset' => 'utf-8',
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Routes configuration
|
||||||
|
*
|
||||||
|
* In this file, you set up routes to your controllers and their actions.
|
||||||
|
* Routes are very important mechanism that allows you to freely connect
|
||||||
|
* different urls to chosen controllers and their actions (functions).
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Config
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Here, we are connecting '/' (base path) to controller called 'Pages',
|
||||||
|
* its action called 'display', and we pass a param to select the view file
|
||||||
|
* to use (in this case, /app/View/Pages/home.ctp)...
|
||||||
|
*/
|
||||||
|
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
||||||
|
/**
|
||||||
|
* ...and connect the rest of 'Pages' controller's urls.
|
||||||
|
*/
|
||||||
|
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load all plugin routes. See the CakePlugin documentation on
|
||||||
|
* how to customize the loading of plugin routes.
|
||||||
|
*/
|
||||||
|
CakePlugin::routes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load the CakePHP default routes. Only remove this if you do not want to use
|
||||||
|
* the built-in default routes.
|
||||||
|
*/
|
||||||
|
require CAKE . 'Config' . DS . 'routes.php';
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AppShell file
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @since CakePHP(tm) v 2.0
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
App::uses('Shell', 'Console');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application Shell
|
||||||
|
*
|
||||||
|
* Add your application-wide methods in the class below, your shells
|
||||||
|
* will inherit them.
|
||||||
|
*
|
||||||
|
* @package app.Console.Command
|
||||||
|
*/
|
||||||
|
class AppShell extends Shell {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# Bake is a shell script for running CakePHP bake script
|
||||||
|
# PHP 5
|
||||||
|
#
|
||||||
|
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
#
|
||||||
|
# Licensed under The MIT License
|
||||||
|
# For full copyright and license information, please see the LICENSE.txt
|
||||||
|
# Redistributions of files must retain the above copyright notice.
|
||||||
|
#
|
||||||
|
# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
# @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
# @package app.Console
|
||||||
|
# @since CakePHP(tm) v 1.2.0.5012
|
||||||
|
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Canonicalize by following every symlink of the given name recursively
|
||||||
|
canonicalize() {
|
||||||
|
NAME="$1"
|
||||||
|
if [ -f "$NAME" ]
|
||||||
|
then
|
||||||
|
DIR=$(dirname -- "$NAME")
|
||||||
|
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
|
||||||
|
fi
|
||||||
|
while [ -h "$NAME" ]; do
|
||||||
|
DIR=$(dirname -- "$NAME")
|
||||||
|
SYM=$(readlink "$NAME")
|
||||||
|
NAME=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
|
||||||
|
done
|
||||||
|
echo "$NAME"
|
||||||
|
}
|
||||||
|
|
||||||
|
CONSOLE=$(dirname -- "$(canonicalize "$0")")
|
||||||
|
APP=$(dirname "$CONSOLE")
|
||||||
|
|
||||||
|
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
|
||||||
|
exit
|
|
@ -0,0 +1,32 @@
|
||||||
|
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
::
|
||||||
|
:: Bake is a shell script for running CakePHP bake script
|
||||||
|
:: PHP 5
|
||||||
|
::
|
||||||
|
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
::
|
||||||
|
:: Licensed under The MIT License
|
||||||
|
:: Redistributions of files must retain the above copyright notice.
|
||||||
|
::
|
||||||
|
:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
:: @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
:: @package app.Console
|
||||||
|
:: @since CakePHP(tm) v 2.0
|
||||||
|
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
::
|
||||||
|
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
|
||||||
|
:: In order for this script to work as intended, the cake\console\ folder must be in your PATH
|
||||||
|
|
||||||
|
@echo.
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
SET app=%0
|
||||||
|
SET lib=%~dp0
|
||||||
|
|
||||||
|
php -q "%lib%cake.php" -working "%CD% " %*
|
||||||
|
|
||||||
|
echo.
|
||||||
|
|
||||||
|
exit /B %ERRORLEVEL%
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/php -q
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Command-line code generation utility to automate programmer chores.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Console
|
||||||
|
* @since CakePHP(tm) v 2.0
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
$ds = DIRECTORY_SEPARATOR;
|
||||||
|
$dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
|
||||||
|
|
||||||
|
if (function_exists('ini_set')) {
|
||||||
|
$root = dirname(dirname(dirname(__FILE__)));
|
||||||
|
|
||||||
|
// the following line differs from its sibling
|
||||||
|
// /lib/Cake/Console/Templates/skel/Console/cake.php
|
||||||
|
ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!include($dispatcher)) {
|
||||||
|
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
|
||||||
|
}
|
||||||
|
unset($paths, $path, $dispatcher, $root, $ds);
|
||||||
|
|
||||||
|
return ShellDispatcher::run($argv);
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Application level Controller
|
||||||
|
*
|
||||||
|
* This file is application-wide controller file. You can put all
|
||||||
|
* application-wide controller-related methods here.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Controller
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
App::uses('Controller', 'Controller');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application Controller
|
||||||
|
*
|
||||||
|
* Add your application-wide methods in the class below, your controllers
|
||||||
|
* will inherit them.
|
||||||
|
*
|
||||||
|
* @package app.Controller
|
||||||
|
* @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
|
||||||
|
*/
|
||||||
|
class AppController extends Controller {
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class EventsController extends AppController {
|
||||||
|
public $helpers = array('Html', 'Form', 'Paginator');
|
||||||
|
public $components = array('Paginator');
|
||||||
|
|
||||||
|
public $paginate = array(
|
||||||
|
'limit' => 25,
|
||||||
|
'order' => array( 'Event.Id' => 'asc'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
public function index() {
|
||||||
|
# $this->set('events', $this->Event->find('all', array('limit' => 1000)));
|
||||||
|
$data = $this->paginate('Event');
|
||||||
|
$this->set('events', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
throw new NotFoundException(__('Invalid event'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$event = $this->Event->findById($id);
|
||||||
|
if (!$event) {
|
||||||
|
throw new NotFoundException(__('Invalid event'));
|
||||||
|
}
|
||||||
|
$this->set('event', $event);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Static content controller.
|
||||||
|
*
|
||||||
|
* This file will render views from views/pages/
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Controller
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
App::uses('AppController', 'Controller');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static content controller
|
||||||
|
*
|
||||||
|
* Override this controller by placing a copy in controllers directory of an application
|
||||||
|
*
|
||||||
|
* @package app.Controller
|
||||||
|
* @link http://book.cakephp.org/2.0/en/controllers/pages-controller.html
|
||||||
|
*/
|
||||||
|
class PagesController extends AppController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controller name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $name = 'Pages';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This controller does not use a model
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $uses = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays a view
|
||||||
|
*
|
||||||
|
* @param mixed What page to display
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function display() {
|
||||||
|
$path = func_get_args();
|
||||||
|
|
||||||
|
$count = count($path);
|
||||||
|
if (!$count) {
|
||||||
|
$this->redirect('/');
|
||||||
|
}
|
||||||
|
$page = $subpage = $title_for_layout = null;
|
||||||
|
|
||||||
|
if (!empty($path[0])) {
|
||||||
|
$page = $path[0];
|
||||||
|
}
|
||||||
|
if (!empty($path[1])) {
|
||||||
|
$subpage = $path[1];
|
||||||
|
}
|
||||||
|
if (!empty($path[$count - 1])) {
|
||||||
|
$title_for_layout = Inflector::humanize($path[$count - 1]);
|
||||||
|
}
|
||||||
|
$this->set(compact('page', 'subpage', 'title_for_layout'));
|
||||||
|
$this->render(implode('/', $path));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Application model for Cake.
|
||||||
|
*
|
||||||
|
* This file is application-wide model file. You can put all
|
||||||
|
* application-wide model-related methods here.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.Model
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
App::uses('Model', 'Model');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application model for Cake.
|
||||||
|
*
|
||||||
|
* Add your application-wide methods in the class below, your models
|
||||||
|
* will inherit them.
|
||||||
|
*
|
||||||
|
* @package app.Model
|
||||||
|
*/
|
||||||
|
class AppModel extends Model {
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
class Event extends AppModel {
|
||||||
|
}
|
||||||
|
?>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Emails.html
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
$content = explode("\n", $content);
|
||||||
|
|
||||||
|
foreach ($content as $line):
|
||||||
|
echo '<p> ' . $line . "</p>\n";
|
||||||
|
endforeach;
|
||||||
|
?>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Emails.text
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php echo $content; ?>
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Errors
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<h2><?php echo $name; ?></h2>
|
||||||
|
<p class="error">
|
||||||
|
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||||
|
<?php printf(
|
||||||
|
__d('cake', 'The requested address %s was not found on this server.'),
|
||||||
|
"<strong>'{$url}'</strong>"
|
||||||
|
); ?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
if (Configure::read('debug') > 0):
|
||||||
|
echo $this->element('exception_stack_trace');
|
||||||
|
endif;
|
||||||
|
?>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Errors
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<h2><?php echo $name; ?></h2>
|
||||||
|
<p class="error">
|
||||||
|
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||||
|
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
if (Configure::read('debug') > 0):
|
||||||
|
echo $this->element('exception_stack_trace');
|
||||||
|
endif;
|
||||||
|
?>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<h1>ZoneMinder Events</h1>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Id</th>
|
||||||
|
<th>MonitorId</th>
|
||||||
|
<th>Length</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Here is where we loop through our $events array, printing out post info -->
|
||||||
|
|
||||||
|
<?php foreach ($events as $event): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($event['Event']['Name'],
|
||||||
|
array('controller' => 'events', 'action' => 'view', $event['Event']['Id'])); ?>
|
||||||
|
<td><?php echo $event['Event']['MonitorId']; ?></td>
|
||||||
|
<td><?php echo $event['Event']['Length']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php unset($event); ?>
|
||||||
|
<?php echo $this->Paginator->numbers(); ?>
|
||||||
|
</table>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<h1><?php echo h($event['Event']['Name']); ?></h1>
|
||||||
|
<ol>
|
||||||
|
<li><?php echo $event['Event']['Id']; ?></li>
|
||||||
|
<li><?php echo $event['Event']['Id']; ?></li>
|
||||||
|
<li><?php echo $event['Event']['StartTime']; ?></li>
|
||||||
|
<li><?php echo $event['Event']['Length']; ?></li>
|
||||||
|
<li><?php echo $event['Event']['Frames']; ?></li>
|
||||||
|
<li><?php echo $event['Event']['Id']; ?></li>
|
||||||
|
</ol>
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Application level View Helper
|
||||||
|
*
|
||||||
|
* This file is application-wide helper file. You can put all
|
||||||
|
* application-wide helper-related methods here.
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Helper
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
App::uses('Helper', 'View');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application helper
|
||||||
|
*
|
||||||
|
* Add your application-wide methods in the class below, your helpers
|
||||||
|
* will inherit them.
|
||||||
|
*
|
||||||
|
* @package app.View.Helper
|
||||||
|
*/
|
||||||
|
class AppHelper extends Helper {
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Layouts.Email.html
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><?php echo $title_for_layout; ?></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php echo $this->fetch('content'); ?>
|
||||||
|
|
||||||
|
<p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Layouts.Email.text
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php echo $this->fetch('content'); ?>
|
||||||
|
|
||||||
|
This email was sent using the CakePHP Framework, http://cakephp.org.
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php echo $this->fetch('content'); ?>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title>
|
||||||
|
<?php echo $cakeDescription ?>:
|
||||||
|
<?php echo $title_for_layout; ?>
|
||||||
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
|
||||||
|
echo $this->Html->css('cake.generic');
|
||||||
|
|
||||||
|
echo $this->fetch('meta');
|
||||||
|
echo $this->fetch('css');
|
||||||
|
echo $this->fetch('script');
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $this->fetch('content'); ?>
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<?php echo $this->Html->link(
|
||||||
|
$this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
|
||||||
|
'http://www.cakephp.org/',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title>
|
||||||
|
<?php echo $cakeDescription ?>:
|
||||||
|
<?php echo $title_for_layout; ?>
|
||||||
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
|
||||||
|
echo $this->Html->css('cake.generic');
|
||||||
|
|
||||||
|
echo $this->fetch('meta');
|
||||||
|
echo $this->fetch('css');
|
||||||
|
echo $this->fetch('script');
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $this->fetch('content'); ?>
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<?php echo $this->Html->link(
|
||||||
|
$this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
|
||||||
|
'http://www.cakephp.org/',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title><?php echo $page_title; ?></title>
|
||||||
|
|
||||||
|
<?php if (Configure::read('debug') == 0) { ?>
|
||||||
|
<meta http-equiv="Refresh" content="<?php echo $pause; ?>;url=<?php echo $url; ?>"/>
|
||||||
|
<?php } ?>
|
||||||
|
<style><!--
|
||||||
|
P { text-align:center; font:bold 1.1em sans-serif }
|
||||||
|
A { color:#444; text-decoration:none }
|
||||||
|
A:HOVER { text-decoration: underline; color:#44E }
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p><a href="<?php echo $url; ?>"><?php echo $message; ?></a></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?php echo $scripts_for_layout; ?>
|
||||||
|
<script type="text/javascript"><?php echo $this->fetch('content'); ?></script>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
if (!isset($channel)) {
|
||||||
|
$channel = array();
|
||||||
|
}
|
||||||
|
if (!isset($channel['title'])) {
|
||||||
|
$channel['title'] = $title_for_layout;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $this->Rss->document(
|
||||||
|
$this->Rss->channel(
|
||||||
|
array(), $channel, $this->fetch('content')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
|
@ -0,0 +1 @@
|
||||||
|
<?php echo $this->fetch('content'); ?>
|
|
@ -0,0 +1,226 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.View.Pages
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
if (!Configure::read('debug')):
|
||||||
|
throw new NotFoundException();
|
||||||
|
endif;
|
||||||
|
App::uses('Debugger', 'Utility');
|
||||||
|
?>
|
||||||
|
<h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
|
||||||
|
<p>
|
||||||
|
<a href="http://cakephp.org/changelogs/<?php echo Configure::version(); ?>"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
if (Configure::read('debug') > 0):
|
||||||
|
Debugger::checkSecurityKeys();
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<p id="url-rewriting-warning" style="background-color:#e32; color:#fff;">
|
||||||
|
<?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?>
|
||||||
|
1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/url-rewriting.html" style="color:#fff;">Help me configure it</a>
|
||||||
|
2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if (version_compare(PHP_VERSION, '5.2.8', '>=')):
|
||||||
|
echo '<span class="notice success">';
|
||||||
|
echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if (is_writable(TMP)):
|
||||||
|
echo '<span class="notice success">';
|
||||||
|
echo __d('cake_dev', 'Your tmp directory is writable.');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_dev', 'Your tmp directory is NOT writable.');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
$settings = Cache::settings();
|
||||||
|
if (!empty($settings)):
|
||||||
|
echo '<span class="notice success">';
|
||||||
|
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/Config/core.php');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
$filePresent = null;
|
||||||
|
if (file_exists(APP . 'Config' . DS . 'database.php')):
|
||||||
|
echo '<span class="notice success">';
|
||||||
|
echo __d('cake_dev', 'Your database configuration file is present.');
|
||||||
|
$filePresent = true;
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_dev', 'Your database configuration file is NOT present.');
|
||||||
|
echo '<br/>';
|
||||||
|
echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
if (isset($filePresent)):
|
||||||
|
App::uses('ConnectionManager', 'Model');
|
||||||
|
try {
|
||||||
|
$connected = ConnectionManager::getDataSource('default');
|
||||||
|
} catch (Exception $connectionError) {
|
||||||
|
$connected = false;
|
||||||
|
$errorMsg = $connectionError->getMessage();
|
||||||
|
if (method_exists($connectionError, 'getAttributes')) {
|
||||||
|
$attributes = $connectionError->getAttributes();
|
||||||
|
if (isset($errorMsg['message'])) {
|
||||||
|
$errorMsg .= '<br />' . $attributes['message'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if ($connected && $connected->isConnected()):
|
||||||
|
echo '<span class="notice success">';
|
||||||
|
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_dev', 'Cake is NOT able to connect to the database.');
|
||||||
|
echo '<br /><br />';
|
||||||
|
echo $errorMsg;
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php
|
||||||
|
App::uses('Validation', 'Utility');
|
||||||
|
if (!Validation::alphaNumeric('cakephp')) {
|
||||||
|
echo '<p><span class="notice">';
|
||||||
|
echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
|
||||||
|
echo '<br/>';
|
||||||
|
echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring');
|
||||||
|
echo '</span></p>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if (CakePlugin::loaded('DebugKit')):
|
||||||
|
echo '<span class="notice success">';
|
||||||
|
echo __d('cake_dev', 'DebugKit plugin is present');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_dev', 'DebugKit is not installed. It will help you inspect and debug different aspects of your application.');
|
||||||
|
echo '<br/>';
|
||||||
|
echo __d('cake_dev', 'You can install it from %s', $this->Html->link('github', 'https://github.com/cakephp/debug_kit'));
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo __d('cake_dev', 'To change the content of this page, edit: APP/View/Pages/home.ctp.<br />
|
||||||
|
To change its layout, edit: APP/View/Layouts/default.ctp.<br />
|
||||||
|
You can also add some CSS styles for your pages at: APP/webroot/css.');
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3><?php echo __d('cake_dev', 'Getting Started'); ?></h3>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->link(
|
||||||
|
sprintf('<strong>%s</strong> %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 2.0 Docs')),
|
||||||
|
'http://book.cakephp.org/2.0/en/',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->link(
|
||||||
|
__d('cake_dev', 'The 15 min Blog Tutorial'),
|
||||||
|
'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3><?php echo __d('cake_dev', 'Official Plugins'); ?></h3>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<?php echo $this->Html->link('DebugKit', 'https://github.com/cakephp/debug_kit') ?>:
|
||||||
|
<?php echo __d('cake_dev', 'provides a debugging toolbar and enhanced debugging tools for CakePHP applications.'); ?>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<?php echo $this->Html->link('Localized', 'https://github.com/cakephp/localized') ?>:
|
||||||
|
<?php echo __d('cake_dev', 'contains various localized validation classes and translations for specific countries'); ?>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3><?php echo __d('cake_dev', 'More about Cake'); ?></h3>
|
||||||
|
<p>
|
||||||
|
<?php echo __d('cake_dev', 'CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php echo __d('cake_dev', 'Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.'); ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://cakefoundation.org/"><?php echo __d('cake_dev', 'Cake Software Foundation'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li>
|
||||||
|
<li><a href="http://www.cakephp.org"><?php echo __d('cake_dev', 'CakePHP'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li>
|
||||||
|
<li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li>
|
||||||
|
<li><a href="http://api.cakephp.org/"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'Quick Reference'); ?></li></ul></li>
|
||||||
|
<li><a href="http://bakery.cakephp.org"><?php echo __d('cake_dev', 'The Bakery'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'Everything CakePHP'); ?></li></ul></li>
|
||||||
|
<li><a href="http://plugins.cakephp.org"><?php echo __d('cake_dev', 'CakePHP plugins repo'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'A comprehensive list of all CakePHP plugins created by the community'); ?></li></ul></li>
|
||||||
|
<li><a href="http://groups.google.com/group/cake-php"><?php echo __d('cake_dev', 'CakePHP Google Group'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'Community mailing list'); ?></li></ul></li>
|
||||||
|
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'Live chat about CakePHP'); ?></li></ul></li>
|
||||||
|
<li><a href="http://github.com/cakephp/"><?php echo __d('cake_dev', 'CakePHP Code'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'For the Development of CakePHP Git repository, Downloads'); ?></li></ul></li>
|
||||||
|
<li><a href="http://cakephp.lighthouseapp.com/"><?php echo __d('cake_dev', 'CakePHP Lighthouse'); ?> </a>
|
||||||
|
<ul><li><?php echo __d('cake_dev', 'CakePHP Tickets, Wiki pages, Roadmap'); ?></li></ul></li>
|
||||||
|
</ul>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
|
|
@ -0,0 +1,6 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||||
|
</IfModule>
|
|
@ -0,0 +1,740 @@
|
||||||
|
@charset "utf-8";
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Generic CSS for CakePHP
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.webroot.css
|
||||||
|
* @since CakePHP(tm)
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
* {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** General Style Info **/
|
||||||
|
body {
|
||||||
|
background: #003d4c;
|
||||||
|
color: #fff;
|
||||||
|
font-family:'lucida grande',verdana,helvetica,arial,sans-serif;
|
||||||
|
font-size:90%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #003d4c;
|
||||||
|
text-decoration: underline;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #367889;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
a img {
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
h1, h2, h3, h4 {
|
||||||
|
font-weight: normal;
|
||||||
|
margin-bottom:0.5em;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
background:#fff;
|
||||||
|
color: #003d4c;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
background:#fff;
|
||||||
|
color: #e32;
|
||||||
|
font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif;
|
||||||
|
font-size: 190%;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
color: #2c6877;
|
||||||
|
font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif;
|
||||||
|
font-size: 165%;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
color: #993;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
ul, li {
|
||||||
|
margin: 0 12px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 0 0 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Layout **/
|
||||||
|
#container {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header{
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
#header h1 {
|
||||||
|
line-height:20px;
|
||||||
|
background: #003d4c url('../img/cake.icon.png') no-repeat left;
|
||||||
|
color: #fff;
|
||||||
|
padding: 0px 30px;
|
||||||
|
}
|
||||||
|
#header h1 a {
|
||||||
|
color: #fff;
|
||||||
|
background: #003d4c;
|
||||||
|
font-weight: normal;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
#header h1 a:hover {
|
||||||
|
color: #fff;
|
||||||
|
background: #003d4c;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
#content{
|
||||||
|
background: #fff;
|
||||||
|
clear: both;
|
||||||
|
color: #333;
|
||||||
|
padding: 10px 20px 40px 20px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
#footer {
|
||||||
|
clear: both;
|
||||||
|
padding: 6px 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** containers **/
|
||||||
|
div.form,
|
||||||
|
div.index,
|
||||||
|
div.view {
|
||||||
|
float:right;
|
||||||
|
width:76%;
|
||||||
|
border-left:1px solid #666;
|
||||||
|
padding:10px 2%;
|
||||||
|
}
|
||||||
|
div.actions {
|
||||||
|
float:left;
|
||||||
|
width:16%;
|
||||||
|
padding:10px 1.5%;
|
||||||
|
}
|
||||||
|
div.actions h3 {
|
||||||
|
padding-top:0;
|
||||||
|
color:#777;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Tables **/
|
||||||
|
table {
|
||||||
|
border-right:0;
|
||||||
|
clear: both;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
border:0;
|
||||||
|
border-bottom:2px solid #555;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
}
|
||||||
|
th a {
|
||||||
|
display: block;
|
||||||
|
padding: 2px 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
th a.asc:after {
|
||||||
|
content: ' ⇣';
|
||||||
|
}
|
||||||
|
th a.desc:after {
|
||||||
|
content: ' ⇡';
|
||||||
|
}
|
||||||
|
table tr td {
|
||||||
|
padding: 6px;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
border-bottom:1px solid #ddd;
|
||||||
|
}
|
||||||
|
table tr:nth-child(even) {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
td.actions {
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
table td.actions a {
|
||||||
|
margin: 0px 6px;
|
||||||
|
padding:2px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SQL log */
|
||||||
|
.cake-sql-log {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.cake-sql-log td {
|
||||||
|
padding: 4px 8px;
|
||||||
|
text-align: left;
|
||||||
|
font-family: Monaco, Consolas, "Courier New", monospaced;
|
||||||
|
}
|
||||||
|
.cake-sql-log caption {
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Paging **/
|
||||||
|
.paging {
|
||||||
|
background:#fff;
|
||||||
|
color: #ccc;
|
||||||
|
margin-top: 1em;
|
||||||
|
clear:both;
|
||||||
|
}
|
||||||
|
.paging .current,
|
||||||
|
.paging .disabled,
|
||||||
|
.paging a {
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 5px 8px;
|
||||||
|
display: inline-block
|
||||||
|
}
|
||||||
|
.paging > span {
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-left: 0;
|
||||||
|
}
|
||||||
|
.paging > span:hover {
|
||||||
|
background: #efefef;
|
||||||
|
}
|
||||||
|
.paging .prev {
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
-moz-border-radius: 4px 0 0 4px;
|
||||||
|
-webkit-border-radius: 4px 0 0 4px;
|
||||||
|
border-radius: 4px 0 0 4px;
|
||||||
|
}
|
||||||
|
.paging .next {
|
||||||
|
-moz-border-radius: 0 4px 4px 0;
|
||||||
|
-webkit-border-radius: 0 4px 4px 0;
|
||||||
|
border-radius: 0 4px 4px 0;
|
||||||
|
}
|
||||||
|
.paging .disabled {
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
.paging .disabled:hover {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.paging .current {
|
||||||
|
background: #efefef;
|
||||||
|
color: #c73e14;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Scaffold View **/
|
||||||
|
dl {
|
||||||
|
line-height: 2em;
|
||||||
|
margin: 0em 0em;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
dl dd:nth-child(4n+2),
|
||||||
|
dl dt:nth-child(4n+1) {
|
||||||
|
background: #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
padding-left: 4px;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 10em;
|
||||||
|
}
|
||||||
|
dd {
|
||||||
|
margin-left: 10em;
|
||||||
|
margin-top: -2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Forms **/
|
||||||
|
form {
|
||||||
|
clear: both;
|
||||||
|
margin-right: 20px;
|
||||||
|
padding: 0;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
fieldset {
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
padding: 16px 10px;
|
||||||
|
}
|
||||||
|
fieldset legend {
|
||||||
|
color: #e32;
|
||||||
|
font-size: 160%;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
fieldset fieldset {
|
||||||
|
margin-top: 0;
|
||||||
|
padding: 10px 0 0;
|
||||||
|
}
|
||||||
|
fieldset fieldset legend {
|
||||||
|
font-size: 120%;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
fieldset fieldset div {
|
||||||
|
clear: left;
|
||||||
|
margin: 0 20px;
|
||||||
|
}
|
||||||
|
form div {
|
||||||
|
clear: both;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
padding: .5em;
|
||||||
|
vertical-align: text-top;
|
||||||
|
}
|
||||||
|
form .input {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
form .required {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
form .required label:after {
|
||||||
|
color: #e32;
|
||||||
|
content: '*';
|
||||||
|
display:inline;
|
||||||
|
}
|
||||||
|
form div.submit {
|
||||||
|
border: 0;
|
||||||
|
clear: both;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
font-size: 110%;
|
||||||
|
margin-bottom:3px;
|
||||||
|
}
|
||||||
|
input, textarea {
|
||||||
|
clear: both;
|
||||||
|
font-size: 140%;
|
||||||
|
font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif;
|
||||||
|
padding: 1%;
|
||||||
|
width:98%;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
clear: both;
|
||||||
|
font-size: 120%;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
|
select[multiple=multiple] {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
option {
|
||||||
|
font-size: 120%;
|
||||||
|
padding: 0 3px;
|
||||||
|
}
|
||||||
|
input[type=checkbox] {
|
||||||
|
clear: left;
|
||||||
|
float: left;
|
||||||
|
margin: 0px 6px 7px 2px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
div.checkbox label {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
input[type=radio] {
|
||||||
|
float:left;
|
||||||
|
width:auto;
|
||||||
|
margin: 6px 0;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
.radio label {
|
||||||
|
margin: 0 0 6px 20px;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
input[type=submit] {
|
||||||
|
display: inline;
|
||||||
|
font-size: 110%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
form .submit input[type=submit] {
|
||||||
|
background:#62af56;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||||
|
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
border-color: #2d6324;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
form .submit input[type=submit]:hover {
|
||||||
|
background: #5BA150;
|
||||||
|
}
|
||||||
|
/* Form errors */
|
||||||
|
form .error {
|
||||||
|
background: #FFDACC;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
form .error-message {
|
||||||
|
-moz-border-radius: none;
|
||||||
|
-webkit-border-radius: none;
|
||||||
|
border-radius: none;
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
margin: 0;
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
form .error,
|
||||||
|
form .error-message {
|
||||||
|
color: #9E2424;
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
-moz-box-shadow: none;
|
||||||
|
-ms-box-shadow: none;
|
||||||
|
-o-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Notices and Errors **/
|
||||||
|
.message {
|
||||||
|
clear: both;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 140%;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0 0 1em 0;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success,
|
||||||
|
.message,
|
||||||
|
.cake-error,
|
||||||
|
.cake-debug,
|
||||||
|
.notice,
|
||||||
|
p.error,
|
||||||
|
.error-message {
|
||||||
|
background: #ffcc00;
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-image: -moz-linear-gradient(top, #ffcc00, #E6B800);
|
||||||
|
background-image: -ms-linear-gradient(top, #ffcc00, #E6B800);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800));
|
||||||
|
background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800);
|
||||||
|
background-image: -o-linear-gradient(top, #ffcc00, #E6B800);
|
||||||
|
background-image: linear-gradient(top, #ffcc00, #E6B800);
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
|
margin-bottom: 18px;
|
||||||
|
padding: 7px 14px;
|
||||||
|
color: #404040;
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||||
|
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||||
|
}
|
||||||
|
.success,
|
||||||
|
.message,
|
||||||
|
.cake-error,
|
||||||
|
p.error,
|
||||||
|
.error-message {
|
||||||
|
clear: both;
|
||||||
|
color: #fff;
|
||||||
|
background: #c43c35;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
|
||||||
|
background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
|
||||||
|
background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
|
||||||
|
background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
|
||||||
|
background-image: linear-gradient(top, #ee5f5b, #c43c35);
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
.success {
|
||||||
|
clear: both;
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||||
|
background: #3B8230;
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||||
|
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
background-image: -ms-linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
background-image: -o-linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
background-image: linear-gradient(top, #76BF6B, #3B8230);
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
p.error {
|
||||||
|
font-family: Monaco, Consolas, Courier, monospace;
|
||||||
|
font-size: 120%;
|
||||||
|
padding: 0.8em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
p.error em {
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
.notice {
|
||||||
|
color: #000;
|
||||||
|
display: block;
|
||||||
|
font-size: 120%;
|
||||||
|
padding: 0.8em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
.success {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Actions **/
|
||||||
|
.actions ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.actions li {
|
||||||
|
margin:0 0 0.5em 0;
|
||||||
|
list-style-type: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.actions ul li a {
|
||||||
|
font-weight: normal;
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons and button links */
|
||||||
|
input[type=submit],
|
||||||
|
.actions ul li a,
|
||||||
|
.actions a {
|
||||||
|
font-weight:normal;
|
||||||
|
padding: 4px 8px;
|
||||||
|
background: #dcdcdc;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: -o-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
color:#333;
|
||||||
|
border:1px solid #bbb;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: #fff 0px 1px 0px;
|
||||||
|
min-width: 0;
|
||||||
|
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.actions ul li a:hover,
|
||||||
|
.actions a:hover {
|
||||||
|
background: #ededed;
|
||||||
|
border-color: #acacac;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
input[type=submit]:active,
|
||||||
|
.actions ul li a:active,
|
||||||
|
.actions a:active {
|
||||||
|
background: #eee;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#eee));
|
||||||
|
background-image: -webkit-linear-gradient(top, #dfdfdf, #eee);
|
||||||
|
background-image: -moz-linear-gradient(top, #dfdfdf, #eee);
|
||||||
|
background-image: -ms-linear-gradient(top, #dfdfdf, #eee);
|
||||||
|
background-image: -o-linear-gradient(top, #dfdfdf, #eee);
|
||||||
|
background-image: linear-gradient(top, #dfdfdf, #eee);
|
||||||
|
text-shadow: #eee 0px 1px 0px;
|
||||||
|
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
-webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
border-color: #aaa;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Related **/
|
||||||
|
.related {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Debugging **/
|
||||||
|
pre {
|
||||||
|
color: #000;
|
||||||
|
background: #f0f0f0;
|
||||||
|
padding: 15px;
|
||||||
|
-moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
-webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
.cake-debug-output {
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.cake-debug-output > span {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 5px 6px;
|
||||||
|
color: #000;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
-moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
||||||
|
}
|
||||||
|
.cake-debug,
|
||||||
|
.cake-error {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 20px;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.cake-error > a {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.cake-error {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.cake-stack-trace {
|
||||||
|
background: rgba(255, 255, 255, 0.7);
|
||||||
|
color: #333;
|
||||||
|
margin: 10px 0 5px 0;
|
||||||
|
padding: 10px 10px 0 10px;
|
||||||
|
font-size: 120%;
|
||||||
|
line-height: 140%;
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.cake-stack-trace a {
|
||||||
|
text-shadow: none;
|
||||||
|
background: rgba(255, 255, 255, 0.7);
|
||||||
|
padding: 5px;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin: 0px 4px 10px 2px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 14px;
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
-moz-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
-webkit-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
.cake-code-dump pre {
|
||||||
|
position: relative;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.cake-context {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.cake-stack-trace pre {
|
||||||
|
color: #000;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
margin: 0px 0 10px 0;
|
||||||
|
padding: 1em;
|
||||||
|
overflow: auto;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.cake-stack-trace li {
|
||||||
|
padding: 10px 5px 0px;
|
||||||
|
margin: 0 0 4px 0;
|
||||||
|
font-family: monospace;
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-wekbkit-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #dcdcdc;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: -o-linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
background-image: linear-gradient(top, #fefefe, #dcdcdc);
|
||||||
|
}
|
||||||
|
/* excerpt */
|
||||||
|
.cake-code-dump pre,
|
||||||
|
.cake-code-dump pre code {
|
||||||
|
clear: both;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 15px;
|
||||||
|
margin: 4px 2px;
|
||||||
|
padding: 4px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.cake-code-dump .code-highlight {
|
||||||
|
display: block;
|
||||||
|
background-color: rgba(255, 255, 0, 0.5);
|
||||||
|
}
|
||||||
|
.code-coverage-results div.code-line {
|
||||||
|
padding-left:5px;
|
||||||
|
display:block;
|
||||||
|
margin-left:10px;
|
||||||
|
}
|
||||||
|
.code-coverage-results div.uncovered span.content {
|
||||||
|
background:#ecc;
|
||||||
|
}
|
||||||
|
.code-coverage-results div.covered span.content {
|
||||||
|
background:#cec;
|
||||||
|
}
|
||||||
|
.code-coverage-results div.ignored span.content {
|
||||||
|
color:#aaa;
|
||||||
|
}
|
||||||
|
.code-coverage-results span.line-num {
|
||||||
|
color:#666;
|
||||||
|
display:block;
|
||||||
|
float:left;
|
||||||
|
width:20px;
|
||||||
|
text-align:right;
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
.code-coverage-results span.line-num strong {
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
.code-coverage-results div.start {
|
||||||
|
border:1px solid #aaa;
|
||||||
|
border-width:1px 1px 0px 1px;
|
||||||
|
margin-top:30px;
|
||||||
|
padding-top:5px;
|
||||||
|
}
|
||||||
|
.code-coverage-results div.end {
|
||||||
|
border:1px solid #aaa;
|
||||||
|
border-width:0px 1px 1px 1px;
|
||||||
|
margin-bottom:30px;
|
||||||
|
padding-bottom:5px;
|
||||||
|
}
|
||||||
|
.code-coverage-results div.realstart {
|
||||||
|
margin-top:0px;
|
||||||
|
}
|
||||||
|
.code-coverage-results p.note {
|
||||||
|
color:#bbb;
|
||||||
|
padding:5px;
|
||||||
|
margin:5px 0 10px;
|
||||||
|
font-size:10px;
|
||||||
|
}
|
||||||
|
.code-coverage-results span.result-bad {
|
||||||
|
color: #a00;
|
||||||
|
}
|
||||||
|
.code-coverage-results span.result-ok {
|
||||||
|
color: #fa0;
|
||||||
|
}
|
||||||
|
.code-coverage-results span.result-good {
|
||||||
|
color: #0a0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Elements **/
|
||||||
|
#url-rewriting-warning {
|
||||||
|
display:none;
|
||||||
|
}
|
After Width: | Height: | Size: 372 B |
After Width: | Height: | Size: 943 B |
After Width: | Height: | Size: 201 B |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 496 B |
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Index
|
||||||
|
*
|
||||||
|
* The Front Controller for handling every request
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package app.webroot
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Use the DS to separate the directories in other defines
|
||||||
|
*/
|
||||||
|
if (!defined('DS')) {
|
||||||
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These defines should only be edited if you have cake installed in
|
||||||
|
* a directory layout other than the way it is distributed.
|
||||||
|
* When using custom settings be sure to use the DS and do not add a trailing DS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The full path to the directory which holds "app", WITHOUT a trailing DS.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (!defined('ROOT')) {
|
||||||
|
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The actual directory name for the "app".
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (!defined('APP_DIR')) {
|
||||||
|
define('APP_DIR', basename(dirname(dirname(__FILE__))));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
|
||||||
|
*
|
||||||
|
* Un-comment this line to specify a fixed path to CakePHP.
|
||||||
|
* This should point at the directory containing `Cake`.
|
||||||
|
*
|
||||||
|
* For ease of development CakePHP uses PHP's include_path. If you
|
||||||
|
* cannot modify your include_path set this value.
|
||||||
|
*
|
||||||
|
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
||||||
|
*
|
||||||
|
* The following line differs from its sibling
|
||||||
|
* /lib/Cake/Console/Templates/skel/webroot/index.php
|
||||||
|
*/
|
||||||
|
//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Editing below this line should NOT be necessary.
|
||||||
|
* Change at your own risk.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (!defined('WEBROOT_DIR')) {
|
||||||
|
define('WEBROOT_DIR', basename(dirname(__FILE__)));
|
||||||
|
}
|
||||||
|
if (!defined('WWW_ROOT')) {
|
||||||
|
define('WWW_ROOT', dirname(__FILE__) . DS);
|
||||||
|
}
|
||||||
|
|
||||||
|
// for built-in server
|
||||||
|
if (php_sapi_name() == 'cli-server') {
|
||||||
|
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['REQUEST_URI'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||||
|
if (function_exists('ini_set')) {
|
||||||
|
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
||||||
|
}
|
||||||
|
if (!include ('Cake' . DS . 'bootstrap.php')) {
|
||||||
|
$failed = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
|
||||||
|
$failed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($failed)) {
|
||||||
|
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
App::uses('Dispatcher', 'Routing');
|
||||||
|
|
||||||
|
$Dispatcher = new Dispatcher();
|
||||||
|
$Dispatcher->dispatch(
|
||||||
|
new CakeRequest(),
|
||||||
|
new CakeResponse()
|
||||||
|
);
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Web Access Frontend for TestSuite
|
||||||
|
*
|
||||||
|
* PHP 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
||||||
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
|
* Redistributions of files must retain the above copyright notice
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://book.cakephp.org/2.0/en/development/testing.html
|
||||||
|
* @package app.webroot
|
||||||
|
* @since CakePHP(tm) v 1.2.0.4433
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
set_time_limit(0);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
/**
|
||||||
|
* Use the DS to separate the directories in other defines
|
||||||
|
*/
|
||||||
|
if (!defined('DS')) {
|
||||||
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These defines should only be edited if you have cake installed in
|
||||||
|
* a directory layout other than the way it is distributed.
|
||||||
|
* When using custom settings be sure to use the DS and do not add a trailing DS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The full path to the directory which holds "app", WITHOUT a trailing DS.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (!defined('ROOT')) {
|
||||||
|
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The actual directory name for the "app".
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (!defined('APP_DIR')) {
|
||||||
|
define('APP_DIR', basename(dirname(dirname(__FILE__))));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The absolute path to the "Cake" directory, WITHOUT a trailing DS.
|
||||||
|
*
|
||||||
|
* For ease of development CakePHP uses PHP's include_path. If you
|
||||||
|
* need to cannot modify your include_path, you can set this path.
|
||||||
|
*
|
||||||
|
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
||||||
|
*
|
||||||
|
* The following line differs from its sibling
|
||||||
|
* /lib/Cake/Console/Templates/skel/webroot/test.php
|
||||||
|
*/
|
||||||
|
//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Editing below this line should not be necessary.
|
||||||
|
* Change at your own risk.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (!defined('WEBROOT_DIR')) {
|
||||||
|
define('WEBROOT_DIR', basename(dirname(__FILE__)));
|
||||||
|
}
|
||||||
|
if (!defined('WWW_ROOT')) {
|
||||||
|
define('WWW_ROOT', dirname(__FILE__) . DS);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||||
|
if (function_exists('ini_set')) {
|
||||||
|
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
||||||
|
}
|
||||||
|
if (!include ('Cake' . DS . 'bootstrap.php')) {
|
||||||
|
$failed = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
|
||||||
|
$failed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($failed)) {
|
||||||
|
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Configure::read('debug') < 1) {
|
||||||
|
throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this url.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
|
||||||
|
|
||||||
|
CakeTestSuiteDispatcher::run();
|
|
@ -1,8 +0,0 @@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
|
|
||||||
webdir = @WEB_PREFIX@/css
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
reset.css \
|
|
||||||
spinner.css \
|
|
||||||
overlay.css
|
|
|
@ -1,421 +0,0 @@
|
||||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
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 = :
|
|
||||||
subdir = web/css
|
|
||||||
DIST_COMMON = $(dist_web_DATA) $(srcdir)/Makefile.am \
|
|
||||||
$(srcdir)/Makefile.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__installdirs = "$(DESTDIR)$(webdir)"
|
|
||||||
DATA = $(dist_web_DATA)
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
BINDIR = @BINDIR@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CGI_PREFIX = @CGI_PREFIX@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CXX = @CXX@
|
|
||||||
CXXCPP = @CXXCPP@
|
|
||||||
CXXDEPMODE = @CXXDEPMODE@
|
|
||||||
CXXFLAGS = @CXXFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
ENABLE_MMAP = @ENABLE_MMAP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
EXTRA_LIBS = @EXTRA_LIBS@
|
|
||||||
EXTRA_PERL_LIB = @EXTRA_PERL_LIB@
|
|
||||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
|
||||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
|
||||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
|
||||||
GREP = @GREP@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBDIR = @LIBDIR@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIB_ARCH = @LIB_ARCH@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
|
||||||
MYSQL_LIBS = @MYSQL_LIBS@
|
|
||||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
OPT_FFMPEG = @OPT_FFMPEG@
|
|
||||||
OPT_NETPBM = @OPT_NETPBM@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_BUILD = @PATH_BUILD@
|
|
||||||
PATH_FFMPEG = @PATH_FFMPEG@
|
|
||||||
PATH_NETPBM = @PATH_NETPBM@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
PERL = @PERL@
|
|
||||||
PERL_MM_PARMS = @PERL_MM_PARMS@
|
|
||||||
POW_LIB = @POW_LIB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
SYSCONFDIR = @SYSCONFDIR@
|
|
||||||
TIME_BUILD = @TIME_BUILD@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
WEB_GROUP = @WEB_GROUP@
|
|
||||||
WEB_HOST = @WEB_HOST@
|
|
||||||
WEB_PREFIX = @WEB_PREFIX@
|
|
||||||
WEB_USER = @WEB_USER@
|
|
||||||
ZM_CONFIG = @ZM_CONFIG@
|
|
||||||
ZM_DB_HOST = @ZM_DB_HOST@
|
|
||||||
ZM_DB_NAME = @ZM_DB_NAME@
|
|
||||||
ZM_DB_PASS = @ZM_DB_PASS@
|
|
||||||
ZM_DB_USER = @ZM_DB_USER@
|
|
||||||
ZM_HAS_GNUTLS = @ZM_HAS_GNUTLS@
|
|
||||||
ZM_HAS_GNUTLS_OPENSSL = @ZM_HAS_GNUTLS_OPENSSL@
|
|
||||||
ZM_HAS_V4L = @ZM_HAS_V4L@
|
|
||||||
ZM_HAS_V4L1 = @ZM_HAS_V4L1@
|
|
||||||
ZM_HAS_V4L2 = @ZM_HAS_V4L2@
|
|
||||||
ZM_LOGDIR = @ZM_LOGDIR@
|
|
||||||
ZM_MYSQL_ENGINE = @ZM_MYSQL_ENGINE@
|
|
||||||
ZM_PCRE = @ZM_PCRE@
|
|
||||||
ZM_PID = @ZM_PID@
|
|
||||||
ZM_RUNDIR = @ZM_RUNDIR@
|
|
||||||
ZM_SSL_LIB = @ZM_SSL_LIB@
|
|
||||||
ZM_TMPDIR = @ZM_TMPDIR@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
bindir = @bindir@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
webdir = @WEB_PREFIX@/css
|
|
||||||
dist_web_DATA = \
|
|
||||||
reset.css \
|
|
||||||
spinner.css \
|
|
||||||
overlay.css
|
|
||||||
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
||||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu web/css/Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu web/css/Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: $(am__configure_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
install-dist_webDATA: $(dist_web_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
test -z "$(webdir)" || $(MKDIR_P) "$(DESTDIR)$(webdir)"
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webdir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(webdir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-dist_webDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
test -n "$$files" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(webdir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(webdir)" && rm -f $$files
|
|
||||||
tags: TAGS
|
|
||||||
TAGS:
|
|
||||||
|
|
||||||
ctags: CTAGS
|
|
||||||
CTAGS:
|
|
||||||
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$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:
|
|
||||||
for dir in "$(DESTDIR)$(webdir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
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:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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:
|
|
||||||
|
|
||||||
html: html-am
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-dist_webDATA
|
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-html: install-html-am
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-am
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
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-dist_webDATA
|
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
|
||||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
|
||||||
install install-am install-data install-data-am \
|
|
||||||
install-dist_webDATA install-dvi install-dvi-am install-exec \
|
|
||||||
install-exec-am install-html install-html-am install-info \
|
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
|
||||||
install-ps install-ps-am install-strip installcheck \
|
|
||||||
installcheck-am installdirs maintainer-clean \
|
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
|
||||||
pdf-am ps ps-am uninstall uninstall-am uninstall-dist_webDATA
|
|
||||||
|
|
||||||
|
|
||||||
# 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:
|
|
|
@ -1,49 +0,0 @@
|
||||||
.overlayMask {
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0.6;
|
|
||||||
filter: alpha(opacity=60);
|
|
||||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
|
|
||||||
z-index: 999;
|
|
||||||
background: #aaaaaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlay {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
border: 2px solid #555555;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
z-index: 1000;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlayHeader {
|
|
||||||
float: left;
|
|
||||||
background-color: #dddddd;
|
|
||||||
width: 100%;
|
|
||||||
border-bottom: 1px solid #666666;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlayTitle {
|
|
||||||
float: left;
|
|
||||||
padding: 10px 6px;
|
|
||||||
font-weight: bold;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlayToolbar {
|
|
||||||
float: right;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 6px 4px;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlayBody {
|
|
||||||
float: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlayContent {
|
|
||||||
padding: 4px 4px 6px;
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
/*
|
|
||||||
* ZoneMinder Reset Stylesheet, $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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Based on Reset Reloaded by Eric Meyer at http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
|
|
||||||
*/
|
|
||||||
|
|
||||||
html, body, div, span, applet, object, iframe,
|
|
||||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
||||||
a, abbr, acronym, address, big, cite, code,
|
|
||||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
|
||||||
small, strike, strong, sub, sup, tt, var,
|
|
||||||
dl, dt, dd, ol, ul, li,
|
|
||||||
fieldset, form, label, legend,
|
|
||||||
input, textarea, select,
|
|
||||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
outline: 0;
|
|
||||||
font-weight: inherit;
|
|
||||||
font-style: inherit;
|
|
||||||
font-size: 100%;
|
|
||||||
font-family: inherit;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* remember to define focus styles! */
|
|
||||||
:focus {
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
line-height: 1;
|
|
||||||
color: black;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol, ul {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* tables still need 'cellspacing="0"' in the markup */
|
|
||||||
table {
|
|
||||||
border-collapse: separate;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
caption, th, td {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before, blockquote:after,
|
|
||||||
q:before, q:after {
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote, q {
|
|
||||||
quotes: "" "";
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
.spinner {
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0.9;
|
|
||||||
filter: alpha(opacity=90);
|
|
||||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90);
|
|
||||||
z-index: 1001;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.spinner-msg {
|
|
||||||
text-align: center;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner-img {
|
|
||||||
background: url(/graphics/spinner.gif) no-repeat;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
|
|
||||||
webdir = @WEB_PREFIX@/graphics
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
favicon.ico \
|
|
||||||
spinner.gif \
|
|
||||||
transparent.gif
|
|
|
@ -1,421 +0,0 @@
|
||||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
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 = :
|
|
||||||
subdir = web/graphics
|
|
||||||
DIST_COMMON = $(dist_web_DATA) $(srcdir)/Makefile.am \
|
|
||||||
$(srcdir)/Makefile.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__installdirs = "$(DESTDIR)$(webdir)"
|
|
||||||
DATA = $(dist_web_DATA)
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
BINDIR = @BINDIR@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CGI_PREFIX = @CGI_PREFIX@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CXX = @CXX@
|
|
||||||
CXXCPP = @CXXCPP@
|
|
||||||
CXXDEPMODE = @CXXDEPMODE@
|
|
||||||
CXXFLAGS = @CXXFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
ENABLE_MMAP = @ENABLE_MMAP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
EXTRA_LIBS = @EXTRA_LIBS@
|
|
||||||
EXTRA_PERL_LIB = @EXTRA_PERL_LIB@
|
|
||||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
|
||||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
|
||||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
|
||||||
GREP = @GREP@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBDIR = @LIBDIR@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIB_ARCH = @LIB_ARCH@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
|
||||||
MYSQL_LIBS = @MYSQL_LIBS@
|
|
||||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
OPT_FFMPEG = @OPT_FFMPEG@
|
|
||||||
OPT_NETPBM = @OPT_NETPBM@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_BUILD = @PATH_BUILD@
|
|
||||||
PATH_FFMPEG = @PATH_FFMPEG@
|
|
||||||
PATH_NETPBM = @PATH_NETPBM@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
PERL = @PERL@
|
|
||||||
PERL_MM_PARMS = @PERL_MM_PARMS@
|
|
||||||
POW_LIB = @POW_LIB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
SYSCONFDIR = @SYSCONFDIR@
|
|
||||||
TIME_BUILD = @TIME_BUILD@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
WEB_GROUP = @WEB_GROUP@
|
|
||||||
WEB_HOST = @WEB_HOST@
|
|
||||||
WEB_PREFIX = @WEB_PREFIX@
|
|
||||||
WEB_USER = @WEB_USER@
|
|
||||||
ZM_CONFIG = @ZM_CONFIG@
|
|
||||||
ZM_DB_HOST = @ZM_DB_HOST@
|
|
||||||
ZM_DB_NAME = @ZM_DB_NAME@
|
|
||||||
ZM_DB_PASS = @ZM_DB_PASS@
|
|
||||||
ZM_DB_USER = @ZM_DB_USER@
|
|
||||||
ZM_HAS_GNUTLS = @ZM_HAS_GNUTLS@
|
|
||||||
ZM_HAS_GNUTLS_OPENSSL = @ZM_HAS_GNUTLS_OPENSSL@
|
|
||||||
ZM_HAS_V4L = @ZM_HAS_V4L@
|
|
||||||
ZM_HAS_V4L1 = @ZM_HAS_V4L1@
|
|
||||||
ZM_HAS_V4L2 = @ZM_HAS_V4L2@
|
|
||||||
ZM_LOGDIR = @ZM_LOGDIR@
|
|
||||||
ZM_MYSQL_ENGINE = @ZM_MYSQL_ENGINE@
|
|
||||||
ZM_PCRE = @ZM_PCRE@
|
|
||||||
ZM_PID = @ZM_PID@
|
|
||||||
ZM_RUNDIR = @ZM_RUNDIR@
|
|
||||||
ZM_SSL_LIB = @ZM_SSL_LIB@
|
|
||||||
ZM_TMPDIR = @ZM_TMPDIR@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
bindir = @bindir@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
webdir = @WEB_PREFIX@/graphics
|
|
||||||
dist_web_DATA = \
|
|
||||||
favicon.ico \
|
|
||||||
spinner.gif \
|
|
||||||
transparent.gif
|
|
||||||
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
||||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu web/graphics/Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu web/graphics/Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: $(am__configure_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
install-dist_webDATA: $(dist_web_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
test -z "$(webdir)" || $(MKDIR_P) "$(DESTDIR)$(webdir)"
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webdir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(webdir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-dist_webDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
test -n "$$files" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(webdir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(webdir)" && rm -f $$files
|
|
||||||
tags: TAGS
|
|
||||||
TAGS:
|
|
||||||
|
|
||||||
ctags: CTAGS
|
|
||||||
CTAGS:
|
|
||||||
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$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:
|
|
||||||
for dir in "$(DESTDIR)$(webdir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
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:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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:
|
|
||||||
|
|
||||||
html: html-am
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-dist_webDATA
|
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-html: install-html-am
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-am
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
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-dist_webDATA
|
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
|
||||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
|
||||||
install install-am install-data install-data-am \
|
|
||||||
install-dist_webDATA install-dvi install-dvi-am install-exec \
|
|
||||||
install-exec-am install-html install-html-am install-info \
|
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
|
||||||
install-ps install-ps-am install-strip installcheck \
|
|
||||||
installcheck-am installdirs maintainer-clean \
|
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
|
||||||
pdf-am ps ps-am uninstall uninstall-am uninstall-dist_webDATA
|
|
||||||
|
|
||||||
|
|
||||||
# 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:
|
|
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 61 B |
|
@ -1,17 +0,0 @@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
|
|
||||||
webdir = @WEB_PREFIX@/includes
|
|
||||||
|
|
||||||
web_DATA = \
|
|
||||||
config.php
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
actions.php \
|
|
||||||
database.php \
|
|
||||||
functions.php \
|
|
||||||
control_functions.php \
|
|
||||||
lang.php \
|
|
||||||
logger.php
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
config.php.in
|
|
|
@ -1,453 +0,0 @@
|
||||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
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 = :
|
|
||||||
subdir = web/includes
|
|
||||||
DIST_COMMON = $(dist_web_DATA) $(srcdir)/Makefile.am \
|
|
||||||
$(srcdir)/Makefile.in $(srcdir)/config.php.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES = config.php
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__installdirs = "$(DESTDIR)$(webdir)" "$(DESTDIR)$(webdir)"
|
|
||||||
DATA = $(dist_web_DATA) $(web_DATA)
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
BINDIR = @BINDIR@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CGI_PREFIX = @CGI_PREFIX@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CXX = @CXX@
|
|
||||||
CXXCPP = @CXXCPP@
|
|
||||||
CXXDEPMODE = @CXXDEPMODE@
|
|
||||||
CXXFLAGS = @CXXFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
ENABLE_MMAP = @ENABLE_MMAP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
EXTRA_LIBS = @EXTRA_LIBS@
|
|
||||||
EXTRA_PERL_LIB = @EXTRA_PERL_LIB@
|
|
||||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
|
||||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
|
||||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
|
||||||
GREP = @GREP@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBDIR = @LIBDIR@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIB_ARCH = @LIB_ARCH@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
|
||||||
MYSQL_LIBS = @MYSQL_LIBS@
|
|
||||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
OPT_FFMPEG = @OPT_FFMPEG@
|
|
||||||
OPT_NETPBM = @OPT_NETPBM@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_BUILD = @PATH_BUILD@
|
|
||||||
PATH_FFMPEG = @PATH_FFMPEG@
|
|
||||||
PATH_NETPBM = @PATH_NETPBM@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
PERL = @PERL@
|
|
||||||
PERL_MM_PARMS = @PERL_MM_PARMS@
|
|
||||||
POW_LIB = @POW_LIB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
SYSCONFDIR = @SYSCONFDIR@
|
|
||||||
TIME_BUILD = @TIME_BUILD@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
WEB_GROUP = @WEB_GROUP@
|
|
||||||
WEB_HOST = @WEB_HOST@
|
|
||||||
WEB_PREFIX = @WEB_PREFIX@
|
|
||||||
WEB_USER = @WEB_USER@
|
|
||||||
ZM_CONFIG = @ZM_CONFIG@
|
|
||||||
ZM_DB_HOST = @ZM_DB_HOST@
|
|
||||||
ZM_DB_NAME = @ZM_DB_NAME@
|
|
||||||
ZM_DB_PASS = @ZM_DB_PASS@
|
|
||||||
ZM_DB_USER = @ZM_DB_USER@
|
|
||||||
ZM_HAS_GNUTLS = @ZM_HAS_GNUTLS@
|
|
||||||
ZM_HAS_GNUTLS_OPENSSL = @ZM_HAS_GNUTLS_OPENSSL@
|
|
||||||
ZM_HAS_V4L = @ZM_HAS_V4L@
|
|
||||||
ZM_HAS_V4L1 = @ZM_HAS_V4L1@
|
|
||||||
ZM_HAS_V4L2 = @ZM_HAS_V4L2@
|
|
||||||
ZM_LOGDIR = @ZM_LOGDIR@
|
|
||||||
ZM_MYSQL_ENGINE = @ZM_MYSQL_ENGINE@
|
|
||||||
ZM_PCRE = @ZM_PCRE@
|
|
||||||
ZM_PID = @ZM_PID@
|
|
||||||
ZM_RUNDIR = @ZM_RUNDIR@
|
|
||||||
ZM_SSL_LIB = @ZM_SSL_LIB@
|
|
||||||
ZM_TMPDIR = @ZM_TMPDIR@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
bindir = @bindir@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
|
||||||
webdir = @WEB_PREFIX@/includes
|
|
||||||
web_DATA = \
|
|
||||||
config.php
|
|
||||||
|
|
||||||
dist_web_DATA = \
|
|
||||||
actions.php \
|
|
||||||
database.php \
|
|
||||||
functions.php \
|
|
||||||
control_functions.php \
|
|
||||||
lang.php \
|
|
||||||
logger.php
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
config.php.in
|
|
||||||
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
||||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu web/includes/Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu web/includes/Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: $(am__configure_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
config.php: $(top_builddir)/config.status $(srcdir)/config.php.in
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
|
||||||
install-dist_webDATA: $(dist_web_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
test -z "$(webdir)" || $(MKDIR_P) "$(DESTDIR)$(webdir)"
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webdir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(webdir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-dist_webDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(dist_web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
test -n "$$files" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(webdir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(webdir)" && rm -f $$files
|
|
||||||
install-webDATA: $(web_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
test -z "$(webdir)" || $(MKDIR_P) "$(DESTDIR)$(webdir)"
|
|
||||||
@list='$(web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(webdir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(webdir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-webDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(web_DATA)'; test -n "$(webdir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
test -n "$$files" || exit 0; \
|
|
||||||
echo " ( cd '$(DESTDIR)$(webdir)' && rm -f" $$files ")"; \
|
|
||||||
cd "$(DESTDIR)$(webdir)" && rm -f $$files
|
|
||||||
tags: TAGS
|
|
||||||
TAGS:
|
|
||||||
|
|
||||||
ctags: CTAGS
|
|
||||||
CTAGS:
|
|
||||||
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$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:
|
|
||||||
for dir in "$(DESTDIR)$(webdir)" "$(DESTDIR)$(webdir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
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:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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:
|
|
||||||
|
|
||||||
html: html-am
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-dist_webDATA install-webDATA
|
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-html: install-html-am
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-am
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
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-dist_webDATA uninstall-webDATA
|
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
|
||||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
|
||||||
install install-am install-data install-data-am \
|
|
||||||
install-dist_webDATA install-dvi install-dvi-am install-exec \
|
|
||||||
install-exec-am install-html install-html-am install-info \
|
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
|
||||||
install-ps install-ps-am install-strip install-webDATA \
|
|
||||||
installcheck installcheck-am installdirs maintainer-clean \
|
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
|
||||||
pdf-am ps ps-am uninstall uninstall-am uninstall-dist_webDATA \
|
|
||||||
uninstall-webDATA
|
|
||||||
|
|
||||||
|
|
||||||
# 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:
|
|
|
@ -1,903 +0,0 @@
|
||||||
<?php
|
|
||||||
//
|
|
||||||
// ZoneMinder web action 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
function getAffectedIds( $name )
|
|
||||||
{
|
|
||||||
$names = $name."s";
|
|
||||||
$ids = array();
|
|
||||||
if ( isset($_REQUEST[$names]) || isset($_REQUEST[$name]) )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST[$names]) )
|
|
||||||
$ids = validInt($_REQUEST[$names]);
|
|
||||||
else if ( isset($_REQUEST[$name]) )
|
|
||||||
$ids[] = validInt($_REQUEST[$name]);
|
|
||||||
}
|
|
||||||
return( $ids );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ZM_OPT_USE_AUTH && ZM_AUTH_HASH_LOGINS && empty($user) && !empty($_REQUEST['auth']) )
|
|
||||||
{
|
|
||||||
if ( $authUser = getAuthUser( $_REQUEST['auth'] ) )
|
|
||||||
{
|
|
||||||
userLogin( $authUser['Username'], $authUser['Password'], true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !empty($action) )
|
|
||||||
{
|
|
||||||
// General scope actions
|
|
||||||
if ( $action == "login" && isset($_REQUEST['username']) && ( ZM_AUTH_TYPE == "remote" || isset($_REQUEST['password']) ) )
|
|
||||||
{
|
|
||||||
$username = validStr( $_REQUEST['username'] );
|
|
||||||
$password = isset($_REQUEST['password'])?validStr($_REQUEST['password']):'';
|
|
||||||
userLogin( $username, $password );
|
|
||||||
}
|
|
||||||
elseif ( $action == "logout" )
|
|
||||||
{
|
|
||||||
userLogout();
|
|
||||||
$refreshParent = true;
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
elseif ( $action == "bandwidth" && isset($_REQUEST['newBandwidth']) )
|
|
||||||
{
|
|
||||||
$_COOKIE['zmBandwidth'] = validStr($_REQUEST['newBandwidth']);
|
|
||||||
setcookie( "zmBandwidth", validStr($_REQUEST['newBandwidth']), time()+3600*24*30*12*10 );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Event scope actions, view permissions only required
|
|
||||||
if ( canView( 'Events' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "filter" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['subaction']) )
|
|
||||||
{
|
|
||||||
if ( $_REQUEST['subaction'] == "addterm" )
|
|
||||||
$_REQUEST['filter'] = addFilterTerm( $_REQUEST['filter'], $_REQUEST['line'] );
|
|
||||||
elseif ( $_REQUEST['subaction'] == "delterm" )
|
|
||||||
$_REQUEST['filter'] = delFilterTerm( $_REQUEST['filter'], $_REQUEST['line'] );
|
|
||||||
}
|
|
||||||
elseif ( canEdit( 'Events' ) )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['execute']) )
|
|
||||||
$tempFilterName = "_TempFilter".time();
|
|
||||||
if ( isset($tempFilterName) )
|
|
||||||
$filterName = $tempFilterName;
|
|
||||||
elseif ( !empty($_REQUEST['newFilterName']) )
|
|
||||||
$filterName = $_REQUEST['newFilterName'];
|
|
||||||
if ( !empty($filterName) )
|
|
||||||
{
|
|
||||||
$_REQUEST['filter']['sort_field'] = validStr($_REQUEST['sort_field']);
|
|
||||||
$_REQUEST['filter']['sort_asc'] = validStr($_REQUEST['sort_asc']);
|
|
||||||
$_REQUEST['filter']['limit'] = validInt($_REQUEST['limit']);
|
|
||||||
$sql = "replace into Filters set Name = '".dbEscape($filterName)."', 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'])."'";
|
|
||||||
dbQuery( $sql );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Event scope actions, edit permissions required
|
|
||||||
if ( canEdit( 'Events' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "rename" && isset($_REQUEST['eventName']) && !empty($_REQUEST['eid']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Events set Name = '".dbEscape($_REQUEST['eventName'])."' where Id = '".dbEscape($_REQUEST['eid'])."'" );
|
|
||||||
}
|
|
||||||
else if ( $action == "eventdetail" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['eid']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Events set Cause = '".dbEscape($_REQUEST['newEvent']['Cause'])."', Notes = '".dbEscape($_REQUEST['newEvent']['Notes'])."' where Id = '".dbEscape($_REQUEST['eid'])."'" );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach( getAffectedIds( 'markEid' ) as $markEid )
|
|
||||||
{
|
|
||||||
dbQuery( "update Events set Cause = '".dbEscape($_REQUEST['newEvent']['Cause'])."', Notes = '".dbEscape($_REQUEST['newEvent']['Notes'])."' where Id = '".dbEscape($markEid)."'" );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "archive" || $action == "unarchive" )
|
|
||||||
{
|
|
||||||
$archiveVal = ($action == "archive")?1:0;
|
|
||||||
if ( !empty($_REQUEST['eid']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Events set Archived = $archiveVal where Id = '".dbEscape($_REQUEST['eid'])."'" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach( getAffectedIds( 'markEid' ) as $markEid )
|
|
||||||
{
|
|
||||||
dbQuery( "update Events set Archived = $archiveVal where Id = '".dbEscape($markEid)."'" );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "delete" )
|
|
||||||
{
|
|
||||||
foreach( getAffectedIds( 'markEid' ) as $markEid )
|
|
||||||
{
|
|
||||||
deleteEvent( $markEid );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
if ( !empty($_REQUEST['fid']) )
|
|
||||||
{
|
|
||||||
dbQuery( "delete from Filters where Name = '".dbEscape($_REQUEST['fid'])."'" );
|
|
||||||
//$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Monitor control actions, require a monitor id and control view permissions for that monitor
|
|
||||||
if ( !empty($_REQUEST['mid']) && canView( 'Control', $_REQUEST['mid'] ) )
|
|
||||||
{
|
|
||||||
require_once( 'control_functions.php' );
|
|
||||||
$mid = validInt($_REQUEST['mid']);
|
|
||||||
if ( $action == "control" )
|
|
||||||
{
|
|
||||||
$monitor = dbFetchOne( "select C.*,M.* from Monitors as M inner join Controls as C on (M.ControlId = C.Id) where M.Id = '".dbEscape($mid)."'" );
|
|
||||||
|
|
||||||
$ctrlCommand = buildControlCommand( $monitor );
|
|
||||||
|
|
||||||
if ( $ctrlCommand )
|
|
||||||
{
|
|
||||||
$socket = socket_create( AF_UNIX, SOCK_STREAM, 0 );
|
|
||||||
if ( $socket < 0 )
|
|
||||||
{
|
|
||||||
Fatal( "socket_create() failed: ".socket_strerror($socket) );
|
|
||||||
}
|
|
||||||
$sockFile = ZM_PATH_SOCKS.'/zmcontrol-'.$monitor['Id'].'.sock';
|
|
||||||
if ( @socket_connect( $socket, $sockFile ) )
|
|
||||||
{
|
|
||||||
$options = array();
|
|
||||||
foreach ( explode( " ", $ctrlCommand ) as $option )
|
|
||||||
{
|
|
||||||
if ( preg_match( '/--([^=]+)(?:=(.+))?/', $option, $matches ) )
|
|
||||||
{
|
|
||||||
$options[$matches[1]] = $matches[2]?$matches[2]:1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$optionString = jsonEncode( $options );
|
|
||||||
if ( !socket_write( $socket, $optionString ) )
|
|
||||||
{
|
|
||||||
Fatal( "Can't write to control socket: ".socket_strerror(socket_last_error($socket)) );
|
|
||||||
}
|
|
||||||
socket_close( $socket );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --id=".$monitor['Id'];
|
|
||||||
|
|
||||||
// Can't connect so use script
|
|
||||||
$ctrlOutput = exec( escapeshellcmd( $ctrlCommand ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "settings" )
|
|
||||||
{
|
|
||||||
$zmuCommand = getZmuCommand( " -m ".$mid." -B".$_REQUEST['newBrightness']." -C".$_REQUEST['newContrast']." -H".$_REQUEST['newHue']." -O".$_REQUEST['newColour'] );
|
|
||||||
$zmuOutput = exec( escapeshellcmd( $zmuCommand ) );
|
|
||||||
list( $brightness, $contrast, $hue, $colour ) = explode( ' ', $zmuOutput );
|
|
||||||
dbQuery( "update Monitors set Brightness = '".$brightness."', Contrast = '".$contrast."', Hue = '".$hue."', Colour = '".$colour."' where Id = '".$mid."'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Control capability actions, require control edit permissions
|
|
||||||
if ( canEdit( 'Control' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "controlcap" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['cid']) )
|
|
||||||
{
|
|
||||||
$control = dbFetchOne( "select * from Controls where Id = '".dbEscape($_REQUEST['cid'])."'" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$control = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define a field type for anything that's not simple text equivalent
|
|
||||||
$types = array(
|
|
||||||
// Empty
|
|
||||||
);
|
|
||||||
|
|
||||||
$columns = getTableColumns( 'Controls' );
|
|
||||||
foreach ( $columns as $name=>$type )
|
|
||||||
{
|
|
||||||
if ( preg_match( '/^(Can|Has)/', $name ) )
|
|
||||||
{
|
|
||||||
$types[$name] = 'toggle';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$changes = getFormChanges( $control, $_REQUEST['newControl'], $types, $columns );
|
|
||||||
|
|
||||||
if ( count( $changes ) )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['cid']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Controls set ".implode( ", ", $changes )." where Id = '".dbEscape($_REQUEST['cid'])."'" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dbQuery( "insert into Controls set ".implode( ", ", $changes ) );
|
|
||||||
//$_REQUEST['cid'] = dbInsertId();
|
|
||||||
}
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
elseif ( $action == "delete" )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST['markCids']) )
|
|
||||||
{
|
|
||||||
foreach( $_REQUEST['markCids'] as $markCid )
|
|
||||||
{
|
|
||||||
dbQuery( "delete from Controls where Id = '".dbEscape($markCid)."'" );
|
|
||||||
dbQuery( "update Monitors set Controllable = 0, ControlId = 0 where ControlId = '".dbEscape($markCid)."'" );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Monitor edit actions, require a monitor id and edit permissions for that monitor
|
|
||||||
if ( !empty($_REQUEST['mid']) && canEdit( 'Monitors', $_REQUEST['mid'] ) )
|
|
||||||
{
|
|
||||||
$mid = validInt($_REQUEST['mid']);
|
|
||||||
if ( $action == "function" )
|
|
||||||
{
|
|
||||||
$monitor = dbFetchOne( "select * from Monitors where Id = '".$mid."'" );
|
|
||||||
|
|
||||||
$newFunction = validStr($_REQUEST['newFunction']);
|
|
||||||
$newEnabled = validStr($_REQUEST['newEnabled']);
|
|
||||||
$oldFunction = $monitor['Function'];
|
|
||||||
$oldEnabled = $monitor['Enabled'];
|
|
||||||
if ( $newFunction != $oldFunction || $newEnabled != $oldEnabled )
|
|
||||||
{
|
|
||||||
dbQuery( "update Monitors set Function = '".dbEscape($newFunction)."', Enabled = '".$newEnabled."' where Id = '".$mid."'" );
|
|
||||||
|
|
||||||
$monitor['Function'] = $newFunction;
|
|
||||||
$monitor['Enabled'] = $newEnabled;
|
|
||||||
//if ( $cookies ) session_write_close();
|
|
||||||
if ( daemonCheck() )
|
|
||||||
{
|
|
||||||
$restart = ($oldFunction == 'None') || ($newFunction == 'None') || ($newEnabled != $oldEnabled);
|
|
||||||
zmcControl( $monitor, $restart?"restart":"" );
|
|
||||||
zmaControl( $monitor, "reload" );
|
|
||||||
}
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "zone" && isset( $_REQUEST['zid'] ) )
|
|
||||||
{
|
|
||||||
$zid = validInt($_REQUEST['zid']);
|
|
||||||
$monitor = dbFetchOne( "select * from Monitors where Id = '".dbEscape($mid)."'" );
|
|
||||||
|
|
||||||
if ( !empty($zid) )
|
|
||||||
{
|
|
||||||
$zone = dbFetchOne( "select * from Zones where MonitorId = '".dbEscape($mid)."' and Id = '".dbEscape($zid)."'" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$zone = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $_REQUEST['newZone']['Units'] == 'Percent' )
|
|
||||||
{
|
|
||||||
$_REQUEST['newZone']['MinAlarmPixels'] = intval(($_REQUEST['newZone']['MinAlarmPixels']*$_REQUEST['newZone']['Area'])/100);
|
|
||||||
$_REQUEST['newZone']['MaxAlarmPixels'] = intval(($_REQUEST['newZone']['MaxAlarmPixels']*$_REQUEST['newZone']['Area'])/100);
|
|
||||||
if ( isset($_REQUEST['newZone']['MinFilterPixels']) )
|
|
||||||
$_REQUEST['newZone']['MinFilterPixels'] = intval(($_REQUEST['newZone']['MinFilterPixels']*$_REQUEST['newZone']['Area'])/100);
|
|
||||||
if ( isset($_REQUEST['newZone']['MaxFilterPixels']) )
|
|
||||||
$_REQUEST['newZone']['MaxFilterPixels'] = intval(($_REQUEST['newZone']['MaxFilterPixels']*$_REQUEST['newZone']['Area'])/100);
|
|
||||||
if ( isset($_REQUEST['newZone']['MinBlobPixels']) )
|
|
||||||
$_REQUEST['newZone']['MinBlobPixels'] = intval(($_REQUEST['newZone']['MinBlobPixels']*$_REQUEST['newZone']['Area'])/100);
|
|
||||||
if ( isset($_REQUEST['newZone']['MaxBlobPixels']) )
|
|
||||||
$_REQUEST['newZone']['MaxBlobPixels'] = intval(($_REQUEST['newZone']['MaxBlobPixels']*$_REQUEST['newZone']['Area'])/100);
|
|
||||||
}
|
|
||||||
|
|
||||||
unset( $_REQUEST['newZone']['Points'] );
|
|
||||||
$types = array();
|
|
||||||
$changes = getFormChanges( $zone, $_REQUEST['newZone'], $types );
|
|
||||||
|
|
||||||
if ( count( $changes ) )
|
|
||||||
{
|
|
||||||
if ( $zid > 0 )
|
|
||||||
{
|
|
||||||
$sql = "update Zones set ".implode( ", ", $changes )." where MonitorId = '".dbEscape($mid)."' and Id = '".dbEscape($zid)."'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sql = "insert into Zones set MonitorId = '".dbEscape($mid)."', ".implode( ", ", $changes );
|
|
||||||
}
|
|
||||||
dbQuery( $sql );
|
|
||||||
//if ( $cookies ) session_write_close();
|
|
||||||
if ( daemonCheck() )
|
|
||||||
{
|
|
||||||
zmaControl( $mid, "restart" );
|
|
||||||
}
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
elseif ( $action == "sequence" && isset($_REQUEST['smid']) )
|
|
||||||
{
|
|
||||||
$smid = validInt($_REQUEST['smid']);
|
|
||||||
$monitor = dbFetchOne( "select * from Monitors where Id = '".dbEscape($mid)."'" );
|
|
||||||
$smonitor = dbFetchOne( "select * from Monitors where Id = '".dbEscape($smid)."'" );
|
|
||||||
|
|
||||||
dbQuery( "update Monitors set Sequence = '".$smonitor['Sequence']."' where Id = '".$monitor['Id']."'" );
|
|
||||||
dbQuery( "update Monitors set Sequence = '".$monitor['Sequence']."' where Id = '".$smonitor['Id']."'" );
|
|
||||||
|
|
||||||
$refreshParent = true;
|
|
||||||
fixSequences();
|
|
||||||
}
|
|
||||||
if ( $action == "delete" )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST['markZids']) )
|
|
||||||
{
|
|
||||||
$deletedZid = 0;
|
|
||||||
foreach( $_REQUEST['markZids'] as $markZid )
|
|
||||||
{
|
|
||||||
dbQuery( "delete from Zones where MonitorId = '".dbEscape($mid)."' && Id = '".dbEscape($markZid)."'" );
|
|
||||||
$deletedZid = 1;
|
|
||||||
}
|
|
||||||
if ( $deletedZid )
|
|
||||||
{
|
|
||||||
//if ( $cookies )
|
|
||||||
//session_write_close();
|
|
||||||
if ( daemonCheck() )
|
|
||||||
zmaControl( $mid, "restart" );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Monitor edit actions, monitor id derived, require edit permissions for that monitor
|
|
||||||
if ( canEdit( 'Monitors' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "monitor" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['mid']) )
|
|
||||||
{
|
|
||||||
$mid = validInt($_REQUEST['mid']);
|
|
||||||
$monitor = dbFetchOne( "select * from Monitors where Id = '".dbEscape($mid)."'" );
|
|
||||||
|
|
||||||
if ( ZM_OPT_X10 )
|
|
||||||
{
|
|
||||||
$x10Monitor = dbFetchOne( "select * from TriggersX10 where MonitorId = '".dbEscape($mid)."'" );
|
|
||||||
if ( !$x10Monitor )
|
|
||||||
$x10Monitor = array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$monitor = array();
|
|
||||||
if ( ZM_OPT_X10 )
|
|
||||||
{
|
|
||||||
$x10Monitor = array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define a field type for anything that's not simple text equivalent
|
|
||||||
$types = array(
|
|
||||||
'Triggers' => 'set',
|
|
||||||
'Controllable' => 'toggle',
|
|
||||||
'TrackMotion' => 'toggle',
|
|
||||||
'Enabled' => 'toggle'
|
|
||||||
);
|
|
||||||
|
|
||||||
$columns = getTableColumns( 'Monitors' );
|
|
||||||
$changes = getFormChanges( $monitor, $_REQUEST['newMonitor'], $types, $columns );
|
|
||||||
|
|
||||||
if ( count( $changes ) )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['mid']) )
|
|
||||||
{
|
|
||||||
$mid = validInt($_REQUEST['mid']);
|
|
||||||
$sql = "update Monitors set ".implode( ", ", $changes )." where Id = '".dbEscape($mid)."'";
|
|
||||||
dbQuery( $sql );
|
|
||||||
if ( isset($changes['Name']) )
|
|
||||||
{
|
|
||||||
exec( escapeshellcmd( "mv ".ZM_DIR_EVENTS."/".$monitor['Name']." ".ZM_DIR_EVENTS."/".$_REQUEST['newMonitor']['Name'] ) );
|
|
||||||
}
|
|
||||||
if ( isset($changes['Width']) || isset($changes['Height']) )
|
|
||||||
{
|
|
||||||
$newW = $_REQUEST['newMonitor']['Width'];
|
|
||||||
$newH = $_REQUEST['newMonitor']['Height'];
|
|
||||||
$newA = $newW * $newH;
|
|
||||||
$oldW = $monitor['Width'];
|
|
||||||
$oldH = $monitor['Height'];
|
|
||||||
$oldA = $oldW * $oldH;
|
|
||||||
|
|
||||||
$zones = dbFetchAll( "select * from Zones where MonitorId = '".dbEscape($mid)."'" );
|
|
||||||
foreach ( $zones as $zone )
|
|
||||||
{
|
|
||||||
$newZone = $zone;
|
|
||||||
$points = coordsToPoints( $zone['Coords'] );
|
|
||||||
for ( $i = 0; $i < count($points); $i++ )
|
|
||||||
{
|
|
||||||
$points[$i]['x'] = intval(($points[$i]['x']*($newW-1))/($oldW-1));
|
|
||||||
$points[$i]['y'] = intval(($points[$i]['y']*($newH-1))/($oldH-1));
|
|
||||||
}
|
|
||||||
$newZone['Coords'] = pointsToCoords( $points );
|
|
||||||
$newZone['Area'] = intval(round(($zone['Area']*$newA)/$oldA));
|
|
||||||
$newZone['MinAlarmPixels'] = intval(round(($newZone['MinAlarmPixels']*$newA)/$oldA));
|
|
||||||
$newZone['MaxAlarmPixels'] = intval(round(($newZone['MaxAlarmPixels']*$newA)/$oldA));
|
|
||||||
$newZone['MinFilterPixels'] = intval(round(($newZone['MinFilterPixels']*$newA)/$oldA));
|
|
||||||
$newZone['MaxFilterPixels'] = intval(round(($newZone['MaxFilterPixels']*$newA)/$oldA));
|
|
||||||
$newZone['MinBlobPixels'] = intval(round(($newZone['MinBlobPixels']*$newA)/$oldA));
|
|
||||||
$newZone['MaxBlobPixels'] = intval(round(($newZone['MaxBlobPixels']*$newA)/$oldA));
|
|
||||||
|
|
||||||
$changes = getFormChanges( $zone, $newZone, $types );
|
|
||||||
|
|
||||||
if ( count( $changes ) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Zones set ".implode( ", ", $changes )." where MonitorId = '".dbEscape($mid)."' and Id = '".$zone['Id']."'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( !$user['MonitorIds'] )
|
|
||||||
{
|
|
||||||
$maxSeq = dbFetchOne( "select max(Sequence) as MaxSequence from Monitors", "MaxSequence" );
|
|
||||||
$changes[] = "Sequence = ".($maxSeq+1);
|
|
||||||
|
|
||||||
dbQuery( "insert into Monitors set ".implode( ", ", $changes ) );
|
|
||||||
$mid = dbInsertId();
|
|
||||||
$zoneArea = $_REQUEST['newMonitor']['Width'] * $_REQUEST['newMonitor']['Height'];
|
|
||||||
dbQuery( "insert into Zones set MonitorId = ".dbEscape($mid).", Name = 'All', Type = 'Active', Units = 'Percent', NumCoords = 4, Coords = '".sprintf( "%d,%d %d,%d %d,%d %d,%d", 0, 0, $_REQUEST['newMonitor']['Width']-1, 0, $_REQUEST['newMonitor']['Width']-1, $_REQUEST['newMonitor']['Height']-1, 0, $_REQUEST['newMonitor']['Height']-1 )."', Area = ".$zoneArea.", AlarmRGB = 0xff0000, CheckMethod = 'Blobs', MinPixelThreshold = 25, MinAlarmPixels = ".intval(($zoneArea*3)/100).", MaxAlarmPixels = ".intval(($zoneArea*75)/100).", FilterX = 3, FilterY = 3, MinFilterPixels = ".intval(($zoneArea*3)/100).", MaxFilterPixels = ".intval(($zoneArea*75)/100).", MinBlobPixels = ".intval(($zoneArea*2)/100).", MinBlobs = 1" );
|
|
||||||
//$view = 'none';
|
|
||||||
mkdir( ZM_DIR_EVENTS.'/'.$mid, 0755 );
|
|
||||||
symlink( $mid, ZM_DIR_EVENTS.'/'.$_REQUEST['newMonitor']['Name'] );
|
|
||||||
if ( isset($_COOKIE['zmGroup']) )
|
|
||||||
{
|
|
||||||
$sql = "update Groups set MonitorIds = concat(MonitorIds,',".$mid."') where Id = '".dbEscape($_COOKIE['zmGroup'])."'";
|
|
||||||
dbQuery( $sql );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$restart = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ZM_OPT_X10 )
|
|
||||||
{
|
|
||||||
$x10Changes = getFormChanges( $x10Monitor, $_REQUEST['newX10Monitor'] );
|
|
||||||
|
|
||||||
if ( count( $x10Changes ) )
|
|
||||||
{
|
|
||||||
if ( $x10Monitor && isset($_REQUEST['newX10Monitor']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update TriggersX10 set ".implode( ", ", $x10Changes )." where MonitorId = '".dbEscape($mid)."'" );
|
|
||||||
}
|
|
||||||
elseif ( !$user['MonitorIds'] )
|
|
||||||
{
|
|
||||||
if ( !$x10Monitor )
|
|
||||||
{
|
|
||||||
dbQuery( "insert into TriggersX10 set MonitorId = '".dbEscape($mid)."', ".implode( ", ", $x10Changes ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dbQuery( "delete from TriggersX10 where MonitorId = '".dbEscape($mid)."'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$restart = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $restart )
|
|
||||||
{
|
|
||||||
$monitor = dbFetchOne( "select * from Monitors where Id = '".dbEscape($mid)."'" );
|
|
||||||
fixDevices();
|
|
||||||
//if ( $cookies )
|
|
||||||
//session_write_close();
|
|
||||||
if ( daemonCheck() )
|
|
||||||
{
|
|
||||||
zmcControl( $monitor, "restart" );
|
|
||||||
zmaControl( $monitor, "restart" );
|
|
||||||
}
|
|
||||||
//daemonControl( 'restart', 'zmwatch.pl' );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
if ( $action == "delete" )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST['markMids']) && !$user['MonitorIds'] )
|
|
||||||
{
|
|
||||||
foreach( $_REQUEST['markMids'] as $markMid )
|
|
||||||
{
|
|
||||||
if ( canEdit( 'Monitors', $markMid ) )
|
|
||||||
{
|
|
||||||
$sql = "select * from Monitors where Id = '".dbEscape($markMid)."'";
|
|
||||||
if ( $monitor = dbFetchOne( $sql ) )
|
|
||||||
{
|
|
||||||
if ( daemonCheck() )
|
|
||||||
{
|
|
||||||
zmaControl( $monitor, "stop" );
|
|
||||||
zmcControl( $monitor, "stop" );
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is the important stuff
|
|
||||||
dbQuery( "delete from Monitors where Id = '".dbEscape($markMid)."'" );
|
|
||||||
dbQuery( "delete from Zones where MonitorId = '".dbEscape($markMid)."'" );
|
|
||||||
if ( ZM_OPT_X10 )
|
|
||||||
dbQuery( "delete from TriggersX10 where MonitorId = '".dbEscape($markMid)."'" );
|
|
||||||
|
|
||||||
fixSequences();
|
|
||||||
|
|
||||||
// If fast deletes are on, then zmaudit will clean everything else up later
|
|
||||||
// If fast deletes are off and there are lots of events then this step may
|
|
||||||
// well time out before completing, in which case zmaudit will still tidy up
|
|
||||||
if ( !ZM_OPT_FAST_DELETE )
|
|
||||||
{
|
|
||||||
$sql = "select Id from Events where MonitorId = '".dbEscape($markMid)."'";
|
|
||||||
$markEids = dbFetchAll( $sql, 'Id' );
|
|
||||||
foreach( $markEids as $markEid )
|
|
||||||
deleteEvent( $markEid );
|
|
||||||
|
|
||||||
deletePath( ZM_DIR_EVENTS."/".$monitor['Name'] );
|
|
||||||
deletePath( ZM_DIR_EVENTS."/".$monitor['Id'] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Device view actions
|
|
||||||
if ( canEdit( 'Devices' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "device" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['command']) )
|
|
||||||
{
|
|
||||||
setDeviceStatusX10( $_REQUEST['key'], $_REQUEST['command'] );
|
|
||||||
}
|
|
||||||
elseif ( isset( $_REQUEST['newDevice'] ) )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST['did']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Devices set Name = '".dbEscape($_REQUEST['newDevice']['Name'])."', KeyString = '".dbEscape($_REQUEST['newDevice']['KeyString'])."' where Id = '".dbEscape($_REQUEST['did'])."'" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dbQuery( "insert into Devices set Name = '".dbEscape($_REQUEST['newDevice']['Name'])."', KeyString = '".dbEscape($_REQUEST['newDevice']['KeyString'])."'" );
|
|
||||||
}
|
|
||||||
$refreshParent = true;
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "delete" )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST['markDids']) )
|
|
||||||
{
|
|
||||||
foreach( $_REQUEST['markDids'] as $markDid )
|
|
||||||
{
|
|
||||||
dbQuery( "delete from Devices where Id = '".dbEscape($markDid)."'" );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// System view actions
|
|
||||||
if ( canView( 'System' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "setgroup" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['gid']) )
|
|
||||||
{
|
|
||||||
setcookie( "zmGroup", validInt($_REQUEST['gid']), time()+3600*24*30*12*10 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setcookie( "zmGroup", "", time()-3600*24*2 );
|
|
||||||
}
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// System edit actions
|
|
||||||
if ( canEdit( 'System' ) )
|
|
||||||
{
|
|
||||||
if ( $action == "version" && isset($_REQUEST['option']) )
|
|
||||||
{
|
|
||||||
$option = $_REQUEST['option'];
|
|
||||||
switch( $option )
|
|
||||||
{
|
|
||||||
case 'go' :
|
|
||||||
{
|
|
||||||
// Ignore this, the caller will open the page itself
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'ignore' :
|
|
||||||
{
|
|
||||||
dbQuery( "update Config set Value = '".ZM_DYN_LAST_VERSION."' where Name = 'ZM_DYN_CURR_VERSION'" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'hour' :
|
|
||||||
case 'day' :
|
|
||||||
case 'week' :
|
|
||||||
{
|
|
||||||
$nextReminder = time();
|
|
||||||
if ( $option == 'hour' )
|
|
||||||
{
|
|
||||||
$nextReminder += 60*60;
|
|
||||||
}
|
|
||||||
elseif ( $option == 'day' )
|
|
||||||
{
|
|
||||||
$nextReminder += 24*60*60;
|
|
||||||
}
|
|
||||||
elseif ( $option == 'week' )
|
|
||||||
{
|
|
||||||
$nextReminder += 7*24*60*60;
|
|
||||||
}
|
|
||||||
dbQuery( "update Config set Value = '".$nextReminder."' where Name = 'ZM_DYN_NEXT_REMINDER'" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'never' :
|
|
||||||
{
|
|
||||||
dbQuery( "update Config set Value = '0' where Name = 'ZM_CHECK_FOR_UPDATES'" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $action == "donate" && isset($_REQUEST['option']) )
|
|
||||||
{
|
|
||||||
$option = $_REQUEST['option'];
|
|
||||||
switch( $option )
|
|
||||||
{
|
|
||||||
case 'go' :
|
|
||||||
{
|
|
||||||
// Ignore this, the caller will open the page itself
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'hour' :
|
|
||||||
case 'day' :
|
|
||||||
case 'week' :
|
|
||||||
case 'month' :
|
|
||||||
{
|
|
||||||
$nextReminder = time();
|
|
||||||
if ( $option == 'hour' )
|
|
||||||
{
|
|
||||||
$nextReminder += 60*60;
|
|
||||||
}
|
|
||||||
elseif ( $option == 'day' )
|
|
||||||
{
|
|
||||||
$nextReminder += 24*60*60;
|
|
||||||
}
|
|
||||||
elseif ( $option == 'week' )
|
|
||||||
{
|
|
||||||
$nextReminder += 7*24*60*60;
|
|
||||||
}
|
|
||||||
elseif ( $option == 'month' )
|
|
||||||
{
|
|
||||||
$nextReminder += 30*24*60*60;
|
|
||||||
}
|
|
||||||
dbQuery( "update Config set Value = '".$nextReminder."' where Name = 'ZM_DYN_DONATE_REMINDER_TIME'" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'never' :
|
|
||||||
case 'already' :
|
|
||||||
{
|
|
||||||
dbQuery( "update Config set Value = '0' where Name = 'ZM_DYN_SHOW_DONATE_REMINDER'" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $action == "options" && isset($_REQUEST['tab']) )
|
|
||||||
{
|
|
||||||
$configCat = $configCats[$_REQUEST['tab']];
|
|
||||||
$changed = false;
|
|
||||||
foreach ( $configCat as $name=>$value )
|
|
||||||
{
|
|
||||||
unset( $newValue );
|
|
||||||
if ( $value['Type'] == "boolean" && empty($_REQUEST['newConfig'][$name]) )
|
|
||||||
$newValue = 0;
|
|
||||||
elseif ( isset($_REQUEST['newConfig'][$name]) )
|
|
||||||
$newValue = preg_replace( "/\r\n/", "\n", stripslashes( $_REQUEST['newConfig'][$name] ) );
|
|
||||||
|
|
||||||
if ( isset($newValue) && ($newValue != $value['Value']) )
|
|
||||||
{
|
|
||||||
dbQuery( "update Config set Value = '".$newValue."' where Name = '".$name."'" );
|
|
||||||
$changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $changed )
|
|
||||||
{
|
|
||||||
switch( $_REQUEST['tab'] )
|
|
||||||
{
|
|
||||||
case "system" :
|
|
||||||
case "config" :
|
|
||||||
case "paths" :
|
|
||||||
$restartWarning = true;
|
|
||||||
break;
|
|
||||||
case "web" :
|
|
||||||
case "tools" :
|
|
||||||
break;
|
|
||||||
case "logging" :
|
|
||||||
case "network" :
|
|
||||||
case "mail" :
|
|
||||||
case "upload" :
|
|
||||||
$restartWarning = true;
|
|
||||||
break;
|
|
||||||
case "highband" :
|
|
||||||
case "medband" :
|
|
||||||
case "lowband" :
|
|
||||||
case "phoneband" :
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
loadConfig( false );
|
|
||||||
}
|
|
||||||
elseif ( $action == "user" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['uid']) )
|
|
||||||
$dbUser = dbFetchOne( "select * from Users where Id = '".dbEscape($_REQUEST['uid'])."'" );
|
|
||||||
else
|
|
||||||
$dbUser = array();
|
|
||||||
|
|
||||||
$types = array();
|
|
||||||
$changes = getFormChanges( $dbUser, $_REQUEST['newUser'], $types );
|
|
||||||
|
|
||||||
if ( $_REQUEST['newUser']['Password'] )
|
|
||||||
$changes['Password'] = "Password = password('".dbEscape($_REQUEST['newUser']['Password'])."')";
|
|
||||||
else
|
|
||||||
unset( $changes['Password'] );
|
|
||||||
|
|
||||||
if ( count( $changes ) )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['uid']) )
|
|
||||||
{
|
|
||||||
$sql = "update Users set ".implode( ", ", $changes )." where Id = '".dbEscape($_REQUEST['uid'])."'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sql = "insert into Users set ".implode( ", ", $changes );
|
|
||||||
}
|
|
||||||
dbQuery( $sql );
|
|
||||||
$refreshParent = true;
|
|
||||||
if ( $dbUser['Username'] == $user['Username'] )
|
|
||||||
userLogin( $dbUser['Username'], $dbUser['Password'] );
|
|
||||||
}
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
elseif ( $action == "state" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['runState']) )
|
|
||||||
{
|
|
||||||
//if ( $cookies ) session_write_close();
|
|
||||||
packageControl( $_REQUEST['runState'] );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "save" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['runState']) || !empty($_REQUEST['newState']) )
|
|
||||||
{
|
|
||||||
$sql = "select Id,Function,Enabled from Monitors order by Id";
|
|
||||||
$definitions = array();
|
|
||||||
foreach( dbFetchAll( $sql ) as $monitor )
|
|
||||||
{
|
|
||||||
$definitions[] = $monitor['Id'].":".$monitor['Function'].":".$monitor['Enabled'];
|
|
||||||
}
|
|
||||||
$definition = join( ',', $definitions );
|
|
||||||
if ( $_REQUEST['newState'] )
|
|
||||||
$_REQUEST['runState'] = $_REQUEST['newState'];
|
|
||||||
dbQuery( "replace into States set Name = '".dbEscape($_REQUEST['runState'])."', Definition = '".dbEscape($definition)."'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $action == "group" )
|
|
||||||
{
|
|
||||||
if ( !empty($_REQUEST['gid']) )
|
|
||||||
{
|
|
||||||
$sql = "update Groups set Name = '".dbEscape($_REQUEST['newGroup']['Name'])."', MonitorIds = '".dbEscape(join(',',$_REQUEST['newGroup']['MonitorIds']))."' where Id = '".dbEscape($_REQUEST['gid'])."'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sql = "insert into Groups set Name = '".dbEscape($_REQUEST['newGroup']['Name'])."', MonitorIds = '".dbEscape(join(',',$_REQUEST['newGroup']['MonitorIds']))."'";
|
|
||||||
}
|
|
||||||
dbQuery( $sql );
|
|
||||||
$refreshParent = true;
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
elseif ( $action == "delete" )
|
|
||||||
{
|
|
||||||
if ( isset($_REQUEST['runState']) )
|
|
||||||
dbQuery( "delete from States where Name = '".dbEscape($_REQUEST['runState'])."'" );
|
|
||||||
|
|
||||||
if ( isset($_REQUEST['markUids']) )
|
|
||||||
{
|
|
||||||
foreach( $_REQUEST['markUids'] as $markUid )
|
|
||||||
dbQuery( "delete from Users where Id = '".dbEscape($markUid)."'" );
|
|
||||||
if ( $markUid == $user['Id'] )
|
|
||||||
userLogout();
|
|
||||||
}
|
|
||||||
if ( !empty($_REQUEST['gid']) )
|
|
||||||
{
|
|
||||||
dbQuery( "delete from Groups where Id = '".dbEscape($_REQUEST['gid'])."'" );
|
|
||||||
if ( isset($_COOKIE['zmGroup']) )
|
|
||||||
{
|
|
||||||
if ( $_REQUEST['gid'] == $_COOKIE['zmGroup'] )
|
|
||||||
{
|
|
||||||
unset( $_COOKIE['zmGroup'] );
|
|
||||||
setcookie( "zmGroup", "", time()-3600*24*2 );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( ZM_USER_SELF_EDIT && $action == "user" )
|
|
||||||
{
|
|
||||||
$uid = $user['Id'];
|
|
||||||
|
|
||||||
$dbUser = dbFetchOne( "select Id, Password, Language from Users where Id = '".dbEscape($uid)."'" );
|
|
||||||
|
|
||||||
$types = array();
|
|
||||||
$changes = getFormChanges( $dbUser, $_REQUEST['newUser'], $types );
|
|
||||||
|
|
||||||
if ( !empty($_REQUEST['newUser']['Password']) )
|
|
||||||
$changes['Password'] = "Password = password('".dbEscape($_REQUEST['newUser']['Password'])."')";
|
|
||||||
else
|
|
||||||
unset( $changes['Password'] );
|
|
||||||
if ( count( $changes ) )
|
|
||||||
{
|
|
||||||
$sql = "update Users set ".implode( ", ", $changes )." where Id = '".dbEscape($uid)."'";
|
|
||||||
dbQuery( $sql );
|
|
||||||
$refreshParent = true;
|
|
||||||
}
|
|
||||||
$view = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $action == "reset" )
|
|
||||||
{
|
|
||||||
$_SESSION['zmEventResetTime'] = strftime( STRF_FMT_DATETIME_DB );
|
|
||||||
setcookie( "zmEventResetTime", $_SESSION['zmEventResetTime'], time()+3600*24*30*12*10 );
|
|
||||||
//if ( $cookies ) session_write_close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,173 +0,0 @@
|
||||||
<?php
|
|
||||||
//
|
|
||||||
// ZoneMinder web configuration 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// This section contains options substituted by the zmconfig.pl utility, do not edit these directly
|
|
||||||
//
|
|
||||||
define( "ZM_CONFIG", "@ZM_CONFIG@" ); // Path to config file
|
|
||||||
|
|
||||||
$configFile = ZM_CONFIG;
|
|
||||||
$localConfigFile = basename($configFile);
|
|
||||||
if ( file_exists( $localConfigFile ) && filesize( $localConfigFile ) > 0 )
|
|
||||||
{
|
|
||||||
if ( php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']) )
|
|
||||||
print( "Warning, overriding installed $localConfigFile file with local copy\n" );
|
|
||||||
else
|
|
||||||
error_log( "Warning, overriding installed $localConfigFile file with local copy" );
|
|
||||||
$configFile = $localConfigFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
$cfg = fopen( $configFile, "r") or die("Could not open config file.");
|
|
||||||
while ( !feof($cfg) )
|
|
||||||
{
|
|
||||||
$str = fgets( $cfg, 256 );
|
|
||||||
if ( preg_match( '/^\s*$/', $str ))
|
|
||||||
continue;
|
|
||||||
elseif ( preg_match( '/^\s*#/', $str ))
|
|
||||||
continue;
|
|
||||||
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.+?)\s*$/', $str, $matches ))
|
|
||||||
define( $matches[1], $matches[2] );
|
|
||||||
}
|
|
||||||
fclose( $cfg );
|
|
||||||
|
|
||||||
//
|
|
||||||
// This section is options normally derived from other options or configuration
|
|
||||||
//
|
|
||||||
define( "ZMU_PATH", ZM_PATH_BIN."/zmu" ); // Local path to the ZoneMinder Utility
|
|
||||||
|
|
||||||
//
|
|
||||||
// If setup supports Video 4 Linux v2 and/or v1
|
|
||||||
//
|
|
||||||
define( "ZM_HAS_V4L2", "@ZM_HAS_V4L2@" ); // V4L2 support enabled
|
|
||||||
define( "ZM_HAS_V4L1", "@ZM_HAS_V4L1@" ); // V4L1 support enabled
|
|
||||||
define( "ZM_HAS_V4L", "@ZM_HAS_V4L@" ); // V4L support enabled
|
|
||||||
|
|
||||||
//
|
|
||||||
// If PCRE dev libraries are installed
|
|
||||||
//
|
|
||||||
define( "ZM_PCRE", "@ZM_PCRE@" ); // PCRE support enabled
|
|
||||||
|
|
||||||
//
|
|
||||||
// Alarm states
|
|
||||||
//
|
|
||||||
define( "STATE_IDLE", 0 );
|
|
||||||
define( "STATE_PREALARM", 1 );
|
|
||||||
define( "STATE_ALARM", 2 );
|
|
||||||
define( "STATE_ALERT", 3 );
|
|
||||||
define( "STATE_TAPE", 4 );
|
|
||||||
|
|
||||||
//
|
|
||||||
// DVR Control Commands
|
|
||||||
//
|
|
||||||
|
|
||||||
define( "MSG_CMD", 1 );
|
|
||||||
define( "MSG_DATA_WATCH", 2 );
|
|
||||||
define( "MSG_DATA_EVENT", 3 );
|
|
||||||
|
|
||||||
define( "CMD_NONE", 0 );
|
|
||||||
define( "CMD_PAUSE", 1 );
|
|
||||||
define( "CMD_PLAY", 2 );
|
|
||||||
define( "CMD_STOP", 3 );
|
|
||||||
define( "CMD_FASTFWD", 4 );
|
|
||||||
define( "CMD_SLOWFWD", 5 );
|
|
||||||
define( "CMD_SLOWREV", 6 );
|
|
||||||
define( "CMD_FASTREV", 7 );
|
|
||||||
define( "CMD_ZOOMIN", 8 );
|
|
||||||
define( "CMD_ZOOMOUT", 9 );
|
|
||||||
define( "CMD_PAN", 10 );
|
|
||||||
define( "CMD_SCALE", 11 );
|
|
||||||
define( "CMD_PREV", 12 );
|
|
||||||
define( "CMD_NEXT", 13 );
|
|
||||||
define( "CMD_SEEK", 14 );
|
|
||||||
define( "CMD_VARPLAY", 15 );
|
|
||||||
define( "CMD_QUERY", 99 );
|
|
||||||
|
|
||||||
//
|
|
||||||
// These are miscellaneous options you won't normally need to change
|
|
||||||
//
|
|
||||||
define( "MAX_EVENTS", 10 ); // The maximum number of events to show in the monitor event listing
|
|
||||||
define( "RATE_BASE", 100 ); // The additional scaling factor used to help get fractional rates in integer format
|
|
||||||
define( "SCALE_BASE", 100 ); // The additional scaling factor used to help get fractional scales in integer format
|
|
||||||
|
|
||||||
//
|
|
||||||
// Date and time formats, eventually some of these may end up in the language files
|
|
||||||
//
|
|
||||||
define( "DATE_FMT_CONSOLE_LONG", "D jS M, g:ia" ); // This is the main console date/time, date() or strftime() format
|
|
||||||
define( "DATE_FMT_CONSOLE_SHORT", "%H:%M" ); // This is the xHTML console date/time, date() or strftime() format
|
|
||||||
|
|
||||||
define( "STRF_FMT_DATETIME_DB", "%Y-%m-%d %H:%M:%S" ); // Strftime format for database queries, don't change
|
|
||||||
|
|
||||||
define( "STRF_FMT_DATETIME", "%c" ); // Strftime locale aware format for dates with times
|
|
||||||
define( "STRF_FMT_DATE", "%x" ); // Strftime locale aware format for dates without times
|
|
||||||
define( "STRF_FMT_TIME", "%X" ); // Strftime locale aware format for times without dates
|
|
||||||
|
|
||||||
define( "STRF_FMT_DATETIME_SHORT", "%y/%m/%d %H:%M:%S" ); // Strftime shorter format for dates with time, not locale aware
|
|
||||||
define( "STRF_FMT_DATETIME_SHORTER", "%m/%d %H:%M:%S" ); // Strftime shorter format for dates with time, not locale aware, used where space is tight
|
|
||||||
|
|
||||||
define( "MYSQL_FMT_DATETIME_SHORT", "%y/%m/%d %H:%i:%S" ); // MySQL date_format shorter format for dates with time
|
|
||||||
|
|
||||||
require_once( 'database.php' );
|
|
||||||
loadConfig();
|
|
||||||
|
|
||||||
$GLOBALS['defaultUser'] = array(
|
|
||||||
"Username" => "admin",
|
|
||||||
"Password" => "",
|
|
||||||
"Language" => "",
|
|
||||||
"Enabled" => 1,
|
|
||||||
"Stream" => 'View',
|
|
||||||
"Events" => 'Edit',
|
|
||||||
"Control" => 'Edit',
|
|
||||||
"Monitors" => 'Edit',
|
|
||||||
"Devices" => 'Edit',
|
|
||||||
"System" => 'Edit',
|
|
||||||
"MaxBandwidth" => "",
|
|
||||||
"MonitorIds" => false
|
|
||||||
);
|
|
||||||
|
|
||||||
function loadConfig( $defineConsts=true )
|
|
||||||
{
|
|
||||||
global $config;
|
|
||||||
global $configCats;
|
|
||||||
|
|
||||||
$config = array();
|
|
||||||
$configCat = array();
|
|
||||||
|
|
||||||
$sql = "select * from Config order by Id asc";
|
|
||||||
$result = mysql_query( $sql );
|
|
||||||
if ( !$result )
|
|
||||||
echo mysql_error();
|
|
||||||
$monitors = array();
|
|
||||||
while( $row = mysql_fetch_assoc( $result ) )
|
|
||||||
{
|
|
||||||
if ( $defineConsts )
|
|
||||||
define( $row['Name'], $row['Value'] );
|
|
||||||
$config[$row['Name']] = $row;
|
|
||||||
if ( !($configCat = &$configCats[$row['Category']]) )
|
|
||||||
{
|
|
||||||
$configCats[$row['Category']] = array();
|
|
||||||
$configCat = &$configCats[$row['Category']];
|
|
||||||
}
|
|
||||||
$configCat[$row['Name']] = $row;
|
|
||||||
}
|
|
||||||
//print_r( $config );
|
|
||||||
//print_r( $configCats );
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,969 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
function buildControlCommand( $monitor )
|
|
||||||
{
|
|
||||||
$ctrlCommand = ZM_PATH_BIN."/zmcontrol.pl";
|
|
||||||
|
|
||||||
if ( isset($_REQUEST['xge']) || isset($_REQUEST['yge']) )
|
|
||||||
{
|
|
||||||
$slow = 0.9; // Threshold for slow speed/timeouts
|
|
||||||
$turbo = 0.9; // Threshold for turbo speed
|
|
||||||
|
|
||||||
if ( preg_match( '/^([a-z]+)([A-Z][a-z]+)([A-Z][a-z]+)+$/', $_REQUEST['control'], $matches ) )
|
|
||||||
{
|
|
||||||
$command = $matches[1];
|
|
||||||
$mode = $matches[2];
|
|
||||||
$dirn = $matches[3];
|
|
||||||
|
|
||||||
switch( $command )
|
|
||||||
{
|
|
||||||
case 'focus' :
|
|
||||||
{
|
|
||||||
$factor = $_REQUEST['yge']/100;
|
|
||||||
if ( $monitor['HasFocusSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinFocusSpeed']+(($monitor['MaxFocusSpeed']-$monitor['MinFocusSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinFocusStep']+(($monitor['MaxFocusStep']-$monitor['MinFocusStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Con' :
|
|
||||||
{
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowSpeed = intval(round($monitor['MinFocusSpeed']+(($monitor['MaxFocusSpeed']-$monitor['MinFocusSpeed'])*$slow)));
|
|
||||||
if ( $speed < $slowSpeed )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'zoom' :
|
|
||||||
{
|
|
||||||
$factor = $_REQUEST['yge']/100;
|
|
||||||
if ( $monitor['HasZoomSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinZoomSpeed']+(($monitor['MaxZoomSpeed']-$monitor['MinZoomSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinZoomStep']+(($monitor['MaxZoomStep']-$monitor['MinZoomStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Con' :
|
|
||||||
{
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowSpeed = intval(round($monitor['MinZoomSpeed']+(($monitor['MaxZoomSpeed']-$monitor['MinZoomSpeed'])*$slow)));
|
|
||||||
if ( $speed < $slowSpeed )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'iris' :
|
|
||||||
{
|
|
||||||
$factor = $_REQUEST['yge']/100;
|
|
||||||
if ( $monitor['HasIrisSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinIrisSpeed']+(($monitor['MaxIrisSpeed']-$monitor['MinIrisSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinIrisStep']+(($monitor['MaxIrisStep']-$monitor['MinIrisStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'white' :
|
|
||||||
{
|
|
||||||
$factor = $_REQUEST['yge']/100;
|
|
||||||
if ( $monitor['HasWhiteSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinWhiteSpeed']+(($monitor['MaxWhiteSpeed']-$monitor['MinWhiteSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinWhiteStep']+(($monitor['MaxWhiteStep']-$monitor['MinWhiteStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'gain' :
|
|
||||||
{
|
|
||||||
$factor = $_REQUEST['yge']/100;
|
|
||||||
if ( $monitor['HasGainSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinGainSpeed']+(($monitor['MaxGainSpeed']-$monitor['MinGainSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinGainStep']+(($monitor['MaxGainStep']-$monitor['MinGainStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'move' :
|
|
||||||
{
|
|
||||||
$xFactor = empty($_REQUEST['xge'])?0:$_REQUEST['xge']/100;
|
|
||||||
$yFactor = empty($_REQUEST['yge'])?0:$_REQUEST['yge']/100;
|
|
||||||
|
|
||||||
if ( $monitor['Orientation'] != '0' )
|
|
||||||
{
|
|
||||||
$conversions = array(
|
|
||||||
'90' => array(
|
|
||||||
'Up' => 'Left',
|
|
||||||
'Down' => 'Right',
|
|
||||||
'Left' => 'Down',
|
|
||||||
'Right' => 'Up',
|
|
||||||
'UpLeft' => 'DownLeft',
|
|
||||||
'UpRight' => 'UpLeft',
|
|
||||||
'DownLeft' => 'DownRight',
|
|
||||||
'DownRight' => 'UpRight',
|
|
||||||
),
|
|
||||||
'180' => array(
|
|
||||||
'Up' => 'Down',
|
|
||||||
'Down' => 'Up',
|
|
||||||
'Left' => 'Right',
|
|
||||||
'Right' => 'Left',
|
|
||||||
'UpLeft' => 'DownRight',
|
|
||||||
'UpRight' => 'DownLeft',
|
|
||||||
'DownLeft' => 'UpRight',
|
|
||||||
'DownRight' => 'UpLeft',
|
|
||||||
),
|
|
||||||
'270' => array(
|
|
||||||
'Up' => 'Right',
|
|
||||||
'Down' => 'Left',
|
|
||||||
'Left' => 'Up',
|
|
||||||
'Right' => 'Down',
|
|
||||||
'UpLeft' => 'UpRight',
|
|
||||||
'UpRight' => 'DownRight',
|
|
||||||
'DownLeft' => 'UpLeft',
|
|
||||||
'DownRight' => 'DownLeft',
|
|
||||||
),
|
|
||||||
'hori' => array(
|
|
||||||
'Up' => 'Up',
|
|
||||||
'Down' => 'Down',
|
|
||||||
'Left' => 'Right',
|
|
||||||
'Right' => 'Left',
|
|
||||||
'UpLeft' => 'UpRight',
|
|
||||||
'UpRight' => 'UpLeft',
|
|
||||||
'DownLeft' => 'DownRight',
|
|
||||||
'DownRight' => 'DownLeft',
|
|
||||||
),
|
|
||||||
'vert' => array(
|
|
||||||
'Up' => 'Down',
|
|
||||||
'Down' => 'Up',
|
|
||||||
'Left' => 'Left',
|
|
||||||
'Right' => 'Right',
|
|
||||||
'UpLeft' => 'DownLeft',
|
|
||||||
'UpRight' => 'DownRight',
|
|
||||||
'DownLeft' => 'UpLeft',
|
|
||||||
'DownRight' => 'UpRight',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$new_dirn = $conversions[$monitor['Orientation']][$dirn];
|
|
||||||
$_REQUEST['control'] = preg_replace( "/_$dirn\$/", "_$new_dirn", $_REQUEST['control'] );
|
|
||||||
$dirn = $new_dirn;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $monitor['HasPanSpeed'] && $xFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboPan'] )
|
|
||||||
{
|
|
||||||
if ( $xFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$panSpeed = $monitor['TurboPanSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xFactor = $xFactor/$turbo;
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --panspeed=".$panSpeed;
|
|
||||||
}
|
|
||||||
if ( $monitor['HasTiltSpeed'] && $yFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboTilt'] )
|
|
||||||
{
|
|
||||||
if ( $yFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$tiltSpeed = $monitor['TurboTiltSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$yFactor = $yFactor/$turbo;
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --tiltspeed=".$tiltSpeed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Rel' :
|
|
||||||
case 'Abs' :
|
|
||||||
{
|
|
||||||
if ( preg_match( '/(Left|Right)$/', $dirn ) )
|
|
||||||
{
|
|
||||||
$panStep = intval(round($monitor['MinPanStep']+(($monitor['MaxPanStep']-$monitor['MinPanStep'])*$xFactor)));
|
|
||||||
$ctrlCommand .= " --panstep=".$panStep;
|
|
||||||
}
|
|
||||||
if ( preg_match( '/^(Up|Down)/', $dirn ) )
|
|
||||||
{
|
|
||||||
$tiltStep = intval(round($monitor['MinTiltStep']+(($monitor['MaxTiltStep']-$monitor['MinTiltStep'])*$yFactor)));
|
|
||||||
$ctrlCommand .= " --tiltstep=".$tiltStep;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Con' :
|
|
||||||
{
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowPanSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$slow)));
|
|
||||||
$slowTiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$slow)));
|
|
||||||
if ( (!isset($panSpeed) || ($panSpeed < $slowPanSpeed)) && (!isset($tiltSpeed) || ($tiltSpeed < $slowTiltSpeed)) )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( isset($_REQUEST['x']) && isset($_REQUEST['y']) )
|
|
||||||
{
|
|
||||||
if ( $_REQUEST['control'] == "moveMap" )
|
|
||||||
{
|
|
||||||
$x = deScale( $_REQUEST['x'], $_REQUEST['scale'] );
|
|
||||||
$y = deScale( $_REQUEST['y'], $_REQUEST['scale'] );
|
|
||||||
switch ( $monitor['Orientation'] )
|
|
||||||
{
|
|
||||||
case '0' :
|
|
||||||
case '180' :
|
|
||||||
case 'hori' :
|
|
||||||
case 'vert' :
|
|
||||||
$width = $monitor['Width'];
|
|
||||||
$height = $monitor['Height'];
|
|
||||||
break;
|
|
||||||
case '90' :
|
|
||||||
case '270' :
|
|
||||||
$width = $monitor['Height'];
|
|
||||||
$height = $monitor['Width'];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch ( $monitor['Orientation'] )
|
|
||||||
{
|
|
||||||
case '90' :
|
|
||||||
$tempY = $y;
|
|
||||||
$y = $height - $x;
|
|
||||||
$x = $tempY;
|
|
||||||
break;
|
|
||||||
case '180' :
|
|
||||||
$x = $width - $x;
|
|
||||||
$y = $height - $y;
|
|
||||||
break;
|
|
||||||
case '270' :
|
|
||||||
$tempX = $x;
|
|
||||||
$x = $width - $y;
|
|
||||||
$y = $tempX;
|
|
||||||
break;
|
|
||||||
case 'hori' :
|
|
||||||
$x = $width - $x;
|
|
||||||
break;
|
|
||||||
case 'vert' :
|
|
||||||
$y = $height - $y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//$ctrlCommand .= " --xcoord=$x --ycoord=$y --width=$width --height=$height";
|
|
||||||
$ctrlCommand .= " --xcoord=$x --ycoord=$y";
|
|
||||||
}
|
|
||||||
elseif ( $_REQUEST['control'] == "movePseudoMap" )
|
|
||||||
{
|
|
||||||
$x = deScale( $_REQUEST['x'], $_REQUEST['scale'] );
|
|
||||||
$y = deScale( $_REQUEST['y'], $_REQUEST['scale'] );
|
|
||||||
|
|
||||||
$halfWidth = $monitor['Width'] / 2;
|
|
||||||
$halfHeight = $monitor['Height'] / 2;
|
|
||||||
$xFactor = ($x - $halfWidth)/$halfWidth;
|
|
||||||
$yFactor = ($y - $halfHeight)/$halfHeight;
|
|
||||||
|
|
||||||
switch ( $monitor['Orientation'] )
|
|
||||||
{
|
|
||||||
case '90' :
|
|
||||||
$tempYFactor = $y;
|
|
||||||
$yFactor = -$xFactor;
|
|
||||||
$xFactor = $tempYFactor;
|
|
||||||
break;
|
|
||||||
case '180' :
|
|
||||||
$xFactor = -$xFactor;
|
|
||||||
$yFactor = -$yFactor;
|
|
||||||
break;
|
|
||||||
case '270' :
|
|
||||||
$tempXFactor = $x;
|
|
||||||
$xFactor = -$yFactor;
|
|
||||||
$yFactor = $tempXFactor;
|
|
||||||
break;
|
|
||||||
case 'hori' :
|
|
||||||
$xFactor = -$xFactor;
|
|
||||||
break;
|
|
||||||
case 'vert' :
|
|
||||||
$yFactor = -$yFactor;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$turbo = 0.9; // Threshold for turbo speed
|
|
||||||
$blind = 0.1; // Threshold for blind spot
|
|
||||||
|
|
||||||
$panControl = '';
|
|
||||||
$tiltControl = '';
|
|
||||||
if ( $xFactor > $blind )
|
|
||||||
{
|
|
||||||
$panControl = 'Right';
|
|
||||||
}
|
|
||||||
elseif ( $xFactor < -$blind )
|
|
||||||
{
|
|
||||||
$panControl = 'Left';
|
|
||||||
}
|
|
||||||
if ( $yFactor > $blind )
|
|
||||||
{
|
|
||||||
$tiltControl = 'Down';
|
|
||||||
}
|
|
||||||
elseif ( $yFactor < -$blind )
|
|
||||||
{
|
|
||||||
$tiltControl = 'Up';
|
|
||||||
}
|
|
||||||
|
|
||||||
$dirn = $tiltControl.$panControl;
|
|
||||||
if ( !$dirn )
|
|
||||||
{
|
|
||||||
// No command, probably in blind spot in middle
|
|
||||||
$_REQUEST['control'] = 'null';
|
|
||||||
return( false );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$_REQUEST['control'] = 'moveRel'.$dirn;
|
|
||||||
$xFactor = abs($xFactor);
|
|
||||||
$yFactor = abs($yFactor);
|
|
||||||
|
|
||||||
if ( $monitor['HasPanSpeed'] && $xFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboPan'] )
|
|
||||||
{
|
|
||||||
if ( $xFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$panSpeed = $monitor['TurboPanSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xFactor = $xFactor/$turbo;
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasTiltSpeed'] && $yFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboTilt'] )
|
|
||||||
{
|
|
||||||
if ( $yFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$tiltSpeed = $monitor['TurboTiltSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$yFactor = $yFactor/$turbo;
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( preg_match( '/(Left|Right)$/', $dirn ) )
|
|
||||||
{
|
|
||||||
$panStep = intval(round($monitor['MinPanStep']+(($monitor['MaxPanStep']-$monitor['MinPanStep'])*$xFactor)));
|
|
||||||
$ctrlCommand .= " --panstep=".$panStep." --panspeed=".$panSpeed;
|
|
||||||
}
|
|
||||||
if ( preg_match( '/^(Up|Down)/', $dirn ) )
|
|
||||||
{
|
|
||||||
$tiltStep = intval(round($monitor['MinTiltStep']+(($monitor['MaxTiltStep']-$monitor['MinTiltStep'])*$yFactor)));
|
|
||||||
$ctrlCommand .= " --tiltstep=".$tiltStep." --tiltspeed=".$tiltSpeed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ( $_REQUEST['control'] == "moveConMap" )
|
|
||||||
{
|
|
||||||
$x = deScale( $_REQUEST['x'], $_REQUEST['scale'] );
|
|
||||||
$y = deScale( $_REQUEST['y'], $_REQUEST['scale'] );
|
|
||||||
|
|
||||||
$halfWidth = $monitor['Width'] / 2;
|
|
||||||
$halfHeight = $monitor['Height'] / 2;
|
|
||||||
$xFactor = ($x - $halfWidth)/$halfWidth;
|
|
||||||
$yFactor = ($y - $halfHeight)/$halfHeight;
|
|
||||||
|
|
||||||
switch ( $monitor['Orientation'] )
|
|
||||||
{
|
|
||||||
case '90' :
|
|
||||||
$tempYFactor = $y;
|
|
||||||
$yFactor = -$xFactor;
|
|
||||||
$xFactor = $tempYFactor;
|
|
||||||
break;
|
|
||||||
case '180' :
|
|
||||||
$xFactor = -$xFactor;
|
|
||||||
$yFactor = -$yFactor;
|
|
||||||
break;
|
|
||||||
case '270' :
|
|
||||||
$tempXFactor = $x;
|
|
||||||
$xFactor = -$yFactor;
|
|
||||||
$yFactor = $tempXFactor;
|
|
||||||
break;
|
|
||||||
case 'hori' :
|
|
||||||
$xFactor = -$xFactor;
|
|
||||||
break;
|
|
||||||
case 'vert' :
|
|
||||||
$yFactor = -$yFactor;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$slow = 0.9; // Threshold for slow speed/timeouts
|
|
||||||
$turbo = 0.9; // Threshold for turbo speed
|
|
||||||
$blind = 0.1; // Threshold for blind spot
|
|
||||||
|
|
||||||
$panControl = '';
|
|
||||||
$tiltControl = '';
|
|
||||||
if ( $xFactor > $blind )
|
|
||||||
{
|
|
||||||
$panControl = 'Right';
|
|
||||||
}
|
|
||||||
elseif ( $xFactor < -$blind )
|
|
||||||
{
|
|
||||||
$panControl = 'Left';
|
|
||||||
}
|
|
||||||
if ( $yFactor > $blind )
|
|
||||||
{
|
|
||||||
$tiltControl = 'Down';
|
|
||||||
}
|
|
||||||
elseif ( $yFactor < -$blind )
|
|
||||||
{
|
|
||||||
$tiltControl = 'Up';
|
|
||||||
}
|
|
||||||
|
|
||||||
$dirn = $tiltControl.$panControl;
|
|
||||||
if ( !$dirn )
|
|
||||||
{
|
|
||||||
// No command, probably in blind spot in middle
|
|
||||||
$_REQUEST['control'] = 'moveStop';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$_REQUEST['control'] = 'moveCon'.$dirn;
|
|
||||||
$xFactor = abs($xFactor);
|
|
||||||
$yFactor = abs($yFactor);
|
|
||||||
|
|
||||||
if ( $monitor['HasPanSpeed'] && $xFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboPan'] )
|
|
||||||
{
|
|
||||||
if ( $xFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$panSpeed = $monitor['TurboPanSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xFactor = $xFactor/$turbo;
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasTiltSpeed'] && $yFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboTilt'] )
|
|
||||||
{
|
|
||||||
if ( $yFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$tiltSpeed = $monitor['TurboTiltSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$yFactor = $yFactor/$turbo;
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( preg_match( '/(Left|Right)$/', $dirn ) )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --panspeed=".$panSpeed;
|
|
||||||
}
|
|
||||||
if ( preg_match( '/^(Up|Down)/', $dirn ) )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --tiltspeed=".$tiltSpeed;
|
|
||||||
}
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowPanSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$slow)));
|
|
||||||
$slowTiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$slow)));
|
|
||||||
if ( (!isset($panSpeed) || ($panSpeed < $slowPanSpeed)) && (!isset($tiltSpeed) || ($tiltSpeed < $slowTiltSpeed)) )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$slow = 0.9; // Threshold for slow speed/timeouts
|
|
||||||
$turbo = 0.9; // Threshold for turbo speed
|
|
||||||
$long_y = 48;
|
|
||||||
$short_x = 32;
|
|
||||||
$short_y = 32;
|
|
||||||
|
|
||||||
if ( preg_match( '/^([a-z]+)([A-Z][a-z]+)([A-Z][a-z]+)$/', $_REQUEST['control'], $matches ) )
|
|
||||||
{
|
|
||||||
$command = $matches[1];
|
|
||||||
$mode = $matches[2];
|
|
||||||
$dirn = $matches[3];
|
|
||||||
|
|
||||||
switch( $command )
|
|
||||||
{
|
|
||||||
case 'focus' :
|
|
||||||
{
|
|
||||||
switch( $dirn )
|
|
||||||
{
|
|
||||||
case 'Near' :
|
|
||||||
{
|
|
||||||
$factor = ($long_y-($y+1))/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Far' :
|
|
||||||
{
|
|
||||||
$factor = ($y+1)/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasFocusSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinFocusSpeed']+(($monitor['MaxFocusSpeed']-$monitor['MinFocusSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinFocusStep']+(($monitor['MaxFocusStep']-$monitor['MinFocusStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Con' :
|
|
||||||
{
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowSpeed = intval(round($monitor['MinFocusSpeed']+(($monitor['MaxFocusSpeed']-$monitor['MinFocusSpeed'])*$slow)));
|
|
||||||
if ( $speed < $slowSpeed )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'zoom' :
|
|
||||||
{
|
|
||||||
switch( $dirn )
|
|
||||||
{
|
|
||||||
case 'Tele' :
|
|
||||||
{
|
|
||||||
$factor = ($long_y-($y+1))/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Wide' :
|
|
||||||
{
|
|
||||||
$factor = ($y+1)/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasZoomSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinZoomSpeed']+(($monitor['MaxZoomSpeed']-$monitor['MinZoomSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinZoomStep']+(($monitor['MaxZoomStep']-$monitor['MinZoomStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Con' :
|
|
||||||
{
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowSpeed = intval(round($monitor['MinZoomSpeed']+(($monitor['MaxZoomSpeed']-$monitor['MinZoomSpeed'])*$slow)));
|
|
||||||
if ( $speed < $slowSpeed )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'iris' :
|
|
||||||
{
|
|
||||||
switch( $dirn )
|
|
||||||
{
|
|
||||||
case 'Open' :
|
|
||||||
{
|
|
||||||
$factor = ($long_y-($y+1))/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Close' :
|
|
||||||
{
|
|
||||||
$factor = ($y+1)/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasIrisSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinIrisSpeed']+(($monitor['MaxIrisSpeed']-$monitor['MinIrisSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinIrisStep']+(($monitor['MaxIrisStep']-$monitor['MinIrisStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'white' :
|
|
||||||
{
|
|
||||||
switch( $dirn )
|
|
||||||
{
|
|
||||||
case 'In' :
|
|
||||||
{
|
|
||||||
$factor = ($long_y-($y+1))/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Out' :
|
|
||||||
{
|
|
||||||
$factor = ($y+1)/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasWhiteSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinWhiteSpeed']+(($monitor['MaxWhiteSpeed']-$monitor['MinWhiteSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinWhiteStep']+(($monitor['MaxWhiteStep']-$monitor['MinWhiteStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'gain' :
|
|
||||||
{
|
|
||||||
switch( $dirn )
|
|
||||||
{
|
|
||||||
case 'Up' :
|
|
||||||
{
|
|
||||||
$factor = ($long_y-($y+1))/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Down' :
|
|
||||||
{
|
|
||||||
$factor = ($y+1)/$long_y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $monitor['HasGainSpeed'] )
|
|
||||||
{
|
|
||||||
$speed = intval(round($monitor['MinGainSpeed']+(($monitor['MaxGainSpeed']-$monitor['MinGainSpeed'])*$factor)));
|
|
||||||
$ctrlCommand .= " --speed=".$speed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Abs' :
|
|
||||||
case 'Rel' :
|
|
||||||
{
|
|
||||||
$step = intval(round($monitor['MinGainStep']+(($monitor['MaxGainStep']-$monitor['MinGainStep'])*$factor)));
|
|
||||||
$ctrlCommand .= " --step=".$step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'move' :
|
|
||||||
{
|
|
||||||
$xFactor = 0;
|
|
||||||
$yFactor = 0;
|
|
||||||
|
|
||||||
if ( preg_match( '/^Up/', $dirn ) )
|
|
||||||
{
|
|
||||||
$yFactor = ($short_y-($y+1))/$short_y;
|
|
||||||
}
|
|
||||||
elseif ( preg_match( '/^Down/', $dirn ) )
|
|
||||||
{
|
|
||||||
$yFactor = ($y+1)/$short_y;
|
|
||||||
}
|
|
||||||
if ( preg_match( '/Left$/', $dirn ) )
|
|
||||||
{
|
|
||||||
$xFactor = ($short_x-($x+1))/$short_x;
|
|
||||||
}
|
|
||||||
elseif ( preg_match( '/Right$/', $dirn ) )
|
|
||||||
{
|
|
||||||
$xFactor = ($x+1)/$short_x;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $monitor['Orientation'] != '0' )
|
|
||||||
{
|
|
||||||
$conversions = array(
|
|
||||||
'90' => array(
|
|
||||||
'Up' => 'Left',
|
|
||||||
'Down' => 'Right',
|
|
||||||
'Left' => 'Down',
|
|
||||||
'Right' => 'Up',
|
|
||||||
'UpLeft' => 'DownLeft',
|
|
||||||
'UpRight' => 'UpLeft',
|
|
||||||
'DownLeft' => 'DownRight',
|
|
||||||
'DownRight' => 'UpRight',
|
|
||||||
),
|
|
||||||
'180' => array(
|
|
||||||
'Up' => 'Down',
|
|
||||||
'Down' => 'Up',
|
|
||||||
'Left' => 'Right',
|
|
||||||
'Right' => 'Left',
|
|
||||||
'UpLeft' => 'DownRight',
|
|
||||||
'UpRight' => 'DownLeft',
|
|
||||||
'DownLeft' => 'UpRight',
|
|
||||||
'DownRight' => 'UpLeft',
|
|
||||||
),
|
|
||||||
'270' => array(
|
|
||||||
'Up' => 'Right',
|
|
||||||
'Down' => 'Left',
|
|
||||||
'Left' => 'Up',
|
|
||||||
'Right' => 'Down',
|
|
||||||
'UpLeft' => 'UpRight',
|
|
||||||
'UpRight' => 'DownRight',
|
|
||||||
'DownLeft' => 'UpLeft',
|
|
||||||
'DownRight' => 'DownLeft',
|
|
||||||
),
|
|
||||||
'hori' => array(
|
|
||||||
'Up' => 'Up',
|
|
||||||
'Down' => 'Down',
|
|
||||||
'Left' => 'Right',
|
|
||||||
'Right' => 'Left',
|
|
||||||
'UpLeft' => 'UpRight',
|
|
||||||
'UpRight' => 'UpLeft',
|
|
||||||
'DownLeft' => 'DownRight',
|
|
||||||
'DownRight' => 'DownLeft',
|
|
||||||
),
|
|
||||||
'vert' => array(
|
|
||||||
'Up' => 'Down',
|
|
||||||
'Down' => 'Up',
|
|
||||||
'Left' => 'Left',
|
|
||||||
'Right' => 'Right',
|
|
||||||
'UpLeft' => 'DownLeft',
|
|
||||||
'UpRight' => 'DownRight',
|
|
||||||
'DownLeft' => 'UpLeft',
|
|
||||||
'DownRight' => 'UpRight',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$new_dirn = $conversions[$monitor['Orientation']][$dirn];
|
|
||||||
$_REQUEST['control'] = preg_replace( "/_$dirn\$/", "_$new_dirn", $_REQUEST['control'] );
|
|
||||||
$dirn = $new_dirn;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $monitor['HasPanSpeed'] && $xFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboPan'] )
|
|
||||||
{
|
|
||||||
if ( $xFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$panSpeed = $monitor['TurboPanSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xFactor = $xFactor/$turbo;
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$panSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$xFactor)));
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --panspeed=".$panSpeed;
|
|
||||||
}
|
|
||||||
if ( $monitor['HasTiltSpeed'] && $yFactor )
|
|
||||||
{
|
|
||||||
if ( $monitor['HasTurboTilt'] )
|
|
||||||
{
|
|
||||||
if ( $yFactor >= $turbo )
|
|
||||||
{
|
|
||||||
$tiltSpeed = $monitor['TurboTiltSpeed'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$yFactor = $yFactor/$turbo;
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$yFactor)));
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --tiltspeed=".$tiltSpeed;
|
|
||||||
}
|
|
||||||
switch( $mode )
|
|
||||||
{
|
|
||||||
case 'Rel' :
|
|
||||||
case 'Abs' :
|
|
||||||
{
|
|
||||||
if ( preg_match( '/(Left|Right)$/', $dirn ) )
|
|
||||||
{
|
|
||||||
$panStep = intval(round($monitor['MinPanStep']+(($monitor['MaxPanStep']-$monitor['MinPanStep'])*$xFactor)));
|
|
||||||
$ctrlCommand .= " --panstep=".$panStep;
|
|
||||||
}
|
|
||||||
if ( preg_match( '/^(Up|Down)/', $dirn ) )
|
|
||||||
{
|
|
||||||
$tiltStep = intval(round($monitor['MinTiltStep']+(($monitor['MaxTiltStep']-$monitor['MinTiltStep'])*$yFactor)));
|
|
||||||
$ctrlCommand .= " --tiltstep=".$tiltStep;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Con' :
|
|
||||||
{
|
|
||||||
if ( $monitor['AutoStopTimeout'] )
|
|
||||||
{
|
|
||||||
$slowPanSpeed = intval(round($monitor['MinPanSpeed']+(($monitor['MaxPanSpeed']-$monitor['MinPanSpeed'])*$slow)));
|
|
||||||
$slowTiltSpeed = intval(round($monitor['MinTiltSpeed']+(($monitor['MaxTiltSpeed']-$monitor['MinTiltSpeed'])*$slow)));
|
|
||||||
if ( (!isset($panSpeed) || ($panSpeed < $slowPanSpeed)) && (!isset($tiltSpeed) || ($tiltSpeed < $slowTiltSpeed)) )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --autostop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( preg_match( '/^presetGoto(\d+)$/', $_REQUEST['control'], $matches ) )
|
|
||||||
{
|
|
||||||
$_REQUEST['control'] = 'presetGoto';
|
|
||||||
$ctrlCommand .= " --preset=".$matches[1];
|
|
||||||
}
|
|
||||||
elseif ( $_REQUEST['control'] == "presetGoto" && !empty($_REQUEST['preset']) )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --preset=".$_REQUEST['preset'];
|
|
||||||
}
|
|
||||||
elseif ( $_REQUEST['control'] == "presetSet" )
|
|
||||||
{
|
|
||||||
if ( canEdit( 'Control' ) )
|
|
||||||
{
|
|
||||||
$preset = validInt($_REQUEST['preset']);
|
|
||||||
$newLabel = validJsStr($_REQUEST['newLabel']);
|
|
||||||
$row = dbFetchOne( "select * from ControlPresets where MonitorId = '".$monitor['Id']."' and Preset = '".dbEscape($preset)."'" );
|
|
||||||
if ( $newLabel != $row['Label'] )
|
|
||||||
{
|
|
||||||
if ( $newLabel )
|
|
||||||
$sql = "replace into ControlPresets ( MonitorId, Preset, Label ) values ( '".$monitor['Id']."', '".dbEscape($preset)."', '".dbEscape($newLabel)."' )";
|
|
||||||
else
|
|
||||||
$sql = "delete from ControlPresets where MonitorId = '".$monitor['Id']."' and Preset = '".dbEscape($preset)."'";
|
|
||||||
dbQuery( $sql );
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --preset=".$preset;
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --preset=".$preset;
|
|
||||||
}
|
|
||||||
elseif ( $_REQUEST['control'] == "moveMap" )
|
|
||||||
{
|
|
||||||
$ctrlCommand .= " --xcoord=$x --ycoord=$y";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$ctrlCommand .= " --command=".$_REQUEST['control'];
|
|
||||||
return( $ctrlCommand );
|
|
||||||
}
|
|