zoneminder/web/skins/classic/views/server.php

109 lines
4.7 KiB
PHP
Raw Permalink Normal View History

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
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2015-08-16 22:52:47 +08:00
//
if ( !canEdit('System') ) {
2017-10-16 23:31:35 +08:00
$view = 'error';
return;
2015-08-16 22:52:47 +08:00
}
2018-11-28 22:55:34 +08:00
$Server = new Server($_REQUEST['id']);
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">
<form name="contentForm" method="post" action="?" onsubmit="return validateForm(this)">
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>
<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>
<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>
</tr>
2015-09-18 03:35:27 +08:00
<tr>
<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>
<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>
</tr>
2018-07-10 00:10:29 +08:00
<tr>
<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>
</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>
<tr>
<th scope="row"><?php echo translate('PathToApi') ?></th>
<td><input type="text" name="newServer[PathToApi]" value="<?php echo $Server->PathToApi() ?>"/></td>
</tr>
<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
</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
</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
</td>
</tr>
2015-08-16 22:52:47 +08:00
</tbody>
</table>
<div id="contentButtons">
2017-10-16 23:31:35 +08:00
<input type="hidden" name="action" value="Save"/>
<input type="submit" value="<?php echo translate('Save') ?>"/>
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
2015-08-16 22:52:47 +08:00
</div>
</form>
</div>
</div>
</body>
</html>