Merge branch 'master' of github.com:ZoneMinder/zoneminder

pull/2993/head
Isaac Connor 2020-07-21 14:39:51 -04:00
commit 495cd56b8b
21 changed files with 394 additions and 289 deletions

View File

@ -21,8 +21,8 @@ override_dh_auto_configure:
-DCMAKE_BUILD_TYPE=Release \
-DZM_CONFIG_DIR="/etc/zm" \
-DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \
-DZM_RUNDIR="/var/run/zm" \
-DZM_SOCKDIR="/var/run/zm" \
-DZM_RUNDIR="/run/zm" \
-DZM_SOCKDIR="/run/zm" \
-DZM_TMPDIR="/tmp/zm" \
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \

View File

@ -21,8 +21,8 @@ override_dh_auto_configure:
-DCMAKE_BUILD_TYPE=Release \
-DZM_CONFIG_DIR="/etc/zm" \
-DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \
-DZM_RUNDIR="/var/run/zm" \
-DZM_SOCKDIR="/var/run/zm" \
-DZM_RUNDIR="/run/zm" \
-DZM_SOCKDIR="/run/zm" \
-DZM_TMPDIR="/tmp/zm" \
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \

View File

@ -3,10 +3,157 @@ Debian
.. contents::
Easy Way: Debian Buster
------------------------
This procedure will guide you through the installation of ZoneMinder on Debian 10 (Buster).
**Step 1:** Make sure your system is up to date
Open a console and use ``su`` command to become root.
::
apt update
apt upgrade
**Step 2:** Setup Sudo (optional but recommended)
By default Debian does not come with sudo, so you have to install it and configure it manually.
This step is optional but recommended and the following instructions assume that you have setup sudo.
If you prefer to setup ZoneMinder as root, do it at your own risk and adapt the following instructions accordingly.
::
apt install sudo
usermod -a -G sudo <username>
exit
Now your terminal session is back under your normal user. You can check that
you are now part of the sudo group with the command ``groups``, "sudo" should
appear in the list. If not, run ``newgrp sudo`` and check again with ``groups``.
**Step 3:** Install Apache and MySQL
These are not dependencies for the ZoneMinder package as they could be
installed elsewhere. If they are not installed yet in your system, you have to
trigger their installation manually.
::
sudo apt install apache2 mysql-server
**Step 4:** Add ZoneMinder's Package repository to your apt sources
ZoneMinder's Debian packages are not included in Debian's official package
repositories. To be able to install ZoneMinder with APT, you have to edit the
list of apt sources and add ZoneMinder's repository.
::
sudo nano /etc/apt/sources.list
Add the following to the bottom of the file
::
# ZoneMinder repository
deb https://zmrepo.zoneminder.com/debian/release-1.34 stretch/
CTRL+o and <Enter> to save
CTRL+x to exit
Because ZoneMinder's package repository provides a secure connection through HTTPS, apt must be enabled for HTTPS.
::
sudo apt install apt-transport-https
Finally, download the GPG key for ZoneMinder's repository:
::
wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add -
**Step 5:** Install ZoneMinder
::
sudo apt update
sudo apt install zoneminder
**Step 6:** Read the Readme
The rest of the install process is covered in the README.Debian, so feel free to have
a read.
::
zcat /usr/share/doc/zoneminder/README.Debian.gz
**Step 7:** Enable ZoneMinder service
::
sudo systemctl enable zoneminder.service
**Step 8:** Configure Apache
The following commands will setup the default /zm virtual directory and configure
required apache modules.
::
sudo a2enconf zoneminder
sudo a2enmod rewrite
sudo a2enmod cgi # this is done automatically when installing the package. Redo this command manually only for troubleshooting.
**Step 9:** Edit Timezone in PHP
Automated way:
::
sudo sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.0/apache2/php.ini
Manual way
::
sudo nano /etc/php/7.0/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and change
date.timezone for your time zone. Don't forget to remove the ; from in front
of date.timezone.
::
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
CTRL+o then [Enter] to save
CTRL+x to exit
**Step 10:** Start ZoneMinder
Reload Apache to enable your changes and then start ZoneMinder.
::
sudo systemctl reload apache2
sudo systemctl start zoneminder
You are now ready to go with ZoneMinder. Open a browser and type either ``localhost/zm`` one the local machine or ``{IP-OF-ZM-SERVER}/zm`` if you connect from a remote computer.
Easy Way: Debian Stretch
------------------------
This procedure will guide you through the installation of ZoneMinder on Debian 9 (Stretch). This section has been tested with ZoneMinder 1.32.3 on Debian 9.8.
This procedure will guide you through the installation of ZoneMinder on Debian 9 (Stretch). This section has been tested with ZoneMinder 1.34 on Debian 9.8.
**Step 1:** Make sure your system is up to date
@ -52,7 +199,7 @@ Add the following to the bottom of the file
::
# ZoneMinder repository
deb https://zmrepo.zoneminder.com/debian/release stretch/
deb https://zmrepo.zoneminder.com/debian/release-1.34 stretch/
CTRL+o and <Enter> to save
CTRL+x to exit
@ -275,7 +422,6 @@ CTRL+x to exit
**Step 12:** Please check the configuration
Zoneminder 1.32.x
1. Check path of ZM_PATH in '/etc/zm/conf.d/zmcustom.conf' is ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
::
cat /etc/zm/conf.d/zmcustom.conf
@ -309,8 +455,8 @@ Reload Apache to enable your changes and then start ZoneMinder.
::
{
"version": "1.29.0",
"apiversion": "1.29.0.1"
"version": "1.34.0",
"apiversion": "1.34.0.1"
}
**Congratulations** Your installation is complete

View File

@ -53,7 +53,7 @@ ZoneMinder releases are now being hosted at RPM Fusion. New users should navigat
Note that RHEL/CentOS 7 users should use yum instead of dnf.
Once ZoneMinder has been installed, it is critically important that you read the README file under /usr/share/doc/zoneminder. ZoneMinder will not run without completing the steps outlined in the README.
Once ZoneMinder has been installed, it is critically important that you read the README file under /usr/share/doc/zoneminder-common. ZoneMinder will not run without completing the steps outlined in the README.
How to Install Nightly Development Builds
-----------------------------------------
@ -191,7 +191,7 @@ Now clone the ZoneMinder git repository from your home folder:
git clone https://github.com/ZoneMinder/zoneminder
cd zoneminder
This will create a sub-folder called ZoneMinder, which will contain the latest development source code.
This will create a sub-folder called zoneminder, which will contain the latest development source code.
If you have previsouly cloned the ZoneMinder git repo and wish to update it to the most recent, then issue these commands instead:

View File

