1<?php 2 3/** 4 * Script to export Data 5 *************************************************/ 6 7# verify that user is logged in 8$User->check_user_session(); 9?> 10 11<script type="text/javascript"> 12 13$(document).on('change', "select#dataType", function() { 14 if (this.value == "subnets") { 15 $('#dataRecompute').show(); 16 } else { 17 $('#dataRecompute').hide(); 18 } 19}); 20 21</script> 22 23<h4><?php print _('Import / Export'); ?></h4> 24<hr><br> 25 26<form name="dataImportExport" id="dataImportExport"> 27<table id="dataImportExport" class="table table-hover table-condensed table-top table-auto"> 28 <tr> 29 <th colspan="3"><h4><?php print _('Pick a data set type, and click on an action'); ?></h4></th> 30 </tr> 31 <tr> 32 <td class="title"><?php print _('Data set'); ?></td> 33 <td> 34 <select name="dataType" id="dataType" class="form-control input-sm input-w-auto" rel='tooltip' data-placement='right' title='<?php print _('Pick data set'); ?>'> 35 <option value='vrf'><?php print _('VRF'); ?></option> 36 <option value='vlan'><?php print _('VLAN'); ?></option> 37 <option value='l2dom'><?php print _('L2 Domains'); ?></option> 38 <option value='subnets'><?php print _('Subnets'); ?></option> 39 <option value='ipaddr'><?php print _('IP addresses'); ?></option> 40 <option value='devices' ><?php print _('Devices'); ?></option> 41 <option value='devtype' ><?php print _('Device types'); ?></option> 42 </select> 43 </td> 44 <td class="info2"><?php print _('Not all options are available currently.'); ?></td> 45 </tr> 46 <tr> 47 <td>Action</td> 48 <td colspan="2"> 49 <div class="btn-group"> 50 <button class='dataImport btn btn-sm btn-default' rel='tooltip' data-placement='bottom' title='<?php print _('Import data entries for the selected type'); ?>'><i class='fa fa-download'></i> <?php print _('Import'); ?></button> 51 <button class='dataExport btn btn-sm btn-default' rel='tooltip' data-placement='bottom' title='<?php print _('Export data entries for the selected type'); ?>'><i class='fa fa-upload'></i> <?php print _('Export'); ?></button> 52 </div> 53 <button class="dataRecompute btn btn-sm btn-default" id="dataRecompute" style="display: none;" rel='tooltip' data-placement='bottom' title='<?php print _('Recompute master/nested subnet relations.'); ?>'><i class="fa fa-magic"></i> <?php print _('Recompute'); ?></button> 54 </td> 55 </tr> 56</table> 57</form> 58 59 60 61<h4 style="margin-top:100px;"><?php print _('phpIPAM database export'); ?></h4> 62<hr><br> 63 64<div class="alert alert-info alert-absolute"><?php print _('You can download MySQL dump of database or generate XLS file of IP addresses'); ?>!</div> 65 66<!-- MySQL dump --> 67<hr style="margin-top:50px;"> 68<h4><?php print _('Create MySQL database dump'); ?></h4> 69<button class="btn btn-sm btn-default" id="MySQLdump"><i class="fa fa-upload"></i> <?php print _('Prepare MySQL dump'); ?></button> 70 71<!-- XLS dump --> 72<h4><?php print _('Create XLS file of IP addresses'); ?></h4> 73<button class="btn btn-sm btn-default" id="XLSdump"><i class="fa fa-upload"></i> <?php print _('Prepare XLS dump'); ?></button> 74 75<!-- XLS dump --> 76<h4><?php print _('Create hostfile dump'); ?></h4> 77<button class="btn btn-sm btn-default" id="hostfileDump"><i class="fa fa-upload"></i> <?php print _('Prepare hostfile dump'); ?></button>