ManagePanel/pages/export.php

49 lines
2.4 KiB
PHP
Raw Permalink Normal View History

2017-10-10 22:09:14 -06:00
<?php
2017-12-16 13:54:00 -07:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2017-10-10 22:09:14 -06:00
require_once __DIR__ . '/../required.php';
redirectifnotloggedin();
?>
2018-01-29 00:00:51 -07:00
<div class="card border-brown">
<form action="lib/reports.php" method="GET" target="_BLANK">
<div class="card-body">
<div class="row">
<div class="col-12 col-sm-6">
<div class="form-group">
<label for="type"><?php $Strings->get("report type"); ?></label>
2018-01-29 00:00:51 -07:00
<select name="type" class="form-control" required>
<option value="users"><?php $Strings->get("users") ?></option>
<option value="groups"><?php $Strings->get("groups") ?></option>
<option value="managers"><?php $Strings->get("managers") ?></option>
<option value="permissions"><?php $Strings->get("permissions") ?></option>
<option value="security"><?php $Strings->get("security log") ?></option>
2018-01-29 00:00:51 -07:00
</select>
</div>
</div>
2017-10-10 22:09:14 -06:00
2018-01-29 00:00:51 -07:00
<div class="col-12 col-sm-6">
<div class="form-group">
<label for="type"><?php $Strings->get("format"); ?></label>
2018-01-29 00:00:51 -07:00
<select name="format" class="form-control" required>
<option value="csv"><?php $Strings->get("csv file") ?></option>
<option value="ods"><?php $Strings->get("ods file") ?></option>
<option value="html"><?php $Strings->get("html file") ?></option>
2018-01-29 00:00:51 -07:00
</select>
</div>
</div>
</div>
2017-10-10 22:09:14 -06:00
</div>
2018-01-29 00:00:51 -07:00
<?php
$code = uniqid(rand(10000000, 99999999), true);
$database2->insert('report_access_codes', ['code' => $code, 'expires' => date("Y-m-d H:i:s", strtotime("+5 minutes"))]);
?>
<input type="hidden" name="code" value="<?php echo $code; ?>" />
<div class="card-footer d-flex">
<button type="submit" class="btn btn-success ml-auto" id="genrptbtn"><i class="fas fa-download"></i> <?php $Strings->get("generate report"); ?></button>
2017-10-10 22:09:14 -06:00
</div>
2018-01-29 00:00:51 -07:00
</form>
</div>