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
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
//
|
|
|
|
|
|
|
|
if ( !canEdit( 'System' ) )
|
|
|
|
{
|
2008-09-26 17:47:20 +08:00
|
|
|
$view = "error";
|
2008-07-14 21:54:50 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2016-04-24 12:47:07 +08:00
|
|
|
<div id="modalState" class="modal fade">
|
|
|
|
<form class="form-horizontal" name="contentForm" id="contentForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
<h2 class="modal-title"><?php echo translate('RunState') ?></h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
2014-12-05 07:44:23 +08:00
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
2016-04-24 12:47:07 +08:00
|
|
|
<input type="hidden" name="action" value="state"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<input type="hidden" name="apply" value="1"/>
|
2016-04-24 12:47:07 +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">
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
if ( $running )
|
|
|
|
{
|
|
|
|
?>
|
2015-05-10 21:10:30 +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
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
?>
|
2015-05-10 21:10:30 +08:00
|
|
|
<option value="start" selected="selected"><?php echo translate('Start') ?></option>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<?php
|
|
|
|
foreach ( $states as $state )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<option value="<?php echo $state['Name'] ?>"><?php echo $state['Name'] ?></option>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
2016-04-24 12:47:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="newState" class="col-sm-3 control-label"><?php echo translate('NewState') ?></label>
|
|
|
|
<div class="col-sm-9">
|
|
|
|
<input class="form-control" type="text" id="newState"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div> <!-- body -->
|
|
|
|
<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>
|
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
<input type="hidden" name="view" value="none"/>
|
|
|
|
<input type="hidden" name="action" value="state"/>
|
2014-12-05 07:44:23 +08:00
|
|
|
<input type="hidden" name="runState" value="<?php echo validHtmlStr($_REQUEST['runState']) ?>"/>
|
2016-04-24 12:47:07 +08:00
|
|
|
<p class="pull-left hidden" id="pleasewait"><?php echo translate('PleaseWait') ?></p>
|
|
|
|
</div><!-- footer -->
|
|
|
|
|
|
|
|
</div> <!-- content -->
|
|
|
|
</div> <!-- dialog -->
|
|
|
|
</form>
|
|
|
|
</div> <!-- state -->
|