2015-08-16 22:52:47 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web user view file, $Date$, $Revision$
|
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
2016-12-26 23:23:16 +08:00
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2015-08-16 22:52:47 +08:00
|
|
|
//
|
|
|
|
|
2018-08-31 06:30:33 +08:00
|
|
|
if ( !canEdit('System') ) {
|
2017-10-16 23:31:35 +08:00
|
|
|
$view = 'error';
|
|
|
|
return;
|
2015-08-16 22:52:47 +08:00
|
|
|
}
|
|
|
|
|
2019-02-22 22:19:07 +08:00
|
|
|
$Server = new ZM\Server($_REQUEST['id']);
|
2018-11-28 22:55:34 +08:00
|
|
|
if ( $_REQUEST['id'] and ! $Server->Id() ) {
|
|
|
|
$view = 'error';
|
|
|
|
return;
|
2015-08-16 22:52:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$focusWindow = true;
|
|
|
|
|
2018-11-28 22:55:34 +08:00
|
|
|
xhtmlHeaders(__FILE__, translate('Server').' - '.$Server->Name());
|
2015-08-16 22:52:47 +08:00
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
2018-11-28 22:55:34 +08:00
|
|
|
<h2><?php echo translate('Server').' - '.$Server->Name() ?></h2>
|
2015-08-16 22:52:47 +08:00
|
|
|
</div>
|
|
|
|
<div id="content">
|
2019-02-10 13:39:19 +08:00
|
|
|
<form name="contentForm" method="post" action="?" class="validateFormOnSubmit">
|
2015-08-16 22:52:47 +08:00
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
|
|
|
<input type="hidden" name="object" value="server"/>
|
|
|
|
<input type="hidden" name="id" value="<?php echo validHtmlStr($_REQUEST['id']) ?>"/>
|
2017-10-16 23:31:35 +08:00
|
|
|
<table id="contentTable" class="major">
|
2015-08-16 22:52:47 +08:00
|
|
|
<tbody>
|
|
|
|
<tr>
|
2016-01-08 23:15:21 +08:00
|
|
|
<th scope="row"><?php echo translate('Name') ?></th>
|
2018-11-28 22:55:34 +08:00
|
|
|
<td><input type="text" name="newServer[Name]" value="<?php echo $Server->Name() ?>"/></td>
|
2015-08-16 22:52:47 +08:00
|
|
|
</tr>
|
2018-11-22 23:04:33 +08:00
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('Protocol') ?></th>
|
2018-11-28 22:55:34 +08:00
|
|
|
<td><input type="text" name="newServer[Protocol]" value="<?php echo $Server->Protocol() ?>"/></td>
|
2018-11-22 23:04:33 +08:00
|
|
|
</tr>
|
2015-09-18 03:35:27 +08:00
|
|
|
<tr>
|
2016-01-08 23:15:21 +08:00
|
|
|
<th scope="row"><?php echo translate('Hostname') ?></th>
|
2018-11-28 22:55:34 +08:00
|
|
|
<td><input type="text" name="newServer[Hostname]" value="<?php echo $Server->Hostname() ?>"/></td>
|
2015-09-18 03:35:27 +08:00
|
|
|
</tr>
|
2018-11-22 23:04:33 +08:00
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('Port') ?></th>
|
2018-11-28 22:55:34 +08:00
|
|
|
<td><input type="number" name="newServer[Port]" value="<?php echo $Server->Port() ?>"/></td>
|
2018-11-22 23:04:33 +08:00
|
|
|
</tr>
|
2018-07-10 00:10:29 +08:00
|
|
|
<tr>
|
2018-11-28 06:35:25 +08:00
|
|
|
<th scope="row"><?php echo translate('PathToIndex') ?></th>
|
2018-11-28 22:55:34 +08:00
|
|
|
<td><input type="text" name="newServer[PathToIndex]" value="<?php echo $Server->PathToIndex() ?>"/></td>
|
2018-11-28 06:35:25 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('PathToZMS') ?></th>
|
2018-11-28 22:55:34 +08:00
|
|
|
<td><input type="text" name="newServer[PathToZMS]" value="<?php echo $Server->PathToZMS() ?>"/></td>
|
2018-07-10 00:10:29 +08:00
|
|
|
</tr>
|
2018-11-30 03:26:30 +08:00
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('PathToApi') ?></th>
|
|
|
|
<td><input type="text" name="newServer[PathToApi]" value="<?php echo $Server->PathToApi() ?>"/></td>
|
|
|
|
</tr>
|
2018-01-11 01:59:27 +08:00
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('RunStats') ?></th>
|
|
|
|
<td>
|
2018-11-28 22:55:34 +08:00
|
|
|
<input type="radio" name="newServer[zmstats]" value="1"<?php echo $Server->zmstats() ? ' checked="checked"' : '' ?>/> Yes
|
|
|
|
<input type="radio" name="newServer[zmstats]" value="0"<?php echo $Server->zmstats() ? '' : ' checked="checked"' ?>/> No
|
2018-01-11 01:59:27 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('RunAudit') ?></th>
|
|
|
|
<td>
|
2018-11-28 22:55:34 +08:00
|
|
|
<input type="radio" name="newServer[zmaudit]" value="1"<?php echo $Server->zmaudit() ? ' checked="checked"' : '' ?>/> Yes
|
|
|
|
<input type="radio" name="newServer[zmaudit]" value="0"<?php echo $Server->zmaudit() ? '' : ' checked="checked"' ?>/> No
|
2018-01-11 01:59:27 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo translate('RunTrigger') ?></th>
|
|
|
|
<td>
|
2018-11-28 22:55:34 +08:00
|
|
|
<input type="radio" name="newServer[zmtrigger]" value="1"<?php echo $Server->zmtrigger() ? ' checked="checked"' : '' ?>/> Yes
|
|
|
|
<input type="radio" name="newServer[zmtrigger]" value="0"<?php echo $Server->zmtrigger() ? '' : ' checked="checked"' ?>/> No
|
2018-01-11 01:59:27 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2015-08-16 22:52:47 +08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div id="contentButtons">
|
2019-02-22 22:19:07 +08:00
|
|
|
<button type="submit" name="action" value="Save" ><?php echo translate('Save') ?></button>
|
|
|
|
<button type="button" data-on-click="closeWindow"><?php echo translate('Cancel') ?></button>
|
2015-08-16 22:52:47 +08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|