mirror of
https://github.com/itflow-org/itflow
synced 2026-03-05 21:34:51 +00:00
More column show/hide work based of of asset type selected
This commit is contained in:
@@ -69,7 +69,7 @@ if(isset($_GET['o'])){
|
|||||||
if(isset($_GET['type']) && ($_GET['type']) == 'workstations'){
|
if(isset($_GET['type']) && ($_GET['type']) == 'workstations'){
|
||||||
$type_query = "asset_type = 'desktop' OR asset_type = 'laptop'";
|
$type_query = "asset_type = 'desktop' OR asset_type = 'laptop'";
|
||||||
}elseif(isset($_GET['type']) && ($_GET['type']) == 'servers'){
|
}elseif(isset($_GET['type']) && ($_GET['type']) == 'servers'){
|
||||||
$type_query = "asset_type = 'servers'";
|
$type_query = "asset_type = 'server'";
|
||||||
}elseif(isset($_GET['type']) && ($_GET['type']) == 'virtual'){
|
}elseif(isset($_GET['type']) && ($_GET['type']) == 'virtual'){
|
||||||
$type_query = "asset_type = 'Virtual Machine'";
|
$type_query = "asset_type = 'Virtual Machine'";
|
||||||
}elseif(isset($_GET['type']) && ($_GET['type']) == 'network'){
|
}elseif(isset($_GET['type']) && ($_GET['type']) == 'network'){
|
||||||
@@ -161,9 +161,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
<thead class="thead-light <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
<thead class="thead-light <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_name&o=<?php echo $disp; ?>">Name</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_name&o=<?php echo $disp; ?>">Name</a></th>
|
||||||
|
<?php if($_GET['type'] !== 'virtual' AND $_GET['type'] !== 'server'){ ?>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_type&o=<?php echo $disp; ?>">Type</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_type&o=<?php echo $disp; ?>">Type</a></th>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($_GET['type'] !== 'virtual'){ ?>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_make&o=<?php echo $disp; ?>">Make/Model</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_make&o=<?php echo $disp; ?>">Make/Model</a></th>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($_GET['type'] !== 'virtual'){ ?>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_serial&o=<?php echo $disp; ?>">Serial Number</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_serial&o=<?php echo $disp; ?>">Serial Number</a></th>
|
||||||
|
<?php } ?>
|
||||||
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other'){ ?>
|
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other'){ ?>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_os&o=<?php echo $disp; ?>">Operating System</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_os&o=<?php echo $disp; ?>">Operating System</a></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -306,9 +312,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</th>
|
</th>
|
||||||
|
<?php if($_GET['type'] !== 'virtual' AND $_GET['type'] !== 'server'){ ?>
|
||||||
<td><?php echo $asset_type; ?></td>
|
<td><?php echo $asset_type; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($_GET['type'] !== 'virtual'){ ?>
|
||||||
<td><?php echo "$asset_make $asset_model"; ?></td>
|
<td><?php echo "$asset_make $asset_model"; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($_GET['type'] !== 'virtual'){ ?>
|
||||||
<td><?php echo $asset_serial_display; ?></td>
|
<td><?php echo $asset_serial_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other'){ ?>
|
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other'){ ?>
|
||||||
<td><?php echo $asset_os_display; ?></td>
|
<td><?php echo $asset_os_display; ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user