commit
619464f43a
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
project (zoneminder)
|
||||
set(zoneminder_VERSION "1.28.99")
|
||||
set(zoneminder_VERSION "1.28.100")
|
||||
# make API version a minor of ZM version
|
||||
set(zoneminder_API_VERSION "${zoneminder_VERSION}.1")
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# For instructions on building with cmake, please see INSTALL
|
||||
#
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(zm,1.28.99,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AC_INIT(zm,1.28.100,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR(src/zm.h)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
|
|
@ -315,6 +315,7 @@ DROP TABLE IF EXISTS `Monitors`;
|
|||
CREATE TABLE `Monitors` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`ServerId` int(10) unsigned,
|
||||
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local',
|
||||
`Function` enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
--
|
||||
-- This updates a 1.28.99 database to 1.28.100
|
||||
--
|
||||
|
||||
--
|
||||
-- Add ServerId column to Monitors
|
||||
--
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'ServerId'
|
||||
) > 0,
|
||||
"SELECT 'Column ServerId exists in Monitors'",
|
||||
"ALTER TABLE Monitors ADD `ServerId` int(10) unsigned AFTER `Name`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit f1cf70ffff0657db29388eca94e6c5ea4944a164
|
||||
Subproject commit e22c1563a51d86aac0d5054beee28b4afb60c802
|
|
@ -637,7 +637,35 @@ if ( !empty($action) )
|
|||
// System edit actions
|
||||
if ( canEdit( 'System' ) )
|
||||
{
|
||||
if ( $action == "version" && isset($_REQUEST['option']) )
|
||||
if ( $_REQUEST['object'] == 'server' ) {
|
||||
|
||||
if ( $action == "save" ) {
|
||||
if ( !empty($_REQUEST['id']) )
|
||||
$dbServer = dbFetchOne( "SELECT * FROM Servers WHERE Id=?", NULL, array($_REQUEST['id']) );
|
||||
else
|
||||
$dbServer = array();
|
||||
|
||||
$types = array();
|
||||
$changes = getFormChanges( $dbServer, $_REQUEST['newServer'], $types );
|
||||
|
||||
if ( count( $changes ) ) {
|
||||
if ( !empty($_REQUEST['id']) ) {
|
||||
dbQuery( "UPDATE Servers SET ".implode( ", ", $changes )." WHERE Id = ?", array($_REQUEST['id']) );
|
||||
} else {
|
||||
dbQuery( "INSERT INTO Servers set ".implode( ", ", $changes ) );
|
||||
}
|
||||
$refreshParent = true;
|
||||
}
|
||||
$view = 'none';
|
||||
} else if ( $action == 'delete' ) {
|
||||
if ( !empty($_REQUEST['markIds']) ) {
|
||||
foreach( $_REQUEST['markIds'] as $Id )
|
||||
dbQuery( "DELETE FROM Servers WHERE Id=?", array($Id) );
|
||||
}
|
||||
$refreshParent = true;
|
||||
}
|
||||
|
||||
} else if ( $action == "version" && isset($_REQUEST['option']) )
|
||||
{
|
||||
$option = $_REQUEST['option'];
|
||||
switch( $option )
|
||||
|
|
|
@ -40,11 +40,18 @@ if ( isset($_REQUEST['tab']) )
|
|||
else
|
||||
$tab = "general";
|
||||
|
||||
if ( defined( ZM_SERVER_ID ) ) {
|
||||
$Server = dbFetchOne( 'SELECT * FROM Servers WHERE Id=?', NULL, array( ZM_SERVER_ID ) );
|
||||
} else {
|
||||
$Server = array();
|
||||
}
|
||||
|
||||
if ( ! empty($_REQUEST['mid']) ) {
|
||||
$monitor = dbFetchMonitor( $_REQUEST['mid'] );
|
||||
if ( ZM_OPT_X10 )
|
||||
$x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['mid']) );
|
||||
} else {
|
||||
|
||||
$nextId = getTableAutoInc( 'Monitors' );
|
||||
$monitor = array(
|
||||
'Id' => 0,
|
||||
|
@ -106,6 +113,7 @@ if ( ! empty($_REQUEST['mid']) ) {
|
|||
'Triggers' => "",
|
||||
'V4LMultiBuffer' => '',
|
||||
'V4LCapturesPerFrame' => 1,
|
||||
'ServerId' => $Server['Id'],
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -474,6 +482,7 @@ if ( $tab != 'general' )
|
|||
{
|
||||
?>
|
||||
<input type="hidden" name="newMonitor[Name]" value="<?php echo validHtmlStr($newMonitor['Name']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[ServerId]" value="<?php echo validHtmlStr($newMonitor['ServerId']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Type]" value="<?php echo validHtmlStr($newMonitor['Type']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Function]" value="<?php echo validHtmlStr($newMonitor['Function']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[Enabled]" value="<?php echo validHtmlStr($newMonitor['Enabled']) ?>"/>
|
||||
|
@ -612,6 +621,13 @@ switch ( $tab )
|
|||
{
|
||||
?>
|
||||
<tr><td><?php echo translate('Name') ?></td><td><input type="text" name="newMonitor[Name]" value="<?php echo validHtmlStr($newMonitor['Name']) ?>" size="16"/></td></tr>
|
||||
<tr><td><?php echo translate('Server') ?></td><td>
|
||||
<?php
|
||||
$servers = dbFetchAssoc( 'SELECT Id,Name FROM Servers ORDER BY Name', 'Id', 'Name' );
|
||||
array_unshift( $servers, 'None' );
|
||||
?>
|
||||
<?php echo buildSelect( "newMonitor[ServerId]", $servers ); ?>
|
||||
</td></tr>
|
||||
<tr><td><?php echo translate('SourceType') ?></td><td><?php echo buildSelect( "newMonitor[Type]", $sourceTypes ); ?></td></tr>
|
||||
<tr><td><?php echo translate('Function') ?></td><td><select name="newMonitor[Function]">
|
||||
<?php
|
||||
|
|
|
@ -30,6 +30,7 @@ $tabs = array();
|
|||
$tabs['skins'] = translate('Display');
|
||||
$tabs['system'] = translate('System');
|
||||
$tabs['config'] = translate('Config');
|
||||
$tabs['servers'] = translate('Servers');
|
||||
$tabs['paths'] = translate('Paths');
|
||||
$tabs['web'] = translate('Web');
|
||||
$tabs['images'] = translate('Images');
|
||||
|
@ -208,6 +209,34 @@ elseif ( $tab == "users" )
|
|||
</div>
|
||||
</form>
|
||||
<?php
|
||||
} else if ( $tab == "servers" ) { ?>
|
||||
<form name="serversForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
||||
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $tab ?>"/>
|
||||
<input type="hidden" name="action" value="delete"/>
|
||||
<input type="hidden" name="object" value="server"/>
|
||||
<table id="contentTable" class="major serversTable" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colName"><?php echo translate('name') ?></th>
|
||||
<th class="colMark"><?php echo translate('Mark') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach( dbFetchAll( 'SELECT * FROM Servers' ) as $row ) { ?>
|
||||
<tr>
|
||||
<td class="colName"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Name']).($user['Name']==$row['Name']?"*":""), $canEdit ) ?></td>
|
||||
<td class="colMark"><input type="checkbox" name="markIds[]" value="<?php echo $row['Id'] ?>" onclick="configureDeleteButton( this );"<?php if ( !$canEdit ) { ?> disabled="disabled"<?php } ?>/></td>
|
||||
</tr>
|
||||
<?php } #end foreach Server ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="contentButtons">
|
||||
<input type="button" value="<?php echo translate('AddNewServer') ?>" onclick="createPopup( '?view=server&id=0', 'zmServer', 'server' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/><input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
if ( $tab == "system" ) {
|
||||
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
||||
|
|
Loading…
Reference in New Issue