2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web export 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
|
|
|
//
|
|
|
|
|
2018-05-18 22:07:58 +08:00
|
|
|
if ( !canView('Events') ) {
|
2017-10-01 02:19:32 +08:00
|
|
|
$view = 'error';
|
|
|
|
return;
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2017-10-01 02:19:32 +08:00
|
|
|
if ( isset($_SESSION['export']) ) {
|
2018-01-25 06:08:12 +08:00
|
|
|
if ( isset($_SESSION['export']['detail']) )
|
|
|
|
$_REQUEST['exportDetail'] = $_SESSION['export']['detail'];
|
|
|
|
if ( isset($_SESSION['export']['frames']) )
|
|
|
|
$_REQUEST['exportFrames'] = $_SESSION['export']['frames'];
|
|
|
|
if ( isset($_SESSION['export']['images']) )
|
|
|
|
$_REQUEST['exportImages'] = $_SESSION['export']['images'];
|
|
|
|
if ( isset($_SESSION['export']['video']) )
|
|
|
|
$_REQUEST['exportVideo'] = $_SESSION['export']['video'];
|
|
|
|
if ( isset($_SESSION['export']['misc']) )
|
|
|
|
$_REQUEST['exportMisc'] = $_SESSION['export']['misc'];
|
|
|
|
if ( isset($_SESSION['export']['format']) )
|
|
|
|
$_REQUEST['exportFormat'] = $_SESSION['export']['format'];
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2019-02-09 18:01:26 +08:00
|
|
|
if (isset($_REQUEST['exportFormat'])) {
|
|
|
|
if (!in_array($_REQUEST['exportFormat'], array('zip', 'tar'))) {
|
|
|
|
Error('Invalid exportFormat');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
$focusWindow = true;
|
|
|
|
|
2015-05-10 21:10:30 +08:00
|
|
|
xhtmlHeaders(__FILE__, translate('Export') );
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
|
|
|
<div id="headerButtons">
|
2019-01-16 22:59:58 +08:00
|
|
|
<a href="#" data-on-click="closeWindow"><?php echo translate('Close') ?></a>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
2015-05-10 21:10:30 +08:00
|
|
|
<h2><?php echo translate('ExportOptions') ?></h2>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
<div id="content">
|
2014-12-05 07:44:23 +08:00
|
|
|
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2018-05-18 22:07:58 +08:00
|
|
|
if ( !empty($_REQUEST['eid']) ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<input type="hidden" name="id" value="<?php echo validInt($_REQUEST['eid']) ?>"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2018-05-18 22:07:58 +08:00
|
|
|
} elseif ( !empty($_REQUEST['eids']) ) {
|
|
|
|
foreach ( $_REQUEST['eids'] as $eid ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<input type="hidden" name="eids[]" value="<?php echo validInt($eid) ?>"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
unset( $eid );
|
|
|
|
}
|
|
|
|
?>
|
2018-05-18 22:07:58 +08:00
|
|
|
<table id="contentTable" class="minor">
|
2008-07-14 21:54:50 +08:00
|
|
|
<tbody>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th scope="row"><?php echo translate('ExportDetails') ?></th>
|
2019-01-16 22:59:58 +08:00
|
|
|
<td><input type="checkbox" name="exportDetail" value="1"<?php if ( !empty($_REQUEST['exportDetail']) ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th scope="row"><?php echo translate('ExportFrames') ?></th>
|
2019-01-16 22:59:58 +08:00
|
|
|
<td><input type="checkbox" name="exportFrames" value="1"<?php if ( !empty($_REQUEST['exportFrames']) ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th scope="row"><?php echo translate('ExportImageFiles') ?></th>
|
2019-01-16 22:59:58 +08:00
|
|
|
<td><input type="checkbox" name="exportImages" value="1"<?php if ( !empty($_REQUEST['exportImages']) ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th scope="row"><?php echo translate('ExportVideoFiles') ?></th>
|
2019-01-16 22:59:58 +08:00
|
|
|
<td><input type="checkbox" name="exportVideo" value="1"<?php if ( !empty($_REQUEST['exportVideo']) ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th scope="row"><?php echo translate('ExportMiscFiles') ?></th>
|
2019-01-16 22:59:58 +08:00
|
|
|
<td><input type="checkbox" name="exportMisc" value="1"<?php if ( !empty($_REQUEST['exportMisc']) ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th scope="row"><?php echo translate('ExportFormat') ?></th>
|
2008-07-14 21:54:50 +08:00
|
|
|
<td>
|
2019-01-16 22:59:58 +08:00
|
|
|
<input type="radio" id="exportFormatTar" name="exportFormat" value="tar"<?php if ( isset($_REQUEST['exportFormat']) && $_REQUEST['exportFormat'] == "tar" ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/><label for="exportFormatTar"><?php echo translate('ExportFormatTar') ?></label>
|
|
|
|
<input type="radio" id="exportFormatZip" name="exportFormat" value="zip"<?php if ( isset($_REQUEST['exportFormat']) && $_REQUEST['exportFormat'] == "zip" ) { ?> checked="checked"<?php } ?> data-on-click-this="configureExportButton"/><label for="exportFormatZip"><?php echo translate('ExportFormatZip') ?></label>
|
2008-07-14 21:54:50 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2019-02-09 18:01:26 +08:00
|
|
|
<button type="button" id="exportButton" name="exportButton" value="Export" disabled="disabled"><?php echo translate('Export') ?></button>
|
2008-07-14 21:54:50 +08:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?php
|
2018-01-25 06:08:12 +08:00
|
|
|
if ( isset($_REQUEST['generated']) ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2015-05-10 21:10:30 +08:00
|
|
|
<h2 id="exportProgress" class="<?php echo $_REQUEST['generated']?'infoText':'errorText' ?>"><span id="exportProgressText"><?php echo $_REQUEST['generated']?translate('ExportSucceeded'):translate('ExportFailed') ?></span><span id="exportProgressTicker"></span></h2>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2018-01-25 06:08:12 +08:00
|
|
|
} else {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2015-05-10 21:10:30 +08:00
|
|
|
<h2 id="exportProgress" class="hidden warnText"><span id="exportProgressText"><?php echo translate('Exporting') ?></span><span id="exportProgressTicker"></span></h2>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
2018-01-25 06:08:12 +08:00
|
|
|
if ( !empty($_REQUEST['generated']) ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2019-02-09 18:01:26 +08:00
|
|
|
<h3 id="downloadLink"><a href="?view=archive&type=<?php echo $_REQUEST['exportFormat']; ?>"><?php echo translate('Download') ?></a></h3>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|