@ -208,12 +208,12 @@ void FfmpegCamera::Terminate() {
int FfmpegCamera::PrimeCapture() {
if ( mCanCapture ) {
Info("Priming capture from %s, Closing", mPath.c_str());
Debug(1, "Priming capture from %s, Closing", mPath.c_str());
Close();
}
mVideoStreamId = -1;
mAudioStreamId = -1;
Info("Priming capture from %s", mPath.c_str());
Debug(1, "Priming capture from %s", mPath.c_str());
return OpenFfmpeg();
}

View File

@ -299,7 +299,7 @@ void Image::Deinitialise() {
void Image::Initialise() {
/* Assign the blend pointer to function */
if ( config.fast_image_blends ) {
if ( config.cpu_extensions && sseversion >= 20 ) {
if ( config.cpu_extensions && sse_version >= 20 ) {
fptr_blend = &sse2_fastblend; /* SSE2 fast blend */
Debug(4, "Blend: Using SSE2 fast blend function");
} else if ( config.cpu_extensions && neonversion >= 1 ) {
@ -356,22 +356,22 @@ void Image::Initialise() {
/* Assign the delta functions */
if ( config.cpu_extensions ) {
if ( sseversion >= 35 ) {
if ( sse_version >= 35 ) {
/* SSSE3 available */
fptr_delta8_rgba = &ssse3_delta8_rgba;
fptr_delta8_bgra = &ssse3_delta8_bgra;
fptr_delta8_argb = &ssse3_delta8_argb;
fptr_delta8_abgr = &ssse3_delta8_abgr;
fptr_delta8_gray8 = &sse2_delta8_gray8;
Debug(4,"Delta: Using SSSE3 delta functions");
} else if ( sseversion >= 20 ) {
Debug(4, "Delta: Using SSSE3 delta functions");
} else if ( sse_version >= 20 ) {
/* SSE2 available */
fptr_delta8_rgba = &sse2_delta8_rgba;
fptr_delta8_bgra = &sse2_delta8_bgra;
fptr_delta8_argb = &sse2_delta8_argb;
fptr_delta8_abgr = &sse2_delta8_abgr;
fptr_delta8_gray8 = &sse2_delta8_gray8;
Debug(4,"Delta: Using SSE2 delta functions");
Debug(4, "Delta: Using SSE2 delta functions");
} else if ( neonversion >= 1 ) {
/* ARM Neon available */
#if defined(__aarch64__)
@ -380,14 +380,14 @@ void Image::Initialise() {
fptr_delta8_argb = &neon64_armv8_delta8_argb;
fptr_delta8_abgr = &neon64_armv8_delta8_abgr;
fptr_delta8_gray8 = &neon64_armv8_delta8_gray8;
Debug(4,"Delta: Using ARM Neon (AArch64) delta functions");
Debug(4, "Delta: Using ARM Neon (AArch64) delta functions");
#elif defined(__arm__)
fptr_delta8_rgba = &neon32_armv7_delta8_rgba;
fptr_delta8_bgra = &neon32_armv7_delta8_bgra;
fptr_delta8_argb = &neon32_armv7_delta8_argb;
fptr_delta8_abgr = &neon32_armv7_delta8_abgr;
fptr_delta8_gray8 = &neon32_armv7_delta8_gray8;
Debug(4,"Delta: Using ARM Neon (AArch32) delta functions");
Debug(4, "Delta: Using ARM Neon (AArch32) delta functions");
#else
Panic("Bug: Non ARM platform but neon present");
#endif
@ -464,11 +464,11 @@ void Image::Initialise() {
fptr_deinterlace_4field_argb = &std_deinterlace_4field_argb;
fptr_deinterlace_4field_abgr = &std_deinterlace_4field_abgr;
fptr_deinterlace_4field_gray8 = &std_deinterlace_4field_gray8;
Debug(4,"Deinterlace: Using standard functions");
Debug(4, "Deinterlace: Using standard functions");
#if defined(__i386__) && !defined(__x86_64__)
/* Use SSE2 aligned memory copy? */
if ( config.cpu_extensions && sseversion >= 20 ) {
if ( config.cpu_extensions && sse_version >= 20 ) {
fptr_imgbufcpy = &sse2_aligned_memcpy;
Debug(4, "Image buffer copy: Using SSE2 aligned memcpy");
} else {
@ -480,52 +480,12 @@ void Image::Initialise() {
Debug(4, "Image buffer copy: Using standard memcpy");
#endif
/* Code below relocated from zm_local_camera */
Debug(3, "Setting up static colour tables");
y_table = y_table_global;
uv_table = uv_table_global;
r_v_table = r_v_table_global;
g_v_table = g_v_table_global;
g_u_table = g_u_table_global;
b_u_table = b_u_table_global;
/*
y_table = new unsigned char[256];
for ( int i = 0; i <= 255; i++ )
{
unsigned char c = i;
if ( c <= 16 )
y_table[c] = 0;
else if ( c >= 235 )
y_table[c] = 255;
else
y_table[c] = (255*(c-16))/219;
}
uv_table = new signed char[256];
for ( int i = 0; i <= 255; i++ )
{
unsigned char c = i;
if ( c <= 16 )
uv_table[c] = -127;
else if ( c >= 240 )
uv_table[c] = 127;
else
uv_table[c] = (127*(c-128))/112;
}
r_v_table = new short[255];
g_v_table = new short[255];
g_u_table = new short[255];
b_u_table = new short[255];
for ( int i = 0; i < 255; i++ )
{
r_v_table[i] = (1402*(i-128))/1000;
g_u_table[i] = (344*(i-128))/1000;
g_v_table[i] = (714*(i-128))/1000;
b_u_table[i] = (1772*(i-128))/1000;
}
*/
initialised = true;
}
@ -572,8 +532,18 @@ uint8_t* Image::WriteBuffer(const unsigned int p_width, const unsigned int p_hei
return buffer;
}
/* Assign an existing buffer to the image instead of copying from a source buffer. The goal is to reduce the amount of memory copying and increase efficiency and buffer reusing. */
void Image::AssignDirect( const unsigned int p_width, const unsigned int p_height, const unsigned int p_colours, const unsigned int p_subpixelorder, uint8_t *new_buffer, const size_t buffer_size, const int p_buffertype) {
/* Assign an existing buffer to the image instead of copying from a source buffer.
The goal is to reduce the amount of memory copying and increase efficiency and buffer reusing.
*/
void Image::AssignDirect(
const unsigned int p_width,
const unsigned int p_height,
const unsigned int p_colours,
const unsigned int p_subpixelorder,
uint8_t *new_buffer,
const size_t buffer_size,
const int p_buffertype) {
if ( new_buffer == NULL ) {
Error("Attempt to directly assign buffer from a NULL pointer");
return;
@ -605,6 +575,7 @@ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_heigh
width = p_width;
height = p_height;
colours = p_colours;
linesize = width*colours;
subpixelorder = p_subpixelorder;
pixels = height*width;
size = new_buffer_size; // was pixels*colours, but we already calculated it above as new_buffer_size
@ -623,6 +594,7 @@ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_heigh
width = p_width;
height = p_height;
colours = p_colours;
linesize = width*colours;
subpixelorder = p_subpixelorder;
pixels = height*width;
size = new_buffer_size; // was pixels*colours, but we already calculated it above as new_buffer_size
@ -631,7 +603,6 @@ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_heigh
buffertype = p_buffertype;
buffer = new_buffer;
}
Debug(1, "In assign direct");
}
void Image::Assign(const unsigned int p_width, const unsigned int p_height, const unsigned int p_colours, const unsigned int p_subpixelorder, const uint8_t* new_buffer, const size_t buffer_size) {
@ -2168,7 +2139,7 @@ void Image::DeColourise() {
subpixelorder = ZM_SUBPIX_ORDER_NONE;
size = width * height;
if ( colours == ZM_COLOUR_RGB32 && config.cpu_extensions && sseversion >= 35 ) {
if ( colours == ZM_COLOUR_RGB32 && config.cpu_extensions && sse_version >= 35 ) {
/* Use SSSE3 functions */
switch (subpixelorder) {
case ZM_SUBPIX_ORDER_BGRA:
@ -2735,7 +2706,7 @@ void Image::Flip( bool leftright ) {
void Image::Scale( unsigned int factor ) {
if ( !factor ) {
Error( "Bogus scale factor %d found", factor );
Error("Bogus scale factor %d found", factor);
return;
}
if ( factor == ZM_SCALE_BASE ) {
@ -2745,6 +2716,7 @@ void Image::Scale( unsigned int factor ) {
unsigned int new_width = (width*factor)/ZM_SCALE_BASE;
unsigned int new_height = (height*factor)/ZM_SCALE_BASE;
// Why larger than we need?
size_t scale_buffer_size = (new_width+1) * (new_height+1) * colours;
uint8_t* scale_buffer = AllocBuffer(scale_buffer_size);
@ -2819,10 +2791,8 @@ void Image::Scale( unsigned int factor ) {
}
new_width = last_w_index;
new_height = last_h_index;
}
} // end foreach line
AssignDirect( new_width, new_height, colours, subpixelorder, scale_buffer, scale_buffer_size, ZM_BUFTYPE_ZM);
}
void Image::Deinterlace_Discard() {

View File

@ -198,8 +198,7 @@ void LibvlcCamera::Terminate() {
}
int LibvlcCamera::PrimeCapture() {
Info("Priming capture from %s", mPath.c_str());
Info("Libvlc Version %s", (*libvlc_get_version_f)());
Debug(1, "Priming capture from %s, libvlc version %s", mPath.c_str(), (*libvlc_get_version_f)());
StringVector opVect = split(Options(), ",");

View File

@ -148,7 +148,7 @@ void VncCamera::Terminate() {
}
int VncCamera::PrimeCapture() {
Info("Priming capture from %s", mHost.c_str());
Debug(1, "Priming capture from %s", mHost.c_str());
return 0;
}

View File

@ -504,7 +504,7 @@ LocalCamera::LocalCamera(
subpixelorder = ZM_SUBPIX_ORDER_NONE;
} else if ( palette == V4L2_PIX_FMT_YUYV && colours == ZM_COLOUR_GRAY8 ) {
/* Fast YUYV->Grayscale conversion by extracting the Y channel */
if ( config.cpu_extensions && sseversion >= 35 ) {
if ( config.cpu_extensions && sse_version >= 35 ) {
conversion_fptr = &ssse3_convert_yuyv_gray8;
Debug(2,"Using SSSE3 YUYV->grayscale fast conversion");
} else {
@ -616,7 +616,7 @@ LocalCamera::LocalCamera(
}
} else if ( (palette == VIDEO_PALETTE_YUYV || palette == VIDEO_PALETTE_YUV422) && colours == ZM_COLOUR_GRAY8 ) {
/* Fast YUYV->Grayscale conversion by extracting the Y channel */
if ( config.cpu_extensions && sseversion >= 35 ) {
if ( config.cpu_extensions && sse_version >= 35 ) {
conversion_fptr = &ssse3_convert_yuyv_gray8;
Debug(2,"Using SSSE3 YUYV->grayscale fast conversion");
} else {

View File

@ -1404,9 +1404,6 @@ bool Monitor::Analyse() {
score += trigger_data->trigger_score;
Debug(1, "Triggered on score += %d => %d", trigger_data->trigger_score, score);
if ( !event ) {
// How could it have a length already?
//if ( cause.length() )
//cause += ", ";
cause += trigger_data->trigger_cause;
}
Event::StringSet noteSet;
@ -1514,7 +1511,6 @@ bool Monitor::Analyse() {
} // end if event
if ( !event ) {
// Create event
event = new Event(this, *timestamp, "Continuous", noteSetMap, videoRecording);
shared_data->last_event = event->Id();
@ -1528,7 +1524,6 @@ bool Monitor::Analyse() {
if ( state == IDLE ) {
shared_data->state = state = TAPE;
}
} // end if ! event
} // end if function == RECORD || function == MOCORD)
} // end if !signal_change && signal
@ -1541,7 +1536,7 @@ bool Monitor::Analyse() {
&& (event_close_mode == CLOSE_ALARM)
&& ( ( timestamp->tv_sec - video_store_data->recording.tv_sec ) >= min_section_length )
) {
Info("%s: %03d - Closing event %" PRIu64 ", continuous end, alarm begins",
Info("%s: %03d - Closing event %" PRIu64 ", continuous end, alarm begins",
name, image_count, event->Id());
closeEvent();
} else if ( event ) {
@ -1552,7 +1547,6 @@ bool Monitor::Analyse() {
);
}
if ( (!pre_event_count) || (Event::PreAlarmCount() >= alarm_frame_count-1) ) {
shared_data->state = state = ALARM;
// lets construct alarm cause. It will contain cause + names of zones alarmed
std::string alarm_cause = "";
for ( int i=0; i < n_zones; i++ ) {
@ -1610,6 +1604,7 @@ bool Monitor::Analyse() {
event = new Event(this, *(image_buffer[pre_index].timestamp), cause, noteSetMap);
} // end if analysis_fps && pre_event_count
shared_data->state = state = ALARM;
shared_data->last_event = event->Id();
//set up video store data
snprintf(video_store_data->event_file, sizeof(video_store_data->event_file), "%s", event->getEventFile());

View File

@ -35,7 +35,7 @@
#include <curl/curl.h>
#endif
unsigned int sseversion = 0;
unsigned int sse_version = 0;
unsigned int neonversion = 0;
std::string trimSet(std::string str, std::string trimset) {
@ -227,7 +227,7 @@ int pairsplit(const char* string, const char delim, std::string& name, std::stri
/* Detect special hardware features, such as SIMD instruction sets */
void hwcaps_detect() {
neonversion = 0;
sseversion = 0;
sse_version = 0;
#if (defined(__i386__) || defined(__x86_64__))
/* x86 or x86-64 processor */
uint32_t r_edx, r_ecx, r_ebx;
@ -265,31 +265,31 @@ void hwcaps_detect() {
#endif
if ( r_ebx & 0x00000020 ) {
sseversion = 52; /* AVX2 */
sse_version = 52; /* AVX2 */
Debug(1, "Detected a x86\\x86-64 processor with AVX2");
} else if ( r_ecx & 0x10000000 ) {
sseversion = 51; /* AVX */
sse_version = 51; /* AVX */
Debug(1, "Detected a x86\\x86-64 processor with AVX");
} else if ( r_ecx & 0x00100000 ) {
sseversion = 42; /* SSE4.2 */
sse_version = 42; /* SSE4.2 */
Debug(1, "Detected a x86\\x86-64 processor with SSE4.2");
} else if ( r_ecx & 0x00080000 ) {
sseversion = 41; /* SSE4.1 */
sse_version = 41; /* SSE4.1 */
Debug(1, "Detected a x86\\x86-64 processor with SSE4.1");
} else if ( r_ecx & 0x00000200 ) {
sseversion = 35; /* SSSE3 */
sse_version = 35; /* SSSE3 */
Debug(1,"Detected a x86\\x86-64 processor with SSSE3");
} else if ( r_ecx & 0x00000001 ) {
sseversion = 30; /* SSE3 */
sse_version = 30; /* SSE3 */
Debug(1, "Detected a x86\\x86-64 processor with SSE3");
} else if ( r_edx & 0x04000000 ) {
sseversion = 20; /* SSE2 */
sse_version = 20; /* SSE2 */
Debug(1, "Detected a x86\\x86-64 processor with SSE2");
} else if ( r_edx & 0x02000000 ) {
sseversion = 10; /* SSE */
sse_version = 10; /* SSE */
Debug(1, "Detected a x86\\x86-64 processor with SSE");
} else {
sseversion = 0;
sse_version = 0;
Debug(1, "Detected a x86\\x86-64 processor");
}
#elif defined(__arm__)

View File

@ -59,7 +59,7 @@ void* sse2_aligned_memcpy(void* dest, const void* src, size_t bytes);
void timespec_diff(struct timespec *start, struct timespec *end, struct timespec *diff);
void hwcaps_detect();
extern unsigned int sseversion;
extern unsigned int sse_version;
extern unsigned int neonversion;
char *timeval_to_string( struct timeval tv );

View File

@ -229,7 +229,7 @@ bool Zone::CheckAlarms(const Image *delta_image) {
Debug(4, "Checking alarms for zone %d/%s in lines %d -> %d", id, label, lo_y, hi_y);
/* if(config.cpu_extensions && sseversion >= 20) {
/* if(config.cpu_extensions && sse_version >= 20) {
sse2_alarmedpixels(diff_image, pg_image, &alarm_pixels, &pixel_diff_count);
} else {
std_alarmedpixels(diff_image, pg_image, &alarm_pixels, &pixel_diff_count);

View File

@ -102,21 +102,21 @@ CakeLog::config('debug', array(
'engine' => 'File',
'types' => array('notice', 'info', 'debug'),
'file' => 'cake_debug',
'path' => '@ZM_LOGDIR@/'
'path' => '@ZM_LOGDIR@/'
));
CakeLog::config('error', array(
'engine' => 'File',
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
'file' => 'cake_error',
'path' => '@ZM_LOGDIR@/'
'path' => '@ZM_LOGDIR@/'
));
CakeLog::config('custom_path', array(
'engine' => 'File',
'path' => '@ZM_LOGDIR@/'
'engine' => 'File',
'path' => '@ZM_LOGDIR@/'
));
Configure::write('ZM_CONFIG', '@ZM_CONFIG@');
Configure::write('ZM_CONFIG_SUBDIR', '@ZM_CONFIG_SUBDIR@');
Configure::write('ZM_CONFIG', '@ZM_CONFIG@');
Configure::write('ZM_CONFIG_SUBDIR', '@ZM_CONFIG_SUBDIR@');
Configure::write('ZM_VERSION', '@VERSION@');
Configure::write('ZM_API_VERSION', '@API_VERSION@');
@ -128,27 +128,3 @@ global $configvals;
foreach( $configvals as $key => $value) {
Configure::write($key, $value);
}
if ( 0 ) {
// No longer needed, but I want to keep the code for reference
//
// For Human-readability, use ZM_SERVER_HOST or ZM_SERVER_NAME in zm.conf, and convert it here to a ZM_SERVER_ID
if ( ! defined('ZM_SERVER_ID') ) {
App::uses('ClassRegistry', 'Utility');
$ServerModel = ClassRegistry::init('Server');
if ( defined('ZM_SERVER_NAME') and ZM_SERVER_NAME ) {
$Server = $ServerModel->find( 'first', array( 'conditions'=>array('Name'=>ZM_SERVER_NAME) ) );
if ( ! $Server ) {
Error('Invalid Multi-Server configration detected. ZM_SERVER_NAME set to ' . ZM_SERVER_NAME . ' in zm.conf, but no corresponding entry found in Servers table.');
} else {
define( 'ZM_SERVER_ID', $Server['Server']['Id'] );
}
} else if ( defined('ZM_SERVER_HOST') and ZM_SERVER_HOST ) {
$Server = $ServerModel->find( 'first', array( 'conditions'=>array('Name'=>ZM_SERVER_HOST) ) );
if ( ! $Server ) {
Error('Invalid Multi-Server configration detected. ZM_SERVER_HOST set to ' . ZM_SERVER_HOST . ' in zm.conf, but no corresponding entry found in Servers table.');
} else {
define( 'ZM_SERVER_ID', $Server['Server']['Id'] );
}
}
}
}

View File

@ -36,12 +36,6 @@ class UsersController extends AppController {
* @return void
*/
public function view($id = null) {
$this->loadModel('Config');
$configs = $this->Config->find('list', array(
'fields' => array('Name', 'Value'),
'conditions' => array('Name' => array('ZM_DIR_EVENTS'))
));
$this->User->recursive = 1;
if (!$this->User->exists($id)) {
throw new NotFoundException(__('Invalid user'));
@ -86,16 +80,16 @@ class UsersController extends AppController {
throw new NotFoundException(__('Invalid user'));
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->User->save($this->request->data)) {
if ( $this->request->is('post') || $this->request->is('put') ) {
if ( $this->User->save($this->request->data) ) {
$message = 'Saved';
} else {
$message = 'Error';
}
} else {
$this->request->data = $this->User->read(null, $id);
unset($this->request->data['User']['password']);
}
$this->request->data = $this->User->read(null, $id);
unset($this->request->data['User']['password']);
}
$this->set(array(
'message' => $message,
@ -112,11 +106,11 @@ class UsersController extends AppController {
*/
public function delete($id = null) {
$this->User->id = $id;
if (!$this->User->exists()) {
if ( !$this->User->exists() ) {
throw new NotFoundException(__('Invalid user'));
}
$this->request->allowMethod('post', 'delete');
if ($this->User->delete()) {
if ( $this->User->delete() ) {
$message = 'The user has been deleted.';
} else {
$message = 'The user could not be deleted. Please, try again.';
@ -127,29 +121,18 @@ class UsersController extends AppController {
));
}
public function beforeFilter() {
parent::beforeFilter();
public function beforeFilter() {
parent::beforeFilter();
$this->loadModel('Config');
$configs = $this->Config->find('list', array(
'fields' => array('Name', 'Value'),
'conditions' => array('Name' => array('ZM_OPT_USE_AUTH'))
));
if ( $configs['ZM_OPT_USE_AUTH'] ) {
$this->Auth->allow('add','logout');
} else {
$this->Auth->allow();
}
if ( ZM_OPT_USE_AUTH ) {
$this->Auth->allow('add', 'logout');
} else {
$this->Auth->allow();
}
}
public function login() {
$this->loadModel('Config');
$configs = $this->Config->find('list', array(
'fields' => array('Name', 'Value'),
'conditions' => array('Name' => array('ZM_OPT_USE_AUTH'))
));
if ( ! $configs['ZM_OPT_USE_AUTH'] ) {
if ( !ZM_OPT_USE_AUTH ) {
$this->set(array(
'message' => 'Login is not required.',
'_serialize' => array('message')
@ -157,8 +140,8 @@ class UsersController extends AppController {
return;
}
if ($this->request->is('post')) {
if ($this->Auth->login()) {
if ( $this->request->is('post') ) {
if ( $this->Auth->login() ) {
return $this->redirect($this->Auth->redirectUrl());
}
$this->Session->setFlash(__('Invalid username or password, try again'));
@ -168,5 +151,4 @@ class UsersController extends AppController {
public function logout() {
return $this->redirect($this->Auth->logout());
}
}

View File

@ -40,6 +40,7 @@ class ZonesController extends AppController {
'_serialize' => array('zones')
));
}
public function index() {
$this->Zone->recursive = -1;
@ -63,23 +64,43 @@ class ZonesController extends AppController {
* @return void
*/
public function add() {
if ( $this->request->is('post') ) {
global $user;
$canEdit = (!$user) || $user['Monitors'] == 'Edit';
if ( !$canEdit ) {
throw new UnauthorizedException(__('Insufficient Privileges'));
return;
}
if ( !$this->request->is('post') ) {
throw new BadRequestException(__('Invalid method. Should be post'));
return;
}
$this->Zone->create();
if ( $this->Zone->save($this->request->data) ) {
return $this->flash(__('The zone has been saved.'), array('action' => 'index'));
global $user;
$canEdit = (!$user) || $user['Monitors'] == 'Edit';
if ( !$canEdit ) {
throw new UnauthorizedException(__('Insufficient Privileges'));
return;
}
$zone = null;
$this->Zone->create();
$zone = $this->Zone->save($this->request->data);
if ( $zone ) {
require_once __DIR__ .'/../../../includes/Monitor.php';
$monitor = new ZM\Monitor($zone['Zone']['MonitorId']);
$monitor->zmaControl('restart');
$message = 'Saved';
//$zone = $this->Zone->find('first', array('conditions' => array( array('Zone.' . $this->Zone->primaryKey => $this->Zone),
} else {
$message = 'Error: ';
// if there is a validation message, use it
if ( !$this->Zone->validates() ) {
$message = $this->Zone->validationErrors;
}
}
$monitors = $this->Zone->Monitor->find('list');
$this->set(compact('monitors'));
}
$this->set(array(
'message' => $message,
'zone' => $zone,
'_serialize' => array('message','zone')
));
} // end function add()
/**
* edit method

View File

@ -3,8 +3,6 @@ App::uses('AppModel', 'Model');
/**
* User Model
*
* @property Monitor $Monitor
* @property Frame $Frame
*/
class User extends AppModel {
@ -53,14 +51,6 @@ class User extends AppModel {
* @var array
*/
public $belongsTo = array(
/*'Monitor' => array(
'className' => 'Monitor',
'foreignKey' => 'MonitorId',
'conditions' => '',
'fields' => '',
'order' => ''
)
*/
);
/**
@ -69,21 +59,6 @@ class User extends AppModel {
* @var array
*/
public $hasMany = array(
/*
'Frame' => array(
'className' => 'Frame',
'foreignKey' => 'UserId',
'dependent' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
*/
);
}

View File

@ -30,6 +30,32 @@ class Zone extends AppModel {
public $recursive = -1;
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'MonitorId' => array(
'rule' => 'checkMonitorId',
//array('naturalNumber'),
'message' => 'Zones must have a valid MonitorId',
'allowEmpty' => false,
'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
'Name' => array(
'required' => array(
//'on' => 'create',
'rule' => 'notBlank',
'message' => 'Zone Name must be specified for creation',
'required' => true,
),
)
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
@ -41,9 +67,17 @@ class Zone extends AppModel {
'Monitor' => array(
'className' => 'Monitor',
'foreignKey' => 'MonitorId',
'conditions' => '',
'fields' => '',
'order' => ''
//'conditions' => '',
//'fields' => '',
//'order' => ''
)
);
public function checkMonitorId($data) {
if ( !$this->Monitor->find('first', array('conditions'=>array('Id'=>$data['MonitorId']))) ) {
//$this->invalidate('MonitorId', 'Invalid Monitor Id');
return false;
}
return true;
}
}

View File

@ -205,6 +205,11 @@ class Monitor extends ZM_Object {
if ( ZM_RAND_STREAM ) {
$args['rand'] = time();
}
foreach ( array('scale','height','width') as $int_arg ) {
if ( isset($args[$int_arg]) and (!is_int($args[$int_arg]) or !$args[$int_arg] ) ) {
unset($args[$int_arg]);
}
}
$streamSrc .= '?'.http_build_query($args, '', $querySep);
@ -297,12 +302,12 @@ class Monitor extends ZM_Object {
return;
}
}
Logger::Debug("sending command to $url");
Logger::Debug('sending command to '.$url);
$context = stream_context_create();
try {
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */
if ( $result === FALSE ) { /* Handle error */
Error("Error restarting zmc using $url");
}
} catch ( Exception $e ) {
@ -314,14 +319,15 @@ class Monitor extends ZM_Object {
} // end function zmcControl
function zmaControl($mode=false) {
if ( ! $this->{'Id'} ) {
if ( !$this->{'Id'} ) {
Warning('Attempt to control a monitor with no Id');
return;
}
if ( (!defined('ZM_SERVER_ID')) or ( property_exists($this, 'ServerId') and (ZM_SERVER_ID==$this->{'ServerId'}) ) ) {
if ( $this->{'Function'} == 'None' || $this->{'Function'} == 'Monitor' || $mode == 'stop' ) {
if ( ZM_OPT_CONTROL ) {
if ( ZM_OPT_CONTROL && $this->Controllable() && $this->TrackMotion() &&
( $this->{'Function'} == 'Modect' || $this->{'Function'} == 'Mocord' ) ) {
daemonControl('stop', 'zmtrack.pl', '-m '.$this->{'Id'});
}
daemonControl('stop', 'zma', '-m '.$this->{'Id'});
@ -344,7 +350,7 @@ class Monitor extends ZM_Object {
} else if ( $this->ServerId() ) {
$Server = $this->Server();
$url = ZM_BASE_PROTOCOL . '://'.$Server->Hostname().'/zm/api/monitors/daemonControl/'.$this->{'Id'}.'/'.$mode.'/zma.json';
$url = $Server->UrlToApi().'/monitors/daemonControl/'.$this->{'Id'}.'/'.$mode.'/zma.json';
if ( ZM_OPT_USE_AUTH ) {
if ( ZM_AUTH_RELAY == 'hashed' ) {
$url .= '?auth='.generateAuthHash(ZM_AUTH_HASH_IPS);
@ -358,10 +364,10 @@ class Monitor extends ZM_Object {
}
Logger::Debug("sending command to $url");
$context = stream_context_create();
$context = stream_context_create();
try {
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */
if ( $result === FALSE ) { /* Handle error */
Error("Error restarting zma using $url");
}
} catch ( Exception $e ) {
@ -497,12 +503,11 @@ class Monitor extends ZM_Object {
foreach ( explode(' ', $command) as $option ) {
if ( preg_match('/--([^=]+)(?:=(.+))?/', $option, $matches) ) {
$options[$matches[1]] = $matches[2]?$matches[2]:1;
} else if ( $option != '' and $option != 'quit' ) {
} else if ( $option != '' and $option != 'quit' and $option != 'start' and $option != 'stop' ) {
Warning("Ignored command for zmcontrol $option in $command");
}
}
if ( !count($options) ) {
if ( $command == 'quit' or $command == 'start' or $command == 'stop' ) {
# These are special as we now run zmcontrol as a daemon through zmdc.
$status = daemonStatus('zmcontrol.pl', array('--id', $this->{'Id'}));
@ -546,7 +551,7 @@ class Monitor extends ZM_Object {
} else if ( $this->ServerId() ) {
$Server = $this->Server();
$url = ZM_BASE_PROTOCOL . '://'.$Server->Hostname().'/zm/api/monitors/daemonControl/'.$this->{'Id'}.'/'.$command.'/zmcontrol.pl.json';
$url = $Server->UrlToApi().'/monitors/daemonControl/'.$this->{'Id'}.'/'.$command.'/zmcontrol.pl.json';
if ( ZM_OPT_USE_AUTH ) {
if ( ZM_AUTH_RELAY == 'hashed' ) {
$url .= '?auth='.generateAuthHash(ZM_AUTH_HASH_IPS);

View File

@ -83,8 +83,8 @@ $SLANG = array(
'Actual' => 'Attuale',
'AddNewControl' => 'Aggiungi nuovo Controllo',
'AddNewMonitor' => 'Aggiungi nuovo Monitor',
'AddNewServer' => 'Add New Server', // Added - 2018-08-30
'AddNewStorage' => 'Add New Storage', // Added - 2018-08-30
'AddNewServer' => 'Aggiungi nuovo Server', // Added - 2018-08-30
'AddNewStorage' => 'Aggiungi nuovo Storage', // Added - 2018-08-30
'AddNewUser' => 'Aggiungi nuovo Utente',
'AddNewZone' => 'Aggiungi nuova Zona',
'Alarm' => 'Allarme',
@ -103,7 +103,7 @@ $SLANG = array(
'Apply' => 'Applica',
'ApplyingStateChange' => 'Sto applicando le modifiche',
'ArchArchived' => 'Archiviato',
'ArchUnarchived' => 'Non archiviare',
'ArchUnarchived' => 'Non archiviato',
'Archive' => 'Archivio',
'Archived' => 'Archiviato',
'Area' => 'Area',
@ -142,14 +142,14 @@ $SLANG = array(
'AutoStopTimeout' => 'Auto Stop Timeout',
'Available' => 'Disponibile', // Added - 2009-03-31
'AvgBrScore' => 'Punteggio<br/>medio',
'Background' => 'Background',
'Background' => 'Sfondo',
'BackgroundFilter' => 'Esegui filtro in background',
'BadAlarmFrameCount' => 'Il numero di frame di un allarme deve essere un numero intero superiore a uno',
'BadAlarmMaxFPS' => 'Il numero massimo di FPS dell\'allarme deve essere un numero intero positivo o un valore in virgola mobile',
'BadAnalysisFPS' => 'Analysis FPS must be a positive integer or floating point value', // Added - 2015-07-22
'BadAnalysisUpdateDelay'=> 'Analysis update delay must be set to an integer of zero or more', // Added - 2015-07-23
'BadAlarmFrameCount' => 'Il numero di immagini per secondo (FPS) di un allarme deve essere un numero intero superiore a uno',
'BadAlarmMaxFPS' => 'Il numero massimo di immagini per secondo (FPS) dell\'allarme deve essere un numero intero positivo o un valore in virgola mobile',
'BadAnalysisFPS' => 'Il numero di immagini per secondo (FPS) di analisi deve essere un numero intero positivo o un valore in virgola mobile', // Added - 2015-07-22
'BadAnalysisUpdateDelay'=> 'Il ritardo di aggiornamento dell\'analisi deve essere impostato su un numero intero pari a zero o superiore', // Added - 2015-07-23
'BadChannel' => 'Il canale deve essere settato con un numero intero uguale o maggiore di zero',
'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15
'BadColours' => 'Il colore target deve essere impostato su un valore valido', // Added - 2011-06-15
'BadDevice' => 'Il dispositivo deve essere impostato con un valore valido',
'BadFPSReportInterval' => 'L\'intervallo di FPS per i report deve essere un numero intero superiore a 0',
'BadFormat' => 'Il formato deve essere impostato con un numero intero come 0 o maggiore',
@ -160,24 +160,24 @@ $SLANG = array(
'BadLabelX' => 'L\'etichetta della coordinata X deve essere un numero intero pari a 0 o maggiore',
'BadLabelY' => 'L\'etichetta della coordinata Y deve essere un numero intero pari a 0 o maggiore',
'BadMaxFPS' => 'I frame per secondo (FPS) massimi devono essere un numero intero positivo o un valore in virgola mobile',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Il conteggio dei salti di Motion Frame deve essere un numero intero pari a zero o superiore',
'BadNameChars' => 'I nomi possono contenere solo caratteri alfanumerici pi&ugrave; i caratteri - e _',
'BadPalette' => 'La palette dei colori deve essere impostata ad un valore valido', // Added - 2009-03-31
'BadPalette' => 'La tavolozza dei colori deve essere impostata ad un valore valido', // Added - 2009-03-31
'BadPath' => 'Il percorso deve essere impostato con un valore valido',
'BadPort' => 'La porta deve essere settata con un valore valido',
'BadPostEventCount' => 'Il buffer d\'immagine successivo ad un evento deve essere un numero maggiore o uguale a zero',
'BadPreEventCount' => 'Il buffer d\'immagine antecedente ad un evento deve essere minimo 0 e comunque minore della dimensione del buffer d\'immagine',
'BadRefBlendPerc' => 'La percentuale di miscela di riferimento deve essere un intero positivo',
'BadSectionLength' => 'La lunghezza della sezione deve essere un numero intero pari a 30 o maggiore',
'BadSignalCheckColour' => 'Signal check colour must be a valid RGB colour string',
'BadSourceType' => 'Source Type \"Web Site\" requires the Function to be set to \"Monitor\"', // Added - 2018-08-30
'BadStreamReplayBuffer'=> 'Stream replay buffer must be an integer of zero or more',
'BadSignalCheckColour' => 'Il colore di controllo del segnale deve essere una stringa di colore RGB valida',
'BadSourceType' => 'Il tipo di origine \"Sito Web\" richiede che la funzione sia impostata su \"Monitor\"', // Added - 2018-08-30
'BadStreamReplayBuffer'=> 'Il buffer di riproduzione dello stream deve essere un numero intero pari a zero o superiore',
'BadWarmupCount' => 'Il numero di frame di allarme deve essere un numero intero maggiore o uguale a zero',
'BadWebColour' => 'L\'identificativo del colore deve essere una stringa valida',
'BadWebSitePath' => 'Please enter a complete website url, including the http:// or https:// prefix.', // Added - 2018-08-30
'BadWebSitePath' => 'Inserisci un URL completo del sito Web, incluso il prefisso http: // o https: //.', // Added - 2018-08-30
'BadWidth' => 'La larghezza deve essere impostata con un valore valido',
'Bandwidth' => 'Banda',
'BandwidthHead' => 'Bandwidth', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing
'BandwidthHead' => 'Larghezza di banda', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing
'BlobPx' => 'Blob Px',
'BlobSizes' => 'Dimensioni Blob',
'Blobs' => 'Blobs',
@ -228,15 +228,15 @@ $SLANG = array(
'CancelForcedAlarm' => 'Annulla Allarme Forzato',
'CaptureHeight' => 'Altezza img catturata',
'CaptureMethod' => 'Metodo di cattura', // Added - 2009-02-08
'CapturePalette' => 'Paletta img Catturata',
'CaptureResolution' => 'Capture Resolution', // Added - 2015-04-18
'CapturePalette' => 'Paletta img catturata',
'CaptureResolution' => 'Risoluzione di cattura', // Added - 2015-04-18
'CaptureWidth' => 'Larghezza img Catturata',
'Cause' => 'Causa',
'CheckMethod' => 'Metodo di Controllo Allarme',
'ChooseDetectedCamera' => 'Scegli telecamera rilevata', // Added - 2009-03-31
'ChooseFilter' => 'Scegli Filtro',
'ChooseLogFormat' => 'Choose a log format', // Added - 2011-06-17
'ChooseLogSelection' => 'Choose a log selection', // Added - 2011-06-17
'ChooseLogFormat' => 'Scegli un formato di registro', // Added - 2011-06-17
'ChooseLogSelection' => 'Scegli una selezione del registro', // Added - 2011-06-17
'ChoosePreset' => 'Scegli Preset',
'Clear' => 'Clear', // Added - 2011-06-16
'CloneMonitor' => 'Clone', // Added - 2018-08-30
@ -301,12 +301,12 @@ $SLANG = array(
'DonateRemindNever' => 'No, io non voglio donare, non lo faro\' mai',
'DonateRemindWeek' => 'Non ancora, ricordamelo ancora tra 1 settimana',
'DonateYes' => 'Si,mi piacerebbe donare qualcosa ora',
'Download' => 'Download',
'DownloadVideo' => 'Download Video', // Added - 2018-08-30
'DuplicateMonitorName' => 'Il nome del monitor e\' gia\' presente', // Added - 2009-03-31
'Download' => 'Scarica',
'DownloadVideo' => 'Scarica video', // Added - 2018-08-30
'DuplicateMonitorName' => 'Il nome del monitor è già presente', // Added - 2009-03-31
'Duration' => 'Durata',
'Edit' => 'Modifica',
'EditLayout' => 'Edit Layout', // Added - 2018-08-30
'EditLayout' => 'Modifica Layout', // Added - 2018-08-30
'Email' => 'Email',
'EnableAlarms' => 'Abilita Allarmi',
'Enabled' => 'Attivo',
@ -323,7 +323,7 @@ $SLANG = array(
'Events' => 'Eventi',
'Exclude' => 'Escludi',
'Execute' => 'Esegui',
'Exif' => 'Embed EXIF data into image', // Added - 2018-08-30
'Exif' => 'Includi dati EXIF nell\'immagine', // Added - 2018-08-30
'Export' => 'Esporta',
'ExportDetails' => 'Esp. dettagli eventi',
'ExportFailed' => 'Esp. Fallita ',
@ -346,17 +346,17 @@ $SLANG = array(
'Feed' => 'Feed',
'Ffmpeg' => 'Ffmpeg', // Added - 2009-02-08
'File' => 'File',
'Filter' => 'Filter', // Added - 2015-04-18
'Filter' => 'Filtro', // Added - 2015-04-18
'FilterArchiveEvents' => 'Archivia gli eventi',
'FilterDeleteEvents' => 'Elimina gli eventi',
'FilterEmailEvents' => 'Invia dettagli via email',
'FilterExecuteEvents' => 'Esegui un comando',
'FilterLog' => 'Filter log', // Added - 2015-04-18
'FilterMessageEvents' => 'Invia dettagli tramite messaggio',
'FilterMoveEvents' => 'Move all matches', // Added - 2018-08-30
'FilterMoveEvents' => 'Sposta tutti gli eventi', // Added - 2018-08-30
'FilterPx' => 'Px Filtro',
'FilterUnset' => 'Devi specificare altezza e larghezza per il filtro',
'FilterUpdateDiskSpace'=> 'Update used disk space', // Added - 2018-08-30
'FilterUpdateDiskSpace'=> 'Aggiorna spazio disco utilizzato', // Added - 2018-08-30
'FilterUploadEvents' => 'Fai upload eventi (FTP)',
'FilterVideoEvents' => 'Crea video per tutte le corrispondenze',
'Filters' => 'Filtri',
@ -381,9 +381,9 @@ $SLANG = array(
'Function' => 'Funzione',
'Gain' => 'Gain',
'General' => 'Generale',
'GenerateDownload' => 'Generate Download', // Added - 2018-08-30
'GenerateVideo' => 'Genera Video',
'GeneratingVideo' => 'Sto generando il Video',
'GenerateDownload' => 'Genera download', // Added - 2018-08-30
'GenerateVideo' => 'Genera video',
'GeneratingVideo' => 'Sto generando il video',
'GoToZoneMinder' => 'Vai su zoneminder.com',
'Grey' => 'Grigio',
'Group' => 'Gruppo',
@ -402,7 +402,7 @@ $SLANG = array(
'High' => 'Alta',
'HighBW' => 'Banda&nbsp;Alta',
'Home' => 'Home',
'Hostname' => 'Hostname', // Added - 2018-08-30
'Hostname' => 'Nome Host', // Added - 2018-08-30
'Hour' => 'Ora',
'Hue' => 'Tinta',
'Id' => 'Id',
@ -420,14 +420,14 @@ $SLANG = array(
'Language' => 'Linguaggio',
'Last' => 'Ultimo',
'Layout' => 'Layout', // Added - 2009-02-08
'Level' => 'Level', // Added - 2011-06-16
'Level' => 'Livello', // Added - 2011-06-16
'Libvlc' => 'Libvlc',
'LimitResultsPost' => 'risultati;', // This is used at the end of the phrase 'Limit to first N results only'
'LimitResultsPre' => 'Limita ai primi', // This is used at the beginning of the phrase 'Limit to first N results only'
'Line' => 'Line', // Added - 2011-06-16
'LinkedMonitors' => 'Monitor Collegati',
'List' => 'Lista',
'ListMatches' => 'List Matches', // Added - 2018-08-30
'ListMatches' => 'Elenca le corrispondenze', // Added - 2018-08-30
'Load' => 'Carico Sistema',
'Local' => 'Locale',
'Log' => 'Log', // Added - 2011-06-16
@ -505,12 +505,12 @@ $SLANG = array(
'MinZoomSpeed' => 'Velocita\' minima dello zoom',
'MinZoomStep' => 'Step minimo dello zoom',
'Misc' => 'Altro',
'Mode' => 'Mode', // Added - 2015-04-18
'Mode' => 'Modalità', // Added - 2015-04-18
'Monitor' => 'Monitor',
'MonitorIds' => 'Monitor&nbsp;Ids',
'MonitorPreset' => 'Monitor Presenti',
'MonitorPresetIntro' => 'Selezionare un appropriato pre settaggio dalla lista riportata qui sotto.<br><br>Per favore notare che questo potrebbe sovrascrivere ogni valore che hai gi&agrave; configurato su questo monitor.<br><br>',
'MonitorProbe' => 'Monitor Probe', // Added - 2009-03-31
'MonitorProbe' => 'Prova Monitor', // Added - 2009-03-31
'MonitorProbeIntro' => 'The list below shows detected analog and network cameras and whether they are already being used or available for selection.<br/><br/>Select the desired entry from the list below.<br/><br/>Please note that not all cameras may be detected and that choosing a camera here may overwrite any values you already have configured for the current monitor.<br/><br/>', // Added - 2009-03-31
'Monitors' => 'Monitors',
'Montage' => 'Montaggio',
@ -523,7 +523,7 @@ $SLANG = array(
'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15.
'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15.
'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15.
'MtgDefault' => 'Default', // Added 2013.08.15.
'MtgDefault' => 'Predefinito', // Added 2013.08.15.
'MustBeGe' => 'deve essere superiore a',
'MustBeLe' => 'deve essere inferiore o pari a',
'MustConfirmPassword' => 'Devi confermare la password',
@ -541,10 +541,10 @@ $SLANG = array(
'Next' => 'Prossimo',
'No' => 'No',
'NoDetectedCameras' => 'Nessuna telecamera rilevata', // Added - 2009-03-31
'NoDetectedProfiles' => 'No Detected Profiles', // Added - 2018-08-30
'NoDetectedProfiles' => 'Nessun profilo rilevato', // Added - 2018-08-30
'NoFramesRecorded' => 'Non ci sono immagini salvate per questo evento',
'NoGroup' => 'Nessun gruppo', // Added - 2009-02-08
'NoSavedFilters' => 'NessunFiltroSalvato',
'NoSavedFilters' => 'Nessun filtro salvato',
'NoStatisticsRecorded' => 'Non ci sono statistiche salvate per questo evento/immagine',
'None' => 'Nessuno',
'NoneAvailable' => 'Nessuno disponibile',
@ -553,15 +553,15 @@ $SLANG = array(
'NumPresets' => 'Num Presets',
'Off' => 'Off',
'On' => 'On',
'OnvifCredentialsIntro'=> 'Please supply user name and password for the selected camera.<br/>If no user has been created for the camera then the user given here will be created with the given password.<br/><br/>', // Added - 2015-04-18
'OnvifCredentialsIntro'=> 'Fornire nome utente e password per la telecamera selezionata.<br/>Se non è stato creato alcun utente per la videocamera, l\'utente qui indicato verrà creato con la password specificata.<br/><br/>', // Added - 2015-04-18
'OnvifProbe' => 'ONVIF', // Added - 2015-04-18
'OnvifProbeIntro' => 'The list below shows detected ONVIF cameras and whether they are already being used or available for selection.<br/><br/>Select the desired entry from the list below.<br/><br/>Please note that not all cameras may be detected and that choosing a camera here may overwrite any values you already have configured for the current monitor.<br/><br/>', // Added - 2015-04-18
'OnvifProbeIntro' => 'L\'elenco seguente mostra le telecamere ONVIF rilevate e se sono già in uso o disponibili per la selezione. Selezionare la voce desiderata dall\'elenco seguente. Si noti che non tutte le telecamere potrebbero essere rilevate e che la scelta di una telecamera qui può sovrascrivere tutti i valori già configurati per il monitor corrente.', // Added - 2015-04-18
'OpEq' => 'uguale a',
'OpGt' => 'maggiore di',
'OpGtEq' => 'maggiore o uguale a',
'OpIn' => 'impostato',
'OpIs' => 'is', // Added - 2018-08-30
'OpIsNot' => 'is not', // Added - 2018-08-30
'OpIs' => 'è', // Added - 2018-08-30
'OpIsNot' => 'non è', // Added - 2018-08-30
'OpLt' => 'minore di',
'OpLtEq' => 'minore o uguale a',
'OpMatches' => 'corrisponde',
@ -571,7 +571,7 @@ $SLANG = array(
'Open' => 'Apri',
'OptionHelp' => 'Opzioni di Aiuto',
'OptionRestartWarning' => 'Queste modifiche potrebbero essere attive solo dopo un riavvio del sistema. Riavviare ZoneMinder.',
'OptionalEncoderParam' => 'Optional Encoder Parameters', // Added - 2018-08-30
'OptionalEncoderParam' => 'Parametri Encoder opzionali', // Added - 2018-08-30
'Options' => 'Opzioni',
'OrEnterNewName' => 'o inserisci un nuovo nome',
'Order' => 'Ordine',
@ -605,24 +605,24 @@ $SLANG = array(
'Presets' => 'Presets',
'Prev' => 'Prec',
'Probe' => 'Prova la telecamera', // Added - 2009-03-31
'ProfileProbe' => 'Stream Probe', // Added - 2015-04-18
'ProfileProbeIntro' => 'The list below shows the existing stream profiles of the selected camera .<br/><br/>Select the desired entry from the list below.<br/><br/>Please note that ZoneMinder cannot configure additional profiles and that choosing a camera here may overwrite any values you already have configured for the current monitor.<br/><br/>', // Added - 2015-04-18
'Progress' => 'Progress', // Added - 2015-04-18
'Protocol' => 'Protocol',
'ProfileProbe' => 'Prova lo stream', // Added - 2015-04-18
'ProfileProbeIntro' => 'L\'elenco seguente mostra i profili di streaming esistenti della telecamera selezionata.<br/><br/>Selezionare la voce desiderata dall\'elenco seguente.<br/><br/>Si noti che ZoneMinder non è in grado di configurare profili aggiuntivi e che la scelta di una telecamera qui può sovrascrivere qualsiasi valore già configurato per il monitor corrente.<br/><br/>', // Added - 2015-04-18
'Progress' => 'Progresso', // Added - 2015-04-18
'Protocol' => 'Protocollo',
'RTSPDescribe' => 'Use RTSP Response Media URL', // Added - 2018-08-30
'RTSPTransport' => 'RTSP Transport Protocol', // Added - 2018-08-30
'Rate' => 'Velocita\'',
'Rate' => 'Velocità',
'Real' => 'Reale',
'RecaptchaWarning' => 'Your reCaptcha secret key is invalid. Please correct it, or reCaptcha will not work', // Added - 2018-08-30
'RecaptchaWarning' => 'La chiave segreta reCaptcha non è valida. Correggila o reCaptcha non funzionerà', // Added - 2018-08-30
'Record' => 'Registra',
'RecordAudio' => 'Whether to store the audio stream when saving an event.', // Added - 2018-08-30
'RecordAudio' => 'Memorizza flusso audio quando salva un evento.', // Added - 2018-08-30
'RefImageBlendPct' => 'Riferimento Miscela Immagine percentuale',
'Refresh' => 'Aggiorna',
'Remote' => 'Remoto',
'RemoteHostName' => 'Nome dell\'Host Remoto',
'RemoteHostPath' => 'Percorso dell\'Host Remoto',
'RemoteHostPort' => 'Porta dell\'Host Remoto',
'RemoteHostSubPath' => 'Remote Host SubPath', // Added - 2009-02-08
'RemoteHostSubPath' => 'SubPath host remoto', // Added - 2009-02-08
'RemoteImageColours' => 'Colori delle immagini Remote',
'RemoteMethod' => 'Metodo Remoto', // Added - 2009-02-08
'RemoteProtocol' => 'Protocollo Remoto', // Added - 2009-02-08
@ -631,7 +631,7 @@ $SLANG = array(
'ReplayAll' => 'All Events',
'ReplayGapless' => 'Gapless Events',
'ReplaySingle' => 'Single Event',
'ReportEventAudit' => 'Audit Events Report', // Added - 2018-08-30
'ReportEventAudit' => 'Rapporto Eventi di controllo', // Added - 2018-08-30
'Reset' => 'Resetta',
'ResetEventCounts' => 'Resetta Contatore Eventi',
'Restart' => 'Riavvia',
@ -643,21 +643,21 @@ $SLANG = array(
'Rewind' => 'Riavvolgi',
'RotateLeft' => 'Ruota a Sinista',
'RotateRight' => 'Ruota a Destra',
'RunLocalUpdate' => 'Please run zmupdate.pl to update', // Added - 2011-05-25
'RunLocalUpdate' => 'Eseguire zmupdate.pl per l\'aggiornamento', // Added - 2011-05-25
'RunMode' => 'Modalita\' funzionamento',
'RunState' => 'Stato di funzionamento',
'Running' => 'Attivo',
'Save' => 'Salva',
'SaveAs' => 'Salva come',
'SaveFilter' => 'salva Filtro',
'SaveJPEGs' => 'Save JPEGs', // Added - 2018-08-30
'SaveFilter' => 'Salva Filtro',
'SaveJPEGs' => 'Salva JPEGs', // Added - 2018-08-30
'Scale' => 'Scala',
'Score' => 'Punteggio',
'Secs' => 'Secs',
'Sectionlength' => 'Lunghezza Sezione',
'Select' => 'Seleziona',
'SelectFormat' => 'Select Format', // Added - 2011-06-17
'SelectLog' => 'Select Log', // Added - 2011-06-17
'SelectFormat' => 'Seleziona Formato', // Added - 2011-06-17
'SelectLog' => 'Seleziona Log', // Added - 2011-06-17
'SelectMonitors' => 'Monitor Selezionati',
'SelfIntersecting' => 'I vertici del poligono non devono intersecarsi',
'Set' => 'Imposta',
@ -666,10 +666,10 @@ $SLANG = array(
'Settings' => 'Impostazioni',
'ShowFilterWindow' => 'MostraFinestraFiltri',
'ShowTimeline' => 'Mostra linea temporale',
'SignalCheckColour' => 'Signal Check Colour',
'SignalCheckPoints' => 'Signal Check Points', // Added - 2018-08-30
'SignalCheckColour' => 'Colore controllo segnale',
'SignalCheckPoints' => 'Punti di controllo segnale', // Added - 2018-08-30
'Size' => 'grandezza',
'SkinDescription' => 'Change the default skin for this computer', // Added - 2011-01-30
'SkinDescription' => 'Cambia la skin predefinita per questo computer', // Added - 2011-01-30
'Sleep' => 'Sleep',
'SortAsc' => 'Cresc',
'SortBy' => 'Ordina per',
@ -692,8 +692,8 @@ $SLANG = array(
'StatusRunning' => 'Not Capturing', // Added - 2018-08-30
'StatusUnknown' => 'Unknown', // Added - 2018-08-30
'Step' => 'Passo',
'StepBack' => 'Step Back',
'StepForward' => 'Step Forward',
'StepBack' => 'Passo indietro',
'StepForward' => 'Passo avanti',
'StepLarge' => 'Lungo passo',
'StepMedium' => 'Medio passo',
'StepNone' => 'No passo',
@ -701,13 +701,13 @@ $SLANG = array(
'Stills' => 'Foto',
'Stop' => 'Stop',
'Stopped' => 'Inattivo',
'StorageArea' => 'Storage Area', // Added - 2018-08-30
'StorageArea' => 'Area di salvataggio', // Added - 2018-08-30
'StorageScheme' => 'Scheme', // Added - 2018-08-30
'Stream' => 'Flusso',
'StreamReplayBuffer' => 'Stream Replay Image Buffer',
'Submit' => 'Accetta',
'System' => 'Sistema',
'SystemLog' => 'System Log', // Added - 2011-06-16
'SystemLog' => 'Log di sistema', // Added - 2011-06-16
'TargetColorspace' => 'Target colorspace', // Added - 2015-04-18
'Tele' => 'Tele',
'Thumbnail' => 'Anteprima',
@ -716,18 +716,18 @@ $SLANG = array(
'TimeDelta' => 'Tempo di Delta',
'TimeStamp' => 'Time Stamp',
'Timeline' => 'Linea Temporale',
'TimelineTip1' => 'Pass your mouse over the graph to view a snapshot image and event details.', // Added 2013.08.15.
'TimelineTip2' => 'Click on the coloured sections of the graph, or the image, to view the event.', // Added 2013.08.15.
'TimelineTip3' => 'Click on the background to zoom in to a smaller time period based around your click.', // Added 2013.08.15.
'TimelineTip4' => 'Use the controls below to zoom out or navigate back and forward through the time range.', // Added 2013.08.15.
'TimelineTip1' => 'Passa il mouse sul grafico per visualizzare un\'immagine dell\'istantanea e i dettagli dell\'evento.', // Added 2013.08.15.
'TimelineTip2' => 'Fai clic sulle sezioni colorate del grafico o sull\'immagine per visualizzare l\'evento.', // Added 2013.08.15.
'TimelineTip3' => 'Fare clic sullo sfondo per ingrandire un periodo di tempo più piccolo basato sul clic.', // Added 2013.08.15.
'TimelineTip4' => 'Utilizzare i controlli seguenti per ridurre o spostarsi avanti e indietro nell\'intervallo di tempo.', // Added 2013.08.15.
'Timestamp' => 'Timestamp',
'TimestampLabelFormat' => 'Formato etichetta timestamp',
'TimestampLabelSize' => 'Font Size', // Added - 2018-08-30
'TimestampLabelSize' => 'Dimensione carattere', // Added - 2018-08-30
'TimestampLabelX' => 'coordinata X etichetta',
'TimestampLabelY' => 'coordinata Y etichetta',
'Today' => 'Oggi ',
'Tools' => 'Strumenti',
'Total' => 'Total', // Added - 2011-06-16
'Total' => 'Totale', // Added - 2011-06-16
'TotalBrScore' => 'Punteggio<br/>Totale',
'TrackDelay' => 'Track Delay',
'TrackMotion' => 'Track Motion',
@ -737,10 +737,10 @@ $SLANG = array(
'Type' => 'Tipo',
'Unarchive' => 'Togli dall\'archivio',
'Undefined' => 'Non specificato', // Added - 2009-02-08
'Units' => 'Unit&agrave;',
'Units' => 'Unità',
'Unknown' => 'Sconosciuto',
'Update' => 'Aggiorna',
'UpdateAvailable' => 'Un aggiornamento di ZoneMinder &egrave; disponibilie.',
'UpdateAvailable' => 'Un aggiornamento di ZoneMinder è disponibilie.',
'UpdateNotNecessary' => 'Nessun aggiornamento necessario.',
'Updated' => 'Updated', // Added - 2011-06-16
'Upload' => 'Upload', // Added - 2011-08-23
@ -769,8 +769,8 @@ $SLANG = array(
'VideoGenParms' => 'Parametri Generazione Video',
'VideoGenSucceeded' => 'Successo: Generato Video !',
'VideoSize' => 'Dimensioni Video',
'VideoWriter' => 'Video Writer', // Added - 2018-08-30
'View' => 'vedi',
'VideoWriter' => 'Scrittore video', // Added - 2018-08-30
'View' => 'Vedi',
'ViewAll' => 'Vedi Tutto',
'ViewEvent' => 'Vedi Evento',
'ViewPaged' => 'Vedi con paginazione',
@ -819,7 +819,7 @@ $CLANG = array(
'MonitorCount' => '%1$s %2$s', // For example '4 Monitors' (from Vlang below)
'MonitorFunction' => 'Funzione Monitor %1$s',
'RunningRecentVer' => 'Stai usando la versione pi&ugrave; aggiornata di ZoneMinder, v%s.',
'VersionMismatch' => 'Version mismatch, system is version %1$s, database is %2$s.', // Added - 2011-05-25
'VersionMismatch' => 'Versioni non corrispondenti: versione sistema %1$s, versione database %2$s.', // Added - 2011-05-25
);
// The next section allows you to describe a series of word ending and counts used to
@ -876,7 +876,7 @@ function zmVlang( $langVarArray, $count )
return( $value );
}
}
die( 'Errore, sono incapace di correlare le stringhe del file-linguaggio');
die( 'Errore, non sono in grado di correlare le stringhe del file-linguaggio');
}
// This is an version that could be used in the Russian example above

View File

@ -106,7 +106,7 @@ xhtmlHeaders(__FILE__, translate('Events') );
<?php
if ( $pagination ) {
?>
<h2 class="pagination"><?php echo $pagination ?></h2>
<h2 class="pagination hidden-xs"><?php echo $pagination ?></h2>
<?php
}
?>
@ -138,6 +138,7 @@ if ( $pages > 1 ) {
<input type="hidden" name="sort_field" value="<?php echo validHtmlStr($_REQUEST['sort_field']) ?>"/>
<input type="hidden" name="sort_asc" value="<?php echo validHtmlStr($_REQUEST['sort_asc']) ?>"/>
<input type="hidden" name="limit" value="<?php echo $limit ?>"/>
<div class="table-responsive">
<table id="contentTable" class="major">
<tbody>
<?php
@ -299,6 +300,7 @@ while ( $event_row = dbFetchNext($results) ) {
}
?>
</table>
</div>
<?php
if ( $pagination ) {
?>