1<?php 2 3/** 4 * Preview Subnets master/nested recompute data 5 ************************************/ 6 7# include required scripts 8require_once( dirname(__FILE__) . '/../../../functions/functions.php' ); 9 10# initialize required objects 11$Database = new Database_PDO; 12$Result = new Result; 13$User = new User ($Database); 14$Admin = new Admin ($Database); 15 16# verify that user is logged in 17$User->check_user_session(); 18 19# Load subnets and recompute the master/nested relations 20include 'import-recompute-logic.php'; 21 22?> 23 24<!-- header --> 25<div class="pHeader"><?php print _("Subnets master/nested recompute data preview"); ?></div> 26 27<!-- content --> 28<div class="pContent"> 29<?php 30 31print '<h4>'._("Recomputed data").'</h4><hr>'; 32print _("The entries marked with ")."<i class='fa ".$icons['edit']."'></i>, "._("have new masters and will be updated, 33 the ones marked with ")."<i class='fa ".$icons['skip']."'></i>, "._("didn't change the master."); 34 35print "<form id='selectImportFields'>".$pass_inputs."</form>"; 36print "<table class='table table-condensed table-hover' id='previewtable'><tbody>"; 37print "<tr class='active'><th></th><th>Section</th><th>Subnet</th><th>Description</th><th>VRF</th><th>Master</th><th>Action</th></tr>"; 38print $rows; 39print "</tbody></table><br>"; 40# add some spaces so we make pContent div larger and not overlap with the absolute pFooter div 41print "<br><br><br>"; 42 43?> 44</div> 45 46<!-- footer --> 47<div class="pFooter"> 48 <div class="btn-group"> 49 <button class="btn btn-sm btn-default hidePopups"><?php print _('Cancel'); ?></button> 50 <button class="btn btn-sm btn-default" id="dataImportSubmit" data-type="recompute" disabled><i class="fa fa-magic"></i> <?php print _('Save'); ?></button> 51 </div> 52</div> 53 54<?php 55if ($counters['edit'] > 0) { 56?> 57 58 <script type="text/javascript"> 59 $(function(){ 60 $('#dataImportSubmit').removeAttr('disabled'); 61 $('#dataImportSubmit').removeClass('btn-default'); 62 $('#dataImportSubmit').addClass('btn-success'); 63 }); 64 </script> 65<?php 66} 67?>