2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web run state view file, $Date$, $Revision$
|
2008-07-25 17:48:16 +08:00
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
// 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.
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
|
2019-01-31 03:36:46 +08:00
|
|
|
if ( !canEdit('System') ) {
|
2017-07-12 22:58:20 +08:00
|
|
|
$view = 'error';
|
2016-05-07 00:06:13 +08:00
|
|
|
return;
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
?>
|
2016-05-07 00:06:13 +08:00
|
|
|
<div id="modalState" class="modal fade">
|
2019-12-19 08:05:06 +08:00
|
|
|
<form class="form-horizontal" name="contentForm" method="get" action="?view=state">
|
2019-12-21 05:11:24 +08:00
|
|
|
<input type="hidden" name="view" value="state"/>
|
|
|
|
<input type="hidden" name="action" value="state"/>
|
|
|
|
<input type="hidden" name="apply" value="1"/>
|
|
|
|
|
2016-04-24 12:47:07 +08:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2016-05-07 00:06:13 +08:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
2016-04-24 12:47:07 +08:00
|
|
|
<h2 class="modal-title"><?php echo translate('RunState') ?></h2>
|
|
|
|
</div>
|
2016-05-07 00:06:13 +08:00
|
|
|
<div class="modal-body">
|
2016-04-24 12:47:07 +08:00
|
|
|
|
2016-05-07 00:06:13 +08:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="runState" class="col-sm-3 control-label">Change State</label>
|
|
|
|
<div class="col-sm-9">
|
|
|
|
<select id="runState" name="runState" class="form-control">
|
2017-07-13 00:49:01 +08:00
|
|
|
<?php
|
2017-07-13 23:04:51 +08:00
|
|
|
if ( $running ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2016-05-07 00:06:13 +08:00
|
|
|
<option value="stop" selected="selected"><?php echo translate('Stop') ?></option>
|
|
|
|
<option value="restart"><?php echo translate('Restart') ?></option>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2017-07-13 23:04:51 +08:00
|
|
|
} else {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2017-07-13 23:04:51 +08:00
|
|
|
<option value="start" selected="selected"><?php echo translate('Start') ?></option>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2017-07-13 23:04:51 +08:00
|
|
|
}
|
2019-01-31 03:36:46 +08:00
|
|
|
$states = dbFetchAll('SELECT * FROM States');
|
2017-07-13 23:04:51 +08:00
|
|
|
foreach ( $states as $state ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2019-05-13 22:30:41 +08:00
|
|
|
<option value="<?php echo validHtmlStr($state['Name']) ?>" <?php echo $state['IsActive'] ? 'selected="selected"' : '' ?>>
|
|
|
|
<?php echo validHtmlStr($state['Name']); ?>
|
|
|
|
</option>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2016-05-07 00:06:13 +08:00
|
|
|
</select>
|
|
|
|
</div><!--col-sm-9-->
|
|
|
|
</div><!--form-group-->
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="newState" class="col-sm-3 control-label"><?php echo translate('NewState') ?></label>
|
|
|
|
<div class="col-sm-9">
|
2016-04-24 12:47:07 +08:00
|
|
|
<input class="form-control" type="text" id="newState"/>
|
2016-05-07 00:06:13 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div> <!-- modal-body -->
|
2016-04-24 12:47:07 +08:00
|
|
|
<div class="modal-footer">
|
|
|
|
<button class="btn btn-primary" type="button" id="btnApply"><?php echo translate('Apply') ?></button>
|
|
|
|
<button class="btn btn-primary" type="button" id="btnSave" disabled><?php echo translate('Save') ?></button>
|
|
|
|
<button class="btn btn-danger" type="button" id="btnDelete" disabled><?php echo translate('Delete') ?></button>
|
2016-05-07 00:06:13 +08:00
|
|
|
<p class="pull-left hidden" id="pleasewait"><?php echo translate('PleaseWait') ?></p>
|
|
|
|
</div><!-- footer -->
|
|
|
|
</div> <!-- content -->
|
|
|
|
</div> <!-- dialog -->
|
|
|
|
</form>
|
2016-04-24 12:47:07 +08:00
|
|
|
</div> <!-- state -->
|